Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- TASK
- 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 = 1500
- KILLSSTORAGE_BASE = 65000
- REPEATSTORAGE_BASE = 48950
- POINTSSTORAGE = 2500
- tasks =
- {
- [1] = {bossName = "mickey", killsRequired = 5, raceName = "rats", level = {1, 666}, premium = false, creatures = {"rat", "cave rat", "spider", "poison spider", "bug"}, rewards = {
- {type = "exp", value = {8000}},
- {type = "money", value = {5000}},
- {type = "points", value = {1}}
- --{type = "storage", value = {81500,1}}
- }},
- [2] = {killsRequired = 50, raceName = "Orcs", level = {1, 666}, premium = false, creatures = {"orc", "orc warrior", "orc spearman", "orc berserker", "orc leader"}, rewards = {
- {type = "exp", value = {10000}},
- {type = "money", value = {3500}},
- {type = "points", value = {1}}
- }},
- [3] = {bossName = "the snapper", killsRequired = 300, raceName = "Crocodiles", level = {1, 666}, premium = false, creatures = {"crocodile"}, rewards = {
- {type = "exp", value = {20000}},
- {type = "item", value = {2536,1}},
- {type = "points", value = {1}},
- {type = "storage", value = {81500,3}}
- }},
- [4] = {bossName = "hide", killsRequired = 300, raceName = "Tarantulas", level = {1, 666}, premium = false, creatures = {"tarantula"}, rewards = {
- {type = "exp", value = {30000}},
- {type = "points", value = {1}},
- {type = "storage", value = {81500,4}}
- }},
- [5] = {bossName = "tiquanda's revenge", killsRequired = 150, raceName = "Carniphilas", level = {1, 666}, premium = false, creatures = {"carniphila"}, rewards = {
- {type = "exp", value = {30000}},
- {type = "item", value = {2477,1}},
- {type = "points", value = {1}},
- {type = "storage", value = {81500,5}}
- }},
- [6] = {killsRequired = 200, raceName = "Stone Golems", level = {1, 666}, premium = false, creatures = {"stone golem"}, rewards = {
- {type = "exp", value = {30000}},
- {type = "points", value = {1}}
- }},
- [7] = {killsRequired = 300, raceName = "Gargoyles", level = {1, 666}, premium = false, creatures = {"gargoyle"}, rewards = {
- {type = "exp", value = {40000}},
- {type = "points", value = {2}}
- }},
- [8] = {killsRequired = 250, raceName = "Ancient Scarabs", level = {1, 666}, premium = false, creatures = {"ancient scarab"}, rewards = {
- {type = "exp", value = {60000}},
- {type = "money", value = {10000}},
- {type = "points", value = {2}}
- }},
- [9] = {killsRequired = 300, raceName = "Bonebeasts", level = {1, 666}, premium = false, creatures = {"bonebeast"}, rewards = {
- {type = "exp", value = {40000}},
- {type = "item", value = {2488,1}},
- {type = "points", value = {2}}
- }},
- [10] = {bossName = "the old widow", killsRequired = 500, raceName = "Giant Spiders", level = {1, 666}, premium = false, creatures = {"giant spider"}, rewards = {
- {type = "exp", value = {80000}},
- {type = "item", value = {2195,1}},
- {type = "points", value = {3}},
- {type = "storage", value = {81500,10}}
- }},
- [11] = {bossName = "the many", killsRequired = 650, raceName = "Hydras", level = {1, 666}, premium = false, creatures = {"hydra"}, rewards = {
- {type = "exp", value = {120000}},
- {type = "item", value = {2498,1}},
- {type = "points", value = {3}},
- {type = "storage", value = {81500,11}}
- }},
- [12] = {bossName = "the noxious spawn", killsRequired = 800, raceName = "Serpent Spawns", level = {1, 9999}, premium = false, creatures = {"serpent spawn"}, rewards = {
- {type = "exp", value = {120000}},
- {type = "points", value = {3}},
- {type = "storage", value = {81500,12}}
- }},
- [13] = {bossName = "stonecracker", killsRequired = 700, raceName = "Behemoths", level = {1, 9999}, premium = false, creatures = {"behemoth"}, rewards = {
- {type = "exp", value = {120000}},
- {type = "item", value = {2645,1}},
- {type = "points", value = {3}},
- {type = "storage", value = {81500,13}}
- }},
- [14] = {killsRequired = 1666, raceName = "Demons", level = {1, 9999}, rank = RANK_ELITEHUNTER, premium = false, creatures = {"demon"}, rewards = {
- {type = "item", value = {2390, 1}},
- {type = "points", value = {5}}
- }},
- [15] = {bossName = "The Horned Fox", killsRequired = 250, raceName = "Minotaurs", level = {1, 999}, premium = false, creatures = {"minotaur", "minotaur mage", "minotaur archer", "minotaur guard"}, rewards = {
- {type = "exp", value = {40000}},
- {type = "money", value = {7000}},
- {type = "points", value = {1}},
- {type = "storage", value = {81500,15}}
- }},
- [16] = {bossName = "Necropharus", killsRequired = 600, raceName = "Necromancers and Priestess", level = {1, 9999}, norepeatable = true, premium = false, creatures = {"necromancer", "priestess"}, rewards = {
- {type = "exp", value = {50000}},
- {type = "item", value = {2195, 1}},
- {type = "points", value = {3}},
- {type = "storage", value = {81500,16}}
- }},
- [17] = {bossName = "Demodras", killsRequired = 400, raceName = "Dragons", level = {1, 999}, premium = false, creatures = {"dragon", "dragon lord", "dragon hatchling", "dragon lord hatchling", "frost dragon", "frost dragon hatchling"}, rewards = {
- {type = "exp", value = {80000}},
- {type = "item", value = {2160,3}},
- {type = "points", value = {2}},
- {type = "storage", value = {81500,17}}
- }},
- [18] = {killsRequired = 400, raceName = "Larvas", level = {1, 999}, premium = false, creatures = {"larva"}, rewards = {
- {type = "exp", value = {20000}},
- {type = "points", value = {1}}
- }},
- [19] = {killsRequired = 200, raceName = "Wasps", level = {1, 999}, premium = false, creatures = {"Wasp"}, rewards = {
- {type = "exp", value = {10000}},
- {type = "points", value = {1}}
- }},
- [20] = {killsRequired = 300, raceName = "Heros", level = {1, 999}, premium = false, creatures = {"Hero"}, rewards = {
- {type = "exp", value = {75000}},
- {type = "points", value = {2}}
- }},
- [21] = {killsRequired = 500, raceName = "Rotworms", level = {1, 999}, premium = false, creatures = {"rotworm"}, rewards = {
- {type = "exp", value = {21000}},
- {type = "points", value = {1}}
- }},
- [22] = {killsRequired = 3000, raceName = "Tombs", level = {1, 999}, premium = false, creatures = {"Ghoul","Skeleton","Demon Skeleton","Ghost","Scarab","Larva","lion","poison spider","spider","Snake","cobra","scorpion","mummy","slime","stone golem","crypt shambler","stalker","gargoyle","vampire","beholder","bonebeast","ancient scarab","necromancer"}, rewards = {
- {type = "exp", value = {65000}},
- {type = "points", value = {2}}
- }},
- [23] = {killsRequired = 500, raceName = "Vampires", level = {1, 999}, premium = false, creatures = {"Vampire"}, rewards = {
- {type = "exp", value = {60000}},
- {type = "points", value = {2}}
- }},
- [24] = {killsRequired = 300, raceName = "Black Knights", level = {1, 999}, premium = false, creatures = {"Black Knight"}, rewards = {
- {type = "exp", value = {90000}},
- {type = "item", value = {2536,1}},
- {type = "points", value = {2}}
- }},
- [25] = {killsRequired = 500, raceName = "Cyclops", level = {1, 999}, premium = false, creatures = {"Cyclops", "Cyclops Drone", "Cyclops Smith"}, rewards = {
- {type = "exp", value = {65000}},
- {type = "points", value = {1}}
- }},
- [26] = {killsRequired = 1000, raceName = "Warlocks", level = {1, 999}, premium = false, creatures = {"Warlock"}, rewards = {
- {type = "exp", value = {180000}},
- {type = "points", value = {3}}
- }},
- [27] = {killsRequired = 700, raceName = "Dwarfs", level = {1, 999}, premium = false, creatures = {"Dwarf","Dwarf Guard","Dwarf Soldier"}, rewards = {
- {type = "exp", value = {30000}},
- {type = "points", value = {2}}
- }},
- [28] = {killsRequired = 400, raceName = "Banshees", level = {1, 999}, premium = false, creatures = {"Banshee"}, rewards = {
- {type = "exp", value = {40000}},
- {type = "points", value = {3}}
- }},
- [29] = {killsRequired = 300, raceName = "Slimes", level = {1, 999}, premium = false, creatures = {"Slime"}, rewards = {
- {type = "exp", value = {10000}},
- {type = "points", value = {2}}
- }},
- [30] = {killsRequired = 400, raceName = "Demon Skeletons", level = {1, 999}, premium = false, creatures = {"Demon Skeleton"}, rewards = {
- {type = "exp", value = {20000}},
- {type = "points", value = {2}}
- }},
- [31] = {killsRequired = 500, raceName = "Ghouls", level = {1, 999}, premium = false, creatures = {"Ghoul"}, rewards = {
- {type = "exp", value = {21300}},
- {type = "points", value = {2}}
- }},
- [32] = {killsRequired = 500, raceName = "Scarabs", level = {1, 999}, premium = false, creatures = {"Scarab"}, rewards = {
- {type = "exp", value = {21300}},
- {type = "points", value = {2}}
- }},
- [33] = {killsRequired = 300, raceName = "Stalkers", level = {1, 999}, premium = false, creatures = {"Stalker"}, rewards = {
- {type = "exp", value = {10000}},
- {type = "points", value = {2}}
- }},
- [34] = {killsRequired = 300, raceName = "Lions", level = {1, 999}, premium = false, creatures = {"Lion"}, rewards = {
- {type = "exp", value = {10000}},
- {type = "points", value = {2}}
- }},
- [35] = {killsRequired = 300, raceName = "Deers", level = {1, 999}, premium = false, creatures = {"Deer"}, rewards = {
- {type = "exp", value = {7000}},
- {type = "points", value = {4}}
- }},
- [36] = {killsRequired = 500, raceName = "Wolves", level = {1, 999}, premium = false, creatures = {"Wolf"}, rewards = {
- {type = "exp", value = {7000}},
- {type = "points", value = {2}}
- }},
- [37] = {killsRequired = 600, raceName = "Apes", level = {1, 999}, premium = false, creatures = {"Kongra","Merlkin","Sibang"}, rewards = {
- {type = "exp", value = {38000}},
- {type = "points", value = {2}}
- }},
- [38] = {killsRequired = 600, raceName = "Orcs High", level = {1, 999}, premium = false, creatures = {"Orc Berserker","Orc Warlord","Orc Warrior","Orc Spearman"}, rewards = {
- {type = "exp", value = {50000}},
- {type = "points", value = {2}}
- }},
- [39] = {killsRequired = 350, raceName = "Amazon", level = {1, 999}, premium = false, creatures = {"Amazon","Valkyrie"}, rewards = {
- {type = "exp", value = {35000}},
- {type = "points", value = {2}}
- }},
- [40] = {killsRequired = 350, raceName = "Elfs", level = {1, 999}, premium = false, creatures = {"Elf Arcanist","Elf","Elf Scout"}, rewards = {
- {type = "exp", value = {35000}},
- {type = "points", value = {2}}
- }},
- [41] = {killsRequired = 100, raceName = "Inquisition", level = {1, 999}, norepeatable = true, premium = false, creatures = {"Annihilon","Golgordan","Hellgorak","Latrivan","Madareth","Ushuriel","Zugurosh"}, rewards = {
- {type = "exp", value = {300000}},
- {type = "points", value = {20}}
- }},
- [42] = {killsRequired = 500, raceName = "Quara", level = {1, 999}, premium = false, creatures = {"quara pincher","quara hydromancer","quara predator","quara constrictor","quara constrictor scout","quara hydromancer scout","quara mantassin","quara mantassin scout", "quara pincher scout","quara predator scout"}, rewards = {
- {type = "exp", value = {50000}},
- {type = "points", value = {5}}
- }},
- [43] = {killsRequired = 500, raceName = "Icy", level = {1, 999}, premium = false, creatures = {"Ice Golem","Crystal Spider","hand of cursed fate"}, rewards = {
- {type = "exp", value = {100000}},
- {type = "points", value = {5}}
- }},
- [44] = {killsRequired = 666, raceName = "Hell", level = {1, 999}, premium = false, creatures = {"Hellfire Fighter","Hellhound","Fury","Lost Soul","Undead Dragon","Juggernaut","hand of cursed fate","diabolic imp","dark torturer","undead dragon","betrayed wraith"}, rewards = {
- {type = "exp", value = {350666}},
- {type = "points", value = {10}}
- }},
- [45] = {killsRequired = 500, raceName = "Lizards", level = {1, 999}, premium = false, creatures = {"Lizard Sentinel", "Lizard Snakecharmer", "Lizard Templar"}, rewards = {
- {type = "exp", value = {55000}},
- {type = "points", value = {3}}
- }},
- [46] = {killsRequired = 300, raceName = "Tortoise", level = {1, 999}, premium = false, creatures = {"Tortoise", "Thornback Tortoises"}, rewards = {
- {type = "exp", value = {35000}},
- {type = "points", value = {2}}
- }},
- [47] = {killsRequired = 1200, raceName = "Mutateds", level = {1, 999}, premium = false, creatures = {"Mutated Rat", "Mutated Bat", "Mutated Human", "Mutated Tiger"}, rewards = {
- {type = "exp", value = {130000}},
- {type = "points", value = {4}}
- }},
- [48] = {killsRequired = 500, raceName = "Wyvern", level = {1, 999}, premium = false, creatures = {"Wyvern"}, rewards = {
- {type = "exp", value = {80000}},
- {type = "points", value = {3}}
- }},
- [49] = {killsRequired = 500, raceName = "Werewolves", level = {1, 999}, premium = false, creatures = {"Werewold"}, rewards = {
- {type = "exp", value = {70000}},
- {type = "points", value = {3}}
- }},
- [50] = {killsRequired = 500, raceName = "Hellspawn", level = {1, 999}, premium = false, creatures = {"Hellspawn"}, rewards = {
- {type = "exp", value = {110000}},
- {type = "points", value = {3}}
- }},
- [51] = {killsRequired = 500, raceName = "Nightmare", level = {1, 999}, premium = false, creatures = {"Nightmare", "Nightmare Scion"}, rewards = {
- {type = "exp", value = {100000}},
- {type = "points", value = {3}}
- }},
- [52] = {killsRequired = 800, raceName = "Grim Reaper", level = {1, 999}, premium = false, creatures = {"Grim Reaper"}, rewards = {
- {type = "exp", value = {200000}},
- {type = "points", value = {5}}
- }},
- [53] = {killsRequired = 500, raceName = "Bog Raider", level = {1, 999}, premium = false, creatures = {"Bog Raider"}, rewards = {
- {type = "exp", value = {100000}},
- {type = "points", value = {3}}
- }},
- [54] = {killsRequired = 500, raceName = "Blobs", level = {1, 999}, premium = false, creatures = {"Acid Blob", "Death Blob", "Mercury Blob"}, rewards = {
- {type = "exp", value = {100000}},
- {type = "points", value = {3}}
- }},
- [55] = {killsRequired = 900, raceName = "Pirates", level = {1, 999}, premium = false, creatures = {"Pirate Buccaneer", "Pirate Corsair", "Pirate Cutthroat", "Pirate Ghost", "Pirate Marauder", "Pirate Skeleton"}, rewards = {
- {type = "exp", value = {120000}},
- {type = "points", value = {3}}
- }},
- [56] = {killsRequired = 300, raceName = "Zombies", level = {1, 999}, premium = false, creatures = {"Zombie"}, rewards = {
- {type = "exp", value = {60000}},
- {type = "points", value = {2}}
- }},
- [57] = {killsRequired = 300, raceName = "Barbarian", level = {1, 999}, premium = false, creatures = {"Barbarian Bloodwalker","Barbarian Brutetamer","Barbarian Headsplitter", "Barbarian Skullhunter"}, rewards = {
- {type = "exp", value = {80000}},
- {type = "points", value = {3}}
- }},
- [58] = {killsRequired = 800, raceName = "Magicians", level = {1, 999}, premium = false, creatures = {"Infernalist","Dark Apprentice","Dark Magician", "Acolyte of the Cult", "Adept of the Cult"}, rewards = {
- {type = "exp", value = {130000}},
- {type = "points", value = {4}}
- }},
- [59] = {killsRequired = 800, raceName = "Golems", level = {1, 999}, premium = false, creatures = {"War Golem","Worker Golem"}, rewards = {
- {type = "exp", value = {130000}},
- {type = "points", value = {4}}
- }}
- -- dragons, cyclops, quaras
- }
- tasksByPlayer = 3
- repeatTimes = 3
- 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) ~= cid or false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement