• 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!

Storage Value needed for StepIn

survivor

New Member
Joined
Mar 20, 2008
Messages
89
Reaction score
4
I was wondering if anyone could make a script where you need a storage value to walk over a tile.
I've been searching the forum but couldn't find it anywhere.

And the storage should be gained by using some item with some action/unique ID.

Thanks in advance,
 
Which server do you use?
Code:
function onStepIn(cid, item, position, fromPosition)
     if getPlayerStorageValue(cid, 59445) ~= 1 then
         doPlayerSendCancel(cid, "You cannot pass here.")
         doTeleportThing(cid, fromPosition)
     end
     return true
end
 
oh yes sorry I forgot to mention, TFS 0.3.6

Thanks for the script!

Could you also do the mini script to add the storage value by using something with a action/unique id?
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
     if getPlayerStorageValue(cid, 59445) ~= 1 then
         setPlayerStorageValue(cid, 59445, 1)
         -- you can add other things here like textmessages
     else
         -- what should happen if the player already clicked on it
     end
     return true
end
 
Back
Top