Func test()
If GetMapLoading() == 2 Then Disconnected()
While GetMapID() == $Test
If GetMapLoading() == 2 Then Disconnected()
If GUICtrlRead($pause) = 1 Then
out("Bot paused")
sleep(2000)
Else
Out("I am in the testmap!")
Sleep (10000)
SendChat('resign', '/')
WaitMapLoading()
EndIf
WEnd
i Just have test the resign function and it's working as intended.Quote:
Hey guys quick question. Calling this:
will result in spamming all chat with "esign" Instead of resigning. i've tried calling the same function with Resign() to GWA2, had the same result. re-compiled it too, GWA2 is uptodate. Because it's sending chat but just not the R. i'm out of idea's.Code:Func test() If GetMapLoading() == 2 Then Disconnected() While GetMapID() == $Test If GetMapLoading() == 2 Then Disconnected() If GUICtrlRead($pause) = 1 Then out("Bot paused") sleep(2000) Else Out("I am in the testmap!") Sleep (10000) SendChat('resign', '/') WaitMapLoading() EndIf WEnd
Might this be lag or something? Or have somebody an idea how to fix this?
$SendChatHeader = 0x6A
;~ Description: Send a message to chat. Func SendChat($aMessage, $aChannel = '!') Local $lMessage Local $lAddress = 256 * $mQueueCounter + $mQueueBase If $mQueueCounter = $mQueueSize Then $mQueueCounter = 0 Else $mQueueCounter = $mQueueCounter + 1 EndIf If StringLen($aMessage) > 120 Then $lMessage = StringLeft($aMessage, 120) Else $lMessage = $aMessage EndIf ;MemoryWrite($lAddress + 8, $aChannel & $lMessage, 'wchar[122]') MemoryWrite($lAddress + 12, $aChannel & $lMessage, 'wchar[122]') DllCall($mKernelHandle, 'int', 'WriteProcessMemory', 'int', $mGWProcHandle, 'int', $lAddress, 'ptr', $mSendChatPtr, 'int', 8, 'int', '') If StringLen($aMessage) > 120 Then SendChat(StringTrimLeft($aMessage, 120), $aChannel) EndFunc ;==>SendChat #EndRegion Chat
Was missing this:Quote:
i Just have test the resign function and it's working as intended.
Be sure to have all function updated in GWA2 like Sendchat :
Code:$SendChatHeader = 0x6ACode:;~ Description: Send a message to chat. Func SendChat($aMessage, $aChannel = '!') Local $lMessage Local $lAddress = 256 * $mQueueCounter + $mQueueBase If $mQueueCounter = $mQueueSize Then $mQueueCounter = 0 Else $mQueueCounter = $mQueueCounter + 1 EndIf If StringLen($aMessage) > 120 Then $lMessage = StringLeft($aMessage, 120) Else $lMessage = $aMessage EndIf ;MemoryWrite($lAddress + 8, $aChannel & $lMessage, 'wchar[122]') MemoryWrite($lAddress + 12, $aChannel & $lMessage, 'wchar[122]') DllCall($mKernelHandle, 'int', 'WriteProcessMemory', 'int', $mGWProcHandle, 'int', $lAddress, 'ptr', $mSendChatPtr, 'int', 8, 'int', '') If StringLen($aMessage) > 120 Then SendChat(StringTrimLeft($aMessage, 120), $aChannel) EndFunc ;==>SendChat #EndRegion Chat
MemoryWrite($lAddress + 12, $aChannel & $lMessage, 'wchar[122]')
MemoryWrite($lAddress + 8, $aChannel & $lMessage, 'wchar[122]')
TargetNearestAlly()
$lGoon = GetNearestNPCToCoords(-993, 16964)
$lName = GetAgentName($lGoon)
Out("" & $lName)
Check before if the function is correct in GWA2 :Quote:
Hi, haven't played GW in a while, and now a bot of mine doesn't work anymore, but can't find out why, i use a recent gwa2 and the headers.
The problem is somewhere in this functions:
Either the Getnpc function or the getname function doesn't work, beacause it doesn't return the name of the NPC.Code:TargetNearestAlly() $lGoon = GetNearestNPCToCoords(-993, 16964) $lName = GetAgentName($lGoon) Out("" & $lName)
Maybe some old headers?
E: added the gwa2 i use
;~ Description: Target the nearest ally. Func TargetNearestAlly() Return PerformAction(0xBC, 0x18) EndFunc ;==>TargetNearestAlly
tried that one but it doesn't work either, also the 0x18 offset doesn't work but this does:Quote:
Go and take GWA2 from [Only registered and activated users can see links. Click Here To Register...]; you'll have the latest update on DropBundle function too
;~ Description: Target the nearest ally. Func TargetNearestAlly() Return PerformAction(0xBC, 0x1E) EndFunc ;==>TargetNearestAlly
Seem found error here; replace DonateFaction(1) by DonateFaction(l) ;) (k for kurzick l for luxon and not 1 the number)Quote:
Hello,
i have a problem with the donate function. The bot travels to Cavalon, talks to the faction reward guy and then doesn't donate the points. I can't find the mistake. Maybe someone can help me.
Thanks in advance!
Func TurnInFaction()
TravelTo(193)
WaitForLoad()
CurrentAction("grabing")
GoNearestNPCToCoords(9076, -1111)
$beforedone = GetLuxonFaction()
If BitAND(GUICtrlRead($Donate), $GUI_CHECKED) = $GUI_CHECKED Then
Do
CurrentAction("Donate")
DonateFaction(1)
;~ SendPacket(0x10, 0x2E, 0, 0, 5000)
;~ rndslp(1000)
;~ SendPacket(0x10, 0x2E, 0, 1, 5000)
RndSleep(500)
Until GetLuxonFaction() < 5000
Else
CurrentAction("Grabbing Jade Shards")
Dialog(131)
RndSleep(500)
$temp = Floor(GetLuxonFaction() / 5000)
$id = 8388609 + ($temp * 256)
Dialog($id)
EndIf
RndSleep(500)
;$luxon_title_at_begining = $beforedone - GetLuxonFaction()
$after_donate = GetLuxonFaction()
$what_we_donate = $beforedone - $after_donate + $what_we_donate
RndSleep(500)
TravelTo(389)
WaitForLoad()
EndFunc