OK to ask for exploit/Scripting help here...

11/01/2019 05:48 oneshout#196
Quote:
Originally Posted by richpianagroyper View Post
maybe try
Code:
;~ Description: Drop environment object.
Func DropBundle()
	Return PerformAction(0xCD, 0x1e)
EndFunc   ;==>DropBundle
Tks a lot, working now...it was a bad PerformAction :handsdown:
11/02/2019 07:58 ForgottenRelic#197
I have posted a couple times and tried my fair share of attempts at fixing bots... to my honest defense i suck miserably at it. (NO coding experience what so ever)

Needless to say, I made it one of my goals to learn a little bit more than what i know now about how to code some scripts. Not expecting to learn how to code a full DOA run, just small scripts like killing a boss or simple farm.


I have many questions that come to my mind....

1) i understand that GWA2 has a sh** ton of code in it, and i learned that theres alot of functions inside of it. so does that mean that when you write a script, it searches through GWA2 for that function that your calling?

2) im trying to figure out how i should start learning about how to make my own small scripts. i know there is a tool out there for simple IDs and travelto points, but what about a master list of functions to learn first before moving on to the whole weird number thingys.


i know eventually i will be able to write something useful.
11/03/2019 02:25 Nachico#198
Hey guys quick question. Calling this:

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
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.

Might this be lag or something? Or have somebody an idea how to fix this?
11/03/2019 05:48 oneshout#199
Quote:
Originally Posted by Nachico View Post
Hey guys quick question. Calling this:

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
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.

Might this be lag or something? Or have somebody an idea how to fix this?
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 = 0x6A
Code:
;~ 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
11/03/2019 10:04 Nachico#200
Quote:
Originally Posted by oneshout View Post
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 = 0x6A
Code:
;~ 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:

Code:
MemoryWrite($lAddress + 12, $aChannel & $lMessage, 'wchar[122]')
I had:
Code:
MemoryWrite($lAddress + 8, $aChannel & $lMessage, 'wchar[122]')


Edit: Yup, this fixed the issue. Seems like my GWA2 isnt so uptodate after all. :cry:
11/04/2019 09:57 oneshout#201
just a question (and a good question :cool:) :
Somebody have found the reason why a bot behave strangely during a "no rendering" ?? most of bots don't have problem with that, seem happen for dungeon bots : Raven's point, voltaic spear or BDS bots.
11/09/2019 02:19 phat34#202
The event system does not function while render is off... so any function using events such as names of NPC's / signpost, etc... will not be recognized. I also think that functions such as haseffect() and some environmental checks may not work while rendering is off... Merchant trading may also be affected... this info is off the top of my head and may be incorrect or need verification, but I believe this issue was never fixed, however some function workarounds have been made in some bots me or the crew have touched !:cool:
11/09/2019 11:38 oneshout#203
I think like CoderHandy said, the best for this 3 bots would be to transfer them on the GWapi... but i don't have time and particulary tools and the knowedge to do it properly ;)
11/10/2019 12:43 zoidberg1337#204
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:
Code:
	
         TargetNearestAlly()
	 $lGoon = GetNearestNPCToCoords(-993, 16964)
	 $lName = GetAgentName($lGoon)
	 Out("" & $lName)
Either the Getnpc function or the getname function doesn't work, beacause it doesn't return the name of the NPC.
Maybe some old headers?
11/10/2019 13:16 oneshout#205
Quote:
Originally Posted by zoidberg1337 View Post
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:
Code:
	
         TargetNearestAlly()
	 $lGoon = GetNearestNPCToCoords(-993, 16964)
	 $lName = GetAgentName($lGoon)
	 Out("" & $lName)
Either the Getnpc function or the getname function doesn't work, beacause it doesn't return the name of the NPC.
Maybe some old headers?

E: added the gwa2 i use
Check before if the function is correct in GWA2 :
Code:
;~ Description: Target the nearest ally.
Func TargetNearestAlly()
	Return PerformAction(0xBC, 0x18)
EndFunc   ;==>TargetNearestAlly
11/10/2019 13:40 zoidberg1337#206
Okay that function was outdated, but it still doesn't work, can you maybe upload your latest gwa2?
11/10/2019 13:45 oneshout#207
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
11/10/2019 14:09 zoidberg1337#208
Quote:
Originally Posted by oneshout View Post
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
tried that one but it doesn't work either, also the 0x18 offset doesn't work but this does:

Code:
;~ Description: Target the nearest ally.
Func TargetNearestAlly()
	Return PerformAction(0xBC, 0x1E)
EndFunc   ;==>TargetNearestAlly
Weird, if i restart the game and the bot it works. but if i restart the bot and not the game it doesn't work :confused:
11/11/2019 18:59 honigkuchenpferd2#209
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!
11/11/2019 20:23 oneshout#210
Quote:
Originally Posted by honigkuchenpferd2 View Post
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!
Seem found error here; replace DonateFaction(1) by DonateFaction(l) ;) (k for kurzick l for luxon and not 1 the number)

Code:
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