• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Storage ID Door and chest

merfus

Member
Joined
Dec 27, 2011
Messages
214
Reaction score
5
Location
Poland
Hello guys i need 2 scripts
1.Door that can pass only players with storage 63111
2.Chest with reward (Add player storage 63111) and player see Message - You can Pass Survival Door.

Can anyone make that for me?
Tell me where i must put this scripts ;s
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if (item.actionid == 5788 and getPlayerStorageValue(cid,63111) >= 1) then
		doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
		doCreatureSay(cid, "You can Pass Survival Door.", TALKTYPE_ORANGE_1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot pass this Survival Door.")
	end
	return true
end
This should work for the door
 
and in actions.xmli need to put that?:
<action actionid="5788" event="script" value="quests/storagedoor.lua"/>

and when i change door aid in map editor to 5788 in door then player without storage can't go with that door?
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 63111) != 1 then
		doCreatureSay(cid, "You can Pass Survival Door.", TALKTYPE_ORANGE_1)
                setPlayerStorageValue(cid, 63111, 1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already did this.")
	end
	return true
end

Something like this?
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid, 63111) != 1 then
		doCreatureSay(cid, "You can Pass Survival Door.", TALKTYPE_ORANGE_1)
                setPlayerStorageValue(cid, 63111, 1)
	else
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already did this.")
	end
	return true
end

Something like this?

replace != 1 with ~= 1 :p
 
Back
Top