Npc Que Vende Rings :)

pantufa
em NPCs, monsters e raids

pantufa

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/03/08Posts: 13Char no Tibia: not

Bom como Scripter vou passar a voces uma criaçao minha

 

1º> vá na pasta data/npcs copie um npc renomei-o como Gui,abra e apage tudo e coloque isso

 

<?xml version="1.0"?>
<npc name="Gui" script="data/npc/scripts/rings.lua" access="3" lookdir="2">
<mana now="800" max="800"/>
<health now="200" max="200"/>
<look type="129" head="74" body="110" legs="120" feet="80"/>
</npc>

 

2º>vá a pasta data/npc/scripts copie um e renomei-o como rings,apaue o que tem dentro e coloque isso \/

 


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)
if (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Hello, ' .. creatureGetName(cid) .. '! I sell sword ring (100gp), axe ring (100gp), club ring (100gp), time ring(100gp), life ring (100gp), energy ring (100gp), power ring (100), might ring (100gp), stealth ring(100gp) and ring of healing(100gp).')
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, '[color="#FF8C00"]might ring') then
buy(cid,[color="#FF0000"]2164[/color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]stealth ring[/color]') then
buy(cid,[color="#FF0000"]2165[/color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]power ring[/color]') then
buy(cid,[color="#FF0000"]2166[/color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]energy ring[/color]') then
buy(cid,[color="#FF0000"]2167[color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]life ring[/color]') then
buy(cid,[color="#FF0000"]2168[/color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]time ring[/color]') then
buy(cid,[color="#FF0000"]2169[/color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]sword ring[/color]') then
buy(cid,[color="#FF0000"]2107[/color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]axe ring[/color]') then
buy(cid,[color="#FF0000"]2208[/color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]club ring[/color]') then
buy(cid,[color="#FF0000"]2209[/color],getCount(msg),100)
elseif msgcontains(msg, '[color="#FF8C00"]ring of healing[/color]') then
buy(cid,[color="#FF0000"]2214[/color],getCount(msg),100)
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

 

id do anel

 

nome do ring

 

se quiser colocar algum ring :

 

elseif msgcontains(msg, 'NOME DO ANEL') then
buy(cid,ID DO ANEL,getCount(msg),PREÇO AQUI)

 

Espero ter ajudado :)

 

até a proxima :smile_positivo:

Fan my ? ~






Ninja Text ~




Fake ~

765765

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 09/02/08Posts: 28

gostei

vo testa aki

e flo c deu certo

BY 765765




FanBar...Te ajudei ??? Gosta de min ??? Usa minha Fanbar



Sou Fan de...

jmazzacaro

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/11/07Posts: 29Char no Tibia: PsyKina

Testei nao deu certo

Narutinhu

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 07/05/08Posts: 82Char no Tibia: Kagero Sinx

Se realmento ele funfa otimo tutor ;)

 

mais funfa na versão 8.10 ?

 

flw abraço

Procurando Ot Perfeito :D

A revolução do furuto õ/



QUOTE
15:28 Follow Me [101]: SELL MLS (15:29 You see a magic longsword (Atk:55, Def:40). It weighs 43.00 oz. It is the magic Cyclopmania Sword.)[OFFER YOU]


omg? noob de mais --'

leoloko12

LeozeraRox
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 16/02/08Posts: 364Gênero: MasculinoChar no Tibia: Infernus

Vlw kra continue assim

deu certinho

 

Parabens

 

abrass

Criador e fundador do Styller Yourots!

Criado em 2010, onde teve sua primeira edição na versão 8.1.

Obrigado a todos que apoiaram esse projeto!

 

>> http://www.xtibia.com/forum/topic/138461-original-styller-yourots-gold-edition-2016-860-completo/

Abrass..
Att
LeozeraRox


Respeite os direitos autorais, não copiei!!!

gnomow157

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/10/08Posts: 35Char no Tibia: Gnomow

os dois npc que vc posto deram errado...

pra vende bp de ring e pra vende ring

 

o outro nem fala com o player, qndo fala hi ele fala: sorry i talk n sei oq

 

e esse de vende ring, falaa e tudo, mas nao vende ring

o player fala

Time ring

ele nao fala nada

ja tentei todas as falas. ele n responde ;P