-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d923a7
commit 9b51fb6
Showing
6 changed files
with
395 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
----------------------------------- | ||
-- Advanced Teamwork | ||
----------------------------------- | ||
-- Log ID: 0, Quest ID: 65 | ||
----------------------------------- | ||
-- Vilatroire : !pos -260 -70 423 100 | ||
----------------------------------- | ||
|
||
local quest = Quest:new(xi.questLog.SANDORIA, xi.quest.id.sandoria.ADVANCED_TEAMWORK) | ||
|
||
quest.reward = | ||
{ | ||
item = xi.item.HORN_RING, | ||
fame = 80, | ||
title = xi.title.FIRST_RATE_ORGANIZER, | ||
} | ||
|
||
quest.sections = | ||
{ | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_AVAILABLE and | ||
player:getQuestStatus(xi.questLog.SANDORIA, xi.quest.id.sandoria.INTERMEDIATE_TEAMWORK) == xi.questStatus.QUEST_COMPLETED | ||
end, | ||
|
||
[xi.zone.WEST_RONFAURE] = | ||
{ | ||
['Vilatroire'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if | ||
player:getFameLevel(xi.fameArea.SANDORIA) >= 4 and | ||
player:getMainLvl() >= 10 | ||
then | ||
return quest:progressEvent(131) | ||
else | ||
return quest:event(130):replaceDefault() | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[131] = function(player, csid, option, npc) | ||
if option == 1 then | ||
quest:begin(player) | ||
end | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED | ||
end, | ||
|
||
[xi.zone.WEST_RONFAURE] = | ||
{ | ||
['Vilatroire'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
local party = player:getParty() | ||
|
||
if #party > 1 then | ||
return quest:progressEvent(129, { [1] = 3 }) | ||
end | ||
end, | ||
}, | ||
|
||
onEventUpdate = | ||
{ | ||
[129] = function(player, csid, option, npc) | ||
local partySizeRequirement = 2 | ||
local party = player:getParty() | ||
local partySameJobCount = 0 | ||
|
||
if #party >= partySizeRequirement then | ||
for key, member in pairs(party) do | ||
if | ||
member:getZoneID() ~= player:getZoneID() or | ||
member:checkDistance(player) > 15 | ||
then | ||
player:updateEvent(1) | ||
return | ||
else | ||
if player:getMainJob() == member:getMainJob() then | ||
partySameJobCount = partySameJobCount + 1 | ||
end | ||
end | ||
end | ||
else | ||
player:updateEvent(1) | ||
return | ||
end | ||
|
||
if partySameJobCount == partySizeRequirement then | ||
quest:setLocalVar(player, 'Prog', 1) | ||
player:updateEvent(15, 3) | ||
return | ||
else | ||
player:updateEvent(5, 3) | ||
return | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[129] = function(player, csid, option, npc) | ||
if option == 0 and quest:getLocalVar(player, 'Prog') == 1 then | ||
if quest:complete(player) then | ||
quest:setLocalVar(player, 'Prog', 0) | ||
end | ||
end | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_COMPLETED | ||
end, | ||
|
||
[xi.zone.WEST_RONFAURE] = | ||
{ | ||
['Vilatroire'] = quest:event(130), | ||
}, | ||
}, | ||
} | ||
|
||
return quest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
----------------------------------- | ||
-- Intermediate Teamwork | ||
----------------------------------- | ||
-- Log ID: 0, Quest ID: 64 | ||
----------------------------------- | ||
-- Vilatroire : !pos -260 -70 423 100 | ||
----------------------------------- | ||
|
||
local quest = Quest:new(xi.questLog.SANDORIA, xi.quest.id.sandoria.INTERMEDIATE_TEAMWORK) | ||
|
||
quest.reward = | ||
{ | ||
item = xi.item.SCROLL_OF_MAGES_BALLAD, | ||
fame = 80, | ||
title = xi.title.SECOND_RATE_ORGANIZER, | ||
} | ||
|
||
quest.sections = | ||
{ | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_AVAILABLE and | ||
player:getQuestStatus(xi.questLog.SANDORIA, xi.quest.id.sandoria.INTRODUCTION_TO_TEAMWORK) == xi.questStatus.QUEST_COMPLETED | ||
end, | ||
|
||
[xi.zone.WEST_RONFAURE] = | ||
{ | ||
['Vilatroire'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
if | ||
player:getFameLevel(xi.fameArea.SANDORIA) >= 3 and | ||
player:getMainLvl() >= 10 | ||
then | ||
return quest:progressEvent(133) | ||
else | ||
return quest:event(132):replaceDefault() | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[133] = function(player, csid, option, npc) | ||
if option == 1 then | ||
quest:begin(player) | ||
end | ||
end, | ||
}, | ||
}, | ||
}, | ||
{ | ||
check = function(player, status, vars) | ||
return status == xi.questStatus.QUEST_ACCEPTED | ||
end, | ||
|
||
[xi.zone.WEST_RONFAURE] = | ||
{ | ||
['Vilatroire'] = | ||
{ | ||
onTrigger = function(player, npc) | ||
local party = player:getParty() | ||
|
||
if #party > 1 then | ||
return quest:progressEvent(129, { [1] = 2 }) | ||
end | ||
end, | ||
}, | ||
|
||
onEventUpdate = | ||
{ | ||
[129] = function(player, csid, option, npc) | ||
local partySizeRequirement = 2 | ||
local party = player:getParty() | ||
local partySameRaceCount = 0 | ||
|
||
if #party >= partySizeRequirement then | ||
for key, member in pairs(party) do | ||
if | ||
member:getZoneID() ~= player:getZoneID() or | ||
member:checkDistance(player) > 15 | ||
then | ||
player:updateEvent(1) | ||
return | ||
else | ||
local pRace = player:getRace() | ||
local mRace = member:getRace() | ||
|
||
if | ||
(pRace == xi.race.HUME_M or pRace == xi.race.HUME_F) and | ||
(mRace == xi.race.HUME_M or mRace == xi.race.HUME_F) | ||
then | ||
partySameRaceCount = partySameRaceCount + 1 | ||
elseif | ||
(pRace == xi.race.ELVAAN_M or pRace == xi.race.ELVAAN_F) and | ||
(mRace == xi.race.ELVAAN_M or mRace == xi.race.ELVAAN_F) | ||
then | ||
partySameRaceCount = partySameRaceCount + 1 | ||
elseif | ||
(pRace == xi.race.TARU_M or pRace == xi.race.TARU_F) and | ||
(mRace == xi.race.TARU_M or mRace == xi.race.TARU_F) | ||
then | ||
partySameRaceCount = partySameRaceCount + 1 | ||
elseif pRace == xi.race.GALKA and mRace == xi.race.GALKA then | ||
partySameRaceCount = partySameRaceCount + 1 | ||
elseif pRace == xi.race.MITHRA and mRace == xi.race.MITHRA then | ||
partySameRaceCount = partySameRaceCount + 1 | ||
end | ||
end | ||
end | ||
else | ||
player:updateEvent(1) | ||
return | ||
end | ||
|
||
if partySameRaceCount >= partySizeRequirement then | ||
quest:setLocalVar(player, 'Prog', 1) | ||
player:updateEvent(15, 2) | ||
return | ||
else | ||
player:updateEvent(4, 2) | ||
return | ||
end | ||
end, | ||
}, | ||
|
||
onEventFinish = | ||
{ | ||
[129] = function(player, csid, option, npc) | ||
if option == 0 and quest:getLocalVar(player, 'Prog') == 1 then | ||
if quest:complete(player) then | ||
quest:setLocalVar(player, 'Prog', 0) | ||
end | ||
end | ||
end, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
return quest |
Oops, something went wrong.