Hi, now that the gwa's been updated i figured ill give botting a go again.
I updated my old bots, where the same identifying & selling functions still works but my salvage functions do not sadly..
So was wondering if theres any kind soul out there that has a working salvage function they'd like to share
you will need assembly if you want to do that with autoit.
u can only salvage non-weapon items by packets without the hook.
Look at the old Salvage Implementation, then fix the patterns and change the asm to the new GW Compiler and it will probably work again
you will need assembly if you want to do that with autoit.
u can only salvage non-weapon items by packets without the hook.
Look at the old Salvage Implementation, then fix the patterns and change the asm to the new GW Compiler and it will probably work again
I'm not very educated with more indept things, i mean i've created 10 or more bots using functions from other bots and adjusting etc but don't rly know more than that, so you're saying its possible to salvage non weapon items, for example dragon roots. How would a function like that look today compared to the old sorry!
1 gave me 007 error and the others just doesnt do anything
Its because 0x690 is an offset inside the WorldContext.
Lets say you have a big shelf called GameContext
The shelf 'GameContext' has some drawer.
there is like:
AgentContext
ItemContext
MapContext
GuildContext
and more Contexts and non Contexts.
and there is the WorldContext.
each of the Contexts saves a bunch of information.
So the WorldContext stores for example the current active quest, the current mission states, your unlocked skills, your earned points like kurzick, balth etc
so a bunch of stuff related to the 'world'.
the world drawer starts at 0x0 when u start to pull it.
so u will need to pull the drawer until u see the offset 0x690. There is the session ID needed for your Salvaging.
You will need the read some layers of Memory.
This is the file i made for my own API months ago but i dont use autoit anymore. U can easily see what offsets u ll need to read out:
Code:
;File: Interface_GuildWarsBase.au3 //epvp edit: also called BasePointer
;{
Func _Gwen_GetGameContext()
If $_GameContext = 0 Then
$_GameContext = _Gwen_Read($_BasePointer)
$_GameContext = _Gwen_Read($_GameContext + 0x18)
EndIf
Return $_GameContext
EndFunc
;}
this is how u get the GameContext. U will need to fin out how to get the BasePointer by urself or look into ur GWA2.
;File: Interface_WorldContext.au3
;{
Global Enum $WORLDCONTEXT_MERCHANT_ITEMS = 0x0024, _
$WORLDCONTEXT_MERCHANT_ROWS = 0x0028, _
$WORLDCONTEXT_MAP_AGENT_ARRAY = 0x007C, _
$WORLDCONTEXT_ALL_FLAG = 0x009C, _
$WORLDCONTEXT_PARTY_ATTRIBUTES_ARRAY = 0x00AC, _
$WORLDCONTEXT_PARTY_EFFECTS_ARRAY = 0x0508, _
$WORLDCONTEXT_ACTIVE_QUEST_ID = 0x0528, _
$WORLDCONTEXT_QUEST_LOG = 0x052C, _
$WORLDCONTEXT_MISSION_OBJECTIVES_ARRAY = 0x0564, _
$WORLDCONTEXT_HERO_FLAG_ARRAY = 0x0584, _
$WORLDCONTEXT_HERO_INFO_ARRAY = 0x0594, _
$WORLDCONTEXT_MISSION_BONUS_ARRAY = 0x05CC, _
$WORLDCONTEXT_MISSION_COMPLETED_ARRAY = 0x05DC, _
$WORLDCONTEXT_MISSION_BONUS_HM_ARRAY = 0x05EC, _
$WORLDCONTEXT_MISSION_COMPLETED_HM_ARRAY = 0x05FC, _
$WORLDCONTEXT_UNLOCKED_MAP_ARRAY = 0x060C, _
$WORLDCONTEXT_SALVAGE_SESSION_ID = 0x0690, _
$WORLDCONTEXT_SKILLBAR_ARRAY = 0x06F0, _
$WORLDCONTEXT_UNLOCKED_SKILLS_ARRAY = 0x0710, _ ;Bit Field
$WORLDCONTEXT_EXPERIENCE = 0x0740, _
$WORLDCONTEXT_CURRENT_KURZICK_POINTS = 0x0748, _
$WORLDCONTEXT_TOTAL_EARNED_KURZICK_POINTS = 0x0750, _ ;Number in the Tooltip of the Kurzick-Bar in the Hero-Panel
$WORLDCONTEXT_CURRENT_LUXON_POINTS = 0x0758, _
$WORLDCONTEXT_TOTAL_EARNED_LUXON_POINTS = 0x0760, _ ;Number in the Tooltip of the Luxon-Bar in the Hero-Panel
$WORLDCONTEXT_CURRENT_IMPERIAL_POINTS = 0x0768, _
$WORLDCONTEXT_TOTAL_EARNED_IMPERIAL_POINTS = 0x0770, _ ;Number in the Tooltip of the Imperial-Bar in the Hero-Panel
$WORLDCONTEXT_LEVEL = 0x0788, _
$WORLDCONTEXT_CURRENT_BALTHAZAR_POINTS = 0x0798, _
$WORLDCONTEXT_TOTAL_EARNED_BALTHAZAR_POINTS = 0x07A0, _ ;Number in the Tooltip of the Balthazar-Bar in the Hero-Panel
$WORLDCONTEXT_CURRENT_SKILL_POINTS = 0x07A8, _
$WORLDCONTEXT_TOTAL_EARNED_SKILL_POINTS = 0x07B0, _ ;Number in the Tooltip of the Skillpoint-Field in the Hero-Panel
$WORLDCONTEXT_MAX_KURZICK_POINTS = 0x07B8, _
$WORLDCONTEXT_MAX_LUXON_POINTS = 0x07BC, _
$WORLDCONTEXT_MAX_BALTHAZAR_POINTS = 0x07C0, _
$WORLDCONTEXT_MAX_IMPERIAL_POINTS = 0x07C4, _
$WORLDCONTEXT_AGENT_INFO_ARRAY = 0x07CC, _
$WORLDCONTEXT_NPC_ARRAY = 0x07FC, _
$WORLDCONTEXT_PLAYER_ARRAY = 0x080C, _
$WORLDCONTEXT_TITLE_ARRAY = 0x081C, _
$WORLDCONTEXT_FOES_KILLED = 0x084C, _
$WORLDCONTEXT_FOES_TO_KILL = 0x0850
;}
and heres the important stuff of the WorldContext. (Some Offset may changed, since the API is 4 Months old and didnt get updated yet.)
But 0x690 is still the offset u want.
I see, so it's more complicated than what i know off, like i mentioned earlier i'm not so in depth with the whole, only basic functions etc, but thanks for letting me know the basics.
Is there anyway for me as a "noob" to find out how to fix salvaging atm or should i wait for someone that knows what they're doing to release it?
I can post the salvage functions that i've used before, and if theres anyone who can teach me or help out i'd appreciate it very much
Code:
Global $inputmodelid = GUICtrlCreateInput("", 30, 55, 40)
Global Const $HEADER_SALVAGE_MATS = 0x7F
While Not $botrunning
Sleep(100)
WEnd
Bankstuff()
Func Bankstuff()
SalvageAnything()
EndFunc ;==>Bankstuff
Func SalvageAnything()
Local $lquantityold, $loldvalue
salvagekit()
Local $lsalvagekitid = findsalvagekit(1, 4)
Local $lsalvagekitptr = getitemptr($lsalvagekitid)
For $bag = 1 To 4
$lbagptr = getbagptr($bag)
If $lbagptr = 0 Then ContinueLoop
For $SLOT = 1 To memoryread($lbagptr + 32, "long")
$litem = getitemptrbyslot($lbagptr, $SLOT)
If Not getcansalvage2($litem) Then ContinueLoop
out("Salvaging : " & $bag & "," & $SLOT)
$lquantity = memoryread($litem + 75, "byte")
$itemmid = memoryread($litem + 44, "long")
$itemrarity = getrarity($litem)
If $itemrarity = $RARITY_White Or $itemrarity = $RARITY_Blue Then
For $i = 1 To $lquantity
If memoryread($lsalvagekitptr + 12, "ptr") = 0 Then
salvagekit()
$lsalvagekitid = findsalvagekit(1, 4)
$lsalvagekitptr = getitemptr($lsalvagekitid)
EndIf
$lquantityold = $lquantity
$loldvalue = memoryread($lsalvagekitptr + 36, "short")
startsalvage($litem, $lsalvagekitid)
Local $ldeadlock = TimerInit()
Do
Sleep(200)
Until memoryread($lsalvagekitptr + 36, "short") <> $loldvalue Or TimerDiff($ldeadlock) > 5000
Next
EndIf
Next
Next
salvagekit()
EndFunc ;==>SalvageAnything
Func getcansalvage2($aitemptr)
If memoryread($aitemptr + 24, "ptr") <> 0 Then Return False
Local $litemtype = memoryread($aitemptr + 32, "byte")
Local $lmodelid = memoryread($aitemptr + 44, "long")
If $lmodelid <> GUICtrlRead($InputModelId) Then Return False
Switch $lmodelid
Case GUICtrlRead($InputModelId)
Return True
EndSwitch
Return False
EndFunc ;==>getcansalvage2
Func StartSalvage($aItem)
Local $lOffset[4] = [0, 0x18, 0x2C, 0x690]
Local $lSalvageSessionID = MemoryReadPtr($mBasePointer, $lOffset)
If IsDllStruct($aItem) = 0 Then
Local $lItemID = $aItem
Else
Local $lItemID = DllStructGetData($aItem, 'ID')
EndIf
Local $lSalvageKit = FindSalvageKit()
If $lSalvageKit = 0 Then Return
DllStructSetData($mSalvage, 2, $lItemID)
DllStructSetData($mSalvage, 3, FindSalvageKit())
DllStructSetData($mSalvage, 4, $lSalvageSessionID[1])
Enqueue($mSalvagePtr, 16)
EndFunc ;==>StartSalvage
Func SalvageMaterials()
Return SendPacket(0x4, $HEADER_SALVAGE_MATS)
EndFunc ;==>SalvageMaterials
I just did this, is this the correct way? basically to replace my StartSalvage function inside the SalvageAnything function? or am i doing completely wrong
Code:
Global $inputmodelid = GUICtrlCreateInput("", 30, 55, 40)
While Not $botrunning
Sleep(100)
WEnd
SalvageAnything()
sleep(5000)
;checking if it salvaged
Func SalvageAnything()
Local $lquantityold, $loldvalue
salvagekit()
Local $lsalvagekitid = findsalvagekit(1, 4)
Local $lsalvagekitptr = getitemptr($lsalvagekitid)
For $bag = 1 To 4
$lbagptr = getbagptr($bag)
If $lbagptr = 0 Then ContinueLoop
For $SLOT = 1 To memoryread($lbagptr + 32, "long")
$litem = getitemptrbyslot($lbagptr, $SLOT)
If Not getcansalvage2($litem) Then ContinueLoop
out("Salvaging : " & $bag & "," & $SLOT)
$lquantity = memoryread($litem + 75, "byte")
$itemmid = memoryread($litem + 44, "long")
$itemrarity = getrarity($litem)
If $itemrarity = $RARITY_White Or $itemrarity = $RARITY_Blue Then
For $i = 1 To $lquantity
If memoryread($lsalvagekitptr + 12, "ptr") = 0 Then
salvagekit()
$lsalvagekitid = findsalvagekit(1, 4)
$lsalvagekitptr = getitemptr($lsalvagekitid)
EndIf
$lquantityold = $lquantity
$loldvalue = memoryread($lsalvagekitptr + 36, "short")
SalvageNonWeapon(2992, 819) ;<------Heres your func
;startsalvage($litem, $lsalvagekitid)
Local $ldeadlock = TimerInit()
Do
Sleep(200)
Until memoryread($lsalvagekitptr + 36, "short") <> $loldvalue Or TimerDiff($ldeadlock) > 5000
Next
EndIf
Next
Next
salvagekit()
EndFunc ;==>SalvageAnything
Func getcansalvage2($aitemptr)
If memoryread($aitemptr + 24, "ptr") <> 0 Then Return False
Local $litemtype = memoryread($aitemptr + 32, "byte")
Local $lmodelid = memoryread($aitemptr + 44, "long")
If $lmodelid <> GUICtrlRead($InputModelId) Then Return False
Switch $lmodelid
Case GUICtrlRead($InputModelId)
Return True
EndSwitch
Return False
EndFunc ;==>getcansalvage2
Func SalvageNonWeapon($kit_id, $item_id)
Local $session_id_offsets[4] = [0, 0x18, 0x2C, 0x690]
Local $session_id = MemoryReadPtr($mBasePointer, $session_id_offsets)
Return SendPacket(0x10, 0x7D, $session_id [1], $kit_id, $item_id)
EndFunc
I just did this, is this the correct way? basically to replace my StartSalvage function inside the SalvageAnything function? or am i doing completely wrong
Code:
Global $inputmodelid = GUICtrlCreateInput("", 30, 55, 40)
While Not $botrunning
Sleep(100)
WEnd
SalvageAnything()
sleep(5000)
;checking if it salvaged
Func SalvageAnything()
Local $lquantityold, $loldvalue
salvagekit()
Local $lsalvagekitid = findsalvagekit(1, 4)
Local $lsalvagekitptr = getitemptr($lsalvagekitid)
For $bag = 1 To 4
$lbagptr = getbagptr($bag)
If $lbagptr = 0 Then ContinueLoop
For $SLOT = 1 To memoryread($lbagptr + 32, "long")
$litem = getitemptrbyslot($lbagptr, $SLOT)
If Not getcansalvage2($litem) Then ContinueLoop
out("Salvaging : " & $bag & "," & $SLOT)
$lquantity = memoryread($litem + 75, "byte")
$itemmid = memoryread($litem + 44, "long")
$itemrarity = getrarity($litem)
If $itemrarity = $RARITY_White Or $itemrarity = $RARITY_Blue Then
For $i = 1 To $lquantity
If memoryread($lsalvagekitptr + 12, "ptr") = 0 Then
salvagekit()
$lsalvagekitid = findsalvagekit(1, 4)
$lsalvagekitptr = getitemptr($lsalvagekitid)
EndIf
$lquantityold = $lquantity
$loldvalue = memoryread($lsalvagekitptr + 36, "short")
SalvageNonWeapon(2992, 819) ;<------Heres your func
;startsalvage($litem, $lsalvagekitid)
Local $ldeadlock = TimerInit()
Do
Sleep(200)
Until memoryread($lsalvagekitptr + 36, "short") <> $loldvalue Or TimerDiff($ldeadlock) > 5000
Next
EndIf
Next
Next
salvagekit()
EndFunc ;==>SalvageAnything
Func getcansalvage2($aitemptr)
If memoryread($aitemptr + 24, "ptr") <> 0 Then Return False
Local $litemtype = memoryread($aitemptr + 32, "byte")
Local $lmodelid = memoryread($aitemptr + 44, "long")
If $lmodelid <> GUICtrlRead($InputModelId) Then Return False
Switch $lmodelid
Case GUICtrlRead($InputModelId)
Return True
EndSwitch
Return False
EndFunc ;==>getcansalvage2
Func SalvageNonWeapon($kit_id, $item_id)
Local $session_id_offsets[4] = [0, 0x18, 0x2C, 0x690]
Local $session_id = MemoryReadPtr($mBasePointer, $session_id_offsets)
Return SendPacket(0x10, 0x7D, $session_id [1], $kit_id, $item_id)
EndFunc
as i told u, if u try to salvage a weapon with it, u will get kicked or in worst case even crash.
u will need to be sure if it is NOT a weapon. based on my information u can be able to understand what to do. if not i highly recommend learning some more coding knowledge
as i told u, if u try to salvage a weapon with it, u will get kicked or in worst case even crash.
u will need to be sure if it is NOT a weapon. based on my information u can be able to understand what to do. if not i highly recommend learning some more coding knowledge
Im not salvaging a weapon though? Item id 819 is dragon roots.
Need Help with salvage function 11/09/2018 - GW Bots - 1 Replies Hello people,
first of all. I'm a big noob. Im just cooking some copy pasta out of all the bots i got to get them to do whatever i want :D So far it worked alright. Until now.
I try to add the ability to salvage runes and sell them to the runes merchant to my feather bots.... but well, i dont get it to work.
My main problem for now is the function SalvageMod() does nothing. It is part of the GWA2.au3 collection
Func SalvageMod($aModIndex)
Return SendPacket(0x8,...
[GWA2] How to close salvage window AFTER salvage session is complete? 05/08/2018 - GW Bots - 5 Replies Hi all,
I'm making a bot to manage my inventory for me in-game.
1. StartSalvage() on an item I want a mod for.
2. SalvageMod() for the mod I'm after
3. Close Salvage window (without GW kicking me out!)
Can't figure out how to do step 3. Looks like when I close the salvage window in-game, it sends a packet to the GS to "cancel" the session. The GS panics when it sees that the session has already completed, and the client gets kicked from the server.
std::function of a function returning an std::function 11/11/2013 - C/C++ - 19 Replies Nun muss ich nach langer Zeit auch mal wieder einen Thread erstellen, weil mir Google nicht mehr weiterhelfen kann.
Ich verzweifle an Folgendem Vorhaben:
#include <Windows.h>
#include <string>
#include <iostream>
using namespace std;
functioning +9 hack 07/27/2008 - Dekaron - 17 Replies Hey guys
I need a functioning +9 !HACK! for 2Moons
Pls help me
Which SM this functioning? 05/12/2007 - Silkroad Online - 6 Replies Which SM this functioning?
SM 1,97 enters normal in the SRO but option AUTO TRAINING is disactivated.
SM 1,96 does not enter in the game appears this error:
ERROR
It has something to be made? I made something wrong?
They help me please!