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

[movements] GETPLAYERSTORAGEVALUE

miklus

New Member
Joined
Feb 17, 2009
Messages
64
Reaction score
0
Location
Poland, Belchatow
1749cm.jpg

A1- SQM, when i step on it, I will get xxx storagevalue
UID - A1 - some UID for this SQM

A2- SQM checks mine storagevalue. If i doesn't step on A1, I will be turned back
UID - A2 - some UID for this SQM

I need that for mine quest. If some player doesn't step on A1, he will not finish the quest

I need both scripts:
-SQM giving storagevalue
-SQM checking storagevalue

TFS v0.2.8. Mystic Spirit (GUI)


Thanks.
 
LUA:
local storage = 123

function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) == TRUE then
		if item.uid == XXX then
			setPlayerStorageValue(cid, storage, 1)
		elseif item.uid == YYY and getPlayerStorageValue(cid, storage) == -1 then
			doTeleportThing(cid, fromPosition, TRUE)
		end
	end
end
 
Last edited:
Code:
	<movevent event="StepIn" uniqueid="XXX" script="script.lua"/>
	<movevent event="StepIn" uniqueid="YYY" script="script.lua"/>
 
There is a problem....
The request said something like this:
Step in A1, give storage, Pass A2
if dont step in a1 first, when the player want to pass a2, he will be returned.... ^^

And ur script is something like this:
step in a1, give storage, try to pass a2, teleport fromPos....
if dont step in a1 first, player will pass a2 with no problems...
 
There is a problem....
The request said something like this:
Step in A1, give storage, Pass A2
if dont step in a1 first, when the player want to pass a2, he will be returned.... ^^

And ur script is something like this:
step in a1, give storage, try to pass a2, teleport fromPos....
if dont step in a1 first, player will pass a2 with no problems...
what, it was working without edits first then :p don't know why he complained
 
So u need to step in A1 to pass A2 or u need to pass A2 first???
If u need to pass A2 first, cykotitan's script works....
If u want it to pass A1 first and then A2, post a response and i will try to change cykotitan's script.... ^^
 
So u need to step in A1 to pass A2 or u need to pass A2 first???
If u need to pass A2 first, cykotitan's script works....
If u want it to pass A1 first and then A2, post a response and i will try to change cykotitan's script.... ^^
no. my script requires the storage from tile XXX (a1) to pass tile YYY (a2). it only teleports you back if your storage is set to -1 (not set)
 
Back
Top