Ir para conteúdo
Entre para seguir isso  
SiegHarD

Script de venda de runes, wands e rods

Recommended Posts

SiegHarD    0
SiegHarD

Bom achei muitos otservs que tinha essa bug hi , 0 sd 0 wand of inferno e por ai vai .

Nao sei se ja existe esse npc na seçao scritips mais vo posta .

 

Bom vá até a PASTA DO OTSERV > DATA > NPC > E COPIE ALGUN DE LA E APAGUE TUDO DE DENTRO E COLE

 

<?xml version="1.0"?>

 

<npc name="Dark Rodo" script="data/npc/scripts/runes.lua" access="3" lookdir="1">

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

<look type="128" head="78" body="71" legs="82" feet="114"/>

</npc>

S

ALVE COM O NOME DE Dark Rodo

 

FEITO ISSO VÁ ATÉ A PASTA SCRIPTS "PASTA DO OTSERV > DATA > NPC > SCRIPTS

 

ABRA UM ARQUIVO .LUA OU COPIE ALGUN DE LA ABRA APAGUE TUDO E COLE

 

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, 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 (10gps cada), uhs (30gps cada), gfbs (20gps cada), explosions (30gps cada), sds (40gps cada) and blank runes (5gps cada).')

elseif msgcontains(msg, 'wands') then

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

elseif msgcontains(msg, 'rods') then

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

 

-- inicio da venda de wands =)

 

elseif msgcontains(msg, 'inferno') then

count = getCount(msg)

if count == 0 then

selfSay('0 wand of inferno? LOL?')

talk_start = os.clock()

else

buy(cid,2187,count,15000)

end

 

elseif msgcontains(msg, 'plague') then

count = getCount(msg)

if count == 0 then

selfSay('0 wand of plague? LOL?')

talk_start = os.clock()

else

buy(cid,2188,count,5000)

end

 

elseif msgcontains(msg, 'cosmic energy') then

count = getCount(msg)

if count == 0 then

selfSay('0 wand of cosmic energy? LOL?')

talk_start = os.clock()

else

buy(cid,2189,count,10000)

end

 

elseif msgcontains(msg, 'vortex') then

count = getCount(msg)

if count == 0 then

selfSay('0 wand of vortex? LOL?')

talk_start = os.clock()

else

buy(cid,2190,count,0)

end

 

elseif msgcontains(msg, 'dragonbreath') then

count = getCount(msg)

if count == 0 then

selfSay('0 Wand of Dragonbreath? LOL?')

talk_start = os.clock()

else

buy(cid,2191,count,1000)

end

 

-- fim da venda de wands =)

-- inicio da venda de rods =)

 

elseif msgcontains(msg, 'quagmire') then

count = getCount(msg)

if count == 0 then

selfSay('0 Quagmire Rod? LOL?')

talk_start = os.clock()

else

buy(cid,2181,count,10000)

end

 

elseif msgcontains(msg, 'snakebite') then

count = getCount(msg)

if count == 0 then

selfSay('0 Snakebite Rod? LOL?')

talk_start = os.clock()

else

buy(cid,2182,count,0)

end

 

elseif msgcontains(msg, 'tempest') then

count = getCount(msg)

if count == 0 then

selfSay('0 Tempest Rod? LOL?')

talk_start = os.clock()

else

buy(cid,2183,count,15000)

end

 

elseif msgcontains(msg, 'volcanic') then

count = getCount(msg)

if count == 0 then

selfSay('0 Volcanic Rod? LOL?')

talk_start = os.clock()

else

buy(cid,2185,count,5000)

end

 

elseif msgcontains(msg, 'moonlight') then

count = getCount(msg)

if count == 0 then

selfSay('0 Moonlight Rod? LOL?')

talk_start = os.clock()

else

buy(cid,2186,count,1000)

end

 

-- fim da venda de rods =)

-- inicio da venda de runas =)

 

elseif msgcontains(msg, 'hmm') then

count = getCount(msg)

if count == 0 then

selfSay('0 Hmm? LOL?')

talk_start = os.clock()

else

buy(cid,2311,count,10)

end

 

elseif msgcontains(msg, 'mana sdsdsdrune') then

count = getCount(msg)

if count == 0 then

selfSay('Im Not Sell 0 Mana Rune!, Continue buying smile.gif')

talk_start = os.clock()

else

buy(cid,2281,count, 200)

end

 

elseif msgcontains(msg, 'uh') then

count = getCount(msg)

if count == 0 then

selfSay('0 UH? LOL?')

talk_start = os.clock()

else

buy(cid,2273,count,30)

end

 

elseif msgcontains(msg, 'gfb') then

count = getCount(msg)

if count == 0 then

selfSay('0 GFB? LOL?')

talk_start = os.clock()

else

buy(cid,2304,count,20)

end

 

elseif msgcontains(msg, 'explosion') then

count = getCount(msg)

if count == 0 then

selfSay('0 EXPLO? LOL?')

talk_start = os.clock()

else

buy(cid,2313,count,30)

end

 

elseif msgcontains(msg, 'sd') then

count = getCount(msg)

if count == 0 then

selfSay('0 SD? LOL?')

talk_start = os.clock()

else

buy(cid,2268,count,40)

end

 

elseif msgcontains(msg, 'bSDlank') then

count = getCount(msg)

if count == 0 then

selfSay('Im Not Sell 0 Blank Rune!, Continue buying smile.gif')

talk_start = os.clock()

else

buy(cid,2260,count,5)

end

 

-- fim da venda de runas =)

 

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[/b]

 

Salve com o nome de "runes"[/b]

 

Creditos : By Kyngpin

Compartilhar este post


Link para o post
Giko    0
Giko

@Sieg

 

Aprovado.

 

Tópico movido.

Compartilhar este post


Link para o post
Lugano The Fakke    0
Lugano The Fakke

hmm mt bom, no meu ot tinha esse bug, mais com esse npc vlw!!!

Compartilhar este post


Link para o post
allansmidi    0
allansmidi

vlw...mais a maioria vem sem bug uai

Compartilhar este post


Link para o post
heitor    0
heitor

valeu cara

me ajudo muito

Compartilhar este post


Link para o post
eitor    0
eitor

muito legal cara

bom trabalho

=]

Compartilhar este post


Link para o post
Dark Gaara    0
Dark Gaara

Bom trabalho,muito bom manow

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.

×