ufowok1995
Administrator
Dołączył: 20 Sty 2008
Posty: 6
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: Braniewo
|
Wysłany: Pią 11:41, 08 Lut 2008 Temat postu: Szymeq skopjuj to cale i zamien z tym co masz u siebie w run |
|
|
-- Script de venda de runes, wands e rods
-- Bugs de compra de 0 runas arrumado By Kyngpin
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, 'bp manafluids') then
count = getCount(msg)
if count == 0 then
selfSay('Im Not Sell 0 BP Manafluid!, Continue buying ')
talk_state = os.clock()
else
buyContainer(cid,2000,2006,7,1100)
end
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 ')
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,25)
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,20)
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,30)
end
elseif msgcontains(msg, 'bSDlank') then
count = getCount(msg)
if count == 0 then
selfSay('Im Not Sell 0 Blank Rune!, Continue buying ')
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
Post został pochwalony 0 razy
|
|