• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

VIP Tile Error :(

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:
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 :P but if anyone could help I'd greatly appreciate it! :D
 
Nope, I didn't receive any Errors it just teleports me back and say's "I'm sorry if you want to enter you must buy VIP!" and I used the item... but I figured out a way around it.. I just used another script :p Thanks for helping though guys! :D
This is what I used instead:
Code:
function onStepIn(cid, item, position, fromPosition)
if item.uid == 11552 then -- This number you will imput into map editor for the door you wish
queststatus = getPlayerStorageValue(cid,11552) -- Quest number that needs to be COMPLETE.
area = {x=1046, y=1040, z=6} -- If that above quest is complete, It will teleport you here.
if queststatus == -1 then
doCreatureSay(cid, "You haven't opened the report yet!", TALKTYPE_ORANGE_1)
doTeleportThing(cid, fromPosition, true)
else
doSendMagicEffect(area, 29)
doSendMagicEffect(area, 30)
doCreatureSay(cid, "Hello "..getCreatureName(cid).."! ", TALKTYPE_ORANGE_1)
end
end
return true
end
 
Last edited:
Back
Top