Ashtar
ShadowRealm.online
- Joined
- May 1, 2009
- Messages
- 312
- Reaction score
- 102
Well guys im using a simple vip acc system script with medal and door, but i would like to know how to display the vip days left on the Premium Time at login and also based on this system i would like to know how could i make some items only usables for vip players (Weapons), ty for you time guys, hope you can help me on this one.
actions xml
actions script
creaturescripts.xml
creaturescrips
login.lua
actions xml
Code:
<action actionid="5788" script="other/vip door.lua" />
<action itemid="9653" script="other/vip.lua"/>
actions script
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if (item.actionid == 5788 and getPlayerStorageValue(cid,11551) >= 1) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, {x=toPosition.x,y=toPosition.y,z=toPosition.z}, TRUE)
doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
end
return TRUE
else
doCreatureSay(cid, "Sorry, Only Vip Can Pass To Vip-Area", TALKTYPE_ORANGE_1)
return TRUE
end
return FALSE
end
creaturescripts.xml
Code:
<event type="look" name="Look" event="script" value="vip.lua"/>
creaturescrips
Code:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) == false then
return true
end
local storage = 11551
if getPlayerStorageValue(thing.uid, storage) == -1 then
doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." isn't a vip player.")
else
doPlayerSendTextMessage(cid, 20, ""..getCreatureName(thing.uid).." is a vip player.")
end
return true
end
login.lua
Code:
registerCreatureEvent(cid, "Idle")
registerCreatureEvent(cid, "look")