function onUse(cid, item, frompos, item2, topos)
text = "Congratulations, you are now a donator."
vip = 11420 -- Change this to storage value you want for your VIP status
vipstatus = getPlayerStorageValue(cid, vip)
if vipstatus == -1 then
doShowTextDialog(cid, 8974, text)
setPlayerStorageValue(cid, vip, 1)
doRemoveItem(item.uid)
else
doPlayerSendCancel(cid,"You already have donator status.")
end
return 1
end
<action itemid="8974" event="script" value="other/vip.lua"/>
function onUse(cid, item, frompos, item2, topos)
donatorstatus = getPlayerStorageValue(cid,11420) -- Change this number to the storage value of your VIP
if item.uid == 11551 then -- This number you will imput into map editor for the unique id on the door you wish to use
area = {x=4186, y=4390, z=7} -- This is where they will get teleported after clicking on the door
if donatorstatus == 1 then
doTeleportThing(cid, area,0)
else
doPlayerSendTextMessage(cid, 22, "Sorry, you are not a donator. Go to YOURSITEHERE to donate.")
doSendMagicEffect(topos, 12)
end
end
return 1
end
<action uniqueid="11551" event="script" value="other/vipdoor.lua" />
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, 11420) ~= -1 then
return doCombat(cid, combat, var)
end
doPlayerSendCancel(cid,"Sorry, only people with VIP Status can use this spell.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return LUA_ERROR
end
I need 2 doors, on diffrent places, is that possible?
function onUse(cid, item, frompos, item2, topos)
donatorstatus = getPlayerStorageValue(cid,11420) -- Change this number to the storage value of your VIP
if item.aid == 11551 then -- This number you will imput into map editor for the unique id on the door you wish to use
area = {x=4186, y=4390, z=7} -- This is where they will get teleported after clicking on the door
if donatorstatus == 1 then
doTeleportThing(cid, area,0)
else
doPlayerSendTextMessage(cid, 22, "Sorry, you are not a donator. Go to YOURSITEHERE to donate.")
doSendMagicEffect(topos, 12)
end
end
return TRUE
end
local function checkStackpos(item, position)
position.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
local thing = getThingfromPos(position)
position.stackpos = STACKPOS_TOP_FIELD
local field = getThingfromPos(position)
if(item.uid ~= thing.uid and thing.itemid >= 100 or field.itemid ~= 0) then
return FALSE
end
return TRUE
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local storage = 2000
if(getItemLevelDoor(item.itemid) > 0) then
if getPlayerStorageValue(cid, storage) == TRUE then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, TRUE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only VIP Players can access this door")
end
end
return TRUE
end