Preula 0 #1 Postado 2 Dezembro, 2006 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 = 0 talk_start = 0 target = 0 following = false attacking = false function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Good bye then.') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function 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 end end function onCreatureChangeOutfit(creature) end function 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 end end 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. Entaum depois eh so vc colocar o Spawn dele aonde vc quiser Espero ter ajudado. vlw.flw Compartilhar este post Link para o post Compartilhar em outros sites
Linkz 0 #2 Postado 2 Dezembro, 2006 Bom tutorial, mas seria melhor se você explicasse como editar os monstros que ele sumona, as falas, etc...Aprovado Compartilhar este post Link para o post Compartilhar em outros sites
Preula 0 #3 Postado 2 Dezembro, 2006 Ok links..se eu não editar...conforme aparecer dúvidas vou me esforçar ao máximo para ajudar....eh q eu parei com your ots faz tempo...este ´tópico tinha aki nu meu pc....mas eu vo lembrando de algumas coisinhas e ajudo tds =)vlw.flw Compartilhar este post Link para o post Compartilhar em outros sites
lucas10 0 #4 Postado 4 Dezembro, 2006 mto bom...parabens Compartilhar este post Link para o post Compartilhar em outros sites
Brunou 0 #5 Postado 4 Dezembro, 2006 Nao é bom esse npc pq os caara rico do serv pega lvl rapidinho http://forum.otserv.com.br/style_emoticons/<#EMO_DIR#>/biggrin.gif Compartilhar este post Link para o post Compartilhar em outros sites
Convidado samuka #6 Postado 5 Dezembro, 2006 essi negociu eh pa qual protocolo? Compartilhar este post Link para o post Compartilhar em outros sites
Preula 0 #7 Postado 6 Dezembro, 2006 @brunou tem gente q gosta...eu não uso ... mas to ensinando (:@samuka7.6vlw.flw Compartilhar este post Link para o post Compartilhar em outros sites
Convidado Doka_ #8 Postado 7 Dezembro, 2006 MASSA CARAAA, mais ta barato di maisssss, vo bota muitoo carooVALEWWW Compartilhar este post Link para o post Compartilhar em outros sites
Maum Migo 0 #9 Postado 10 Dezembro, 2006 muito bom esse npc... eh bom para, por exemplo, um char naum eh p.a. e quer matar um bixo, mas esse bixo só existe na área de p.a. então vai nesse npc. =) bem rox flws Compartilhar este post Link para o post Compartilhar em outros sites
Maum Migo 0 #10 Postado 10 Dezembro, 2006 muito bom esse npc... eh bom para, por exemplo, um char naum eh p.a. e quer matar um bixo, mas esse bixo só existe na área de p.a. então vai nesse npc. =) bem rox flws Compartilhar este post Link para o post Compartilhar em outros sites
metalchau 0 #11 Postado 10 Dezembro, 2006 bom tutor mas falto umas pekenas paradas... tipo pra qq serve cada linha...palavra etc.. mas issu qlqer um saber =] Compartilhar este post Link para o post Compartilhar em outros sites
metalchau 0 #12 Postado 10 Dezembro, 2006 bom tutor mas falto umas pekenas paradas... tipo pra qq serve cada linha...palavra etc.. mas issu qlqer um saber =] Compartilhar este post Link para o post Compartilhar em outros sites
Preula 0 #13 Postado 15 Dezembro, 2006 @doka_ o preço vc configura aí no script msm if pay(cid,999)thenonde 999 eh o preço vlw.flw Compartilhar este post Link para o post Compartilhar em outros sites
Preula 0 #14 Postado 15 Dezembro, 2006 @doka_ o preço vc configura aí no script msm if pay(cid,999)thenonde 999 eh o preço vlw.flw Compartilhar este post Link para o post Compartilhar em outros sites
Convidado mulambo #15 Postado 16 Dezembro, 2006 mto bom.. como o nosso amigo li disse.. os chares q nm sao p.a. podem matar os bixo! Compartilhar este post Link para o post Compartilhar em outros sites
159468 0 #16 Postado 18 Dezembro, 2006 legal issu ai de npc sumoner Compartilhar este post Link para o post Compartilhar em outros sites
Convidado Hunter #17 Postado 31 Dezembro, 2006 Npc summoner eh meo noob mas se for contar pelo tutorial nota : 10 Compartilhar este post Link para o post Compartilhar em outros sites
Convidado Hateke Kakahi #18 Postado 31 Dezembro, 2006 aew manow muito show pods cre gostei muito continui assim ^.^ Compartilhar este post Link para o post Compartilhar em outros sites
dehhhh 0 #19 Postado 2 Janeiro, 2007 Massa, Mas nao axo muito util para meu ot mas para muita gente ajuda Compartilhar este post Link para o post Compartilhar em outros sites
arthoux 0 #20 Postado 25 Janeiro, 2007 Bom tuto.. mais n tenho mta certeza q isso eh pra server serio!! x).. Falows galera [/img]D:\MeusDocumentos\Arthur\Variados\Minhas imagens (aRtHuR)\O.o.gif[/url] Compartilhar este post Link para o post Compartilhar em outros sites