|
You last visited: Today at 22:02
Advertisement
Move in GWCA
Discussion on Move in GWCA within the GW Bots forum part of the Guild Wars category.
12/08/2009, 19:09
|
#1
|
elite*gold: 0
Join Date: Jan 2008
Posts: 293
Received Thanks: 40
|
Move in GWCA
Hallo
Ich befasse mich derzeit mit GWCA
mein Problem ist dass ich nen Move machen möchte und der Bot erst weitergeht wenn der Character am richtigen Ort ist.
also
Move(x,y)
warte bis Character +- 300 bei x,y ist
....
Hoffe versteht mich , habe bis jetzt nichts gefunden ausser die Distance berechnen doch das Verstehe ich nicht so recht
|
|
|
12/08/2009, 19:19
|
#2
|
elite*gold: 1826
Join Date: Mar 2009
Posts: 4,310
Received Thanks: 6,287
|
^this
Code:
Func MoveTo($X, $Y)
MoveToEx($X, $Y)
Do
Sleep(100)
Until ((GetOwnXCoord() - $X) < 50) Or ((GetOwnXCoord() - $X) > 50) And ((GetOwnyCoord() - $Y) < 50) Or ((GetOwnyCoord() - $Y) < 50)
EndFunc ;==>MoveTo
|
|
|
12/08/2009, 19:32
|
#3
|
elite*gold: 0
Join Date: Feb 2008
Posts: 191
Received Thanks: 135
|
That MoveTo() is kinda scraped :P
Code:
Func MoveTo($x, $y, $random = 50)
Local $iBlocked = 0
$cbType = "float"
MoveEx($x, $y, $random)
CmdCB($CA_GETCOORDS, -2)
Do
Sleep(250)
$oldCoords = $cbVar
$cbType = "int"
CmdCB($CA_GETDEAD)
If $cbVar[0] = 1 Then Return
$cbType = "float"
CmdCB($CA_GETCOORDS, -2)
If $oldCoords[0] = $cbVar[0] AND $oldCoords[1] = $cbVar[1] Then
$iBlocked += 1
MoveEx($x, $y, $random)
EndIf
Until ComputeDistance($cbVar[0], $cbVar[1], $x, $y) < 250 OR $iBlocked > 20
EndFunc
Func ComputeDistance($x1, $y1, $x2, $y2)
Return Sqrt(($y2 - $y1)^2 + ($x2 - $x1)^2)
EndFunc
This is the one I always used
|
|
|
12/08/2009, 19:48
|
#4
|
elite*gold: 0
Join Date: Apr 2009
Posts: 442
Received Thanks: 189
|
u might get errors with that func 'cause ur coords sometimes dont change when moving with gwca
|
|
|
12/08/2009, 20:34
|
#5
|
elite*gold: 0
Join Date: Feb 2008
Posts: 191
Received Thanks: 135
|
Quote:
Originally Posted by in MIND
u might get errors with that func 'cause ur coords sometimes dont change when moving with gwca
|
Which is due to the fact, that GWCA only sends the Move packet, which doesn't make the client aware that it's actually moving  it will update during the move or when it reaches the location no matter what though.
If you are having issues with the $iBlocked variable, simply comment/delete it out.
|
|
|
12/10/2009, 21:15
|
#6
|
elite*gold: 0
Join Date: Jan 2008
Posts: 293
Received Thanks: 40
|
What can i make that the MoveTo(17178,-15874) wait until MoveTo(17844,-16224) ( Function) is finish ?
PHP Code:
Global $random0 = "-50" ; Random Für Move
Global $random1 = "50" ; Random Für Move
Func walk()
MoveTo(17844,-16224)
MoveTo(17178,-15874)
MoveTo(15655,-15685)
MoveTo(15501,-15204)
Endfunc
Func MoveTo($x, $y) ; Move(x,y)
Cmd($CA_MOVE, _FloatToInt($x+Random($random0,$random1)), _FloatToInt($y+Random($random0,$random1)))
Do
Sleep(900)
$CBType = "float"
CmdCB($CA_GetCoords,-2)
Until $CBVar[0] - $x < $random0 or $CBVar[0] - $x < $random1 And $CBVar[1] - $y < $random0 or $CBVar[1] - $y < $random1
EndFunc
|
|
|
12/10/2009, 21:20
|
#7
|
elite*gold: 0
Join Date: Feb 2008
Posts: 191
Received Thanks: 135
|
Get a proper MoveTo() function first :P I have no idea if your current one even works. The one I posted works the way you want it to though, so just use that.
|
|
|
12/10/2009, 22:16
|
#8
|
elite*gold: 0
Join Date: Apr 2009
Posts: 442
Received Thanks: 189
|
u better also add the condition that moveto() ends if mapstate (ca_getmaploading) changes cuz the func sometimes doesnt end if u choose "wrong" coords behind a portal
just add this before the "do":
Code:
$cbType = "int"
$mState = CmdCB($CA_GETMAPLOADING)
$mStateOld = $mState[0]
and this after "do" but before "until":
Code:
$cbType = "int"
$mState = CmdCB($CA_GETMAPLOADING)
and this in the same line as "until":
Code:
Or $mState[0] <> $mStateOld
if ur using sune's func it'd be like this:
Code:
Func MoveTo($x, $y, $random = 50)
Local $iBlocked = 0
$cbType = "int"
$mState = CmdCB($CA_GETMAPLOADING)
$mStateOld = $mState[0]
$cbType = "float"
MoveEx($x, $y, $random)
CmdCB($CA_GETCOORDS, -2)
Do
Sleep(250)
$oldCoords = $cbVar
$cbType = "int"
CmdCB($CA_GETDEAD)
If $cbVar[0] = 1 Then Return
$cbType = "float"
CmdCB($CA_GETCOORDS, -2)
If $oldCoords[0] = $cbVar[0] AND $oldCoords[1] = $cbVar[1] Then
$iBlocked += 1
MoveEx($x, $y, $random)
EndIf
$cbType = "int"
$mState = CmdCB($CA_GETMAPLOADING)
Until ComputeDistance($cbVar[0], $cbVar[1], $x, $y) < 250 OR $iBlocked > 20 Or $mState[0] <> $mStateOld
EndFunc
__________________________________________________ _________________________________
Quote:
Originally Posted by SuneC
Which is due to the fact, that GWCA only sends the Move packet, which doesn't make the client aware that it's actually moving  it will update during the move or when it reaches the location no matter what though.
If you are having issues with the $iBlocked variable, simply comment/delete it out.
|
i didnt mean to say anything against gwca
just wanted to tell that that case could happen
|
|
|
12/10/2009, 23:34
|
#9
|
elite*gold: 0
Join Date: Feb 2008
Posts: 191
Received Thanks: 135
|
That's a nice addition to the MoveTo() function! Never thought of that, even though I've run into issues with zoning when moving through portals just like you mentioned.
Quote:
Originally Posted by in MIND
i didnt mean to say anything against gwca
just wanted to tell that that case could happen
|
I'm sorry if you got the impression, but I wasn't making a rant at you. I admit it's a flaw in GWCA, but lazyness has kept me from updating to a better solution, even though it's not difficult at all, to find a function at a higher level to call instead of forging the packet!
|
|
|
12/11/2009, 00:25
|
#10
|
elite*gold: 0
Join Date: Apr 2009
Posts: 442
Received Thanks: 189
|
feel free to add it to the constants or wherever u want
|
|
|
 |
Similar Threads
|
GWCA reloaded
10/18/2010 - GW Exploits, Hacks, Bots, Tools & Macros - 62 Replies
Ich hab euch mal alle GWCA wieder fit gemacht. Es funktioniert 1:1 wie das orig. GWCA von Harboe, wurde jedoch um die Stealth-Funktion von Valvepro erweitert und nutzt einen anderen Pipenamen .. es fielen Stichworte wie Pipescan ;)
GWCA
gwca - Project Hosting on Google Code
GWCA reloaded
|
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 = ???
|
GWCA Frage(n)
02/02/2010 - GW Bots - 56 Replies
HI
hab ne Frage bezüglich mehrere Guild Wars über GWCA zu steuern.
Nämlich welches ist die "Variable" für die $client ?
also was muss ich umschreiben wenn ein Bot für das Fenster "Guild Wars Name1" und ein Bot für "Guild Wars Name2" die Befehle gibt ?
|
gwca laufen
12/17/2009 - GW Bots - 11 Replies
Hallo,
ich habe mir mal die API von gwca angesehen. Es funktioniert soweit auch super.
Nur folgendes Problem mit dem Code:
Cmd($CA_MOVE, 11836, -96463)
Diese Koordinaten liegen in Termalquellen von Bergen.
|
All times are GMT +1. The time now is 22:02.
|
|