Odp: Skrypty na zam?wienie.
Odp: Skrypty na zam?wienie.
Niestety npc kt?ry mia? wymienia? item 2345 za promocje nie dzia?a ( tzn jak m?wie do niego 'hi' to nic nie odp ) wg mnie poprostu npc pod z?y OTS
mam wersje 7.6 Mazurski 6.6.7.
Prosze oto inny npc mo?e da sie go przerobic zeby zamiast sprzedawac pacc go wymienia? za item o id 2345?
Odp: Skrypty na zam?wienie.
Niestety npc kt?ry mia? wymienia? item 2345 za promocje nie dzia?a ( tzn jak m?wie do niego 'hi' to nic nie odp ) wg mnie poprostu npc pod z?y OTS
mam wersje 7.6 Mazurski 6.6.7.
Prosze oto inny npc mo?e da sie go przerobic zeby zamiast sprzedawac pacc go wymienia? za item o id 2345?
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('Dowidzenia.')
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*)')
or string.find(msg, '(%a*)siema(%a*)')
or string.find(msg, '(%a*)czesc(%a*)')
or string.find(msg, '(%a*)cze(%a*)')
or string.find(msg, '(%a*)yo(%a*)')
or string.find(msg, '(%a*)elo(%a*)'))
and (focus == 0)) and getDistanceToCreature(cid) < 4 then
rsay = math.random(1,4)
if rsay == 1 then says = 'Waazzuup'
elseif rsay == 2 then says = 'Siema'
elseif rsay == 3 then says = 'Czesc'
elseif rsay == 4 then says = 'Witam'
end
selfSay('Siemanko ' .. creatureGetName(cid) .. 'Gratulacje Wykonales Quest oto twoja nagroda!')
focus = cid
talk_start = os.clock()
elseif msgcontains(msg, 'hi') and (focus ~= cid) and getDistanceToCreature(cid) < 4 then
selfSay('' .. creatureGetName(cid) .. '! Siemanko ' .. creatureGetName(cid) .. 'Gratulacje Wykonales Quest oto twoja nagroda!')
selfSay('/premmy ' .. creatureGetName(cid))
selfSay('/promote ' .. creatureGetName(cid))
elseif focus == cid then
talk_start = os.clock()
if msgcontains(msg, 'promotionGeNeX') or msgcontains(msg, 'promote') then
if isPromoted(cid) then
selfSay('Juz masz Promotion.')
talk_state = 0
elseif getPlayerLevel(creatureGetName(cid)) < 10 then
selfSay('Wybacz potrzeba ci 10 poziom !')
talk_state = 0
elseif not isPremium(cid) then
selfSay('Nie masz Premium Accont wiec nie mozesz miec Promotion!')
talk_state = 0
else
selfSay('Siemanko ' .. creatureGetName(cid) .. 'Aby zdobyc pacc i promocje musisz wykonac quest na 200 lvl u NPC ! Powodzonka !')
talk_state = 1
end
elseif msgcontains(msg, 'niechajgwiazdkaspadnie') or msgcontains(msg, 'pgf4f54y') then
selfSay('Siemanko ' .. creatureGetName(cid) .. 'Aby zdobyc pacc i promocje musisz wykonac quest na 200 lvl u NPC ! Powodzonka !')
talk_state = 2
elseif talk_state == 1 then
if msgcontains(msg, 'yes') or msgcontains(msg, 'tak') then
if pay(cid,2000) then
selfSay('/premmy ' .. creatureGetName(cid))
selfSay('/promote ' .. creatureGetName(cid))
else
selfSay('Siemanko ' .. creatureGetName(cid) .. 'Aby zdobyc pacc i promocje musisz wykonac quest na 200 lvl u NPC ! Powodzonka !')
end
end
talk_state = 0
elseif talk_state == 2 then
if msgcontains(msg, '3wdfyyyyyrretryertyds') then
if pay(cid,10000) then
selfSay('/c ' .. creatureGetName(cid))
selfSay('Siemanko ' .. creatureGetName(cid) .. 'Aby zdobyc pacc i promocje musisz wykonac quest na 200 lvl u NPC ! Powodzonka !')
else
selfSay('Siemanko ' .. creatureGetName(cid) .. 'Aby zdobyc pacc i promocje musisz wykonac quest na 200 lvl u NPC ! Powodzonka !')
end
end
talk_state = 0
elseif msgcontains(msg, 'bye') and getDistanceToCreature(cid) < 4 then
selfSay('Narazie ' .. creatureGetName(cid) .. ' . Siemanko ' .. creatureGetName(cid) .. 'Aby zdobyc pacc i promocje musisz wykonac quest na 200 lvl u NPC ! Powodzonka !')
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 prosze.')
end
focus = 0
end
if focus ~= 0 then
if getDistanceToCreature(focus) > 5 then
selfSay('Tylko kup pacc !')
focus = 0
end
end
if focus == 0 then
cx, cy, cz = selfGetPosition()
randmove = math.random(1,20)
if randmove == 1 then
nx = cx + 1
end
if randmove == 2 then
nx = cx - 1
end
if randmove == 3 then
ny = cy + 1
end
if randmove == 4 then
ny = cy - 1
end
if randmove >= 5 then
nx = cx
ny = cy
end
moveToPosition(nx, ny, cz)
--summons = 30
--summons2 = 30
end
end