as 3vangelist said. GWA2 hooks a function. with c++ u can call the function directly. so u dont need a hook. u just need to care about a few things. u will need 2 patterns to be able to do so.
u will probably get kicked with code 007 or get a crash when u send a salvage packet for a weapon. thats why some items can be salvaged only into materials.
For weapons u get a packet back from the Gameserver, which contains the the array of the mods.
So if you send the salvage packet for a weapon, then u get some packets back, where ur client cannot handle it, bcs it was not prepared for the incoming packets.
you will need to prepare a few things clientside before sending the final packet for weapon salvaging. Thats why GWA2 hooked the function, which also sends the right packet. There is a workaround for that where u block the incoming packets and just send the salvage packet. but thats nasty and will only update the inventory when changing the map and will also probably crash when the bot tries to do sth with the item or the invisible items u got through the salvage.
Quote:
|
Also your packet content is in the wrong order, 500ms won't guarantee a response, 1000ms won't guarantee your salvage is complete, and blue items may also have upgrades to salvage.
|
you will probably want to wait for the incoming packet which tells ur client that u successfully salvaged. so working with GStoC is probably ur way to go too.