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

[Movement] When player step on X floor he gets X StorageID (TFS 0.3.1 CryingDamson)

Pentagratta

ancientwars.servegame.com
Joined
Mar 15, 2009
Messages
76
Reaction score
0
Location
São Paulo - Brazil
HAS BEEN RESOLVED!!!

Greetings,

Well im here to ask if someone have a script like that (as topic says):
"When player step on XYZ floor he gets X StorageID."

Ill be glad if someone could give it to me, and ofc ill rep.
Thanks for attetion.
-srry for bad english-

Regards,
Pentagratta. :)
 
Last edited:
Code:
function onStepIn(cid, item, pos)
local storage = YOURSTORAGE
	if(item.uid == XXXX and isPlayer(cid) == TRUE) then
		setPlayerStorageValue(cid, storage, 1)
	end
return TRUE
end
 
Yeah man! Thats simpliest script ever! You should also learn script : DP

This function is used to set player value
setPlayerStorageValue(cid, key, value)

Now try to use it with onStepIn! Hope you can do it yourself :)

#Edit
Ah, HeRmES faster ;[

PS if(item.uid == XXXX) not needed.
 
@Hermes
Thanks dude it works perfectly!
-
@slawkens
Thanks for reply dude!
Well i tryed sometimes create some scripts but them as always crash, and idk exactly what means the error in server console but yeah ill try do it!
Btw i tryed put that a new function (sendmagiceffect) in herme's script and it crashes >.<
Could some1 help me?

I added doSendMagicEffect(position, 49)
PHP:
function onStepIn(cid, item, pos)
local storage = 2526
	if(item.uid == 2525 and isPlayer(cid) == TRUE) then
		setPlayerStorageValue(cid, storage, 1)
             doSendMagicEffect(position, 49)
	end
return TRUE
end

I added thinking when player steps on the floor that effect shows in same XYZ..
-srry for bad english-
Regards.

-- EDIT --


I solved the thing of SendMagicEffect!
The tag was wrong, the right one was: doSendMagicEffect(getThingPos(item.uid), 49)
Thanks anyway!
Regards.
 
Last edited:
Back
Top