Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RANK_NONE = 0
- RANK_HUNTSMAN = 1
- RANK_RANGER = 2
- RANK_BIGGAMEHUNTER = 3
- RANK_TROPHYHUNTER = 4
- RANK_ELITEHUNTER = 5
- REWARD_MONEY = 1
- REWARD_EXP = 2
- REWARD_ACHIEVEMENT = 3
- REWARD_STORAGE = 4
- REWARD_POINT = 5
- REWARD_ITEM = 6
- QUESTSTORAGE_BASE = 71500
- KILLSSTORAGE_BASE = 72500
- REPEATSTORAGE_BASE = 73500
- POINTSSTORAGE = 72500
- tasks =
- {
- [6] = {killsRequired = 1500, raceName = "Carniphilas", level = {1, 99999}, premium = true, creatures = {"carniphila"}, rewards = {
- {type = "exp", value = {2500}},
- {type = "achievement", value = {"Rootless Behaviour"}},
- {type = "storage", value = {35002, 1}},
- {type = "money", value = {45000}},
- {type = "item", value = {5015, 1}},
- {type = "points", value = {3}}
- }},
- --Taks for level 80 to 129.
- [25] = {killsRequired = 600, raceName = "Underwater Quara", level = {1, 99999}, premium = true, creatures = {"quara hydromancer", "quara predator", "quara constrictor", "quara mantassin", "quara pincher"}, rewards = {
- {type = "exp", value = {15000}},
- {type = "achievement", value = {"Back into the Abyss"}},
- {type = "storage", value = {35009, 1}},
- {type = "points", value = {3}}
- }},
- [26] = {killsRequired = 500, raceName = "Giant Spiders", level = {1, 99999}, premium = true, creatures = {"giant spider"}, rewards = {
- {type = "exp", value = {20000}},
- {type = "achievement", value = {"Choking on Her Venom"}},
- {type = "storage", value = {35010, 1}},
- {type = "points", value = {3}}
- }},
- [28] = {killsRequired = 1500, raceName = "Nightmares", level = {1, 99999}, premium = true, creatures = {"nightmare", "nightmare scion"}, rewards = {
- {type = "exp", value = {50000}},
- {type = "achievement", value = {"Dream is Over"}},
- {type = "storage", value = {35012, 1}},
- {type = "money", value = {100000}},
- {type = "points", value = {3}}
- }},
- [29] = {killsRequired = 2000, raceName = "Hellspawns", level = {1, 99999}, premium = true, creatures = {"hellspawn"}, rewards = {
- {type = "exp", value = {25000}},
- {type = "achievement", value = {"Scorched Flames"}},
- {type = "storage", value = {35013, 1}}
- }},
- [30] = {killsRequired = 8000, raceName = "High Class Lizards", level = {1, 99999}, premium = true, creatures = {"lizard chosen", "lizard dragon priest", "lizard high guard", "lizard legionnaire"}, rewards = {
- {type = "exp", value = {30000}},
- {type = "achievement", value = {"Zzztill Zzztanding!"}},
- {type = "storage", value = {35014, 1}},
- {type = "item", value = {6527, 7}},
- {type = "money", value = {1500000}},
- {type = "points", value = {3}}
- }},
- [31] = {killsRequired = 600, raceName = "Stampors", level = {1, 99999}, premium = true, creatures = {"stampor"}, rewards = {
- {type = "exp", value = {20000}},
- {type = "achievement", value = {"Stepped on a Big Toe"}},
- {type = "storage", value = {35015, 1}},
- {type = "points", value = {3}}
- }},
- [32] = {killsRequired = 500, raceName = "Brimstone Bugs", level = {1, 99999}, premium = true, creatures = {"brimstone bug"}, rewards = {
- {type = "exp", value = {15000}},
- {type = "achievement", value = {"Something Smells"}},
- {type = "storage", value = {35016, 1}},
- {type = "points", value = {3}}
- }},
- [33] = {killsRequired = 400, raceName = "Mutated Bats", level = {1, 99999}, premium = true, creatures = {"mutated bat"}, rewards = {
- {type = "exp", value = {20000}},
- {type = "achievement", value = {"Kapow!"}},
- {type = "storage", value = {35017, 1}},
- {type = "points", value = {2}}
- }},
- --Tasks for level 130+
- [34] = {killsRequired = 750, raceName = "Hydras", level = {1, 9999}, premium = true, creatures = {"hydra"}, rewards = {
- {type = "exp", value = {200000}},
- {type = "achievement", value = {"One Less"}},
- {type = "storage", value = {35018, 1}},
- {type = "item", value = {10523, 1}},
- {type = "money", value = {100000}},
- {type = "points", value = {3}}
- }},
- [35] = {killsRequired = 7000, raceName = "Serpent Spawns", level = {1, 9999}, premium = true, creatures = {"serpent spawn"}, rewards = {
- {type = "exp", value = {1700000}},
- {type = "achievement", value = {"Hissing Downfall"}},
- {type = "storage", value = {35019, 1}},
- {type = "money", value = {100000}},
- {type = "points", value = {4}}
- }},
- [36] = {killsRequired = 5000, raceName = "Medusae", level = {1, 9999}, premium = true, creatures = {"medusa"}, rewards = {
- {type = "exp", value = {1700000}},
- {type = "achievement", value = {"The Serpent's Bride"}},
- {type = "storage", value = {35020, 1}},
- {type = "item", value = {6527, 1}},
- {type = "money", value = {100000}},
- {type = "points", value = {5}}
- }},
- [37] = {killsRequired = 2000, raceName = "Behemoths", level = {1, 9999}, premium = true, creatures = {"behemoth"}, rewards = {
- {type = "exp", value = {500000}},
- {type = "achievement", value = {"Just Cracked Me Up!"}},
- {type = "storage", value = {35021, 1}},
- {type = "money", value = {100000}},
- {type = "points", value = {4}}
- }},
- [38] = {killsRequired = 2000, raceName = "Sea Serpents and Young Sea Serpents", level = {1, 9999}, premium = true, creatures = {"sea serpent", "young sea serpent"}, rewards = {
- {type = "exp", value = {50000}},
- {type = "achievement", value = {"The Drowned Sea God"}},
- {type = "storage", value = {35022, 1}},
- {type = "money", value = {100000}},
- {type = "points", value = {4}}
- }},
- [39] = {killsRequired = 1550, raceName = "Hellhounds", level = {1, 9999}, premium = true, creatures = {"hellhound"}, rewards = {
- {type = "exp", value = {3500000}},
- {type = "achievement", value = {"The Gates of Hell"}},
- {type = "storage", value = {35023, 1}},
- {type = "item", value = {6527, 7}},
- {type = "money", value = {300000}},
- {type = "points", value = {5}}
- }},
- [40] = {killsRequired = 3000, raceName = "Ghastly Dragons", level = {1, 9999}, premium = true, creatures = {"ghastly dragon"}, rewards = {
- {type = "exp", value = {3000000}},
- {type = "achievement", value = {"Beautiful Agony"}},
- {type = "storage", value = {35024, 1}},
- {type = "item", value = {6527, 7}},
- {type = "money", value = {300000}},
- {type = "points", value = {5}}
- }},
- [41] = {killsRequired = 2500, raceName = "Drakens", level = {1, 9999}, premium = true, creatures = {"draken spellweaver", "draken warmaster", "draken abomination", "draken elite"} , rewards = {
- {type = "exp", value = {3000000}},
- {type = "achievement", value = {"Enter zze Draken!"}},
- {type = "storage", value = {35025, 1}},
- {type = "item", value = {6527, 7}},
- {type = "money", value = {2500000}},
- {type = "points", value = {3}}
- }},
- [42] = {killsRequired = 2000, raceName = "Destroyers", level = {1, 9999}, premium = true, creatures = {"destroyer"}, rewards = {
- {type = "exp", value = {30000}},
- {type = "achievement", value = {"Best there was!"}},
- {type = "storage", value = {35026, 1}},
- {type = "item", value = {6527, 2}},
- {type = "money", value = {100000}},
- {type = "points", value = {4}}
- }},
- [43] = {killsRequired = 600, raceName = "Undead Dragons", level = {1, 9999}, premium = true, creatures = {"undead dragon"}, rewards = {
- {type = "exp", value = {3000000}},
- {type = "achievement", value = {"Back from the Dead"}},
- {type = "storage", value = {35027, 1}},
- {type = "item", value = {6527, 6}},
- {type = "money", value = {500000}},
- {type = "points", value = {6}}
- }},
- [51] = {killsRequired = 10000, raceName = "Grim Reaper", level = {1, 9999}, premium = true, creatures = {"grim reaper"}, rewards = {
- {type = "exp", value = {3500000}},
- {type = "achievement", value = {"Back from the Dead"}},
- {type = "storage", value = {35034, 1}},
- {type = "item", value = {6527, 10}},
- {type = "money", value = {2500000}},
- {type = "points", value = {6}}
- }},
- [52] = {killsRequired = 2000, raceName = "Dragons", level = {1, 9999}, premium = true, creatures = {"dragon", "dragon lord","frost dragon"}, rewards = {
- {type = "achievement", value = {"Beautiful Agony"}},
- {type = "storage", value = {35024, 1}},
- {type = "item", value = {5919, 1}},
- {type = "points", value = {5}}
- }},
- [53] = {killsRequired = 8000, raceName = "Dark Torturer", level = {1, 9999}, premium = true, creatures = {"dark torturer"}, rewards = {
- {type = "exp", value = {4000000}},
- {type = "achievement", value = {"Back from the Dead"}},
- {type = "storage", value = {35032, 1}},
- {type = "item", value = {6527, 10}},
- {type = "money", value = {2500000}},
- {type = "points", value = {6}}
- }},
- [53] = {killsRequired = 2000, raceName = "Juggernaut", level = {1, 9999}, premium = true, creatures = {"juggernaut"}, rewards = {
- {type = "exp", value = {5000000}},
- {type = "achievement", value = {"Back from the Dead"}},
- {type = "storage", value = {35030, 1}},
- {type = "item", value = {6527, 10}},
- {type = "points", value = {6}}
- }},
- --Special tasks.
- [44] = {killsRequired = 6666, raceName = "Demons", level = {1, 9999}, premium = true, creatures = {"demon"}, rewards = {
- {type = "exp", value = {6000000}},
- {type = "storage", value = {41300, 1}}, --Storage that let's you to start Demon Oak
- {type = "item", value = {6527, 15}},
- {type = "item", value = {9737, 1}}
- }},
- [45] = {killsRequired = 500, raceName = "Green Djinns or Efreets", level = {1, 9999}, storage = {12500, 1}, premium = true, creatures = {"green djinn", "efreet"}, rewards = { --Requires an storage (Gained on The Djinn War - Marid Faction)
- {type = "exp", value = {10000}},
- {type = "money", value = {5000}},
- {type = "storage", value = {35028, 1}}
- }},
- [46] = {killsRequired = 500, raceName = "Blue Djinns or Marids", level = {1, 9999}, storage = {12501, 1}, premium = true, creatures = {"blue djinn", "marid"}, rewards = { --Requires an storage (Gained on The Djinn War - Efreet Faction)
- {type = "exp", value = {10000}},
- {type = "money", value = {5000}},
- {type = "storage", value = {35029, 1}}
- }},
- -- [47] = {killsRequired = 3000, raceName = "Pirates", level = {1, 9999}, storage = {12600, 1}, premium = true, creatures = {"pirate ghost", "pirate marauder", "pirate cutthroad", "pirate buccaneer", "pirate corsair", "pirate skeleton"}, rewards = { --Requires an storage (Gained on The Shattered Isles Quest)
- -- {type = "exp", value = {10000}},
- -- {type = "money", value = {5000}},
- -- {type = "storage", value = {35030, 1}}
- -- }},
- [48] = {killsRequired = 3000, raceName = "Pirates second task", level = {1, 9999}, storage = {REPEATSTORAGE_BASE + 47, 3}, norepeatable = true, premium = true, creatures = {"pirate ghost", "pirate marauder", "pirate cutthroad", "pirate buccaneer", "pirate corsair", "pirate skeleton"}, rewards = { --Requires an storage (Gained completing Raymond Striker's first task three times.) NOTE: The required storage to start this task is: base + first pirate task id (47)
- {type = "exp", value = {10000}},
- {type = "money", value = {5000}},
- {type = "storage", value = {35031, 1}}
- }},
- --[49] = {killsRequired = 5000, raceName = "Minotaurs", level = {1, 40}, storage = {12700, 1}, norepeatable = true, premium = false, creatures = {"minotaur", "minotaur mage", "minotaur archer"}, rewards = { --Requires an storage (Gained on To Outfox a Fox Quest)
- -- {type = "storage", value = {35032, 1}}
- -- }},
- [50] = {killsRequired = 4000, raceName = "Necromancers and Priestess", level = {1, 9999}, norepeatable = true, premium = true, creatures = {"necromancer", "priestess"}, rewards = { --Requires an storage (Gained on To Outfox a Fox Quest)
- {type = "storage", value = {35033, 1}},
- {type = "item", value = {5809, 1}},
- {type = "exp", value = {20000}},
- {type = "money", value = {20000}},
- {type = "storage", value = {12800, 1}} --storage to stark the second Necromancers and Priestess task.
- }},
- [49] = {killsRequired = 1000, name = "Necromancers and Priestess second task", raceName = "Necromancers and Priestess", level = {60, 9999}, storage = {12800, 1}, norepeatable = true, premium = true, creatures = {"necromancer", "priestess"}, rewards = { --Requires an storage (Gained on To Outfox a Fox Quest)
- {type = "exp", value = {40000}},
- {type = "storage", value = {35033, 1}}
- }},
- }
- tasksByPlayer = 5
- repeatTimes = 100
- function getPlayerRank(cid)
- return (getPlayerStorageValue(cid, POINTSSTORAGE) >= 100 and RANK_ELITEHUNTER or getPlayerStorageValue(cid, POINTSSTORAGE) >= 70 and RANK_TROPHYHUNTER or getPlayerStorageValue(cid, POINTSSTORAGE) >= 40 and RANK_BIGGAMEHUNTER or getPlayerStorageValue(cid, POINTSSTORAGE) >= 20 and RANK_RANGER or getPlayerStorageValue(cid, POINTSSTORAGE) >= 10 and RANK_HUNTSMAN or RANK_NONE)
- end
- function getTaskByName(name, table)
- local t = (table and table or tasks)
- for k, v in pairs(t) do
- if v.name then
- if v.name:lower() == name:lower() then
- return k
- end
- else
- if v.raceName:lower() == name:lower() then
- return k
- end
- end
- end
- return false
- end
- function getTasksByPlayer(cid)
- local canmake = {}
- local able = {}
- for k, v in pairs(tasks) do
- if getCreatureStorage(cid, QUESTSTORAGE_BASE + k) < 1 and getCreatureStorage(cid, REPEATSTORAGE_BASE + k) < repeatTimes then
- able[k] = true
- if getPlayerLevel(cid) < v.level[1] or getPlayerLevel(cid) > v.level[2] then
- able[k] = false
- end
- if v.storage and getCreatureStorage(cid, v.storage[1]) < v.storage[2] then
- able[k] = false
- end
- if v.rank then
- if getPlayerRank(cid) < v.rank then
- able[k] = false
- end
- end
- if v.premium then
- if not isPremium(cid) then
- able[k] = false
- end
- end
- if able[k] then
- table.insert(canmake, k)
- end
- end
- end
- return canmake
- end
- function canStartTask(cid, name, table)
- local v = ""
- local id = 0
- local t = (table and table or tasks)
- for k, i in pairs(t) do
- if i.name then
- if i.name:lower() == name:lower() then
- v = i
- id = k
- break
- end
- else
- if i.raceName:lower() == name:lower() then
- v = i
- id = k
- break
- end
- end
- end
- if v == "" then
- return false
- end
- if getCreatureStorage(cid, QUESTSTORAGE_BASE + id) > 0 then
- return false
- end
- if (getCreatureStorage(cid, REPEATSTORAGE_BASE + id) >= repeatTimes) or (v.norepeatable and getCreatureStorage(cid, REPEATSTORAGE_BASE + id) > 0) then
- return false
- end
- if getPlayerLevel(cid) >= v.level[1] and getPlayerLevel(cid) <= v.level[2] then
- if v.premium then
- if isPremium(cid) then
- if v.rank then
- if getPlayerRank(cid) >= v.rank then
- if v.storage then
- if getCreatureStorage(cid, v.storage[1]) >= v.storage[2] then
- return true
- end
- else
- return true
- end
- end
- else
- return true
- end
- end
- else
- return true
- end
- end
- return false
- end
- function getPlayerStartedTasks(cid)
- local tmp = {}
- for k, v in pairs(tasks) do
- if getCreatureStorage(cid, QUESTSTORAGE_BASE + k) > 0 and getCreatureStorage(cid, QUESTSTORAGE_BASE + k) < 2 then
- table.insert(tmp, k)
- end
- end
- return tmp
- end
- function isSummon(cid)
- return getCreatureMaster(cid) ~= nil
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement