finish few tasks of killing in the name of

This commit is contained in:
ErikasKontenis 2020-04-05 20:46:08 +03:00
parent 2894d82731
commit 51f4ed6a65
6 changed files with 89 additions and 12 deletions

View File

@ -1 +1 @@
next: 17615
next: 17621

View File

@ -401,10 +401,18 @@
</quest>
<quest name="Killing in the Name of..." startstorageid="17607" startstoragevalue="1">
<!-- Grizzly Adams: level 6 to 49 -->
<mission name="Paw and Fur: Crocodiles" storageid="17609" startvalue="0" endvalue="300" description="You already hunted |STATE|/300 crocodiles." />
<mission name="Paw and Fur: Carniphilas" storageid="17611" startvalue="0" endvalue="150" description="You already hunted |STATE|/150 carniphilas." />
<mission name="Paw and Fur: Apes" storageid="17612" startvalue="0" endvalue="300" description="You already hunted |STATE|/300 apes." />
<mission name="Paw and Fur: Thornback Tortoises" storageid="17613" startvalue="0" endvalue="300" description="You already hunted |STATE|/300 thornback tortoises." />
<mission name="Paw and Fur: Gargoyles" storageid="17614" startvalue="0" endvalue="200" description="You already hunted |STATE|/200 gargoyles." />
<mission name="Paw and Fur: Crocodiles" storageid="17609" startvalue="0" endvalue="100" description="You already hunted |STATE|/100 crocodiles." />
<mission name="Paw and Fur: Tarantulas" storageid="17610" startvalue="0" endvalue="100" description="You already hunted |STATE|/100 tarantulas." />
<mission name="Paw and Fur: Carniphilas" storageid="17611" startvalue="0" endvalue="50" description="You already hunted |STATE|/50 carniphilas." />
<mission name="Paw and Fur: Apes" storageid="17612" startvalue="0" endvalue="100" description="You already hunted |STATE|/100 apes." />
<mission name="Paw and Fur: Thornback Tortoises" storageid="17613" startvalue="0" endvalue="100" description="You already hunted |STATE|/100 thornback tortoises." />
<mission name="Paw and Fur: Gargoyles" storageid="17614" startvalue="0" endvalue="65" description="You already hunted |STATE|/65 gargoyles." />
<!--Grizzly Adams: level 50 to 79 -->
<mission name="Paw and Fur: Quara Scouts" storageid="17616" startvalue="0" endvalue="200" description="You already hunted |STATE|/200 quara scouts." />
<mission name="Paw and Fur: Ancient Scarabs" storageid="17617" startvalue="0" endvalue="125" description="You already hunted |STATE|/125 ancient scarabs." />
<mission name="Paw and Fur: Wyverns" storageid="17618" startvalue="0" endvalue="100" description="You already hunted |STATE|/100 wyverns." />
<mission name="Paw and Fur: Bonebeasts" storageid="17619" startvalue="0" endvalue="100" description="You already hunted |STATE|/100 bonebeasts." />
<mission name="Paw and Fur: Dragons" storageid="17620" startvalue="0" endvalue="200" description="You already hunted |STATE|/200 dragons." />
</quest>
</quests>

View File

@ -6,4 +6,7 @@
<event type="login" name="FirstItems" script="firstitems.lua"/>
<event type="login" name="RegenerateStamina" script="regeneratestamina.lua" />
<event type="death" name="PlayerDeath" script="playerdeath.lua"/>
<!-- Killing In The Name Of Quest -->
<event type="kill" name="KillingInTheNameOfKills" script="killing_in_the_name_of.lua" />
</creaturescripts>

View File

@ -0,0 +1,37 @@
local tasks = {
['crocodile'] = {progressStorage = 17608, killsRequired = 100},
['tarantula'] = {progressStorage = 17608, killsRequired = 100},
['carniphila'] = {progressStorage = 17608, killsRequired = 50},
['merlkin'] = {progressStorage = 17608, killsRequired = 100},
['kongra'] = {progressStorage = 17608, killsRequired = 100},
['sibang'] = {progressStorage = 17608, killsRequired = 100},
['thornback tortoise'] = {progressStorage = 17608, killsRequired = 100},
['gargoyle'] = {progressStorage = 17608, killsRequired = 65},
['quara constrictor scout'] = {progressStorage = 17608, killsRequired = 200},
['quara hydromancer scout'] = {progressStorage = 17608, killsRequired = 200},
['quara mantassin scout'] = {progressStorage = 17608, killsRequired = 200},
['quara pincher scout'] = {progressStorage = 17608, killsRequired = 200},
['quara predator scout'] = {progressStorage = 17608, killsRequired = 200},
['ancient scarab'] = {progressStorage = 17608, killsRequired = 125},
['wyvern'] = {progressStorage = 17608, killsRequired = 100},
['bonebeast'] = {progressStorage = 17608, killsRequired = 100},
['dragon'] = {progressStorage = 17608, killsRequired = 200},
}
function onKill(player, target)
if target:isPlayer() or target:getMaster() then
return true
end
local task = tasks[target:getName():lower()]
if task ~= nil then
local inProgressQuest = player:getStorageValue(task.progressStorage)
if inProgressQuest > 0 then
local playerQuestKills = player:getStorageValue(inProgressQuest)
if playerQuestKills < task.killsRequired then
player:setStorageValue(inProgressQuest, playerQuestKills + 1)
end
end
end
return true
end

View File

@ -58,6 +58,7 @@ function onLogin(player)
player:registerEvent("PlayerLogout")
player:registerEvent("FirstItems")
player:registerEvent("RegenerateStamina")
player:registerEvent("KillingInTheNameOfKills")
return true
end

View File

@ -26,16 +26,44 @@ VANISH,! -> "Happy hunting, old chap!"
"task",QuestValue(17607)=0 -> "Firstly, you have to join us in our society %N. Would you like to join the 'Paw and Fur - Hunting Elite'?"
"mission",QuestValue(17607)=0 -> *
# Level 6-49
"task",QuestValue(17608)=0,level>5,level<50 -> "Alright, what would you like to hunt? Crocodiles, tarantulas, carniphilas, apes, thornback tortoises or gargoyles.", Topic=1
Topic=1,"crocodile" -> Amount=17609, "They are a nuisance! You'll find them here in the jungle near the river. Hunt 300 crocodiles and you'll get a nice reward. Interested?", Topic=2
Topic=1,"carniphila" -> Amount=17611, "Damn walking weed-thingies! You'll find them deeper in the jungle. Weed out 150 carniphilas for our society. Alright?", Topic=2
Topic=1,"ape" -> Amount=17612, "You'll find the apes deeper in the jungle. Hunt 300 merlkins, kongras or sibangs to complete this task. Alright?", Topic=2
Topic=1,"tortoise" -> Amount=17613, "You'll find them on the Laguna Islands. Hunt 300 of them. Interested?", Topic=2
Topic=1,"gargoyle" -> Amount=17614, "They can be found all over Tibia. Hunt 200 of them. Interested?", Topic=2
Topic=1,"crocodile" -> Amount=17609, "They are a nuisance! You'll find them here in the jungle near the river. Hunt 100 crocodiles and you'll get a nice reward. Interested?", Topic=2
Topic=1,"tarantula" -> Amount=17610, "There is a veritable plague of tarantulas living in the caves north of the river to the east. Can you squish 100 tarantulas for the Hunting Elite. What do you say?", Topic=2
Topic=1,"carniphila" -> Amount=17611, "Damn walking weed-thingies! You'll find them deeper in the jungle. Weed out 50 carniphilas for our society. Alright?", Topic=2
Topic=1,"ape" -> Amount=17612, "You'll find the apes deeper in the jungle. Hunt 100 merlkins, kongras or sibangs to complete this task. Alright?", Topic=2
Topic=1,"tortoise" -> Amount=17613, "You'll find them on the Laguna Islands. Hunt 100 of them. Interested?", Topic=2
Topic=1,"gargoyle" -> Amount=17614, "They can be found all over Tibia. Hunt 65 of them. Interested?", Topic=2
Topic=1 -> "Maybe next time."
"task",QuestValue(17609)=100 -> Data=1, Amount=2000, Price=1000, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17610)=100 -> Data=2, Amount=3000, Price=1000, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17611)=50 -> Data=2, Amount=3000, Price=1500, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17612)=100 -> Data=1, Amount=3000, Price=1500, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17613)=100 -> Data=2, Amount=2500, Price=2500, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17614)=65 -> Data=3, Amount=5000, Price=2500, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
# Level 50-79
"task",QuestValue(17608)=0,level>49,level<80 -> "Alright, what would you like to hunt? Quara scouts, ancient scarabs, wyverns, bonebeasts, dragons.", Topic=5
Topic=5,"quara" -> Amount=17616, "The scouts can be found on Malada, one of the Shattered Isles. Your task is to kill 200 quara scouts. I accept quara constrictor scouts, quara hydromancer scouts, quara mantassin scouts, quara pincher scouts and quara predator scouts, are you in?", Topic=2
Topic=5,"scarab" -> Amount=17617, "They can be found in tombs beneath the desert around Ankrahmun. Hunt 125 of them. Interested?", Topic=2
Topic=5,"wyvern" -> Amount=17618, "They can be found all over Tibia. Hunt 100 wyverns. Interested?", Topic=2
Topic=5,"bonebeast" -> Amount=17619, "They can be found all over Tibia. Hunt 100 bonebeasts. Interested?", Topic=2
Topic=5,"dragon" -> Amount=17620, "They can be found all over Tibia. Hunt 200 dragons. Interested?", Topic=2
"task",QuestValue(17616)=200 -> Data=2, Amount=10000, Price=4000, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17617)=125 -> Data=2, Amount=11000, Price=5000, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17618)=100 -> Data=3, Amount=15000, Price=7000, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17619)=100 -> Data=3, Amount=9000, Price=9000, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
"task",QuestValue(17620)=200 -> Data=2, Amount=10000, Price=4000, "Spiffing work, old chap. What would you like to get for reward: %A EXP or %P gold?", Topic=4
# Speaks
"task",QuestValue(17608)>0 -> "Your current task is in progress. Follow the status of your task in the quest log. If you wish to cancel your in-progress task then don't be afraid and feel free to cancel."
Topic=4,"exp" -> "Very well! I grant you %A experience points.", SetQuestValue(QuestValue(17608),99999), SetQuestValue(17608,0), SetQuestValue(17615,Data), Experience(Amount)
Topic=4,"gold" -> "Alright! Here is your %P gold chap.", SetQuestValue(QuestValue(17608),99999), SetQuestValue(17608,0), SetQuestValue(17615,Data), CreateMoney
Topic=4 -> "When you know what you want let me know."
Topic=2,"yes" -> "Happy hunting, old chap! Speak to me again when you are done hunting.", SetQuestValue(17608,Amount), SetQuestValue(Amount,0)
Topic=2 -> "Maybe later."