Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Guild Wars > GW Bots
You last visited: Today at 22:02

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Trouble with --> Func GetEffectTimeRemaining

Discussion on Trouble with --> Func GetEffectTimeRemaining within the GW Bots forum part of the Guild Wars category.

Reply
 
Old   #1
 
xnx's Avatar
 
elite*gold: 85
Join Date: Sep 2009
Posts: 285
Received Thanks: 9
Trouble with --> Func GetEffectTimeRemaining

Code:
;~ Description: Returns time remaining before an effect expires, in milliseconds.
Func GetEffectTimeRemaining($aEffect)
	If Not IsDllStruct($aEffect) Then $aEffect = GetEffect($aEffect)
	If IsArray($aEffect) Then Return 0
	Return DllStructGetData($aEffect, 'Duration') * 1000
;~ 	Return DllStructGetData($aEffect, 'Duration') * 1000 - (GetSkillTimer() - DllStructGetData($aEffect, 'TimeStamp'))
EndFunc   ;==>GetEffectTimeRemaining
Having trouble with this little piece of GWA2 not returning what it should return. Just returning 0 always.

Any suggestions for solving this problem?
xnx is offline  
Old 04/01/2023, 23:02   #2
 
sadusten's Avatar
 
elite*gold: 0
Join Date: Aug 2015
Posts: 52
Received Thanks: 8
Quote:
Originally Posted by xnx View Post
Code:
;~ Description: Returns time remaining before an effect expires, in milliseconds.
Func GetEffectTimeRemaining($aEffect)
	If Not IsDllStruct($aEffect) Then $aEffect = GetEffect($aEffect)
	If IsArray($aEffect) Then Return 0
	Return DllStructGetData($aEffect, 'Duration') * 1000
;~ 	Return DllStructGetData($aEffect, 'Duration') * 1000 - (GetSkillTimer() - DllStructGetData($aEffect, 'TimeStamp'))
EndFunc   ;==>GetEffectTimeRemaining
Having trouble with this little piece of GWA2 not returning what it should return. Just returning 0 always.

Any suggestions for solving this problem?
Are you inputting the actuall skillid of the skill and not your "number" on your bar?

Should be like this example:
Code:
Global $100b_effect = 381 "actual skillID of 100b skill"
Global $100b = 4 "Slot 4 on my bar"
Code:
If geteffecttimeremaining($100b_effect) = 0 Then
  If isrecharged($100b) And getenergy(-2) >= 5 Then
	useskill($100b, 0)
	Sleep(getping() + 100)
  EndIf
EndIf
sadusten is offline  
Reply


Similar Threads Similar Threads
need help with GetEffectTimeRemaining Func
02/14/2022 - GW Bots - 0 Replies
Hi, id like to have a working Function, that gives me the actual skill cooldown Func GetEffectTimeRemaining($aEffect) If Not IsDllStruct($aEffect) Then $aEffect = GetEffect($aEffect) If IsArray($aEffect) Then Return 0 Return DllStructGetData($aEffect, 'Duration') * 1000 - (GetSkillTimer() - DllStructGetData($aEffect, 'TimeStamp')) EndFunc ;==>GetEffectTimeRemaining
Func nach der func ausführen problem
08/15/2011 - AutoIt - 6 Replies
Hi, ich hab hier mal nen code schnipel der nicht funktioniert.. Die error Erkennung... if StringInStr($oWebTcp.body, "Du kannst nicht weitermachen...") Then GUICtrlSetData($list1, "Login failed. Please fix"&" = "&$array&" ANR: ")
Func in Func ?
02/11/2011 - AutoIt - 8 Replies
Hallo E*PvP, Ich habe eine frage , ich will ein shortcut ..ding machen ..xD also wen ich z.b F1 drücke,soll ich in ein Menü reinkommen und dan auch für F1 etwas anderes amchen also z.b F1= Begrüßungs hotkeys => Press F1 =>
[Fragen zu] Gui Hide & Show / Admin Rights / Func in Func
12/12/2010 - AutoIt - 29 Replies
Hi Leute, wie ihr oben ja bereits lesen könnt habe ich ein paar Fragen. 1. Könnte mir jmd. eine Hotkeyset-Func schreiben, womit ich mit nur einer (!) Taste die GUI verstecken und wieder anzeigen lassen kann ? 2. Gibt es etwas, dass dem gescripteten Tool von selbst Adminrechte verschafft? Ich rede NICHT von RequireAdmin, da muss man ja Administrator des PCs sein. €: Kann "#requireadmin" rausgezögert werden ?! Ich möchte, dass das passiert, aber erst, wenn ich einen Knopf gedrückt...
Mit welcher Func am besten zwischen 2 GW Fenster wechseln?
05/30/2008 - Guild Wars - 14 Replies
Hallo, Ich weiss schon wieder ein mal nich weiter (Ich kann bald n Fragen von gabba sammel Fred auf machen). Ich hab mirn Bot geschrieben der mit mehreren Accs gleichzeitig hfff läuft is auch soweit alels ganz doll nur an soner dummen Sache weiss ich wieder nicht weiter. Ich hab die Accs mit dem Multi Clienten von hier gestartet und da heißen se dann ja GW, GW1, GW2 usw. und wenn ich dem Script jetzt sag winactivate GW aktiviert er nich selten GW1 oder 2 oder sons was was halt als letztes...



All times are GMT +1. The time now is 22:09.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.