Page 1 of 1

Hey, looking for some help with my scirpt

Posted: Fri Apr 06, 2012 12:54 pm
by eragon2450
Im trying to make it so that the waypoint scirpt changes after a certain amount of time. I was thinking, since there is a logout time, the time is probably being recorded. So could we make this somehow work:


<?xml version="1.0" encoding="UTF-8"?>
-<waypoints>
<!-- # 1 -->
<waypoint y="168" z="4413" x="6436"> if time(); > 3 then loadPaths("scirpt2") end, reset time() </waypoint>
<!-- # 2 -->
<waypoint y="168" z="4413" x="6436"> </waypoint>
<!-- # 3 -->
<waypoint y="168" z="4413" x="6436"> </waypoint> </waypoint


I don't know lua, but im guessing we have to make a variable time() and link it back to place where time is being counted in minutes. So any suggestions?

Re: Hey, looking for some help with my scirpt

Posted: Fri Apr 06, 2012 11:51 pm
by lisa

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>	
<onload>
mytime = os.time()
</onload>
<!-- # 1 -->
<waypoint y="168" z="4413" x="6436"> if (os.time() - mytime) > 3 then loadPaths("scirpt2") end </waypoint> 
<!-- # 2 -->
<waypoint y="168" z="4413" x="6436"> </waypoint> 
<!-- # 3 -->
<waypoint y="168" z="4413" x="6436"> </waypoint>
</waypoints>
--=== Edited ===--
Removed the *1000, thanks rock =)

Re: Hey, looking for some help with my scirpt

Posted: Fri Apr 06, 2012 11:55 pm
by rock5
os.time() and os.clock() are in seconds.

Re: Hey, looking for some help with my scirpt

Posted: Sun Apr 08, 2012 8:26 pm
by eragon2450
alright, thanks