|
You last visited: Today at 18:30
Advertisement
some questions concerning GWCA
Discussion on some questions concerning GWCA within the GW Bots forum part of the Guild Wars category.
12/10/2009, 00:49
|
#1
|
elite*gold: 0
Join Date: Jul 2008
Posts: 7
Received Thanks: 0
|
some questions concerning GWCA
Hey Everybody,
I've been using GWCA since yesterday and ran into some questions:
1.) Is it just me or doesn't it work with Windows 7? It works just fine on my laptop( XP) but when I try to start guildwars on my Pc the Client API window opens along with the update screen as normal but shuts down as Guildwars itself is started. The game runs normally after that.
I've tried executing using admin rights and compatibility mode but so far I didn't succed.
2.) In my script I'm using CA_GetAllegiance to determine wether an agent is hostile or not. When running the script this afternoon everything worked well but now it only works 50% of the time. For troubleshooting I did this:
Code:
#include <GWCAConstants.au3>
HotKeySet("{ESC}","_exit")
$CBType = "int"
while 1
CmdCB($CA_GetAllegiance,-1)
ToolTip($CBVar[0],0,0)
sleep(50)
wend
func _exit ()
exit
EndFunc
(of course this only works while targeting someone/something)
I noticed that, while this should give me a constant tooltip showing my targets Allegiance, the Tooltip was somewhat unsteady.
When Guildwars isn't focused the downtime of the Tooltip increases drasticly.
Can anybody tell me why this happens and how to work around it?
tia
|
|
|
12/10/2009, 07:24
|
#2
|
elite*gold: 0
Join Date: Feb 2008
Posts: 191
Received Thanks: 135
|
1) GWCA was made before Windows 7 and since I don't have access to a Win7 PC, I can't test how well it functions. I've heard some users say that it's working for them on Win7, but that's no guarantee for you, I'm afraid.
Try using the latest revision that doesn't include LUA and the info window (rev116). Hopefully it'll work!
2) Is that your whole script? If so, I understand why it won't work. You've forgot to do $cGUI = GUICreate("GWCA") and GUIRegisterMsg(0x500, "WndCallback").
When using GWCA, no matter if you use a GUI interface or not, you have to create a new one assigned to $cGUI.
When you say it works 50% of the time, it just confuses me though, that makes no sense.
The speed of window messages (which GWCA uses), can vary a lot. If you are having great issues with speed reduction when not focused your PC sounds pretty slow.
I have developed another method of doing communication between script and Dll though, so I might implement that. With a speed increase of around 10x. But it's a lot of work, so definitely won't happen before the Wintersdays.
|
|
|
12/10/2009, 12:00
|
#3
|
elite*gold: 0
Join Date: Jul 2008
Posts: 7
Received Thanks: 0
|
Quote:
Originally Posted by SuneC
2) Is that your whole script? If so, I understand why it won't work. You've forgot to do $cGUI = GUICreate("GWCA") and GUIRegisterMsg(0x500, "WndCallback").
When using GWCA, no matter if you use a GUI interface or not, you have to create a new one assigned to $cGUI.
When you say it works 50% of the time, it just confuses me though, that makes no sense.
The speed of window messages (which GWCA uses), can vary a lot. If you are having great issues with speed reduction when not focused your PC sounds pretty slow.
I have developed another method of doing communication between script and Dll though, so I might implement that. With a speed increase of around 10x. But it's a lot of work, so definitely won't happen before the Wintersdays.
|
Thank you for the fast answer. I tried using the latest version but it didn't help. But If you know some people who are able to use GWCA in conjunction with windows 7 then I guess the problem must be somewhere on my end.
You are right, thats not my whole script. I just rewrote the script here from my mind instead of copying it and forgot about the gui. My laptop is a 1.8GHz dual core with 2gb ram and a gforce 7600go. I know thats not top-notch but I don't think its too slow... (well, I hope it isn't ).
Sometimes CmdCB($CA_GetAllegiance,$Agent) just comes back blank (this doesn't chage if I switch to CmdCBEX).
For example I wrote this script for interrupting:
Code:
;####### Includes #######
#include <GWCAConstants.au3>
#include <GUIConstantsEx.au3>
#include <Array.au3>
;####### Variables #######
global $IruptImportant = IniReadSection("interrupt.ini","important"),$useIrupt = 1
;####### Gui setup #######
#Region ### START Koda GUI section ### Form=
$cGui = GUICreate("Interrupt", 200, 400, 200, 190)
$IruptLog = GUICtrlCreateEdit("", 5, 10, 190, 390)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;####### Program Body #######
GUIRegisterMsg(0x500, "WndCallback")
GUIRegisterMsg(0x4A, "Interrupt")
Cmd($CA_SETLOGANDHWND, 1, $cGUI)
HotKeySet("0","_debug")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
_SetIruptSkill ()
WEnd
Func Interrupt($hwnd, $msg, $wparam, $lparam)
local $timer = TimerInit()
Local $recv = DllStructCreate("ptr;dword;ptr", $LParam)
Local $skillStruct = DllStructCreate($tagSKILLLOGSTRUCT, DllStructGetData($recv, 3))
Local $Agent = DllStructGetData($SkillStruct,"AgentId")
$CBType = "int"
;CmdCB($CA_GetAllegiance,$Agent) ;check wether spell is casted by an enemy
;If $CBVar[0] <> 768 then return
Local $SkillID = _ArraySearch($IruptImportant,DllStructGetData($skillStruct,"SkillId"),0,0,0,0,1); checks if spell needs to be interrupted
CmdCB(0x467,$Agent) ; 0x467 = CA_GetMyDistanceToAgent
If $SkillID <> -1 and $CBVar[0]<1300 Then ; If skill needs to be interrupted and caster is in spellrange
CmdCB($CA_SkillRecharge,$useIrupt)
If $CBVar[0] <> 0 then ; If no normal interrupt is ready use emergency interrupt
Cmd($CA_UseSkillbarSkill,8,$Agent)
Else
Cmd($CA_UseSkillbarSkill,$useIrupt,$Agent)
EndIf
GUICtrlSetData($IruptLog,$IruptImportant[$SkillID][1]&@CRLF,1) ; log the skill thatshould be interrupted
EndIf
ToolTip(TimerDiff($timer),0,0)
EndFunc
Func _SetIruptSkill ()
CmdCB($CA_SkillRecharge,1)
If $CBVar[0] = 0 Then
$useIrupt = 1
Else
CmdCB($CA_SkillRecharge,2)
If $cbVar[0] = 0 Then
$useIrupt = 2
Else
$useIrupt = 3
EndIf
EndIf
EndFunc
Func _debug ()
$CBType = "int"
CmdCB($CA_GetAllegiance,-1)
ToolTip("debug: "&$CBVar[0],0,0)
EndFunc
interrupt.ini:
Code:
[important]
1126=Empathic Removal
266=Peace and Harmony
309=Holy Veil
954=Expel Hexes
941=Blessed Light
2003=Cure Hex
282=Word of Healing
1687=Zealous Benediction
This works perfectly within approximatly 3ms until I uncomment this part:
;CmdCB($CA_GetAllegiance,$Agent) ;check wether spell is casted by an enemy
;If $CBVar[0] <> 768 then return
At wich point the function stops to work. When trying to find the error myself I noticed that $CBVar[0] is blank all the time and so the condition is not met.
If I just uncomment the CmdCB(...) part then the time goes up to about 20ms... (I dont know if this is relevant).
Furthermore I've ran into a third question:
3.) what exactly does CA_SetEngineHook do?
from the describtion I thought that it only disables the rendering of the graphics but when I used it in the above script (inserted before the loop) I noticed that the time needed to run the _interrupt function goes up to over 2 seconds.
|
|
|
12/10/2009, 14:54
|
#4
|
elite*gold: 0
Join Date: Apr 2009
Posts: 442
Received Thanks: 189
|
gwca works WONDERFUL with win7 (as it does on winxp and winvista)
if u still got problems using gwca feel free to contact me on icq (or skype or msn) then ill try to solve ur problems
|
|
|
12/10/2009, 16:34
|
#5
|
elite*gold: 0
Join Date: Feb 2008
Posts: 191
Received Thanks: 135
|
@sospam:
Your laptop ain't topnotch, that's true, but not exactly slow either. I guess you're just being unlucky with the speeds.
The issue with $CA_GetAllegiance (and as a matter of fact also $CA_GetMyDistanceToAgent) is due to a limitation of AutoIt (and most other languages).
Inside a WndProc (which Interrupt() is), you won't "jump" out when you receive a new Window Message.
All this means, that you cannot use CmdCB() inside Interrupt()! Instead, have a look at the $tagSKILLLOGSTRUCT defined in GWCAConstants.au3 - here you will actually find what you are looking for!
Code:
Global $tagSKILLLOGSTRUCT = "long AgentId;long MyId;long SkillId;float Activation;byte TeamId;ushort Allegiance;float Distance;long Ping"
So to get the Allegiance of the caster, simply get the "Allegiance" variable using DllStructGetData($skillStruct, "Allegiance").
And same for Distance to the agent. Use the "Distance" variable here.
To get the skill recharge of certain skills will have to be done in your main loop though. For example, you could do a check on all the skills you wish to use to interrupt every 100ms and save the data to global variables (possibly an array?).
And last but not least, $CA_SetEngineHook. Your PC is very strange, since this command should increase your performance by a lightyear xD Maybe it was caused by the CmdCB() calls? Get rid of them atleast.
Hope it'll work with the changes I mentioned!
|
|
|
12/10/2009, 19:35
|
#6
|
elite*gold: 0
Join Date: Jul 2008
Posts: 7
Received Thanks: 0
|
Quote:
Originally Posted by in MIND
if u still got problems using gwca feel free to contact me on icq (or skype or msn) then ill try to solve ur problems
|
danke für das Angebot, ich denke ich werde darauf zurückkommen (vermutlich erst morgen, heute ist meine Zeit so knapp)
@ SuneC:
Ahhhh, that worked like a charm. Now I feel kinda stupid because I didn't realize that I already had the information I was trying to get using the CmdCB commands
Thank you for the explanation, too. Now I know what I need to avoid.
$CA_SetEngineHook still doesn't do what I thought it would (it boosts the performance a lot but it seems to delay the commands). Anyway, I don't think I need it anymore since the whole process is fast enough without it now due to your help!
|
|
|
12/11/2009, 13:28
|
#7
|
elite*gold: 0
Join Date: Jul 2008
Posts: 7
Received Thanks: 0
|
Quote:
Originally Posted by in MIND
gwca works WONDERFUL with win7 (as it does on winxp and winvista)
if u still got problems using gwca feel free to contact me on icq (or skype or msn) then ill try to solve ur problems
|
Yes, you are right. I found the reason why it didn't work and it had absolutely nothing to do with GWCA but rather with a wrong registry entry.
When I fixed the entry everything started to work properly
|
|
|
12/12/2009, 21:03
|
#8
|
elite*gold: 0
Join Date: Jan 2008
Posts: 293
Received Thanks: 40
|
Wollte nicht nen neuen Thread erstellen daher frag ich hier ^^
Mein Guild Wars stürzt sobald ich ein Bot/Script mit Gwca ausführe ab -.- , die game.dll ist injectet weil der CharacterName wird angezeigt (Guild Wars - Nam...e) geht es jemandem ähnlich ?
|
|
|
12/12/2009, 21:18
|
#9
|
elite*gold: 0
Join Date: Apr 2009
Posts: 793
Received Thanks: 366
|
Quote:
Originally Posted by NANAAA
Wollte nicht nen neuen Thread erstellen daher frag ich hier ^^
Mein Guild Wars stürzt sobald ich ein Bot/Script mit Gwca ausführe ab -.- , die game.dll ist injectet weil der CharacterName wird angezeigt (Guild Wars - Nam...e) geht es jemandem ähnlich ?
|
brauchst rev118:
Quote:
Fixed the crash bug when using commands that sends packets after the 10/12/2009
GW game update.
Previous revisions will most likely not work anymore!
|
|
|
|
12/15/2009, 17:29
|
#10
|
elite*gold: 134
Join Date: Jan 2009
Posts: 2,082
Received Thanks: 266
|
Hallo, habe auch mal eine Frage. Und zwar will ich, dass mein Char nur zum Gegener läuft, ihn aber nicht angreift. Dies habe ich so gelöst:
CmdCB($CA_Getcurrenttarget)
CmdCB($CA_GoAgent,$cbVar[0])
Allerdings geht es nicht. Wenn ich über den Commander das auslese + manuell eingebe, geht es dorthin.
Danke schonmal und ich hoffe, meine Frage war nicht zu dumm :-)
|
|
|
12/15/2009, 18:01
|
#11
|
elite*gold: 1826
Join Date: Mar 2009
Posts: 4,310
Received Thanks: 6,284
|
Probier das mal
Code:
$cbType = 'int'
CmdCB($CA_GetCurrentTarget)
If $cbVar[0] <= 0 Then
CmdCBEx($CA_GetCurrentTarget)
EndIf
Cmd($CA_GoAgent, $cbVar[0])
|
|
|
12/15/2009, 18:19
|
#12
|
elite*gold: 20
Join Date: Feb 2007
Posts: 3,080
Received Thanks: 4,294
|
was hat das "ex" zu bedeuten?
|
|
|
12/15/2009, 18:27
|
#13
|
elite*gold: 100
Join Date: Oct 2007
Posts: 738
Received Thanks: 485
|
is ne bisschen abgewandelte form von cmdcb
falls das mal nicht funzt
|
|
|
12/15/2009, 18:30
|
#14
|
elite*gold: 0
Join Date: Jul 2008
Posts: 7
Received Thanks: 0
|
Quote:
Originally Posted by kknb
was hat das "ex" zu bedeuten?
|
Code:
Func CmdCBEx($uMsg, $wParam = 0, $msTimeout = 60)
CmdCB($uMsg, $wParam)
$tEscape = TimerInit()
Do
Sleep(0)
Until TimerDiff($tEscape) > $msTimeout OR $cbVar[0] <> ""
EndFunc
wenn ich das richtig interpretiere bedeutet das "ex" nur, dass dem DLLCall der normalen CmdCB Funktion mehr Zeit gegeben wird um ein Ergebnis zu liefern.
-----
I just ran into another question concerning CA_GetHex and CA_GetEffects:
CA_GetHex doesn't seem to work as it always returns a non zero value, even if the target is not hexed and the value returned doesn't change when the target actually becomes hexed.
When working with CA_GetEffects there seem to be 6 classes:
[class 1][2]
Burning
Blind
Dazed
Weakness
[class 2][3]
Bleeding
[class 3][10]
Crippled
[class 4][34]
Deep Wound
[class 5][66]
Poison
Disease
[class 6][128]
Enchanted
class 1 to 5 contain the different conditions while class 6 tells wether the target is enchanted.
I figured that the ID's of the condition classes consist of a general condition indicator [2] plus a modifier that is individual to every class (0,1,8,32,64). With that knowledge one can break down the Number returned by CA_GetEffects into the individual classes:
Code:
func _test () ; returns the condition on you charakter as tooltip
local $condition = "|"
$CBType = "int"
CmDCB($CA_GetEffects,-2)
If $CBVar[0] >= 128 Then
$condition &= " enchanted |"
$CBVar[0] -= 128
EndIf
If $CBVar[0] >= 66 Then
$condition &= " poison/disease |"
$CBVar[0] -= 64
EndIf
If $CBVar[0] >= 34 Then
$condition &= " Deep Wound |"
$CBVar[0] -= 32
EndIf
If $CBVar[0] >= 10 Then
$condition &= " Crippled |"
$CBVar[0] -= 8
EndIf
If $CBVar[0] >= 3 Then
$condition &= " bleeding |"
$CBVar[0] -= 1
EndIf
If $CBVar[0] >= 2 Then
$condition &= " other |"
EndIf
ToolTip("condition:"&@CRLF&$condition,0,0)
EndFunc
My Problem is that once you have a condition of class 2 or above there is no way of telling if you also have a class 1 condition since the class 1 modifier is 0.
Is there any way to work around this and is it possible to differ between the individual condion(s) in a class?
|
|
|
12/15/2009, 18:43
|
#15
|
elite*gold: 0
Join Date: Apr 2009
Posts: 793
Received Thanks: 366
|
Quote:
Originally Posted by sospam
Code:
Func CmdCBEx($uMsg, $wParam = 0, $msTimeout = 60)
CmdCB($uMsg, $wParam)
$tEscape = TimerInit()
Do
Sleep(0)
Until TimerDiff($tEscape) > $msTimeout OR $cbVar[0] <> ""
EndFunc
wenn ich das richtig interpretiere bedeutet das "ex" nur, dass dem DLLCall der normalen CmDCB Funktion mehr Zeit gegeben wird um ein Ergebnis zu liefern.
|
Nö es gibt einfach nur ein TimeOut.
|
|
|
|
|
Similar Threads
|
GWCA - SS und LB Titel Bot
05/13/2010 - GW Exploits, Hacks, Bots, Tools & Macros - 30 Replies
Heyy.
Heute veröffentliche ich meinen Sonnenspeer Punkte Farmbot, der als Wurm in der Schwefel Einöde die Untoten farmt.
Ihr reist zum Ödland Tor und addet 3 Helden und startet den Bot.
Der Bot schafft in ca. 5 min. 1 Run, welcher ca. 450-500 SS Punkte einbringen sollte.
So, der Lichtbringer Punkte Bot ist nun auch so gut wie fertig...
Problem ist zwar, das nicht alle Funktionen gingen, die benötigt wurden wesswegen ich auf eine andere Lösung zurück greifen musste.
Im Großen und...
|
GWCA Problem
04/20/2010 - GW Bots - 3 Replies
auch wenn es ein relativ leicht zu behebender fehler sein sollte bitte ich um konstruktive hilfe.
nun zu meinem problem:
wenn ich mit gwca einen befehl calle tut sich bei mir im guildwars fenster nichts...
injectet habe ich, compiled = 0 errors
nur wenn ich wirklich einen reinen befehl benutze bewegt sich der character
|
.ini in GWCA verwenden
02/28/2010 - GW Bots - 13 Replies
Morgen Community,
nachdem ich mehrfach die SuFu mit diversen Wörtern gefüttert hab, und keine passende antwort gefunden habe, stelle ich einfach hier die Frage,
wie kann bindet man eine .ini in einen GWCA-basierten bot ein (bzw ist mit den unten genannten sachen eine .ini überhaupt notwendig, oder kann man direkt an die GUI schreiben und wenn ja, wie geht das :))?
D.h., ich hätte gern in der GUI (oder wie zB gabba es sehr elegant mit dem kleinen fenster links oben in seinem...
|
GWCA help?
02/20/2010 - GW Bots - 3 Replies
I'm trying to find place numbers for the maps etc.
Like Rata Sum is 640...
I need to know what I would set my ToPK value to.
It's for this...
Global $MAP_TOPK = ???
|
All times are GMT +2. The time now is 18:30.
|
|