Nevalopo
Demigod
[08/11/2008 12:29:11] Warning: [Event::loadScript] Event onUse not found. data/actions/scripts/other/privtile.lua
Can anyone see whats wrong? :S
Code:
local names = {"Sorcerer", "Druid", "Paladin", "Knight"}
local failPos = {x=3423, y=3453, z=6}
local successPos = {x=3423, y=3453, z=6}
function onStepIn(cid)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
if isInArray(names, getCreatureName(cid)) == TRUE then
doTeleportThing(cid, failPos)
doPlayerSendTextMessage(cid, 22, "You may not enter this room.")
else
doTeleportThing(cid, successPos)
doPlayerSendTextMessage(cid, 18, "Welcome in!")
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
return TRUE
end
Can anyone see whats wrong? :S