Updated GWA2

03/25/2020 22:08 DerMoench14#91
It have been used to trade between players ...
03/30/2020 05:34 logicdoor#92
Quote:
Originally Posted by CoderAndy View Post
i'm saying again for all the ppl that trying to run old scripts with the new api: GWA2 isn't fully updated and it doesn't work 100%, thats why i asked phat what it needs to be fixed and here is the list again:
AbandonQuest() logs me out.
03/30/2020 06:10 list comprehension#93
Quote:
Originally Posted by logicdoor View Post
AbandonQuest() logs me out.
Make sure you have the correct header which is currently:
Code:
Global Const $HEADER_QUEST_ABANDON = 0x12 ;+ AbandonQuest($aQuestID)
I would also double check to make sure you have a valid questid, this only uses the packet function so if you can use any packets successfully this should work fine. The size of the packet is still 0x8 as well.
04/03/2020 01:17 logicdoor#94
Quote:
Originally Posted by list comprehension View Post
Make sure you have the correct header which is currently:
Code:
Global Const $HEADER_QUEST_ABANDON = 0x12 ;+ AbandonQuest($aQuestID)
I would also double check to make sure you have a valid questid, this only uses the packet function so if you can use any packets successfully this should work fine. The size of the packet is still 0x8 as well.
Thanks it worked
04/05/2020 00:22 sadusten#95
Does Anybody have a working Header for Cancel both individual heros, and also all heros flags? :)
Also has anybody yet found a fixed useheroskill function aswell perhaps?
04/09/2020 00:29 cactusjuice#96
Getting a game crash when using the UseItem() function. Has anyone else experienced this? Can't pop Imp, cons, etc without this function.
04/09/2020 05:54 phat34#97
Hero/ Party Flag headers went -1 to the old headers…. I believe use item is +1 to the old headers.

WHEN IN DOUBT - BRUTE FORCE IT OUT ! ALWAYS 100 !
04/09/2020 20:14 cactusjuice#98
So by +1 you mean changing the header from 0x84 to 0x85? Thanks.
04/10/2020 04:13 logicdoor#99
I found something else that doesn't work.

Code:
$lMe = GetMyID()
$lSkill = GetSkillByID (DllStructGetData($lMe, 'skill'))
DllStructGetData($lSkill, 'Activation')
I can get skill ID and activation time for my target but not for myself.

So I assume this function doesn't work:

Code:
Func GetMyID()
	Return MemoryRead($mMyID)
EndFunc   ;==>GetMyID
So §mMyID needs to be updated?

Code:
$mMyID = MemoryRead(GetScannedAddress('ScanMyID', -3));$mMyID = $mAgentBase - 84
Anyone knows how to fix?
04/10/2020 05:42 list comprehension#100
Quote:
Originally Posted by logicdoor View Post
I found something else that doesn't work.

Code:
$lMe = GetMyID()
$lSkill = GetSkillByID (DllStructGetData($lMe, 'skill'))
DllStructGetData($lSkill, 'Activation')
I can get skill ID and activation time for my target but not for myself.

So I assume this function doesn't work:

Code:
Func GetMyID()
	Return MemoryRead($mMyID)
EndFunc   ;==>GetMyID
So §mMyID needs to be updated?

Code:
$mMyID = MemoryRead(GetScannedAddress('ScanMyID', -3));$mMyID = $mAgentBase - 84
Anyone knows how to fix?
You are going to want to take a look at the AgentMgr.cpp file in GWCA and more specifically this line to fix it. Too many versions of half broken gwa2 floating around to give a direct code example in autoit format.

Code:
PlayerAgentIdPtr = Scanner::Find("\x5D\xE9\x00\x00\x00\x00\x55\x8B\xEC\x53","xx????xxxx", -0xE);
        if (PlayerAgentIdPtr) {
            PlayerAgentIdPtr = *(uintptr_t*)PlayerAgentIdPtr;
            printf("[SCAN] PlayerAgentIdPtr = %p\n", (void *)PlayerAgentIdPtr);
        }
04/10/2020 06:11 phat34#101
_('ScanMyID:')
AddPattern('83EC08568BF13B15')

is the one that goes with the -3 offset
04/11/2020 03:24 logicdoor#102
Quote:
Originally Posted by phat34 View Post
_('ScanMyID:')
AddPattern('83EC08568BF13B15')

is the one that goes with the -3 offset
This is what I have in my GWA2 version, but it somehow doesn't work.
04/11/2020 05:22 phat34#103
This returns the result of the command call...

Code:
ConsoleWrite("testGMID " & GetMyID()  [MENTION=3576271]CRLF[/MENTION])
put that in your code as you zone back and forth between areas and if you only getting zeros than you need to try some other gwa2s... perhaps your base pattern is wrong or something else... maybe you can narrow it down...
04/11/2020 05:23 logicdoor#104
Quote:
Originally Posted by list comprehension View Post
You are going to want to take a look at the AgentMgr.cpp file in GWCA and more specifically this line to fix it. Too many versions of half broken gwa2 floating around to give a direct code example in autoit format.

Code:
PlayerAgentIdPtr = Scanner::Find("\x5D\xE9\x00\x00\x00\x00\x55\x8B\xEC\x53","xx????xxxx", -0xE);
        if (PlayerAgentIdPtr) {
            PlayerAgentIdPtr = *(uintptr_t*)PlayerAgentIdPtr;
            printf("[SCAN] PlayerAgentIdPtr = %p\n", (void *)PlayerAgentIdPtr);
        }
This is beyond my ability to utilize 😁😁
04/11/2020 06:20 phat34#105
its actually not really worth trying to utilize but if u want to you can use the pattern given a few messages ago in olly or ida… and attach gw.exe to one of the debuggers and choose gw.exe's executable area and do a binary search for that pattern....

once its found go to the byte before it and offset -3 or 3 bytes before that and that is where the pattern leads ---

you can then move forward the toolboxes E hex or 14 decimal place forward from that spot and you will be at the byte before their pattern which will then follow "5d e9 -- 4 bytes that are unreliable and should not be used in patterns then 55 8B EC 53"

like I said nothing to utilize and that its useless -- plenty of youtube videos on how to use these debuggers and its worth watching them if you want to be a coder

ok yeah their scanner can scan past the unreliable bytes and still find the pattern - I know and it can easily be written - but its not needed and was most likely written like this to thwart the community.