Hi!
I have w problem with this script:
When I try to enter portal, nothing is happening. Could somebody mend it?
I have w problem with this script:
Code:
local ice = {x=1035, y=1022, z=7} ---7992
local fire = {x=1036, y=1022, z=7} --7993
local energy = {x=1037, y=1022, z=7} --7991
local earth = {x=1038, y=1021, z=7} --7994
local exit = {x=1048, y=1026, z=6} --7995
function onStepIn(cid, item, position, fromPosition)
local charpos = getPlayerPosition(cid)
if item.actionid == 7992 then
if (isPremium(cid) == TRUE and isDruid(cid) and getPlayerLevel(cid) >= 30) or getPlayerGroupId(cid) >= 2 then
doTeleportThing(cid,ice)
doSendMagicEffect(ice,10)
else
doCreatureSay(cid,"Only premium Druids are able to enter this portal", TALKTYPE_ORANGE_1)
doTeleportThing(cid, {x = charpos.x, y = charpos.y+2, z = charpos.z}, TRUE)
doSendMagicEffect({x = charpos.x, y = charpos.y+2, z = charpos.z},10)
end
elseif item.actionid == 7994 then
if (isPremium(cid) == TRUE and isDruid(cid) and getPlayerLevel(cid) >= 30) or getPlayerGroupId(cid) >= 2 then
doTeleportThing(cid,earth)
doSendMagicEffect(earth,10)
else
doCreatureSay(cid,"Only premium Druids are able to enter this portal", TALKTYPE_ORANGE_1)
doTeleportThing(cid, {x = charpos.x, y = charpos.y+2, z = charpos.z}, TRUE)
doSendMagicEffect({x = charpos.x, y = charpos.y+2, z = charpos.z},10)
end
elseif item.actionid == 7993 then
if (isPremium(cid) == TRUE and isSorcerer(cid) and getPlayerLevel(cid) >= 30) or getPlayerGroupId(cid) >= 2 then
doTeleportThing(cid,fire)
doSendMagicEffect(fire,10)
else
doCreatureSay(cid,"Only premium Sorcerers are able to enter this portal", TALKTYPE_ORANGE_1)
doTeleportThing(cid, {x = charpos.x, y = charpos.y+2, z = charpos.z}, TRUE)
doSendMagicEffect({x = charpos.x, y = charpos.y+2, z = charpos.z},10)
end
elseif item.actionid == 7991 then
if (isPremium(cid) == TRUE and isSorcerer(cid) and getPlayerLevel(cid) >= 30) or getPlayerGroupId(cid) >= 2 then
doTeleportThing(cid,energy)
doSendMagicEffect(energy,10)
else
doCreatureSay(cid,"Only premium Sorcerers are able to enter this portal", TALKTYPE_ORANGE_1)
doTeleportThing(cid, {x = charpos.x, y = charpos.y+2, z = charpos.z}, TRUE)
doSendMagicEffect({x = charpos.x, y = charpos.y+2, z = charpos.z},10)
end
elseif item.actionid == 7995 then
doTeleportThing(cid,exit)
doSendMagicEffect(exit,10)
end
return TRUE
end