<action uniqueid="TheUniqueIDofDoor" script="VIP Door.lua"/>
local vipstorage = 11551 --your storage value for VIP
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,vipstorage) >= 1 then
if getCreaturePosition(cid).y < toPosition.y then
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
else
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
end
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 30)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but you must be a VIP to enter this area.")
end
return TRUE
end
local vipstorage = 11551 --your storage value for VIP
local pos = {x=947, y=9025, z=7, stackpos=1} --positon of where you want them to get tped to
local cancelpos = {x=947, y=9025, z=7, stackpos=1} --position where you want them to get tped if there NOT vip
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,vipstorage) >= 1 then
doTeleportThing(cid, pos)
else
doTeleportThing(cid, cancelpos)
end
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 30)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but you must be a VIP to enter this area.")
end
return TRUE
end
[06/07/2010 00:27:14] [Error - LuaScriptInterface::loadFile] data/actions/scripts/VIP Door.lua:13: 'end' expected (to close 'function' at line 5) near 'else'
[06/07/2010 00:27:14] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/VIP Door.lua)
[06/07/2010 00:27:14] data/actions/scripts/VIP Door.lua:13: 'end' expected (to close 'function' at line 5) near 'else'
[06/07/2010 00:27:14] Reloaded actions.
local vipstorage = 11551 --your storage value for VIP
local pos = {x=1000, y=1000, z=7, stackpos=1} --positon of where you want them to get tped to
local cancelpos = {x=941, y=1025, z=7, stackpos=1} --position where you want them to get tped if there NOT vip
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,vipstorage) >= 1 then
doTeleportThing(cid, pos)
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 30)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but you must be a VIP to enter this area.")
doTeleportThing(cid, cancelpos)
end
return true
end