I have this poi script for my ot. It loads without any problems. But nothing happen when you walk over a throne.
Can someone please have a look?
Thanks!
Can someone please have a look?
Thanks!
Code:
local t = {
[10274] = {'Verminor', CONST_ME_POISONAREA, 3},
[10275] = {'Infernatil', CONST_ME_HITBYFIRE, 4},
[10276] = {'Tafariel', CONST_ME_POFF, 4},
[10277] = {'Apocalypse', CONST_ME_EXPLOSIONAREA, 3},
[10278] = {'Pumin', CONST_ME_YELLOW_RINGS, 4},
[10279] = {'Ashfalor', CONST_ME_MORTAREA, 5}
}
function onStepIn(cid, item, pos, fromPos)
if isPlayer(cid) == TRUE then
local f = t[item.uid]
if getPlayerStorageValue(cid, item.uid) == -1 then
setPlayerStorageValue(cid, item.uid, 1)
doSendMagicEffect(pos, f[2])
doCreatureSay(cid, 'You have touched '..f[1]..'\'s throne and absorbed some of his spirit.', TALKTYPE_ORANGE_1)
else
if item.itemid == 5915 then
pos.y = pos.y + f[3]
elseif item.itemid == 5916 then
pos.x = pos.x + f[3]
end
doTeleportThing(cid, pos)
doSendMagicEffect(pos, CONST_ME_MORTAREA)
doCreatureSay(cid, 'Begone!', TALKTYPE_ORANGE_1)
end
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1229 then
for i = 10274, 10279 do
if getPlayerStorageValue(cid, i) == -1 then
return TRUE, doPlayerSendCancel(cid, 'You didn\'t absorb enough energy.')
end
end
doTransformItem(item.uid, 1230)
doTeleportThing(cid, toPosition)
end
return TRUE
end
Last edited by a moderator: