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

Teleport for storage

nilvagner

Long live the otland.net
Joined
May 3, 2010
Messages
118
Reaction score
3
Location
Brazil
Help me!
I need a script to the player so you can use the teleporter if VALUE STORAGE 1001.

Where the teleporter brought: x = 853, y = 975, z = 7
Action of the teleport on the map: 2193

:)
 
Lua:
local config = {
	pos = {x = 1, z = 2, y = 7},
	storage = 1001
}
 
function onStepIn(cid, item, position, fromPosition)
    if getCreatureStorage(cid, 1001) < 0 then
		doTeleportThing(cid, config.pos)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
		doCreatureSetStorage(cid, 1001, 1)
	end
	return true
end
 
Last edited:
It did not work!

Even without having clicked on the chest, to have storage value 1001. The player can enter the teleporter.

And gave no error in console

: P
 
I'm not entirely sure about how to do it but you could make a moveevent right in front of the teleporter so that if they do not have the right storage value, when they step in front of the teleporter (not on it, but in front of it), then they get teleported back 2 squares or something and "selfSay("You are not worthy!", cid)" or something, it might work.
 
Example of POI. Very old that! Yet thanks. I'll wait someone help me with the script portal.

- - - Updated - - -

Help-me!!!
 
movements
Lua:
local config = {
	pos = {x = 1000, y = 1000, z = 7},
	storage = 1001
}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if isPlayer(cid) and getCreatureStorage(cid, config.storage) < 0 then
		doPlayerSendCancel(cid, "You cannot pass!")
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		doTeleportThing(cid, fromPosition, true)
	else
		doTeleportThing(cid, config.pos)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
	end
	return true
end

also you need to use something to give player storage value 1 for the storage id in the script so they can pass this spot
 
Back
Top