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

Lua Poi thrones (Storage ID to open door)

Freezer

New Member
Joined
Mar 14, 2013
Messages
54
Reaction score
0
Location
Germany
Hiho :)

I have this small script to give a player a storage ID:
Works also good

Lua:
local storage = 7015 function onStepIn(cid, item, pos)
	setPlayerStorageValue(cid, storage, 1)
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
	doCreatureSay(cid, "bla bla!", TALKTYPE_MONSTER)
	return TRUE
end

How can I make a magic door which opens only, if a player has the storage = 7015 ??
 
put actionid in RME.. and here you go script.
Lua:
local config = {
      storage = 7015
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
         if (getPlayerStorageValue(cid, config.storage) == EMPTY_STORAGE) then
            doPlayerSendTextMessage(cid, 22, "bla bla!.")
            doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
            doTeleportThing(cid, {x=1, y=2, z=7}) -- position where send onclick			
            setPlayerStorageValue(cid, config.storage, 1)
         else
             doPlayerSendCancel(cid, "Its already done.")
         end
	return true
end
 
Back
Top