Help to add a 20 second timer up to 0

Ask gaming related questions
trushzin
Posts: 10
Joined: 05 Oct 2019, 11:48

Help to add a 20 second timer up to 0

05 Oct 2019, 11:54

So its for a game called Tibia, if anyone already knows, i need a timer for magic walls, it needs to start with 20seg and end with 0 when the mwall disappear.

If u dont know what tibia is or magic wall is, basically its a wall rune you can use and it'll disappear in 20 sec, but i need to know the exact time it'll disappear, which means i need a timer on the magic wall, and we can throw more than one, so for each magic wall used it should start a timer on it, is it possible?

thank you
Rohwedder
Posts: 2353
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Help to add a 20 second timer up to 0

07 Oct 2019, 07:18

Hallo,
try:

Code: Select all

+1::
+2::
+3::
N := SubStr(A_ThisHotkey,0), T%N% := 20
SetTimer, T%N%, 1000
Goto, T%N%
T1:
T2:
T3:
XCoord := 200, YCoord := 200
CoordMode, ToolTip
N := SubStr(A_ThisLabel,0)
ToolTip,% N " : " T%N%, XCoord, YCoord+N*20, N
If (--T%N% < -1)
{
	ToolTip,,,, N
	SetTimer, T%N%, Off
}
Return
3 CountDown, (Re-)Start with Shift+1 - Shift+3
trushzin
Posts: 10
Joined: 05 Oct 2019, 11:48

Re: Help to add a 20 second timer up to 0

08 Oct 2019, 13:14

thank you, thats a great start. Now i'm gonna try to use it to make my script functional, first thing im gonna try to make the x,y coord into my mouse cursor, so i can add this timer wherever i want, gonna come back here if i find any problem.
trushzin
Posts: 10
Joined: 05 Oct 2019, 11:48

Re: Help to add a 20 second timer up to 0

08 Oct 2019, 13:20

Sid4G i cant pm u, i dont have enough activity in the site yet, lol, but i really would appreciate ur help
trushzin
Posts: 10
Joined: 05 Oct 2019, 11:48

Re: Help to add a 20 second timer up to 0

08 Oct 2019, 13:31

Code: Select all

MouseGetPos, xpos, ypos 
+1::
+2::
+3::
N := SubStr(A_ThisHotkey,0), T%N% := 20
SetTimer, T%N%, 1000
Goto, T%N%
T1:
T2:
T3:
XCoord := %xpos%, YCoord := %ypos%
CoordMode, ToolTip
N := SubStr(A_ThisLabel,0)
ToolTip,% N " : " T%N%, XCoord, YCoord+N*20, N
If (--T%N% < -1)
{
	ToolTip,,,, N
	SetTimer, T%N%, Off
}
Return

So I made these changes, to put the timer right on my mouse, but it keeps following my cursor, I wanted to put a timer and it keeps there frozen, can u help me? I'm gonna keep trying to do it on my own but every help is welcome
trushzin
Posts: 10
Joined: 05 Oct 2019, 11:48

Re: Help to add a 20 second timer up to 0

08 Oct 2019, 13:58

What would be nice is: whenever I use shift+1 it put a timer on my mouse, and that I can do this more than once. Just saying what would be perfect, gonna try this now
Rohwedder
Posts: 2353
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Help to add a 20 second timer up to 0

09 Oct 2019, 02:12

Then:

Code: Select all

+1::
N = 1
While, T%N%
	N++
IF !IsLabel("T" N)
	Return
T%N% := 20
SetTimer, T%N%, 1000
CoordMode, Mouse
MouseGetPos, X%N%, Y%N%
Goto, T%N%
T1:
T2:
T3:
T4:
CoordMode, ToolTip
T := SubStr(A_ThisLabel,0)
ToolTip,% T%T%, X%T%, Y%T%, T
If (--T%T% < -1)
{
	ToolTip,,,, T
	SetTimer, T%T%, Off
	T%T% =
}
Return

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 37 guests