ArekDrax98
Active User
- Joined
- May 6, 2010
- Messages
- 72
- Reaction score
- 1
Witam mam mianowicie taki problem ze gdy wlacze silnik wyskakuje taki blad SS:
A oto kod npc :
PS. Gdyby ktos mogl przerobic go i wstawic tutaj to prosze napisac post
A oto kod npc :
PHP:
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('Narazie')
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 (msgcontains(msg, 'hi') and (focus == 0)) and getDistanceToCreature(cid) < 4 then
selfSay('Witaj ' .. creatureGetName(cid) .. '! Wymieniam gp na platinum, platinum na cc i sc na cc')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('Sorry, ' .. creatureGetName(cid) .. 'Zaczekaj Chwile') elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'sc') or msgcontains(msg, 'sc') then sell(cid,2159,1,1000000)
if msgcontains(msg, '100 platinum') or msgcontains(msg, 'platinum') then sell(cid,2152,100,10000)
elseif msgcontains(msg, '100 gold') or msgcontains(msg, 'gold') then sell(cid,2148,100,100)
elseif msgcontains(msg, 'powtorz') then selfSay('Aby wymienic monety wpisz - "gold" [zamienia 100gp na 1 platinum, "platinum" [zamienia 100 platinum na 1cc]')
elseif string.find(msg, '(%a*)bye(%a*)') and getDistanceToCreature(cid) < 4 then
selfSay('Narazie, ' .. 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('Nastepny...')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Narazie.')
focus = 0
end
end
end
function onThink()
if (os.clock() - talk_start) > 30 then
end
end
end
PS. Gdyby ktos mogl przerobic go i wstawic tutaj to prosze napisac post