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

question lua

Keiro

New Member
Joined
Jun 24, 2009
Messages
285
Reaction score
0
Hows the code to check a storage value , i mean, i want to check if the player did or not the quest, before letting him go inside

using tfs 0.3.6
 
A door? A NPC? A teleport? A tile? A action? A creaturescripts? A talkaction?

For everything else, there's getPlayerStorageValue(cid,0000) == -1
 
Sample door script:

Lua:
local storage = 2462 -- storage key if have can enter and if dont have dont enter
local newpos = {x=32247, y=33569, z=7} -- New position

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorageValue(cid,storage) == 1 then
    doTeleportThing(cid,newpos)
    doSendMagicEffect(newpos,10)
  else
     doPlayerSendTextMessage(cid,25,"You need done the quest!")
    end
return 1
end
 
Back
Top