The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Difference between revisions of "User:Cegaiel/Macros/Timer/Code"

From A Tale in the Desert
Jump to navigationJump to search
(New page: <pre> ;No hotkeys to start script. Upon loading script, it will immediately ask Seconds and Timing Mode. ;It will remember the seconds everytime you start / stop(reset) timer. ;Hit Ctrl+R ...)
(No difference)

Revision as of 05:09, 18 February 2010

;No hotkeys to start script. Upon loading script, it will immediately ask Seconds and Timing Mode.
;It will remember the seconds everytime you start / stop(reset) timer.
;Hit Ctrl+R if you want to reload script to input a new amount of seconds.



	Gui, Add, Text,, Minutes:
	Gui, Add, Edit, vMins wp number, 0

	Gui, Add, Text,, Seconds:
	Gui, Add, Edit, vseconds wp number, 0

	Gui, Add, Text,, Timer Mode:
	Gui, Add, DropDownList, vmode Choose1, Teppy|Real
	Gui, Add, Button, gSubmit, Submit
	Gui, Show
	return


	Submit:
	Gui, Submit
	Gui, Destroy

	Minutes := Mins * 60
	Seconds := Minutes + Seconds	



	Gui, +AlwaysOnTop +ToolWindow
	Gui, Font, normal
	Gui, Add, Text, vLocationText, Press Numpad Plus (+) key to START Timer`n`nTimer Set: %seconds% seconds (%mode%)
	Gui, Show

	;WinActivate, eGenesis Client

	KeyWait, NumpadAdd, D


	Timer:
	counter := seconds * 10

	if (mode == "Teppy")
	counter := counter * 1.1

	loop
	{
		GetKeyState, state, NumpadSub
		if state = D
		{
		counter := counter/10
		break
		}
		if counter <= 0 
		{
		SoundPlay *64,1
		break
		}

	counter--
	Display := counter/10
	SetFormat, float, 0.1 
	GuiControl, Text, LocationText, Press Numpad Minus (--) to STOP Timer`n`n%Display% seconds remaining... 
	sleep 100
	}


	
	GuiControl, Text, LocationText, Press Numpad Plus (+) key to START Timer`n`nTimer Set: %seconds% seconds (%mode%) 

 
	KeyWait, NumpadAdd, D

	;counter := seconds * 1.1 * 10
	Gosub, Timer

^r::reload