Register for your free account! | Forgot your password?

You last visited: Today at 07:55

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[GWCA++]Bot Developer Helper

Discussion on [GWCA++]Bot Developer Helper within the GW Exploits, Hacks, Bots, Tools & Macros forum part of the Guild Wars category.

Reply
 
Old 02/15/2020, 10:18   #121
 
elite*gold: 0
Join Date: May 2010
Posts: 99
Received Thanks: 16
Quote:
Originally Posted by CoderAndy View Post
ok whatever you say bro, i don't think you understand what changed with the last gw update but anyway gl fixing your script.
instead of ******** around you could explain and contribute
iTeX- is offline  
Old 02/15/2020, 12:06   #122
 
Zvend's Avatar
 
elite*gold: 143
Join Date: Oct 2011
Posts: 72
Received Thanks: 31
Quote:
Originally Posted by iTeX- View Post
instead of ******** around you could explain and contribute
Dont tell people to contribute. It just looks like u see sth is not working and didnt try to deal with it or read why stuff is not working. Also this tool is a Dev-HELPER -- which means it helps u developing bots not developing the 'API' to bot.
Zvend is offline  
Old 02/16/2020, 12:27   #123





 
Good Morning's Avatar
 
elite*gold: 10134
The Black Market: 1866/0/0
Join Date: Sep 2013
Posts: 2,123
Received Thanks: 445
If using over 3-4 accounts cpu will be 100%. Hope a net fixes it.
Good Morning is offline  
Old 02/16/2020, 14:56   #124
 
elite*gold: 0
Join Date: May 2010
Posts: 99
Received Thanks: 16
Quote:
Originally Posted by Zvend View Post
Dont tell people to contribute. It just looks like u see sth is not working and didnt try to deal with it or read why stuff is not working. Also this tool is a Dev-HELPER -- which means it helps u developing bots not developing the 'API' to bot.
You are basically right.
I know that this is a helping tool but since i tested it and it seemed to me that all you can do here is printing out memory adresses which you need for basically everything unless you do a pixelbased bot AFAIK.

Anyways. Since im not that into this botting scene i better hold back
iTeX- is offline  
Old 02/16/2020, 15:21   #125
 
TheOldy's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 18
Received Thanks: 38
Quote:
Originally Posted by Good Morning View Post
If using over 3-4 accounts cpu will be 100%. Hope a net fixes it.
I don't know your setup, but I'm running 7 clients/accounts with ~50% CPU
TheOldy is offline  
Thanks
1 User
Old 02/16/2020, 18:12   #126
 
Zvend's Avatar
 
elite*gold: 143
Join Date: Oct 2011
Posts: 72
Received Thanks: 31
Quote:
Originally Posted by TheOldy View Post
I don't know your setup, but I'm running 7 clients/accounts with ~50% CPU
Im curious too
Zvend is offline  
Old 03/06/2020, 22:48   #127
 
elite*gold: 26
Join Date: Apr 2019
Posts: 65
Received Thanks: 28
Hello guys,

First of all, thanks a lot to DerMoench14 for this tools it helps me a lot while playing with GWCA and GWTB.

I managed to create the premises of a salvaging module but I encounter an issue...
Everytime I (re)load a zone, I need to first salvage one item manually in order to use my salvage GWCA function next. If I skip this manual first salvage, GW crashes.

When I use the CtoGS logger, I can't find anything special on first salvage call...

Any idea ?

Thx for your help.
Yoshikawa91 is offline  
Old 03/07/2020, 00:18   #128
 
elite*gold: 0
Join Date: Jul 2019
Posts: 103
Received Thanks: 83
Quote:
Originally Posted by Yoshikawa91 View Post
Hello guys,

First of all, thanks a lot to DerMoench14 for this tools it helps me a lot while playing with GWCA and GWTB.

I managed to create the premises of a salvaging module but I encounter an issue...
Everytime I (re)load a zone, I need to first salvage one item manually in order to use my salvage GWCA function next. If I skip this manual first salvage, GW crashes.

When I use the CtoGS logger, I can't find anything special on first salvage call...

Any idea ?

Thx for your help.
It is because you need some structs and pointers to them to allow the salvage function to work, otherwise the client gets unknown packets back from the game server. You need to update the following, this isn't fixed but what areas need to be updated of gwa2.
Code:
AddPattern('5F5E5B741A6860EA0000')
	_('ScanSalvageFunction:')
	AddPattern('8BFA8BD9897DF0895DF4')
	_('ScanSalvageGlobal:')

;then the following asm needs to be updated as well
;~ 	_('CommandSalvage:')
;~ 	_('mov ebx,SalvageGlobal')
;~ 	_('mov ecx,dword[eax+4]')
;~ 	_('mov dword[ebx],ecx')
;~ 	_('push ecx')
;~ 	_('mov ecx,dword[eax+8]')
;~ 	_('add ebx,4')
;~ 	_('mov dword[ebx],ecx')
;~ 	_('mov edx,dword[eax+c]')
;~ 	_('mov dword[ebx],ecx')
;~ 	_('call SalvageFunction')
;~ 	_('ljmp CommandReturn')
As you will notice the public gwa2 has the salvage asm commented out as well that needs to be updated. This update would only work for non weapons as well I believe as weapons with mods require dealing with GStoC packets.
list comprehension is offline  
Thanks
1 User
Old 03/07/2020, 00:35   #129
 
elite*gold: 26
Join Date: Apr 2019
Posts: 65
Received Thanks: 28
Quote:
Originally Posted by list comprehension View Post
It is because you need some structs and pointers to them to allow the salvage function to work, otherwise the client gets unknown packets back from the game server. You need to update the following, this isn't fixed but what areas need to be updated of gwa2.
Code:
AddPattern('5F5E5B741A6860EA0000')
	_('ScanSalvageFunction:')
	AddPattern('8BFA8BD9897DF0895DF4')
	_('ScanSalvageGlobal:')

;then the following asm needs to be updated as well
;~ 	_('CommandSalvage:')
;~ 	_('mov ebx,SalvageGlobal')
;~ 	_('mov ecx,dword[eax+4]')
;~ 	_('mov dword[ebx],ecx')
;~ 	_('push ecx')
;~ 	_('mov ecx,dword[eax+8]')
;~ 	_('add ebx,4')
;~ 	_('mov dword[ebx],ecx')
;~ 	_('mov edx,dword[eax+c]')
;~ 	_('mov dword[ebx],ecx')
;~ 	_('call SalvageFunction')
;~ 	_('ljmp CommandReturn')
As you will notice the public gwa2 has the salvage asm commented out as well that needs to be updated. This update would only work for non weapons as well I believe as weapons with mods require dealing with GStoC packets.
Thanks but I am not actually using GWA2 but GWCA.
I succeeded to salvage non weapon item with this code :
Code:
    void Items::SalvageMaterials(uint32_t itemId) {
        Item* salvageKit = FindSalvageKit();
        if (salvageKit) {
            uint16_t salvageSessionId16bit = GameContext::instance()->world->salvage_session_id;
            GW::CtoS::SendPacket(0x10, GAME_CMSG_ITEM_SALVAGE_SESSION_OPEN
                , salvageSessionId16bit
                , salvageKit->item_id
                , itemId
            );
        }
    }
But unfortunately, it only works if I do a manual salvage within the game before calling this function to mass salvage the rest of the inventory.

Without the prior "manual salvage within the game", GW crashes right after the first call of the above function. :'(
With the prior "manual salvage within the game", items are salvaged like a charm.

By the way I placed some hooks on :
* GW::Packet::StoC::ItemGeneralInfo (0x0165)
* GW::Packet::StoC::SalvageSessionStart (0x0167)
* GW::Packet::StoC::SixteenA (0x016A)
* GW::Packet::StoC::InventoryItemQuantity (0x0013C)
* GW::Packet::StoC::ChatMessageCore (0x005D)
* GW::Packet::StoC::ChatMessageServer (0x005E)

Hooks are working well but it still does not solve my problem...
Yoshikawa91 is offline  
Old 03/07/2020, 03:57   #130
 
phat34's Avatar
 
elite*gold: 0
Join Date: Sep 2014
Posts: 354
Received Thanks: 120
try to call GW::Packet::StoC::SalvageSessionStart (0x0167) then a delay then try your salvage function
phat34 is offline  
Old 03/07/2020, 11:53   #131
 
elite*gold: 26
Join Date: Apr 2019
Posts: 65
Received Thanks: 28
Quote:
Originally Posted by phat34 View Post
try to call (0x0167) then a delay then try your salvage function
I can't call a Server to Client packet. I however can place an hook on it, which I did.

Code:
GW::HookEntry SalvageSessionStart_Entry;
GW::StoC::RegisterPacketCallback<GW::Packet::StoC::SalvageSessionStart>(&SalvageSessionStart_Entry,
		[this](GW::HookStatus*, GW::Packet::StoC::SalvageSessionStart* packet) -> void {
			GW::Chat::WriteChat(GW::Chat::CHANNEL_MODERATOR, "SalvageSessionStart Hooked !");
		});
When I do the first manual salvage within the game , chat is displaying "SalvageSessionStart Hooked !". This tells me that the hook is working fine.




But when my first salvage come from a GWCA call, I still crash...
Yoshikawa91 is offline  
Old 03/07/2020, 12:05   #132
 
elite*gold: 0
Join Date: Dec 2016
Posts: 10
Received Thanks: 0
thanks man
MissingInformation is offline  
Old 03/07/2020, 20:15   #133
 
Zvend's Avatar
 
elite*gold: 143
Join Date: Oct 2011
Posts: 72
Received Thanks: 31
Quote:
Originally Posted by Yoshikawa91 View Post
I can't call a Server to Client packet. I however can place an hook on it, which I did.

Code:
GW::HookEntry SalvageSessionStart_Entry;
GW::StoC::RegisterPacketCallback<GW::Packet::StoC::SalvageSessionStart>(&SalvageSessionStart_Entry,
		[this](GW::HookStatus*, GW::Packet::StoC::SalvageSessionStart* packet) -> void {
			GW::Chat::WriteChat(GW::Chat::CHANNEL_MODERATOR, "SalvageSessionStart Hooked !");
		});
When I do the first manual salvage within the game , chat is displaying "SalvageSessionStart Hooked !". This tells me that the hook is working fine.




But when my first salvage come from a GWCA call, I still crash...
you crash because there is an global array of size 2x 4Bytes which need to be prepared before calling salvage. GW needs the globals in order to react on a successful salvage. His BotDev tool wont help you with it. you will need to dig into xdbg or IDA in order to understand what is happening.
You need to see whats on the stack and whats in the registers.

If the global from GW is not filled with the right values your salvage session will take the old values from last salvage session. if the old session contained the same items like ur new session (e.g. if u salvage the same stack with the same kit) then it wont create any crash if u use ur code after ur manual salvage.

Just if you wanted to understand ur crash
Zvend is offline  
Thanks
1 User
Old 03/11/2020, 20:39   #134
 
3vangelist's Avatar
 
elite*gold: 0
Join Date: Jan 2018
Posts: 46
Received Thanks: 14
Code:
GW::GameThread::Enqueue([item, kit]() {
  SalvageUIMessage s = { item->item_id, kit->item_id };
  GW::UI::SendUIMessage(0x10000000 | 0x100, &s);
  GW::CtoS::SendPacket(0x10, GAME_CMSG_ITEM_SALVAGE_SESSION_OPEN, GW::GameContext::instance()->world->salvage_session_id, s.kit_id, s.item_id);
  });
3vangelist is offline  
Thanks
3 Users
Old 03/11/2020, 21:10   #135
 
elite*gold: 26
Join Date: Apr 2019
Posts: 65
Received Thanks: 28
Quote:
Originally Posted by 3vangelist View Post
Code:
GW::GameThread::Enqueue([item, kit]() {
  SalvageUIMessage s = { item->item_id, kit->item_id };
  GW::UI::SendUIMessage(0x10000000 | 0x100, &s);
  GW::CtoS::SendPacket(0x10, GAME_CMSG_ITEM_SALVAGE_SESSION_OPEN, GW::GameContext::instance()->world->salvage_session_id, s.kit_id, s.item_id);
  });
Many thanks 3vangelist.
You saved me precious hours of sleep.
Yoshikawa91 is offline  
Reply

Tags
developer, dll, gwac++, gwca, packets


Similar Threads Similar Threads
[Release] Holy Helper - Most advanced helper in sro era
11/15/2014 - SRO PServer Guides & Releases - 81 Replies
Hello , wazzap. After over two weeks being working on Holy Helper , I decided to release it today. Holy helper is a program which giving you unlimited power to control your server / play status . Which , could be used by a user or an server owner. Check it out. First of all I would like to thank all over who did helped me through this program and they're Holy Helper functions:
[Release] Holy Helper - Most advanced helper in sro era
02/27/2013 - SRO Private Server - 12 Replies
Hello , wazzap. After over two weeks being working on Holy Helper , I decided to release it today. Holy helper is a program which giving you unlimited power to control your server / play status . Which , could be used by a user or an server owner. Check it out. First of all I would like to thank all over who did helped me through this program and they're Holy Helper functions:
[HELPER]ANY 1 need PM [HELPER]
12/17/2008 - EO PServer Hosting - 0 Replies
hello guys just wana tell u if any one looking for a good pm can help as a good helper at Eo PServer i know about database, not really good at hexedit i can get ppl to server have many freind to join :) just tell me if u need a help or add me at my msn [email protected] ]



All times are GMT +1. The time now is 07:55.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.