Bom aki tah eu outra veiz... :smiling:
Entaum...Ele eh uma npc que sumona quase tudo para YurOts...
ele eh pago...vocÊ pod editar o preço facilmente !!
Vá em data/npc/scripts e adicione "Summoner.lua" e dentro dele acrecente este code:
focus = 0talk_start = 0target = 0following = falseattacking = falsefunction onThingMove(creature, thing, oldpos, oldstackpos)endfunction onCreatureAppear(creature)endfunction onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 endendfunction onCreatureTurn(creature)endfunction msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)'))endfunction onCreatureSay(cid, type, msg) msg = string.lower(msg) if (msgcontains(msg, 'hi') and focus == 0) and getDistanceToCreature(cid) < 2 then selfSay('Ola ' .. creatureGetName(cid) .. '! Eu posso sumonar bixos para voce agora com bixos valendu grana!. Para saber que bixo sumono fale lista, lista2, lista3 ou lista4.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 2 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'lista') then selfSay('Eu sumono: Rat(1 rat 1 cave rat) Wolf (3 Wolf) Snake (3 cobras)Dwarf (dwarf guard,dwarf,dwarf soldier,dwarf geomancer)Dragon (dragon,dragon lord).') elseif msgcontains(msg, 'lista2') then selfSay('Eu sumono: Demon(demon)Orshabaal(orshabaal)hydra(3 hydra)Giant Spider(2 giant spider)ghouls(3 ghoul).') elseif msgcontains(msg, 'lista3') then selfSay('Eu sumono: yeti(yeti)warlock(warlock)cyclops(3cyclops).') elseif msgcontains(msg, 'lista4') then selfSay('Eu sumono: Demodras(demodras)thalas(thalas)omruc(omruc)necromancer(2necromancer).') elseif msgcontains(msg, 'necromancer') then if pay(cid,1000)then selfSay('/m necromancer') selfSay('/m necromancer') else selfSay('Your dont have the money(10 platinum) go away!') end elseif msgcontains(msg, 'demodras') then if pay(cid,3000)then selfSay('/m demodras') else selfSay('Your dont have the money(30 platinum) go away!') end elseif msgcontains(msg, 'thalas') then if pay(cid,5000)then selfSay('/m thalas') else selfSay('Your dont have the money(50 platinum) go away!') end elseif msgcontains(msg, 'omruc') then if pay(cid,4500)then selfSay('/m omruc') else selfSay('Your dont have the money(45 platinum) go away!') end elseif msgcontains(msg, 'rat') then if pay(cid,10)then selfSay('/m rat') selfSay('/m cave rat') else selfSay('Your dont have the money(10 gps) go away!') end elseif msgcontains(msg, 'wolf') then if pay(cid,200)then selfSay('/m wolf') selfSay('/m wolf') selfSay('/m wolf') else selfSay('Your dont have the money(200 gps) go away!') end elseif msgcontains(msg, 'snake') then if pay(cid,100)then selfSay('/m snake') selfSay('/m snake') selfSay('/m snake') else selfSay('Your dont have the money(100 gps) go away!') end elseif msgcontains(msg, 'dwarf') then if pay(cid,500)then selfSay('/m dwarf geomancer') selfSay('/m dwarf soldier') selfSay('/m dwarf') selfSay('/m dwarf guard') else selfSay('Your dont have the money(500 gps) go away!') end elseif msgcontains(msg, 'dragon') then if pay(cid,1000)then selfSay('/m dragon lord') selfSay('/m dragon') else selfSay('Your dont have the money(10 platinum) go away!') end elseif msgcontains(msg, 'demon') then if pay(cid,10000)then selfSay('/m demon') else selfSay('Your dont have the money(1 crystal) go away!') end elseif msgcontains(msg, 'orshabaal') then if pay(cid,200000)then selfSay('/m orshabaal') else selfSay('Your dont have the money(20 crystal) go away!') end elseif msgcontains(msg, 'hydra') then if pay(cid,7500)then selfSay('/m hydra') selfSay('/m hydra') selfSay('/m hydra') else selfSay('Your dont have the money(75 platinum) go away!') end elseif msgcontains(msg, 'giant spider') then if pay(cid,6000)then selfSay('/m giant spider') selfSay('/m giant spider') else selfSay('Your dont have the money(60 platinum) go away!') end elseif msgcontains(msg, 'ghoul') then if pay(cid,1000)then selfSay('/m ghoul') selfSay('/m ghoul') selfSay('/m ghoul') else selfSay('Your dont have the money(10 platinum) go away!') end elseif msgcontains(msg, 'yeti') then if pay(cid,2000)then selfSay('/m yeti') else selfSay('Your dont have the money(20 platinum) go away!') end elseif msgcontains(msg, 'warlock') then if pay(cid,7500)then selfSay('/m warlock') else selfSay('Your dont have the money(75 platinum) go away!') end elseif msgcontains(msg, 'cyclops') then if pay(cid,999)then selfSay('/m cyclops') selfSay('/m cyclops') selfSay('/m cyclops') else selfSay('Your dont have the money(999 gps) go away!') end elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then selfSay('Good bye, ' .. creatureGetName(cid) .. '!') focus = 0 talk_start = 0 end endendfunction onCreatureChangeOutfit(creature)endfunction onThink() if (os.clock() - talk_start) > 30 then if focus > 0 then selfSay('Next Please...') end focus = 0 end if focus ~= 0 then if getDistanceToCreature(focus) > 5 then selfSay('Good bye then.') focus = 0 end endend
Agora vá em data/npc e crie um arquivo chamado "Summoner.xml" e dentro dele adicione este code :
<?xml version="1.0"?><npc name="Summoner" script="data/npc/scripts/summoner.lua" access="3"><look type="75" head="75" body="75" legs="75" feet="75"/></npc>
Agora Ajustando o preço vai em "Summoner.lua" e procure "if pay(cid,XX)then". no XX voce troca para o preço que voce quer....
dai é só edita a mensagem em baixo
que fala o preço. :grin:
Entaum depois eh so vc colocar o Spawn dele aonde vc quiser :w00t:
Espero ter ajudado. :smiling: