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

If get storage script? HELP

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
I need a script like this.

LUA:
function onStepIn(cid, item, position, fromPosition)

local was = fromPosition

    if(getPlayerStorageValue(cid,65535) >= 1) and (getPlayerStorageValue(cid,65536) >= 1) and (getPlayerStorageValue(cid,65537) >= 1) and (getPlayerStorageValue(cid,65538) >= 1) then


elseif(getPlayerStorageValue(cid,65535)  <= 0) then
			doTeleportThing(cid, was, CONST_ME_NONE)
                        doPlayerSendTextMessage(0, cid, 22, "You must finish a mission.")
        end

end

PS. This script do not work.
 
If player have 4 different storages he will be send to position X.
If player do not have all the storages he will be sent back to Y.

PS.: It's a movement (STEP IN)
 
LUA:
local storages = {65535, 65536, 65537, 65538}
function onStepIn(cid, item, pos)
for i = 1,#storages do
    if getPlayerStorageValue(cid, storages[i]) >= 1 then
       doTeleportThing(cid, x)
    else
        doTeleportThing(cid, y)
        doPlayerSendTextMessage(cid, 22, "You must finish a mission.")
    end
end
return true
end
 
LUA:
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) then
		for i = 65535, 65538 do
			if getCreatureStorage(cid, i) == -1 then
				doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You must finish a mission.')
				return doTeleportThing(cid, {x=100, y=100, z=7})
			end
		end
		doTeleportThing(cid, {x=100, y=100, z=7})
	end
end
 
Back
Top