Warth
Gaduła+
Dołączył: 07 Lip 2006
Posty: 103
Przeczytał: 0 tematów
Ostrzeżeń: 0/3 Skąd: Wroclaw
|
Wysłany: Sob 9:12, 08 Lip 2006 Temat postu: BŁAD rings.lua dla starszych wersji FushionOTS |
|
|
Znalazłem juz kiedys błąd w FushionOTS by Shwizard(R)
Otóż "ziomeq" sprzedajacy ringi tak naprawde sprzedawal co innego np. zamiast time ring'a sprzedawal ciało marida xD
Zmieniłem numerqi ID i macie tu (dla leniwych)
Z gory mowie ze nie wysylilem sie (zeby nie bylo komentarzy jak na forum.tibia.org.pl)
Kod: | --ox = 44
--oy = 5
--oz = 6
focus = 0
talk_start = 0
target = 0
following = false
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.')
selfLook(cid)
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 ((string.find(msg, '(%a*)hi(%a*)')) and (focus == 0)) and getDistanceToCreature(cid) < 3 then
selfSay('Hello ' .. creatureGetName(cid) .. '! I sell rings of every type.')
focus = cid
talk_start = os.clock()
elseif string.find(msg, '(%a*)hi ringuero(%a*)') and (focus ~= cid) and getDistanceToCreature(cid) < 3 then
selfSay('Sorry, ' .. creatureGetName(cid) .. '! I talk to you in a minute.') elseif focus == cid then talk_start = os.clock() if msgcontains(msg, 'axe ring') then
buy(cid,2208,1,250)
elseif msgcontains(msg, 'club ring') then
buy(cid,2209,1,250)
elseif msgcontains(msg, 'crystal ring') then
buy(cid,2124,1,300)
elseif msgcontains(msg, 'dwarven ring') then
buy(cid,2213,1,200)
elseif msgcontains(msg, 'energy ring') then
buy(cid,2167,1,1000)
elseif msgcontains(msg, 'gold ring') then
buy(cid,2179,1,1500)
elseif msgcontains(msg, 'life ring') then
buy(cid,2168,1,100) elseif msgcontains(msg, 'might ring') then
buy(cid,2164,1,1000)
elseif msgcontains(msg, 'power ring') then
buy(cid,22166,1,500)
elseif msgcontains(msg, 'ring of healing') then
buy(cid,2214,1,500)
elseif msgcontains(msg, 'ring of the skies') then
buy(cid,2357,1,5000)
elseif msgcontains(msg, 'stealth ring') then
buy(cid,2165,1,500)
elseif msgcontains(msg, 'sword ring') then
buy(cid,2207,1,250)
elseif msgcontains(msg, 'time ring') then
buy(cid,2169,1,100)
elseif msgcontains(msg, 'wedding ring') then
buy(cid,2121,1,200)
elseif msgcontains(msg, 'rings') then
selfSay('I sell axe (250gp), club (250gp), crystal (300gp), dwarven (200gp), energy (1k), golden (1,5k) life (100gp), might (1k), power (500gp), of healing (500gp), of skies (5k), stealth (500gp), sword (250gp), time (100gp), wedding (200gp).')
elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 3 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
end
|
Post został pochwalony 0 razy
Ostatnio zmieniony przez Warth dnia Pon 15:55, 10 Lip 2006, w całości zmieniany 1 raz
|
|