Ir para conteúdo
Entre para seguir isso  
Big Show Ot

NPC Que Vende Bps De Potions!!

Recommended Posts

Big Show Ot    0
Big Show Ot

Bom Esse Npc Foi Eu Que Fiz..

Testado Na Versão 8.10..

Vamos A Oq Intereça:)

 

Va Em data\npc Copia Algum Arkivo .xml E Renomeia Para Potions.xml

Apaga Tudo E Cola Isso Dentro..

<?xml version="1.0"?>

 

<npc name="Potions" script="data/npc/scripts/Bppotions.lua" access="5" lookdir="2" autowalk="25">

<mana now="800" max="800"/>

<health now="200" max="200"/>

<look type="134" head="78" body="88" legs="0" feet="88"/>

</npc>

Salve-O..

Agora Va Em data\npc\scripts.Copie Algum Arkivo .lua Renomeie-o Para Bppotions.lua.

Apaga Tudo E Cole Isso Dentro..

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)

local msg = string.lower(msg)

 

if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) < 4 then

selfSay('Hello ' .. creatureGetName(cid) .. '! Eu Vendo Bps De Potions(Para Saber Quais Fale bps).')

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, 'bps') then

selfSay('Eu Vendo, bp strong health potion (3k),bp strong mana potion (3k),bp health potion (2k),bp mana potion (2k),bp great health potion (5k),bp great mana potion (5k).')

 

elseif msgcontains(msg, 'bp strong health potion') then

buyContainer(cid,2000,7588,100,3000)

 

elseif msgcontains(msg, 'bp strong mana potion') then

buyContainer(cid,2001,7589,100,3000)

 

elseif msgcontains(msg, 'bp health potion') then

buyContainer(cid,2000,7618,100,2000)

 

elseif msgcontains(msg, 'bp mana potion') then

buyContainer(cid,2001,7620,100,2000)

 

elseif msgcontains(msg, 'bp great health potion') then

buyContainer(cid,2000,7591,2,5000)

 

elseif msgcontains(msg, 'bp great mana potion') then

buyContainer(cid,2001,7590,2,5000)

 

 

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

Salve-o E Pronto..

 

Agora Se VocÊ Kise Coloka Ele No Map Editor

Va Na Pasta Onde Esta Seu Map Editor..Abra Ela,Procure Pelo Arkivo Chamado Creatures.xml

E Coloke Isso Dentro(Nao Apague Nada!!)

<creature looktype="140" name="Potions" head="109" body="109" legs="128" feet="127" type="npc"/>

Pronto..

 

Creditos 100% Para Mim...

Doe OT$ Ai..:bye:

Compartilhar este post


Link para o post
Jovial    2
Jovial

Obrigado pela contribuição.

 

Aprovado.

Compartilhar este post


Link para o post
leodoidao8    0
leodoidao8

Rox

kra Ja tinha visto NPC

assim mais sempre vinha com alguns bug n achei nenhum bug nessi

vlw

Compartilhar este post


Link para o post
Big Show Ot    0
Big Show Ot

Valeu Pelos Elogios...

Doa Uns OT$ Ai.. xD

Compartilhar este post


Link para o post
BlueAvenger    0
BlueAvenger

Aew cara muitissimo obrigado, a tempos eu tava procurando isso, meus parabens

Obrigado por traze-lo até nós da OTNET~

Aprovado

Compartilhar este post


Link para o post
Mk4    0
Mk4

Muito bom cara, belo trabalho...

 

Falou..

 

~~~~~~

Compartilhar este post


Link para o post
Big Show Ot    0
Big Show Ot

Como eu Jah Disse Brigado Pelos Elogios..

Compartilhar este post


Link para o post
leandro weirich    0
leandro weirich

ou n sei como por ele no meu mapa plx me ajudem

Compartilhar este post


Link para o post
Raizens_    0
Raizens_

Não gostei, não funciona para Forgotten...

Se puder por para funcionar...

Compartilhar este post


Link para o post
Big Show Ot    0
Big Show Ot
leandro weirich

VC Tem Q Baxar Um Map Editor..

Baxa Ele.

Estraia Em Qualker Lugar..De Preferencia Dentro De Uma Pasta..^^

Dai Abra O Arkivo Q VC Estraiu..CREATURES.XML

Dai Vc Vai Ih Beeeem Pra Baxo..

Vc Vai Axa Algo Assim No Começo..

<creature looktype="105" name="Badger" type="monster" />

Va Pra Baxo Ate Vc Axa Algo Assim

<creature looktype="140" name="Albert" head="109" body="109" legs="128" feet="127" type="npc"/>

Com O Final .. Type="Npc"/>

De Um Espaco..

I Cola Akilo Q eu Falei Ali Incima xD

<creature looktype="140" name="Potions" head="109" body="109" legs="128" feet="127" type="npc"/>

Se Nao Der.. Manda Uma Mp Para Mim Que Eu Posso Esplica Melhor.. Cum SS ...etc..

vlw

Compartilhar este post


Link para o post
Lukinhasmt    0
Lukinhasmt

Aew boa me ajudo.

Compartilhar este post


Link para o post
Cinkuenta    0
Cinkuenta

muito bom tutorial :) eu APROVO.

Tchau

Compartilhar este post


Link para o post
zach    0
zach

eu puis essi npc..

so que quando se compra as bps di potions, so vem a bp sem potions dentro.. pq isso?

alguem POR FAVOR/PELAMOR DI DEUS pode me ajuda?

tento.. tento e n consigu..

obrigado

Compartilhar este post


Link para o post
fram_laran    0
fram_laran

Af menha mae tem penis

Compartilhar este post


Link para o post
Sorc LokoO    0
Sorc LokoO

AK NA FUNFO

AFfff

sei pq

Compartilhar este post


Link para o post
charles chaleron    0
charles chaleron

muitu bom mesmo

bom topico manda mais scripts ai

flw manu!

Compartilhar este post


Link para o post
lucaorox    0
lucaorox

awe kra to com 1 problema.. eu ccrio o npc coloco no map e tals , msa quando ele vende a bp ela vem vazia , como vc pode me ajuda?! tem scrip pros potions?! me passe! *.*

Compartilhar este post


Link para o post
Vigborg    0
Vigborg

Mto bom cara parabéns ! :D

continue assim!!!!

Compartilhar este post


Link para o post
Paulinho    0
Paulinho

Só uma pergunta, tem Ultimate Health Potion?

 

 

 

Grato.

 

Sem mais.

Compartilhar este post


Link para o post
Voros    3
Voros

mto bom...configurei ele pra vender BPS de potion SO para vips!

mas muito legal msm!vlw ai

Aprovado

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.

×