Ir para conteúdo
Entre para seguir isso  
Bonano

Npc Summoner

Recommended Posts

Bonano    0
Bonano

Eh um Npc Que Summona Bixos Para YurOts.

 

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 isto:

 

<?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 você troca para o preço que voce quer....

dai é só edita a mensagem em baixo

que fala o preço.

 

Entaum depois eh so vc colocar o Spawn dele aonde vc quiser

 

Espero Ter Ajudado xD

 

Creditos: Kozz

 

Bonano ~

Compartilhar este post


Link para o post
T l l S    0
T l l S

Os creditos sao de qm?

Compartilhar este post


Link para o post
T l l S    0
T l l S

e nao seria assim

<?xml version="1.0"?>  <npc name="Summoner" script="data/npc/scripts/summoner.xml" access="3">  <look type="75" head="75" body="75" legs="75" feet="75"/>  </npc>  [/b]

hein??inves de

 <?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>  [/b]

C boto summoner.lua.Ahhhh, voltando aos creditos, no passado eu fiz um npc igual a esse ai, sera q nao eh meu??

Compartilhar este post


Link para o post
Bonano    0
Bonano

Não Meu Querido...eh Summoner.lua pq eh onde o npc esta salvo =)E Respondendo a sua pergunta, os creditos são de kozz...desculpe se tinha esquecido dos creditos.PS.: Obrigado Por me Alerta sobre os creditosBonano ~

Compartilhar este post


Link para o post
Convidado Rabico   
Convidado Rabico

KKkk

Fiko mt Top xD

Parabens~

Compartilhar este post


Link para o post
Convidado Rabico   
Convidado Rabico

KKkk

Fiko mt Top xD

Parabens~

Compartilhar este post


Link para o post
Convidado redemolito   
Convidado redemolito

Cara legal + curti + o do Thallys eh um pouco mais criativo!

Compartilhar este post


Link para o post
Gean    0
Gean

vsf q merda é essa

Compartilhar este post


Link para o post
mendez    0
mendez

E até legal o script, mas não achei viavel pra coloka em ot

Compartilhar este post


Link para o post
Le588    0
Le588

Script legal, mas ai os caras ricos upam level 1 milhão. Alem de peder o Rpg...

Compartilhar este post


Link para o post
BlueAvenger    0
BlueAvenger

é bom para servers de fim de semana, zuados e talz apenas para se divertir para um server sério não recomendo mais o script é legal.

Compartilhar este post


Link para o post
gusloki    0
gusloki

vlw broder

Compartilhar este post


Link para o post
Kah~    0
Kah~

klOLOlool

Compartilhar este post


Link para o post
ADM V8    0
ADM V8

askPOaksOPAskPOA KE LOKO..! =P

Compartilhar este post


Link para o post
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×