BlackTibia

No estás conectado. Conéctate o registrate

 » Open Tibia » Pedido de Scripts » 

(Pedido) Script 20 demons matados = item

(Pedido) Script 20 demons matados = item

#1 (Pedido) Script 20 demons matados = item el Vie Mar 14, 2014 1:29 am

AngeluzMG


Miembro
Bueno este script trataría de lo siguiente:

Matar 10 Rotworms = Long sword
Matar 20 Rats = Fire axe
Matar 30 Demons = Boots of haste

(por poner unos ejemplos)



y en ese mismo script (o en otro) que te diga el total de Ratas que a matado el Character desde que se creo.

"Has matado X rats"
"Has matado X Demons"
"Has matado X Frost dragons"
"Has matado X Dragon lords"


pero que no interfiera con el script de arriba, osea que si llega a 20 ratas siga el conteo, pero que solo te de 1 solo item por ese monster.

----
No se si me di a entender, si ocupan mas detalles hagan me saberlos y con gusto y atención se los daré, de antemano muchas gracias.

http://titanpad.com/angeluzmg

#2 Re: (Pedido) Script 20 demons matados = item el Sáb Mar 15, 2014 8:54 am

darknelson


Aprendiz
Creo que lo que busca es esto [Tienes que estar registrado y conectado para ver este vínculo]

#3 Re: (Pedido) Script 20 demons matados = item el Dom Mar 16, 2014 3:07 am

AngeluzMG


Miembro
@darknelson: De hecho ese es el que intente usar, pero no me funciono me sale un error :/ tambien tengo un tema pidiendo ayuda sobre ese script (http://www.blacktibia.org/t34188-ayuda-script-mod-kill-count-mas-premio) pero como nadie respondio me pregunto si alguien pudiera hacerme/pasarme otro que haga lo mismo xD

pero muchas gracias por tu respuesta e interes

http://titanpad.com/angeluzmg

#4 Re: (Pedido) Script 20 demons matados = item el Dom Mar 16, 2014 7:03 am

chaotiick


Miembro
data/Creaturescript/script/script_name:
function onKill(cid, target)

local m = {
function onKill(cid, target)

local m = {
["minotaur mage"] = 91001,
["orc spearman"] = 91002,
["cyclops"] = 91003,
["cave rat"] = 91004,
["fire devil"] = 91005,
["orc warrior"] = 91006,
["slime"] = 91007,
["beholder"] = 91008,
["dragon hatchling"] = 91009,
["wyvern"] = 91010,
["fire elemental"] = 91011,
["blue djinn"] = 91012,
["demon skeleton"] = 91013,
["dragon"] = 91014,
["dragon lord"] = 91015,
["vampire"] = 91016,
["crystal spider"] = 91017,
["earth elemental"] = 91018,
["hero"] = 91019,
["avalanche"] = 91020,
["giant spider"] = 91021,
["fury"] = 91022,
["orc warlord"] = 91023,
["green djinn"] = 91024,
["demon"] = 91025,
["hydra"] = 91026,
["frost dragon"] = 91027,
["warlock"] = 91028,
["medusa"] = 91029,
["grim reaper"] = 91030,
["undead dragon"] = 91031,
["ferumbras"] = 91032,
["orshabaal"] = 91033,
["morgaroth"] = 91034,
["ghazbaran"] = 91035,
["minishabaal"] = 91036,
["diabolic imp"] = 91037,
["juggernaut"] = 91038,
["behemoth"] = 91039
}
 
if(isMonster(target) == TRUE) then
local n = getCreatureName(target)
local name_monster = m[string.lower(n)]
if(name_monster) then
local contagem = getPlayerStorageValue(cid, name_monster)
if(contagem == -1) then
contagem = 1
end
setPlayerStorageValue(cid, name_monster, contagem+1)  
end
end
return TRUE
end

ot>data>creaturescripts>scripts/login.lua:

registerCreatureEvent(cid, "Script_name")
creaturescripts:

Código:
<event type="kill" name="Script_name" script="Script_name.lua"/>

ot>data>talkactions>scripts Crear nuevo Task_info.lua:

function onSay(cid, words, param)

   function pairsByKeys (t, f)
     local a = {}
     for n in pairs(t) do table.insert(a, n) end
     table.sort(a, f)
     local i = 0
     local iter = function ()
       i = i + 1
       if a[i] == nil then return nil
       else return a[i], t[a[i]]
       end
     end
     return iter
   end

local m = {
["minotaur mage"] = {storage = 91001,count = 12},
["orc spearman"] = {storage = 91002,count = 14},
["cyclops"] = {storage = 91003,count = 25},
["cave rat"] = {storage = 91004,count = 10},
["fire devil"] = {storage = 91005,count = 17},
["orc warrior"] = {storage = 91006,count = 28},
["slime"] = {storage = 91007,count = 18},
["beholder"] = {storage = 91008,count = 40},
["dragon hatchling"] = {storage = 91009,count = 45},
["wyvern"] = {storage = 91010,count = 55},
["fire elemental"] = {storage = 91011,count = 60},
["blue djinn"] = {storage = 91012,count = 64},
["demon skeleton"] = {storage = 91013,count = 45},
["dragon"] = {storage = 91014,count = 80},
["dragon lord"] = {storage = 91015,count = 90},
["vampire"] = {storage = 91016,count = 50},
["crystal spider"] = {storage = 91017,count = 45},
["earth elemental"] = {storage = 91018,count = 80},
["hero"] = {storage = 91019,count = 72},
["avalanche"] = {storage = 91020,count = 83},
["giant spider"] = {storage = 91021,count = 97},
["fury"] = {storage = 91022,count = 105},
["orc warlord"] = {storage = 91023,count = 74},
["green djinn"] = {storage = 91024,count = 65},
["demon"] = {storage = 91025,count = 400},
["hydra"] = {storage = 91026,count = 295},
["frost dragon"] = {storage = 91027,count = 330},
["warlock"] = {storage = 91028,count = 210},
["medusa"] = {storage = 91029,count = 152},
["grim reaper"] = {storage = 91030,count = 350},
["undead dragon"] = {storage = 91031,count = 200},
["ferumbras"] = {storage = 91032,count = 7},
["orshabaal"] = {storage = 91033,count = 20},
["morgaroth"] = {storage = 91034,count = 10},
["ghazbaran"] = {storage = 91035,count = 20},
["minishabaal"] = {storage = 91036,count = 243},
["diabolic imp"] = {storage = 91037,count = 163},
["juggernaut"] = {storage = 91038,count = 45},
["behemoth"] = {storage = 91039,count = 147}
}

local str = ""
str = str .. "Task Completed :\n\n"
for k, v in pairsByKeys(m) do
local contagem = getPlayerStorageValue(cid, v.storage)
if(contagem == -1) then
contagem = 1
end
str = str..k.." = ["..((contagem)-1).."/"..v.count.."]\n"
end
str = str .. ""
return doShowTextDialog(cid, 8983, str)
end
Talkactions.xml:

Código:
<talkaction words="!task" script="Task_info.lua"/>

crear npc.lua:

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end

function MonsterCount(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
               return false
       end
local contagem = getPlayerStorageValue(cid, parameters.storage)
if(contagem == -1) then
contagem = 1
end
     if getPlayerStorageValue(cid, parameters.x) <= 0 then
          if (((contagem)-1) >= parameters.count) then
                                      doPlayerAddExp(cid, parameters.exp)
                              for k,v in pairs(parameters.reward) do
                   doPlayerAddItem(cid, v.item, v.count or 1)
               end
             setPlayerStorageValue(cid, parameters.x, 1)
           npcHandler:say('Thanks for your help,receive your rewards!', cid)  
       else
               npcHandler:say('Sorry,but you still only killed '..((contagem)-1)..' monsters!', cid)
               npcHandler:resetNpc()
       end
       else
       npcHandler:say('You can only receive the reward once!', cid)
       npcHandler:resetNpc()
       end
       return TRUE
end
function Completed(cid, message, keywords, parameters, node)
       if(not npcHandler:isFocused(cid)) then
               return false
       end
     if getPlayerStorageValue(cid, parameters.x) <= 0 then
     for i = 21001,21039 do
          if getPlayerStorageValue(cid,i) <= 0 then
          return npcHandler:say('Sorry,but you have not still finished the whole task!', cid)
          end
          end                     doPlayerAddExp(cid, parameters.exp)
                              for k,v in pairs(parameters.reward) do
                   doPlayerAddItem(cid, v.item, v.count or 1)
               end
             setPlayerStorageValue(cid, parameters.x, 1)
                b = getGlobalStorageValue(63004)
                 if b == -1 then
                   b = 1
                      end
                        if b < 11 then
                           setGlobalStorageValue(63004,b+1)
                           npcHandler:say('you recivied items,trophy and 10 days of premium account!!', cid)
                             doBroadcastMessage('[Task Mission Complete] '..getCreatureName(cid)..' was the '..b..'° to finish the task!.')
                                    doPlayerAddPremiumDays(cid, 10)
                                doPlayerAddItem(cid, 2646,1)
                             doPlayerAddItem(cid, 2343,1)
                    doItemSetAttribute(doPlayerAddItem(cid, 7369), "name", "trophy of the 10 firsts finish all task")
                end
           npcHandler:say('Congratulations,now you have completed all the task!', cid)
           npcHandler:resetNpc()
       else
       npcHandler:say('You can only receive the reward once!', cid)
       npcHandler:resetNpc()
       end
       return TRUE
end


keywordHandler:addKeyword({'task'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I have a mission to {low level},{mid level} and {high level},{all mission} or {help} for know the amount of monsters you/ve killed!'})
keywordHandler:addKeyword({'all mission'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Wow! You/re a great hunter!,you really {completed} all mission?'})
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'To see how many monsters you killed just use command {!task}'})
keywordHandler:addKeyword({'low level'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Then low level you have to kill some monsters like: {minotaur mage},{orc spearman},{cyclops},{cave rat},{fire devil},{fire devil},{orc warrior},{slime},{beholder},{dragon hatchling} and {wyvern}!'})
keywordHandler:addKeyword({'mid level'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'hmm mid level,you have to kill some monsters: {fire elemental},{blue djinn},{demon skeleton},{dragon},{dragon lord},{crystal spider},{earth elemental},{hero},{avalanche},{giant spider},{fury},{orc warlord} and {green djinn}'})
keywordHandler:addKeyword({'high level'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'haha high level,to you it will not be easy because you have to kill some monsters: {demon},{hydra},{frost dragon},{warlock},{medusa},{grim reaper},{undead dragon},{ferumbras},{orshabaal},{morgaroth},{ghazbaran},{minishabaal},{diabolic imp},{juggernaut} and {behemoth}'})
local node1 = keywordHandler:addKeyword({'minotaur mage'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 12 minotaur mage? {yes}'})
node1:addChildKeyword({'yes'}, MonsterCount, {x = 21001,storage = 91001,count = 12,reward = {{item = 2656, count = 1},{item = 7730, count = 1},{item = 2152, count = 20}},exp = 1000})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node2 = keywordHandler:addKeyword({'orc spearman'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 14 orc spearman? {yes}'})
node2:addChildKeyword({'yes'}, MonsterCount, {x = 21002, storage = 91002,count = 14,reward = {{item = 2152, count = 50}},exp = 2000})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node3 = keywordHandler:addKeyword({'cyclops'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 25 cyclops? {yes}'})
node3:addChildKeyword({'yes'}, MonsterCount, {x = 21003, storage = 91003,count = 25,reward = {{item = 2462, count = 1},{item = 2648, count = 1},{item = 2152, count = 35}},exp = 4000})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node4 = keywordHandler:addKeyword({'cave rat'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 10 cave rat? {yes}'})
node4:addChildKeyword({'yes'}, MonsterCount, {x = 21004, storage = 91004,count = 10,reward = {{item = 2696, count = 1},{item = 2152, count = 20}},exp = 0})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node5 = keywordHandler:addKeyword({'fire devil'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 17 fire devil? {yes}'})
node5:addChildKeyword({'yes'}, MonsterCount, {x = 21005, storage = 91005,count = 17,reward = {{item = 2160, count = 2},{item = 2491, count = 1},{item = 2488, count = 1}},exp = 10000})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node6 = keywordHandler:addKeyword({'orc warrior'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 28 orc warrior? {yes}'})
node6:addChildKeyword({'yes'}, MonsterCount, {x = 21006, storage = 91006,count = 28,reward = {{item = 2152, count = 25}},exp = 0})
node6:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node7 = keywordHandler:addKeyword({'slime'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 18 slime? {yes}'})
node7:addChildKeyword({'yes'}, MonsterCount, {x = 21007, storage = 91007,count = 18,reward = {{item = 2160, count = 1},{item = 2477, count = 1}},exp = 15000})
node7:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node8 = keywordHandler:addKeyword({'beholder'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 40 beholder? {yes}'})
node8:addChildKeyword({'yes'}, MonsterCount, {x = 21008, storage = 91008,count = 40,reward = {{item = 2160, count = 2},{item = 2518, count = 1}},exp = 0})
node8:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node9 = keywordHandler:addKeyword({'dragon hatchling'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 45 dragon hatchling? {yes}'})
node9:addChildKeyword({'yes'}, MonsterCount, {x = 21009, storage = 91009,count = 45,reward = {{item = 2475, count = 1},{item = 2187, count = 1}},exp = 20000})
node9:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node10 = keywordHandler:addKeyword({'wyvern'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 55 wyvern? {yes}'})
node10:addChildKeyword({'yes'}, MonsterCount, {x = 21010, storage = 91010,count = 55,reward = {{item = 2519, count = 1},{item = 2160, count = 2}},exp = 0})
node10:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node11 = keywordHandler:addKeyword({'fire elemental'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 60 fire elemental? {yes}'})
node11:addChildKeyword({'yes'}, MonsterCount, {x = 21011,storage = 91011,count = 60,reward = {{item = 2392, count = 1},{item = 2160, count = 5}},exp = 0})
node11:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node12 = keywordHandler:addKeyword({'blue djinn'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 64 blue djinn {yes}'})
node12:addChildKeyword({'yes'}, MonsterCount, {x = 21022, storage = 91012,count = 64,reward = {{item = 2160, count = 10},{item = 2451, count = 1}},exp = 0})
node12:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node13 = keywordHandler:addKeyword({'demon skeleton'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 45 demon skeleton? {yes}'})
node13:addChildKeyword({'yes'}, MonsterCount, {x = 21013, storage = 91013,count = 45,reward = {{item = 2498, count = 1},{item = 2152, count = 30}},exp = 0})
node13:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node14 = keywordHandler:addKeyword({'dragon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 80 dragon? {yes}'})
node14:addChildKeyword({'yes'}, MonsterCount, {x = 21014, storage = 91014,count = 80,reward = {{item = 2516, count = 1},{item = 7457, count = 1},{item = 2160, count = 4}},exp = 0})
node14:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node15 = keywordHandler:addKeyword({'dragon lord'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 90 dragon lord? {yes}'})
node15:addChildKeyword({'yes'}, MonsterCount, {x = 21015, storage = 91015,count = 95,reward = {{item = 7402, count = 1},{item = 2537, count = 1}},exp = 101321})
node15:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node16 = keywordHandler:addKeyword({'vampire'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 50 vampire? {yes}'})
node16:addChildKeyword({'yes'}, MonsterCount, {x = 21016, storage = 91016,count = 50,reward = {{item = 2534, count = 1},{item = 2197, count = 1}},exp = 60000})
node16:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node17 = keywordHandler:addKeyword({'crystal spider'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 45 crystal spider? {yes}'})
node17:addChildKeyword({'yes'}, MonsterCount, {x = 21017, storage = 91017,count = 45,reward = {{item = 2160, count = 25},{item = 8920, count = 1}},exp = 0})
node17:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node18 = keywordHandler:addKeyword({'earth elemental'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 80 earth elemental? {yes}'})
node18:addChildKeyword({'yes'}, MonsterCount, {x = 21018, storage = 91018,count = 80,reward = {{item = 2160, count = 10},{item = 11114, count = 1}},exp = 80000})
node18:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node19 = keywordHandler:addKeyword({'hero'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 72 hero? {yes}'})
node19:addChildKeyword({'yes'}, MonsterCount, {x = 21019, storage = 91019,count = 72,reward = {{item = 2487, count = 1},{item = 2491, count = 1}},exp = 0})
node19:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node20 = keywordHandler:addKeyword({'avalanche'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 83 avalanche? {yes}'})
node20:addChildKeyword({'yes'}, MonsterCount, {x = 21020, storage = 91020,count = 83,reward = {{item = 8851, count = 1}},exp = 0})
node20:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node21 = keywordHandler:addKeyword({'giant spider'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 97 giant spider? {yes}'})
node21:addChildKeyword({'yes'}, MonsterCount, {x = 21021, storage = 91021,count = 97,reward = {{item = 2536, count = 1},{item = 2160, count = 13}},exp = 150000})
node21:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node22 = keywordHandler:addKeyword({'fury'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 105 fury? {yes}'})
node22:addChildKeyword({'yes'}, MonsterCount, {x = 21022, storage = 91022,count = 105,reward = {{item = 6500, count = 35},{item = 2414, count = 1}},exp = 0})
node22:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node23 = keywordHandler:addKeyword({'orc warlor'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 74 orc warlord? {yes}'})
node23:addChildKeyword({'yes'}, MonsterCount, {x = 21023, storage = 91023,count = 74,reward = {{item = 7414, count = 1}},exp = 98574})
node23:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node24 = keywordHandler:addKeyword({'green djinn'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 65 green djinn? {yes}'})
node24:addChildKeyword({'yes'}, MonsterCount, {x = 21024, storage = 91024,count = 65,reward = {{item = 2517, count = 1}},exp = 123125})
node24:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node25 = keywordHandler:addKeyword({'demon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 400 demons {yes}'})
node25:addChildKeyword({'yes'}, MonsterCount, {x = 21025, storage = 91025,count = 400,reward = {{item = 2160, count = 80},{item = 2495, count = 1},{item = 2496, count = 1},{item = 2520, count = 1},{item = 2472, count = 1}},exp = 7500000})
node25:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node26 = keywordHandler:addKeyword({'hydra'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 295 hydras? {yes}'})
node26:addChildKeyword({'yes'}, MonsterCount, {x = 21026, storage = 91026,count = 295,reward = {{item = 2160, count = 50},{item = 6433, count = 1},{item = 7434, count = 1},{item = 2197, count = 1},{item = 2476, count = 1}},exp = 2500000})
node26:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node27 = keywordHandler:addKeyword({'frost dragon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 80 frost dragons? {yes}'})
node27:addChildKeyword({'yes'}, MonsterCount, {x = 21027, storage = 91027,count = 330,reward = {{item = 2396, count = 1},{item = 2492, count = 1},{item = 2160, count = 100}},exp = 5246300})
node27:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node28 = keywordHandler:addKeyword({'warlock'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 210 warlocks? {yes}'})
node28:addChildKeyword({'yes'}, MonsterCount, {x = 21028, storage = 91028,count = 210,reward = {{item = 8918, count = 1},{item = 2206, count = 1},{item = 2173, count = 1},{item = 2160, count = 100}},exp = 27393800})
node28:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node29 = keywordHandler:addKeyword({'medusa'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 152 medusas? {yes}'})
node29:addChildKeyword({'yes'}, MonsterCount, {x = 21029, storage = 91029,count = 152,reward = {{item = 2542, count = 1},{item = 7403, count = 1},{item = 2536, count = 1},{item = 2160, count = 65}},exp = 1639300})
node29:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node30 = keywordHandler:addKeyword({'grim reaper'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 350 grim reapers? {yes}'})
node30:addChildKeyword({'yes'}, MonsterCount, {x = 21030, storage = 91030,count = 350,reward = {{item = 2160, count = 70},{item = 2474, count = 1},{item = 8927, count = 1},{item = 6433, count = 1}},exp = 38124230})
node30:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node31 = keywordHandler:addKeyword({'undead dragon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 200 undead dragons? {yes}'})
node31:addChildKeyword({'yes'}, MonsterCount, {x = 21031, storage = 91031,count = 200,reward = {{item = 2160, count = 80},{item = 2514, count = 1},{item = 2466, count = 1}},exp = 2219180})
node31:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node32 = keywordHandler:addKeyword({'ferumbras'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 7 ferumbras? {yes}'})
node32:addChildKeyword({'yes'}, MonsterCount, {x = 21032, storage = 91032,count = 7,reward = {{item = 2472, count = 1},{item = 8925, count = 1},{item = 8904, count = 1},{item = 5903, count = 1},{item = 2160, count = 100}},exp = 5246300})
node32:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node33 = keywordHandler:addKeyword({'orshabaal'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 20 orshabaal? {yes}'})
node33:addChildKeyword({'yes'}, MonsterCount, {x = 21033, storage = 91033,count = 20,reward = {{item = 2469, count = 1},{item = 2472, count = 1},{item = 2393, count = 1},{item = 2160, count = 100}},exp = 7915800})
node33:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node34 = keywordHandler:addKeyword({'morgaroth'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 10 morgaroth? {yes}'})
node34:addChildKeyword({'yes'}, MonsterCount, {x = 21034, storage = 91034,count = 10,reward = {{item = 2523, count = 1},{item = 2415, count = 1},{item = 2160, count = 100}},exp = 15694800})
node34:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node35 = keywordHandler:addKeyword({'ghazbaran'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 20 ghazbaran? {yes}'})
node35:addChildKeyword({'yes'}, MonsterCount, {x = 21035, storage = 91035,count = 20,reward = {{item = 2494, count = 1},{item = 2408, count = 1},{item = 2390, count = 1},{item = 2160, count = 100}},exp = 15694800})
node35:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node36 = keywordHandler:addKeyword({'minishabaal'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 243 minishabaal? {yes}'})
node36:addChildKeyword({'yes'}, MonsterCount, {x = 21036, storage = 91036,count = 243,reward = {{item = 2470, count = 1},{item = 2466, count = 1},{item = 7753, count = 1},{item = 2160, count = 70}},exp = 1118190})
node36:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node37 = keywordHandler:addKeyword({'diabolic imp'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 163 diabolic imp? {yes}'})
node37:addChildKeyword({'yes'}, MonsterCount, {x = 21037, storage = 91037,count = 163,reward = {{item = 9776, count = 1},{item = 7418, count = 1},{item = 2421, count = 1},{item = 2160, count = 68}},exp = 2125150})
node37:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node38 = keywordHandler:addKeyword({'juggernaut'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 45 juggernaut? {yes}'})
node38:addChildKeyword({'yes'}, MonsterCount, {x = 21038, storage = 91038,count = 45,reward = {{item = 2506, count = 1},{item = 2522, count = 1},{item = 2160, count = 90}},exp = 24858000})
node38:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node39 = keywordHandler:addKeyword({'behemoth'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'You already killed 147 behemoth? {yes}'})
node39:addChildKeyword({'yes'}, MonsterCount, {x = 21039, storage = 91039,count = 45,reward = {{item = 6391, count = 1},{item = 5741, count = 1},{item = 2160, count = 65}},exp = 3138470})
node39:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})
local node40 = keywordHandler:addKeyword({'completed'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I have to give you special items! You already killed all monster? {yes}'})
node40:addChildKeyword({'yes'}, Completed, {x = 21040,reward = {{item = 2471, count = 1},{item = 2469, count = 1},{item = 9932, count = 1},{item = 2160, count = 100}},exp = 54042300})
node40:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Ok, then.', reset = true})

npcHandler:addModule(FocusModule:new())

Npc.Xml:

Código:
<?xml version="1.0"?>
<npc name="xxxxx" script="data/npc/scripts/scripts.lua" walkinterval="0" floorchange="0">
<health now="100" max="100"/>
<look type="127" head="100" body="100" legs="100" feet="100"/>
<parameters>
<parameter key="message_greet" value="Hello |PLAYERNAME|.I have some {task} for you!" />
</parameters>
</npc>

creditos: no recuerdo es un user de bt o xtibia o tibiaking xD lo tengo de hace tiempo al terminar todas las task te manda al node:40 ese node seran todos los items que te dara cuando ayas completado todas las taks,aparte que puedes poner reward x cada task... las task se pueden repetir, tu le pones si si o si no.. la exp le acomodas = etc es facil entender el script

testiado en el ultimo update de otx 2.90 funciona, tfs nose nome gusta tfs
si agregaras mas task sige el orden delas storages sino no funcionara xD! que no se repitan ._. ni telas saltes D:! en orden de 1+1

#5 Re: (Pedido) Script 20 demons matados = item el Dom Mar 16, 2014 7:19 am

AngeluzMG


Miembro
Muchas gracias, yo tengo un 8.60 aun no le puedo hacer test ya que no estoy en mi casa, pero en cuanto pueda lo haré!!

muchas gracias !

http://titanpad.com/angeluzmg

Contenido patrocinado


Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje [Página 1 de 1.]

Permisos de este foro:
No puedes responder a temas en este foro.

 

¿Quién está en línea?

En total hay 0 usuarios en línea: 0 Registrados, 0 Ocultos y 0 Invitado

Usuarios navegando en este foro: Ninguno

Forum Statistics

Nuestros miembros han públicado un total de posts en temas.
Actualmente hay miembros registrados.
Démosle la bienvenida al miembro más reciente,
La mayor cantidad de usuarios en línea ha sido de .