joia 2 Postado Dezembro 17, 2006 Share Postado Dezembro 17, 2006 ;D koeh guruzada! sentiru minha falta? to di volta aos Ots e aos meus tutoriais. Mas antes kero lembrar-lhes de que quando vc for comprá-la tera que deixar o espaço de cima (onde a bp/bag ficam). vamos lá: 1º Passo - Olhe no seu server o nome do seu Npc que vende runas, geralmente é o Dark Rodo né, mais tem gente que muda porque axa que fica mais legal. Intaum vá na pasta Data e a seguir entre na pasta Npcs e procure pelo seu Npc que vende runas e clique nele com o botão direito e vá em propriedades. 2º Passo -agora então localize isto: script="data/npc/scripts/x.lua" OBS: o "x" é variávem nos Ots, mas provalmente tem nome de "runes" 2º Passo -entao pegue o nome "x" que terá ai e vá na pasta scripts que há na pasta Npcs, então localize o arquivo "x" e clike nele com o botão direito e clike em editar então abria o arquivo num bloco de notas. 3º Passo - adicione isto no seus script (no meio de onde estao as outras runas) elseif msgcontains(msg, 'bp hmm 100') and focus == cid then buy(cid,2001,1,10000) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) buy(cid,2311,100,0) talk_start = os.clock() elseif msgcontains(msg, 'bp gfb 100') and focus == cid then buy(cid,2000,1,10000) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) buy(cid,2304,100,0) talk_start = os.clock() elseif msgcontains(msg, 'bp explosion 100') and focus == cid then buy(cid,2001,1,10000) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) buy(cid,2313,100,0) talk_start = os.clock() elseif msgcontains(msg, 'bp uh 100') and focus == cid then buy(cid,2002,1,15000) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) buy(cid,2273,100,0) talk_start = os.clock() elseif msgcontains(msg, 'bp sd 100') and focus == cid then buy(cid,2003,1,20000) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) buy(cid,2268,100,0) talk_start = os.clock() agora é só salvar e ser feliz xD EDITED: credits by Dud por \/ Kra... vc postou ai para os ots q n possuem o comando "sellcontainer".masi ai vai para os q tem ( bem + facil ): CODE elseif msgcontains(msg, 'bp hmm') and focus == cid then sellcontainer(cid,id-da-bp,id-da-hmm,charges,custo) Agora bp d mf: CODE elseif msgcontains(msg, 'bp mfs') and focus == cid then sellcontainer(cid,id-da-bp,2006,7,custo) cya Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/ Compartilhar em outros sites More sharing options...
cinhusk8ot 0 Postado Dezembro 18, 2006 Share Postado Dezembro 18, 2006 Ficou Massa. Valew ai ! Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-198641 Compartilhar em outros sites More sharing options...
DuD 0 Postado Dezembro 18, 2006 Share Postado Dezembro 18, 2006 Kra... vc postou ai para os ots q n possuem o comando "sellcontainer". masi ai vai para os q tem ( bem + facil ): elseif msgcontains(msg, 'bp hmm') and focus == cid then sellcontainer(cid,id-da-bp,id-da-hmm,charges,custo) Agora bp d mf: elseif msgcontains(msg, 'bp mfs') and focus == cid thensellcontainer(cid,id-da-bp,2006,7,custo) cya Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-198654 Compartilhar em outros sites More sharing options...
vini_xxe 0 Postado Janeiro 3, 2007 Share Postado Janeiro 3, 2007 Funciona em ot 7.9? Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-210580 Compartilhar em outros sites More sharing options...
Jk2 0 Postado Janeiro 23, 2007 Share Postado Janeiro 23, 2007 Eh bom vo add aki no meu ot a galera vai gosta ctz Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-227490 Compartilhar em outros sites More sharing options...
Jvchequer 63 Postado Junho 6, 2007 Share Postado Junho 6, 2007 Isto é praticamente um NPC. Portanto, movido. Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-312676 Compartilhar em outros sites More sharing options...
capeta7 0 Postado Junho 21, 2007 Share Postado Junho 21, 2007 aew kara eu tentei fazer esse npc no meu ot mas n deu certo =( mas fora isso o tuto tah muito bom ... da pra passar o script inteiro dele ? se puder, vlw =D Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-322044 Compartilhar em outros sites More sharing options...
MarcolinoGOD 1 Postado Julho 12, 2007 Share Postado Julho 12, 2007 @capeta7 Coloca isso aqui: -- Npc by Zorzin =) local focus = 0 local talk_start = 0 local target = 0 local following = false local 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) -- greeting phrase if string.find(msg, '(%a*)hi(%a*)') and focus == 0 and string.len(msg) == 2 and getDistanceToCreature(cid) < 4 then selfSay('Hi ' .. creatureGetName(cid) .. '! I sell runes.') focus = cid talk_start = os.clock() elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif focus == cid then talk_start = os.clock() -- Mensages: buy_error = 'Sorry, you dont have enough money.' buy_ok = 'Here you are.' buy_no = 'Ok. Maybe another time.' -- sell_error = 'Sorry, you dont have that item.' sell_ok = 'Thanks for this item.' sell_no = 'Ok. Maybe another time.' -- preco_hmm = getConfigNumber("price_hmm") cargas_hmm = getConfigNumber("charges_hmm") preco_uh = getConfigNumber("price_uh") cargas_uh = getConfigNumber("charges_uh") preco_gfb = getConfigNumber("price_gfb") cargas_gfb = getConfigNumber("charges_gfb") preco_explo = getConfigNumber("price_explo") cargas_explo = getConfigNumber("charges_explo") preco_gfb = getConfigNumber("price_gfb") cargas_gfb = getConfigNumber("charges_gfb") preco_sd = getConfigNumber("price_sd") cargas_sd = getConfigNumber("charges_sd") if msgcontains(msg, 'rune') or msgcontains(msg, 'runes') then selfSay('I sell hmms ('.. preco_hmm ..'gps), uhs ('.. preco_uh ..'gps), gfbs ('.. preco_gfb ..'gps), explosions ('.. preco_explo ..'gps), sds '.. preco_sd ..'gps) and blank runes (5gps).') elseif msgcontains(msg, 'hmm') or msgcontains(msg, 'hmms') or msgcontains(msg, 'heavy magic missile') then bs,itemid,count,subtype,price,iscountable,article,name,plural = 'buy',2311,getCountNumber(msg),cargas_hmm,preco_hmm,0,'a','heavy magic missile rune','heavy magic missile runes' sendMsgBuySell(cid,itemid,count,price,article,name,plural,bs) talk_state = 392 elseif msgcontains(msg, 'uh') or msgcontains(msg, 'uhs') or msgcontains(msg, 'ultimate healing') then bs,itemid,count,subtype,price,iscountable,article,name,plural = 'buy',2273,getCountNumber(msg),cargas_uh,preco_uh,0,'an','ultimate healing rune','ultimate healing runes' sendMsgBuySell(cid,itemid,count,price,article,name,plural,bs) talk_state = 392 elseif msgcontains(msg, 'gfb') or msgcontains(msg, 'gfbs') or msgcontains(msg, 'great fireball') then bs,itemid,count,subtype,price,iscountable,article,name,plural = 'buy',2304,getCountNumber(msg),cargas_gfb,preco_gfb,0,'a','great fireball rune','great fireball runes' sendMsgBuySell(cid,itemid,count,price,article,name,plural,bs) talk_state = 392 elseif msgcontains(msg, 'explo') or msgcontains(msg, 'explosion') then bs,itemid,count,subtype,price,iscountable,article,name,plural = 'buy',2313,getCountNumber(msg),cargas_explo,preco_explo,0,'an','explosion rune','explosion runes' sendMsgBuySell(cid,itemid,count,price,article,name,plural,bs) talk_state = 392 elseif msgcontains(msg, 'sd') or msgcontains(msg, 'sds') or msgcontains(msg, 'sudden death') then bs,itemid,count,subtype,price,iscountable,article,name,plural = 'buy',2268,getCountNumber(msg),cargas_sd,preco_sd,0,'a','sudden death rune','sudden death runes' sendMsgBuySell(cid,itemid,count,price,article,name,plural,bs) talk_state = 392 elseif msgcontains(msg, 'blank') then bs,itemid,count,subtype,price,iscountable,article,name,plural = 'buy',2260,getCountNumber(msg),0,5,0,'a','blank rune','blank runes' sendMsgBuySell(cid,itemid,count,price,article,name,plural,bs) talk_state = 392 elseif talk_state == 392 then if msgcontains(msg, 'yes') or msgcontains(msg, 'no') then if bs == 'buy' then buyItem(cid,itemid,count,subtype,price,iscountable,name,plural,buy_error,buy_ok, buy_no,msg) else sellItem(cid,itemid,count,subtype,price,iscountable,sell_error,sell_ok,sell_no,m sg) end talk_state = 0 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 focus > 0 then x, y, z = creatureGetPosition(focus) myx, myy, myz = selfGetPosition() if ((myy-y==0) and (myx-x<=0 and myx-x>=-4)) then selfTurn(1) end if ((myy-y==0) and (myx-x>=0 and myx-x<=4)) then selfTurn(3) end if ((myx-x==0) and (myy-y<=0 and myy-y>=-4)) then selfTurn(2) end if ((myx-x==0) and (myy-y>=0 and myy-y<=4)) then selfTurn(0) end if ((myy-y==-2) and (myx-x>=-1 and myx-x<=1)) then selfTurn(2) end if ((myy-y==2) and (myx-x>=-1 and myx-x<=1)) then selfTurn(0) end if ((myx-x==2) and (myy-y>=-1 and myy-y<=1)) then selfTurn(3) end if ((myx-x==-2) and (myy-y>=-1 and myy-y<=1)) then selfTurn(1) end if ((myy-y==-3) and (myx-x>=-2 and myx-x<=2)) then selfTurn(2) end if ((myy-y==3) and (myx-x>=-2 and myx-x<=2)) then selfTurn(0) end if ((myx-x==3) and (myy-y>=-2 and myy-y<=2)) then selfTurn(3) end if ((myx-x==-3) and (myy-y>=-2 and myy-y<=2)) then selfTurn(1) end if ((myy-y==-4) and (myx-x>=-3 and myx-x<=3)) then selfTurn(2) end if ((myy-y==4) and (myx-x>=-3 and myx-x<=3)) then selfTurn(0) end if ((myx-x==4) and (myy-y>=-3 and myy-y<=3)) then selfTurn(3) end if ((myx-x==-4) and (myy-y>=-3 and myy-y<=3)) then selfTurn(1) end end 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 Pronto! Vê se da certo porque a minha versão é 7.92 @Topic Parabens, bom tuto! Continue assim... Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-338272 Compartilhar em outros sites More sharing options...
solock-loko 0 Postado Julho 30, 2007 Share Postado Julho 30, 2007 (editado) Desculpa o Incomodo é Pq Sou Meio Newba Em assunto de OT No Meu Runes Ta Isso ... Kual Lugar Devo Colocar Pa Vender Bp de Mf ...?? local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start 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 -- OTServ event handling functions end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'light wand', 'lightwand'}, 2163, 500, 'magic light wand') shopModule:addBuyableItem({'mana fluid', 'manafluid'}, 2006, 100, 7, 'mana fluid') shopModule:addBuyableItem({'life fluid', 'lifefluid'}, 2006, 80, 10, 'life fluid') shopModule:addBuyableItem({'heavy magic missile', 'hmm'}, 2311, 7000, 100, 'heavy magic missile rune') shopModule:addBuyableItem({'great fireball', 'gfb'}, 2304, 7000, 100, 'great fireball rune') shopModule:addBuyableItem({'explo', 'xpl'}, 2313, 9000, 100, 'explosion rune') shopModule:addBuyableItem({'ultimate healing', 'uh'}, 2273, 9000, 100, 'ultimate healing rune') shopModule:addBuyableItem({'sudden death', 'sd'}, 2268, 10000, 100, 'sudden death rune') shopModule:addBuyableItem({'blank', 'rune'}, 2260, 10, 'blank rune') shopModule:addBuyableItem({'wand of inferno', 'inferno'}, 2187, 15000, 'wand of inferno') shopModule:addBuyableItem({'wand of plague', 'plague'}, 2188, 5000, 'wand of plague') shopModule:addBuyableItem({'wand of cosmic energy', 'cosmic energy'}, 2189, 10000, 'explosion rune') shopModule:addBuyableItem({'wand of vortex', 'vortex'}, 2190, 500, 'wand of cosmic energy') shopModule:addBuyableItem({'wand of dragonbreath', 'dragonbreath'}, 2191, 1000, 'wand of dragonbreath') shopModule:addBuyableItem({'quagmire rod', 'quagmire'}, 2181, 10000, 'quagmire rod') shopModule:addBuyableItem({'snakebite rod', 'snakebite'}, 2182, 500, 'snakebite rod') shopModule:addBuyableItem({'tempest rod', 'tempest'}, 2183, 15000, 'tempest rod') shopModule:addBuyableItem({'volcanic rod', 'volcanic'}, 2185, 5000, 'volcanic rod') shopModule:addBuyableItem({'moonlight rod', 'moonlight'}, 2186, 1000, 'moonlight rod') npcHandler:addModule(FocusModule:new()) Detalhes do Meu ServEvolutions 0.7.8 Versão 8.0 Editado Julho 31, 2007 por solock-loko Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-351868 Compartilhar em outros sites More sharing options...
olhodigital 0 Postado Agosto 4, 2007 Share Postado Agosto 4, 2007 Alguem pode botar inteiro como fica? Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-354433 Compartilhar em outros sites More sharing options...
capeta7 0 Postado Agosto 4, 2007 Share Postado Agosto 4, 2007 da pra usa esse npc em 8.0 ??? Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-354852 Compartilhar em outros sites More sharing options...
jmazzacaro 0 Postado Novembro 30, 2007 Share Postado Novembro 30, 2007 preciso saber se esse npc da pra usar em ot 8.0 tb por favor responda Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-430212 Compartilhar em outros sites More sharing options...
victor bacchi 0 Postado Dezembro 1, 2007 Share Postado Dezembro 1, 2007 Em Devland ñ funciona. até + Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-431198 Compartilhar em outros sites More sharing options...
h3online 1 Postado Dezembro 3, 2007 Share Postado Dezembro 3, 2007 Não funciono em yurots 8.0 Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-431903 Compartilhar em outros sites More sharing options...
dougauche 0 Postado Dezembro 13, 2007 Share Postado Dezembro 13, 2007 Não teu no YurOTS >.<" Link para o comentário https://xtibia.com/forum/topic/35859-bp-de-runasmf/#findComment-439319 Compartilhar em outros sites More sharing options...
Posts Recomendados