Updated GWA2

04/30/2020 11:55 FriendlyFarmer#121
Quote:
Originally Posted by L0ume View Post
Hello Everyone,

I'm trying to fixe GetAgentbyName(), but struggling
Did you made any progress on this part ?
Thx
The easy fix is replacing all the GetAgentbyName() with GetAgentByCoords or GetAgentByPlayerNumber.
04/30/2020 19:48 sadosan#122
I managed to fix the fact my bot wasn't able to go to the Rare Material Trader, but now it can't buy the material I choosed.

It appears both TraderRequest and TraderBuy functions are not working and im stuck there. Any idea?
05/03/2020 20:57 phat34#123
I wouldn't expect a fix for this anytime soon...

However these are on my todo list and I am working on them and will release if I come up with something.
05/04/2020 21:57 Copephobia#124
Quote:
Originally Posted by matx61971 View Post
I'm out of ideas on the Gwbible.
Fixed-
ASM Crash
The Script will now initialize the client again.
Rendering Fix
Donate Function
All current headers
Memory updates

I'm no expect but ive goten this far.

The Script flat up crashes the client after about 5 seconds when it trys to enter battle.
no au3 error codes just a flat crash.
Any assistance would be Great- Thank you

[Only registered and activated users can see links. Click Here To Register...]
It's probable that your $HEADER_MISSION_ENTER is a bad value. My current working value is 0xAD, try that and see if it works for you.
05/04/2020 22:18 matx61971#125
Quote:
Originally Posted by Copephobia View Post
It's probable that your $HEADER_MISSION_ENTER is a bad value. My current working value is 0xAD, try that and see if it works for you.
Thank you that Working header did fix my current issue. testing now Update in a bit.

So we are on the right track.

What about the current headers for donate? Im crashing again right when it trys to donate. If i remove that function it works perfectly.

Currently using Global Const $HEADER_FACTION_DONATE = 0x3C
It wont speak to the NPC at all

On the right track it will donate now but only if i click the NPC first once i put the mouse on it then the script takes over.... Maybie the npc cords are wrong?

EDIT__ It does work donates and all. My only issue is opening more then 1 of this script its being a cunt hair to do so.
05/22/2020 20:40 ss1100#126
So where is this updated gwa2 library at? Github somewhere? The link at the beginning doesn't appear to be updated.

I think it's not in Github and my next question will be... Why don't we get it into Github? The benefits:

1) A single, consolidated, publicly accessible codebase that doesn't require people to download a .rar file off a web forum full of people who write code :)
2) Issue tracking where people can create tickets for stuff that's broken and mark them resolved and bound to a particular code commit to see what was done to fix them.
3) Code reviewer(s) can be created or set to review commits to the codebase before accepting them in, to prevent weird, wrong, or malicious commits.
4) Commits can be seen and linked here so we can discuss changes and/or use them to teach people who want to help.
5) Generally easier for people to jump in and help if they wish.
05/22/2020 21:37 DerMoench14#127
There is no public (full) updated GWA2 out there ... there are some versions available with limited functionality ...
05/22/2020 21:38 ss1100#128
That's all we need to start with. People can add their changes to that and then we'll get a full updated one that's easy to continue updating as needed.

Thoughts? I know I'm a newbie here, but it's a good suggestion.

EDIT: The reason I'm not creating it is that the creator is default set to review changes and I'm just barely getting started with this stuff... (not a good choice for reviewer lol)

EDIT EDIT: My personal reason for this suggestion is that, I know I can contribute and maybe even help create new useful functions, but it's hard to get started without things like a list of tasks that I could just pickup and try to fix. It's also going to be harder for anyone else with background software dev experience to just jump in and help without some sort of source control and issue tracking.

I built one out:

[Only registered and activated users can see links. Click Here To Register...]

I also created an example (but true) issue in the issue tracker to show how we can use this to track open issues and fix them as needed.
05/23/2020 11:48 Restia Ashdoll#129
Quote:
Originally Posted by ss1100 View Post
That's all we need to start with. People can add their changes to that and then we'll get a full updated one that's easy to continue updating as needed.

Thoughts? I know I'm a newbie here, but it's a good suggestion.

EDIT: The reason I'm not creating it is that the creator is default set to review changes and I'm just barely getting started with this stuff... (not a good choice for reviewer lol)

EDIT EDIT: My personal reason for this suggestion is that, I know I can contribute and maybe even help create new useful functions, but it's hard to get started without things like a list of tasks that I could just pickup and try to fix. It's also going to be harder for anyone else with background software dev experience to just jump in and help without some sort of source control and issue tracking.

I built one out:

[Only registered and activated users can see links. Click Here To Register...]

I also created an example (but true) issue in the issue tracker to show how we can use this to track open issues and fix them as needed.
Many People don't want to have everyone access to the bots - this would cause more ban waves
05/23/2020 12:31 n0futur3#130
Quote:
Originally Posted by ss1100 View Post
So where is this updated gwa2 library at? Github somewhere? The link at the beginning doesn't appear to be updated.

I think it's not in Github and my next question will be... Why don't we get it into Github? The benefits:

1) A single, consolidated, publicly accessible codebase that doesn't require people to download a .rar file off a web forum full of people who write code :)
2) Issue tracking where people can create tickets for stuff that's broken and mark them resolved and bound to a particular code commit to see what was done to fix them.
3) Code reviewer(s) can be created or set to review commits to the codebase before accepting them in, to prevent weird, wrong, or malicious commits.
4) Commits can be seen and linked here so we can discuss changes and/or use them to teach people who want to help.
5) Generally easier for people to jump in and help if they wish.
Package headers and stuff like that can be easily fixed by everyone with a little programming knowledge by themselves, and for the komplex methods like Salvaging not enough ppl have knowledge to contribute in a constructive way
05/23/2020 18:26 list comprehension#131
Quote:
Originally Posted by Restia Ashdoll View Post
Many People don't want to have everyone access to the bots - this would cause more ban waves
I think this is one of the largest reasons that public frameworks have disappeared. Some people bot from here as a hobby but some actually are selling gold for real money. So why put more competition into the pool that also damages their business with more banwaves?

The skills needed to actually properly update old frameworks or make your own are also quite a bit higher than scripting a simple bot in gwa2. The last thing to keep in mind is the majority of non contributing end bot users are cancer to an already old game. Strong easy to use frameworks just lead to PvP and other game formats being trolled by children. It also leads to run away inflation of in game items and reduced gold purchases if a regular player can just download a fully working bot.
05/23/2020 19:23 ss1100#132
The topic of this thread is creating an updated, public framework, so what's the point of arguing that we shouldn't have an updated, public framework?

EDIT: As far as "Many People don't want to have everyone access to the bots - this would cause more ban waves", this isn't a bot, this is a library to use to create bots. It still requires basic knowledge to create bots and, easy as we know it is, to most children and hobbyist, the hurdle is still too high to even get started and try.

Regarding ease of fixes... That's true, but why require everyone to make changes to their own doc when you can have one here that's easy? People can even fork their own private libraries off this and continue to roll updates from this branch into theirs easily+seamlessly, so it even helps people who are attempting to sell bots and/or libraries.
05/27/2020 04:27 cortexio#133
Im trying to figure out how to fix the salvage thingy. But im rather bad at reverse engineering.

One thing did work though, and that's manually clicking salvage in the game and calling SalvageMaterials() with

Global Const $HEADER_SALVAGE_MATS = 0x81

For mods:
Global Const $HEADER_SALVAGE_MODS = 0x82
But i havent tested with mod yet.

But.. I want StartSalvage to work obviously
My guess is that following is broken

1. PatternScan for SalvageGlobal and SalvageFunction
2. And CommandSalvage probably has to get reworked.

It's easy to find the salvage function in the memory... i just dont know what to do with it.

[Only registered and activated users can see links. Click Here To Register...]

I updated my the pattern scan for SalvageFunction, im pretty sure this was a correct change. Just a pointer to the start address of the function. correct no?

As for SalvageGlobal.. im not 100% sure what this needs to be. As you can see in the image, the SalvageFunction uses the address stored in ESP to retrieve the parameters (itemid, sessionid, kitid). So i thought that that address was the the SalvageGlobal. I created some pointers so autoit could retrieve it and use it in the bot.

But.. the game still crashes. The only thing that is left, CommandSalvage, and i dont know what to do with it.

So either CommandSalvage needs an update or i dont have the correct pointer to SalvageGlobal.. Or both.

05/28/2020 08:19 cortexio#134
OH MY FUCKING GOD.... I FUCKING DID IT!! I FIXED THE SALVAGING!! HOOOLLY FUCK :D yeah, sorry, im a total noob at reverse engineering,, this is such a big step for me.


Anyway, here it goes

Replace the old "_('CommandSalvage:')" part with:

Code:
 	_('CommandSalvage:')
	_('mov ebx,SalvageGlobal')
 	_('mov ecx,dword[eax+4]')
 	_('mov dword[ebx],ecx')
	_('add ebx,4')
 	_('mov ecx,dword[eax+8]')
 	_('mov dword[ebx],ecx')
 	_('mov ebx,dword[eax+4]')
 	_('push ebx')
 	_('mov ebx,dword[eax+8]')
 	_('push ebx')
 	_('mov ebx,dword[eax+c]')
 	_('push ebx')
 	_('call SalvageFunction')
 	_('add esp,C')
 	_('ljmp CommandReturn')
Replace old SetValue(... with:

Code:
SetValue('SalvageFunction', '0x' & Hex(GetScannedAddress('ScanSalvageFunction', -10), 8))
SetValue('SalvageGlobal', '0x' & Hex(MemoryRead(GetScannedAddress('ScanSalvageGlobal', 1) - 0x4), 8))
Replace old _('Scan... with:

Code:
_('ScanSalvageFunction:')
AddPattern('33C58945FC8B45088945F08B450C8945F48B45108945F88D45EC506A10C745EC7E')
_('ScanSalvageGlobal:')
AddPattern('8B5104538945F48B4108568945E88B410C578945EC8B4110528955E48945F0')
You also need to change the following headers for SalvageMaterials & mods

Code:
Global Const $HEADER_SALVAGE_MATS = 0x81
Global Const $HEADER_SALVAGE_MODS = 0x82

One problem that remains is that after calling SalvageMaterials() or Mods() the popup window will not close by itself, and when u close it, it disconnects u. I don't know, maybe u guys know more about this, i never used these functions before.
05/28/2020 11:37 NiliyaFlamme#135
dont work for me :)