Justin123456
New Member
- Joined
- Mar 24, 2011
- Messages
- 177
- Reaction score
- 4
I think my scripts are wrong : / what's supposed to happen is say, I use my crystal ring (ID 2124) and it will say lalala cha-ching congratz.. But then it should set my storage value to 11552, which helps out my next script. The script I have for my tile is to allow someone to walk on it after they use the crystal ring, but it doesn't work
Here's my scripts:
Actions:
VIP Item 2:
Movements:
VIP:
It looks right to me : / But maybe I'm just stupid Lol
but if anyone could help I'd greatly appreciate it! 
Here's my scripts:
Actions:
Code:
<action itemid="2124" script="VIP Item2.lua"/>
VIP Item 2:
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2124 then
if getPlayerLevel(cid) > 0 then
getPlayerStorageValue(cid, 11552)
doSendAnimatedText(getPlayerPosition(cid), "Cha-Ching!", TEXTCOLOR_RED)
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP! You can now enter the VIP-area and use unique features!", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11552, 1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,'You are not a donator.')
doRemoveItem(item.uid, 1)
end
else
end
return 1
end
Movements:
Code:
<movement type="StepIn" uniqueid="11552" event="script" value="VIP.lua" />
VIP:
Code:
-- Script Vip Sytem 1.0 --
function onStepIn(cid, item, position, fromPosition)
local config = {
msgDenied = "I'm sorry if you want to enter you must buy VIP!",
msgWelcome = "Welcome VIP player!"
}
if getPlayerStorageValue(cid, 11552) - os.time() <= 0 then
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, 21, config.msgDenied)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.msgWelcome)
end
end
It looks right to me : / But maybe I'm just stupid Lol