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

Lua Is this doable?

Zuma Master

~Holes Through Happiness~
Joined
Jul 31, 2011
Messages
369
Reaction score
21
Location
Under your bed.
Hello OtLand.

As a small few of you know, I'm a decent LUA scripter... But I discovered a faulty function in Crying Damson, which is:
doCreatureSetNoMove()
This function should make a player not move, at all, until its used again to cancel such an effect...
However, it's possible to bypass such an effect, by using the Chase button in the Tibia client... If I have Chase enabled, and I target anyone away from my current location, while under the effects of doCreatureSetNoMove(), I will still run behind him...
Currently I'm working on a project of my own, and I do not have time to waste. So I have one question...
Is it possible to save a player's current position when doCreatureSetNoMove() is used, and then if his position changes, he gets teleported to his first position?

Thanks in advance,
Zuma Master.
 
Just set a storage to x, y, z value of the position when using the function and register a onThink to the player and another storage to save the status of the player (may move / no move).
In the onThink you can check if he may move and then check if both positions are different, if so teleport him back.
 
Then write a onMove creatureevent and check if the player is able to move, if not teleport him back.
 

Similar threads

Back
Top