Bom,como meu topico anterior aqui foi npcs que vende rings agora estou postando um que vende Bps de rings
Vamos lá
1º- vá na pasta data/npc copie um renomeio como Seller Rings abra-o apague tudo e coloque isso dentro :
<?xml version="1.0"?> <npc name="[color="#FF0000"]Seller Rings[/color]" script="data/npc/scripts/ring.lua" access="3" autowalk="30"> <mana now="800" max="800"/> <health now="800" max="800"/> <look type="145" head="0" body="132" legs="114" feet="57" addons="3"/> </npc>
Vermelho : voce pode trocar o nome de seu npc é so trocar o vermelho e renomear o arquivo
2º vá na pasta data/npcs/scripts copie um arquivo e renomei-o como ring,apague tuo dentro e coloque isso :
function onCreatureSay(cid, type, msg) local msg = string.lower(msg) if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) < 4 then selfSay('Hello ' .. creatureGetName(cid) .. ' ! Vendo Bps de rings se quiser diga rings') 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() if msgcontains(msg, 'rings') then selfSay('Vendo Ring of Healing,Time ring,Sword,axe e club ring é so dizer bp e o nome : 3k cada BP') elseif msgcontains(msg, 'bp ring of healing') then buyContainer(cid,2003,2214,100,3000) elseif msgcontains(msg, 'bp time ring') then buyContainer(cid,2000,2206,100,3000) elseif msgcontains(msg, 'bp sword ring') then buyContainer(cid,2001,2210,100,3000) elseif msgcontains(msg, 'bp axe ring') then buyContainer(cid,2002,2211,100,2000) elseif msgcontains(msg, 'bp club ring') then buyContainer(cid,2000,2212,2,3000) elseif msgcontains(msg, 'ring of healing') then buy(cid,2214,getCount(msg),100) elseif msgcontains(msg, 'time ring') then buy(cid,2206,getCount(msg),150) elseif msgcontains(msg, 'sword ring') then buy(cid,2210,getCount(msg),150) elseif msgcontains(msg, 'axe ring') then buy(cid,2211,getCount(msg),200) elseif msgcontains(msg, 'club ring') then buy(cid,2212,getCount(msg),300) elseif string.find(msg, '(%a*)bye(%a*)') 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
Créditos =>Striike(Eu)
mais uma obra minha aqui como sou novo
espero ter ajudado
até a próxima
:smile_positivo: