Hello, I'm using TFS 1.0 on debian.
I need to write a script which stops monster when 'something happens' (it is not important).
Important thing is, how to stop that monster?
I tried something like this:
when storage value = 2 then
dospeedchange(cid, 0)
doesn't work, because there is delta, so I need to check the speed and then add a '-' before the value
when storage bla bla then
local speed = getplayerspeed(cid)
dospeedchange(cid, -speed)
there is a problem, getplayerspeed (or getcreaturespeed I don't remember now) returns boolean value (true or false) and the question is.... this function checks if player has speed or hasn't speed?! how to compare it?
also tried with maynotmove(cid) but it was removed from source before I downloaded git.
also tried with checking speed of monster from .xml file on my own but when monster updated target list and storage value was not 2 then monster got extremely fast
sorry for wrong names of functions, I think it is not necessary to keep all identical with actual functions.
I need to write a script which stops monster when 'something happens' (it is not important).
Important thing is, how to stop that monster?
I tried something like this:
when storage value = 2 then
dospeedchange(cid, 0)
doesn't work, because there is delta, so I need to check the speed and then add a '-' before the value
when storage bla bla then
local speed = getplayerspeed(cid)
dospeedchange(cid, -speed)
there is a problem, getplayerspeed (or getcreaturespeed I don't remember now) returns boolean value (true or false) and the question is.... this function checks if player has speed or hasn't speed?! how to compare it?
also tried with maynotmove(cid) but it was removed from source before I downloaded git.
also tried with checking speed of monster from .xml file on my own but when monster updated target list and storage value was not 2 then monster got extremely fast
sorry for wrong names of functions, I think it is not necessary to keep all identical with actual functions.