VI

Npc Q Vende Bps De Runas

Por vinnie, 12 de mai. de 2007 em NPCs, monsters e raids

otserv
tibia
script
16
5.4k
vinnieV
12 de maio de 2007 às 00:19

Bem irei postar um npc q eu testei no mapa evolutions 0.7.8 ele esta funcionando direitinho cada runa tem uma cor da bp para nao se perder

Bem la vai o scripst

1--- Pegue o script q vende runas(dependedo de qual for o ot é runas)

2--- copie e cole a seguinte informaçao

 

----------------------------------------------------------------------------------------------------------------------------------------

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) .. '! I sell runes,bp runes, wands and rods.')

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

selfSay('I sell hmms (50gps), uhs (150gps), gfbs (100gps), explosions (150gps), sds (200gps), and blank runes (5gps).')

elseif msgcontains(msg, 'wands') then

selfSay('I sell wand of inferno (15k), plague (5k), cosmic energy (10k), vortex (500gp) and dragonbreath (1k).')

elseif msgcontains(msg, 'rods') then

selfSay('I sell quagmire (10k), snakebite (500gp), tempest (15k), volcanic (5k) and moonlight rod (1k).')

 

elseif msgcontains(msg, 'inferno') then

buy(cid,2187,getCount(msg),15000)

elseif msgcontains(msg, 'plague') then

buy(cid,2188,getCount(msg),5000)

elseif msgcontains(msg, 'cosmic energy') then

buy(cid,2189,getCount(msg),10000)

elseif msgcontains(msg, 'vortex') then

buy(cid,2190,getCount(msg),500)

elseif msgcontains(msg, 'dragonbreath') then

buy(cid,2191,getCount(msg),1000)

 

elseif msgcontains(msg, 'quagmire') then

buy(cid,2181,getCount(msg),10000)

elseif msgcontains(msg, 'snakebite') then

buy(cid,2182,getCount(msg),500)

elseif msgcontains(msg, 'tempest') then

buy(cid,2183,getCount(msg),15000)

elseif msgcontains(msg, 'volcanic') then

buy(cid,2185,getCount(msg),5000)

elseif msgcontains(msg, 'moonlight') then

buy(cid,2186,getCount(msg),1000)

 

elseif msgcontains(msg, 'bp sd') then

buyContainer(cid,2003,2268,1,6000)

 

elseif msgcontains(msg, 'bp explosion') then

buyContainer(cid,2000,2313,3,4000)

elseif msgcontains(msg, 'bp uh') then

 

buyContainer(cid,2001,2273,1,3000)

elseif msgcontains(msg, 'bp hmm') then

 

buyContainer(cid,2002,2311,5,2000)

elseif msgcontains(msg, 'bp gfb') then

 

buyContainer(cid,2000,2304,2,3000)

 

elseif msgcontains(msg, 'hmm') then

buy(cid,2311,getCount(msg),100)

elseif msgcontains(msg, 'uh') then

buy(cid,2273,getCount(msg),150)

 

elseif msgcontains(msg, 'gfb') then

buy(cid,2304,getCount(msg),150)

 

elseif msgcontains(msg, 'explosion') then

buy(cid,2313,getCount(msg),200)

 

elseif msgcontains(msg, 'sd') then

buy(cid,2268,getCount(msg),300)

 

elseif msgcontains(msg, 'blank') then

buy(cid,2260,getCount(msg),5)

 

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

----------------------------------------------------------------------------------------------------------------------------------------

e é isso vc tera um npc q vende runas e bps de runas. O PREÇO ESTA IGUAL O DO TIBIA RL ENTAO SE VCS QUISEREM DEMINUIR O PREÇO MUDEM NAS SEGUINTES INFORMAÇOES EM VERMELHO\/

elseif msgcontains(msg, 'bp sd') then

buyContainer(cid,2003,2268,1,6000)

 

elseif msgcontains(msg, 'bp explosion') then

buyContainer(cid,2000,2313,3,4000)

elseif msgcontains(msg, 'bp uh') then

 

buyContainer(cid,2001,2273,1,3000)

elseif msgcontains(msg, 'bp hmm') then

 

buyContainer(cid,2002,2311,5,2000)

elseif msgcontains(msg, 'bp gfb') then

 

buyContainer(cid,2000,2304,2,3000)

 

elseif msgcontains(msg, 'hmm') then

buy(cid,2311,getCount(msg),100)

elseif msgcontains(msg, 'uh') then

buy(cid,2273,getCount(msg),150)

 

elseif msgcontains(msg, 'gfb') then

buy(cid,2304,getCount(msg),150)

 

elseif msgcontains(msg, 'explosion') then

buy(cid,2313,getCount(msg),200)

 

elseif msgcontains(msg, 'sd') then

buy(cid,2268,getCount(msg),300)

 

elseif msgcontains(msg, 'blank') then

buy(cid,2260,getCount(msg),5)

 

 

Bem espero ter ajudado :tongue:

 

Creditos: 100% para mim

Editado Maio 12 por vinnie

HugoBeolchiH
12 de maio de 2007 às 18:41

Opa Ajudo Mto..

Vlw ai =)

tava procurandu isso mesmo =)

cya

vinnieV
12 de maio de 2007 às 20:18

Vlw HugoBeolchi

so tem q consertar uma coisa o npc fala ! I sell runes, wands and rods. eu mudar para ! I sell runes,bp runes, wands and rods.

2 semanas depois...
skynagerloasS
24 de maio de 2007 às 21:01

Tópico contendo somente 1 NpC,

essa seção é para DataPacks com 3 ou mais Npcs,

~o{Tópico Movido}o~,

Abraços.

2 meses depois...
SpectrusS
30 de julho de 2007 às 19:19

Parabens,Esta muito bom. Esse usarei em meu OT.

Tudo organizado,só faltou dar um

QUOTE
no Script,porem esta ótimo.

Editado Julho 30 por Spectrus

1 mês depois...
LeocorvoL
08 de agosto de 2007 às 01:48

Vlw kra tava procurando issu mesmo, para facilitar os players !!!

 

Ty :p

3 semanas depois...
AoriaA
22 de agosto de 2007 às 15:20

Muito bom..

Eu tava precisando aki..

Parabéns, Nota 10.

Dei uns ajustes, daih fiko muito bom..

Ajudo muito aki no ot...

 

 

OBS: Poderia dar um "Quote" no script.

 

Abraço.

 

 

 

 

 

 

Atenciosamente, LancellotWillis.

Maum MigoM
26 de agosto de 2007 às 22:27

Legal, inovador...

Como o LancellotWillis disse, podia dar um quote no script, para ficar mais organizado.

Mas assim já está bom =)

4 meses depois...
InfoservI
20 de dezembro de 2007 às 15:39

Hey ele so vende bp de runas? ou vende runas separadas?

 

 

POST

 

muito BOM gostei!!!

CarlicC
20 de dezembro de 2007 às 15:56

@vinnie

Dahora esse script mas isso pega em Ot's 8.0???

 

Ah, e uma dica... na próxima vez poe o script no quote pra ficar mais organizado do que já tá firmê? :smile_positivo:

 

See ya! :winksmiley02:

1 mês depois...
ahhhA
14 de janeiro de 2008 às 14:39

Cara vc sabe faze esse bagulho com mf

4 meses depois...
ririwR
11 de maio de 2008 às 09:55

e potions todas as potions vc sabe?

 

=)

maluluM
15 de maio de 2008 às 09:14

tu tinha ki por em quote brow

2 semanas depois...
careca21C
22 de maio de 2008 às 21:19

Vlw Otimo

blz Gratz

Ta Ajudando Muitos

pso Muitos Tmb Viran O seu Topico !!!

TererekoT
23 de maio de 2008 às 00:18

tava procurando

otimo parabéns