Ir para conteúdo

[Task System] Command 1.0


Roksas

Posts Recomendados

O código do creaturescripts, você troca por:

 

 

--[[

    Task System criado por Roksas

    Acesse já XTibia.com 

]]--


function onKill(cid, target, lastHit)

local task = taskSys[getCreatureName(string.lower(target))]

if not task then
    return true
end

if getPlayerStorageValue(cid, task.storKill) >= (task.goalNeed - 1) then
    doPlayerAddExp(cid, task.exp)
    doPlayerAddItem(cid, task.item)
    doPlayerAddMoney(cid, task.money)
    setPlayerStorageValue(cid, 19000, -1)
    setPlayerStorageValue(cid, task.storKill, -1)
    doPlayerSendTextMessage(cid, 20, "[Task-System] Congratulations! You completed the task of "..task.raceName.." race.")
    return true
end

if getPlayerStorageValue(cid, task.can) >= 1 and getPlayerStorageValue(cid, 19000) >= 1 then

if getPlayerStorageValue(cid, task.storKill) < 1 then
    setPlayerStorageValue(cid, task.storKill, 0)
end

    setPlayerStorageValue(cid, task.storKill, getPlayerStorageValue(cid, task.storKill) + 1)
    doPlayerSendTextMessage(cid, 20, "[Task-System] Defeated ["..getPlayerStorageValue(cid, task.storKill).."/"..task.goalNeed.."] "..task.raceName..".")
    return true
end

    return true
end

 

E mude o lib também por este:

 

 

--[[

    Task System criado por Roksas

    Acesse já XTibia.com 

]]--
 
taskSys = {



--[[ Trolls Race ]]-- 1



    ["Troll"] = {storKill = 17301, goalNeed = 100, raceName = "Trolls", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Frost Troll"] = {storKill = 17301, goalNeed = 100, raceName = "Trolls", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Furious Troll"] = {storKill = 17301, goalNeed = 100, raceName = "Trolls", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Island Troll"] = {storKill = 17301, goalNeed = 100, raceName = "Trolls", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Swamp Troll"] = {storKill = 17301, goalNeed = 100, raceName = "Trolls", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Troll Champion"] = {storKill = 17301, goalNeed = 100, raceName = "Trolls", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Troll Legionnaire"] = {storKill = 17301, goalNeed = 100, killBoss = 18701, raceName = "Trolls", can = 15019, exp = 1000, money = 5000, item = 2499},



 --[[ Goblins Race ]]-- 2

    ["Goblin"] = {storKill = 17302, goalNeed = 150, raceName = "Goblins", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Goblin Assassin"] = {storKill = 17302, goalNeed = 150, raceName = "Goblins", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Goblin Leader"] = {storKill = 17302, goalNeed = 150, raceName = "Goblins", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Goblin Scavenger"] = {storKill = 17302, goalNeed = 150, raceName = "Goblins", can = 15019, exp = 1000, money = 5000, item = 2499},

                                                                                        

 --[[ Annelidies Race ]]-- 3

    ["Rotworm"] = {storKill = 17303, goalNeed = 300, raceName = "Annelidies", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Carriom Worm"] = {storKill = 17303, goalNeed = 300, raceName = "Annelidies", can = 15019, exp = 1000, money = 5000, item = 2499},



 --[[ Cyclops Race ]]-- 4

    ["Cyclops"] = {storKill = 17304, goalNeed = 500, raceName = "Cyclops", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Cyclops Smith"] = {storKill = 17304, goalNeed = 500, raceName = "Cyclops", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Cyclops Drone"] = {storKill = 17304, goalNeed = 500, raceName = "Cyclops", can = 15019, exp = 1000, money = 5000, item = 2499},



--[[ Quaras Race ]]-- 6

    ["Quara Predator Scout"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Constrictor Scout"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Hydromancer Scout"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Mantassin Scout"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Pincher Scout"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Predator"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Ponstrictor"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Hydromancer"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Mantassin"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Quara Pincher"] = {storKill = 17306, goalNeed = 300, raceName = "Quaras", can = 15019, exp = 1000, money = 5000, item = 2499},



--[[ Water Elemental Race ]]-- 7

    ["Water Elemental"] = {storKill = 17307, goalNeed = 70, raceName = "Water Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Roaring Water Elemental"] = {storKill = 17307, goalNeed = 70, raceName = "Water Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Slick Water Elemental"] = {storKill = 17307, goalNeed = 70, raceName = "Water Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Massive Water Elemental"] = {storKill = 17307, goalNeed = 70, raceName = "Water Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},



--[[ Earth Elemental Race ]]-- 8

    ["Earth Elemental"] = {storKill = 17308, goalNeed = 70, raceName = "Earth Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Jagged Earth Elemental"] = {storKill = 17308, goalNeed = 70, raceName = "Earth Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Massive Earth Elemental"] = {storKill = 17308, goalNeed = 70, raceName = "Earth Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Muddy Earth Elemental"] = {storKill = 17308, goalNeed = 70, raceName = "Earth Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},



 --[[ Energy Elemental Race ]]-- 9

    ["Energy Elemental"] = {storKill = 17309, goalNeed = 70, raceName = "Energy Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Charged Energy Elemental"] = {storKill = 17309, goalNeed = 70, raceName = "Energy Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Massive Energy Elemental"] = {storKill = 17309, goalNeed = 70, raceName = "Energy Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Overcharged Energy Elemental"] = {storKill = 17309, goalNeed = 70, raceName = "Energy Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},



--[[ Fire Elemental Race ]]-- 10

    ["Fire Elemental"] = {storKill = 17310, goalNeed = 70, raceName = "Fire Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Blazing Fire elemental"] = {storKill = 17310, goalNeed = 70, raceName = "Fire Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Blistering Fire elemental"] = {storKill = 17310, goalNeed = 70, raceName = "Fire Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Massive Fire elemental"] = {storKill = 17310, goalNeed = 70, raceName = "Fire Elementals", can = 15019, exp = 1000, money = 5000, item = 2499},



--[[ Djinns Race ]]-- 11

    ["Green Djinn"] = {storKill = 17311, goalNeed = 500, raceName = "Djinns", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Efreet"] = {storKill = 17311, goalNeed = 500, raceName = "Djinns", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Blue Djinn"] = {storKill = 17311, goalNeed = 500, raceName = "Djinns", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Marid"] = {storKill = 17311, goalNeed = 500, raceName = "Djinns", can = 15019, exp = 1000, money = 5000, item = 2499},



--[[ Pirates Race]]-- 12



    ["Pirate Buccaneer"] = {storKill = 17312, goalNeed = 3000, raceName = "Pirates", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Pirate Corsair"] = {storKill = 17312, goalNeed = 3000, raceName = "Pirates", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Pirate Cutthroat"] = {storKill = 17312, goalNeed = 3000, raceName = "Pirates", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Pirate Ghost"] = {storKill = 17312, goalNeed = 3000, raceName = "Pirates", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Pirate Marauder"] = {storKill = 17312, goalNeed = 3000, raceName = "Pirates", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Pirate Skeleton"] = {storKill = 17312, goalNeed = 3000, raceName = "Pirates", can = 15019, exp = 1000, money = 5000, item = 2499},





--[[ Magicians Race ]]-- 13

    ["Necromancer"] = {storKill = 17313, goalNeed = 1000, raceName = "Magicians", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Priestess"] = {storKill = 17313, goalNeed = 1000, raceName = "Magicians", can = 15019, exp = 1000, money = 5000, item = 2499},



--[[ Drakens Race ]]--     14

    ["Draken Abomination"] = {storKill = 17314, goalNeed = 300, raceName = "Ice Golems", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Draken Elite"] = {storKill = 17314, goalNeed = 300, raceName = "Ice Golems", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Draken Spellweaver"] = {storKill = 17314, goalNeed = 300, raceName = "Ice Golems", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Draptor"] = {storKill = 17314, goalNeed = 300, raceName = "Ice Golems", can = 15019, exp = 1000, money = 5000, item = 2499},





--[[ Lizards Race ]]--   15               

    ["Lizard Templar"] = {storKill = 17315, goalNeed = 300, raceName = "Lizards", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Lizard Snakecharmer"] = {storKill = 17315, goalNeed = 300, raceName = "Lizards", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Lizard Sentinel"] = {storKill = 17315, goalNeed = 300, raceName = "Lizards", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Wyvern"] = {storKill = 17315, goalNeed = 300, raceName = "Lizards", can = 15019, exp = 1000, money = 5000, item = 2499},





--[[ Dragons Race ]]-- 16

    ["Dragon"] = {storKill = 17316, goalNeed = 300, raceName = "Dragons", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Dragon Lord"] = {storKill = 17316, goalNeed = 300, raceName = "Dragons", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Dragon Hatchling"] = {storKill = 17316, goalNeed = 300, raceName = "Dragons", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Dragon Lord Hatchling"] = {storKill = 17316, goalNeed = 300, raceName = "Dragons", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Demodras"] = {storKill = 17316, goalNeed = 300, raceName = "Dragons", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Ghastly Dragon"] = {storKill = 17316, goalNeed = 300, raceName = "Dragons", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Undead Dragon"] = {storKill = 17316, goalNeed = 300, raceName = "Dragons", can = 15019, exp = 1000, money = 5000, item = 2499},



--[[ Nils Race ]]-- ?



    ["Demon"] = {storKill = 17317, goalNeed = 6666, raceName = "Demons", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Minotaur"] = {storKill = 17318, goalNeed = 5000, raceName = "Minotaurs", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Mutated Rat"] = {storKill = 17319, goalNeed = 200, raceName = "Mutated Rats", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Giant Spider"] = {storKill = 17320, goalNeed = 500, raceName = "Giant Spiders", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Hydra"] = {storKill = 17321, goalNeed = 2000, raceName = "Hydras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Sea Serpent"] = {storKill = 17322, goalNeed = 2000, raceName = "Sea Serpents", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Behemoth"] = {storKill = 17323, goalNeed = 2000, raceName = "Behemoths", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Serpent Spawn"] = {storKill = 17324, goalNeed = 1500, raceName = "Serpents Spawn", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Crocodile"] = {storKill = 17325, goalNeed = 300, raceName = "Crocodiles", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Tarantula"] = {storKill = 17326, goalNeed = 300, raceName = "Tarantulas", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Carniphila"] = {storKill = 17327, goalNeed = 150, raceName = "Carniphilas", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Stone Golem"] = {storKill = 17328, goalNeed = 200, raceName = "Stone Golems", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Mammoth"] = {storKill = 17329, goalNeed = 300, raceName = "Mammoths", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Ice Golem"] = {storKill = 17330, goalNeed = 300, raceName = "Ice Golems", can = 15019, exp = 1000, money = 5000, item = 2499},



    ["Badger"] = {storKill = 17331, goalNeed = 250, raceName = "Badgers", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Terramite"] = {storKill = 17332, goalNeed = 100, raceName = "Terramites", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Gargoyle"] = {storKill = 17333, goalNeed = 700, raceName = "Gargoyles", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Ancient Scarab"] = {storKill = 17334, goalNeed = 220, raceName = "Ancient Scarabs", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Bonebeast"] = {storKill = 17335, goalNeed = 550, raceName = "Bonebeasts", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Crystal Spider"] = {storKill = 17336, goalNeed = 777, raceName = "Crystal Spiders", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Mutated Tiger"] = {storKill = 17337, goalNeed = 915, raceName = "Mutated Tigers", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Werewolf"] = {storKill = 17338, goalNeed = 242, raceName = "Werewolfs", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Nightmare"] = {storKill = 17339, goalNeed = 666, raceName = "Nightmares", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Mutated Bat"] = {storKill = 17340, goalNeed = 777, raceName = "Mutated Bats", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Lancer Beetle"] = {storKill = 17341, goalNeed = 400, raceName = "Lancer Beetles", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Kongra"] = {storKill = 17342, goalNeed = 500, raceName = "Kongras", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Tortoise"] = {storKill = 17343, goalNeed = 1000, raceName = "Tortoises", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Gnarlhound"] = {storKill = 17344, goalNeed = 1000, raceName = "Gnarlhounds", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Hellspawn"] = {storKill = 17345, goalNeed = 1000, raceName = "Hellspawns", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Killer Caiman"] = {storKill = 17346, goalNeed = 200, raceName = "Killer Caimans", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Stampor"] = {storKill = 17347, goalNeed = 215, raceName = "Stampos", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Brimstone Bug"] = {storKill = 17348, goalNeed = 1000, raceName = "Brimstone Bugs", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Medusa"] = {storKill = 17349, goalNeed = 750, raceName = "Medusas", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Destroyer"] = {storKill = 17350, goalNeed = 420, raceName = "Destroyers", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Hellhound"] = {storKill = 17351, goalNeed = 350, raceName = "Hellhounds", can = 15019, exp = 1000, money = 5000, item = 2499},

    ["Tiquanda Revenge"] = {storKill = 17352, goalNeed = 700, raceName = "Tiquandas Revenge", can = 15019, exp = 1000, money = 5000, item = 2499},

}

 

Nas tabelas da lib você coloca o ID do item em cada linha, ao lado do money.

Link para o comentário
Compartilhar em outros sites

  • 6 months later...
×
×
  • Criar Novo...