Someone have the "new" Kilroy Bot?
I hope that I did not forget to copy something. That's how it is done for years, dunno why the current public GWA2 reverted it ...Quote:
I will do some test and try to make work the template load after it will be public.
Global Const $HEADER_SET_ATTRIBUTES = 0x11
Local $mSetAttributes = DllStructCreate("ptr;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword;dword")
Local $mSetAttributesPtr = DllStructGetPtr($mSetAttributes)
Func Initialize()
//[...]
DllStructSetData($mSetAttributes, 1, GetValue('CommandPacketSend'))
DllStructSetData($mSetAttributes, 2, 0x90)
DllStructSetData($mSetAttributes, 3, $HEADER_SET_ATTRIBUTES)
//[...]
EndFunc
;~ Description: Loads skill template code.
; NEW VERSION BY 4D 1 USING SET ATTRIBUTES
Func LoadSkillTemplate($aTemplate, $aHeroNumber = 0)
Local $lHeroID = GetHeroID($aHeroNumber)
Local $lSplitTemplate = StringSplit($aTemplate, "")
Local $lAttributeStr = ""
Local $lAttributeLevelStr = ""
Local $lTemplateType ; 4 Bits
Local $lVersionNumber ; 4 Bits
Local $lProfBits ; 2 Bits -> P
Local $lProfPrimary ; P Bits
Local $lProfSecondary ; P Bits
Local $lAttributesCount ; 4 Bits
Local $lAttributesBits ; 4 Bits -> A
;Local $lAttributes[1][2] ; A Bits + 4 Bits (for each Attribute)
Local $lSkillsBits ; 4 Bits -> S
Local $lSkills[8] ; S Bits * 8
Local $lOpTail ; 1 Bit
$aTemplate = ""
For $i = 1 To $lSplitTemplate[0]
$aTemplate &= Base64ToBin64($lSplitTemplate[$i])
Next
$lTemplateType = Bin64ToDec(StringLeft($aTemplate, 4))
$aTemplate = StringTrimLeft($aTemplate, 4)
If $lTemplateType <> 14 Then Return False
$lVersionNumber = Bin64ToDec(StringLeft($aTemplate, 4))
$aTemplate = StringTrimLeft($aTemplate, 4)
$lProfBits = Bin64ToDec(StringLeft($aTemplate, 2)) * 2 + 4
$aTemplate = StringTrimLeft($aTemplate, 2)
$lProfPrimary = Bin64ToDec(StringLeft($aTemplate, $lProfBits))
$aTemplate = StringTrimLeft($aTemplate, $lProfBits)
If $lProfPrimary <> GetHeroProfession($aHeroNumber) Then Return False
$lProfSecondary = Bin64ToDec(StringLeft($aTemplate, $lProfBits))
$aTemplate = StringTrimLeft($aTemplate, $lProfBits)
$lAttributesCount = Bin64ToDec(StringLeft($aTemplate, 4))
$aTemplate = StringTrimLeft($aTemplate, 4)
$lAttributesBits = Bin64ToDec(StringLeft($aTemplate, 4)) + 4
$aTemplate = StringTrimLeft($aTemplate, 4)
For $i = 1 To $lAttributesCount
;Attribute ID
$lAttributeStr &= Bin64ToDec(StringLeft($aTemplate, $lAttributesBits))
If $i <> $lAttributesCount Then $lAttributeStr &= "|"
$aTemplate = StringTrimLeft($aTemplate, $lAttributesBits)
;Attribute level of above ID
$lAttributeLevelStr &= Bin64ToDec(StringLeft($aTemplate, 4))
If $i <> $lAttributesCount Then $lAttributeLevelStr &= "|"
$aTemplate = StringTrimLeft($aTemplate, 4)
Next
$lSkillsBits = Bin64ToDec(StringLeft($aTemplate, 4)) + 8
$aTemplate = StringTrimLeft($aTemplate, 4)
For $i = 0 To 7
$lSkills[$i] = Bin64ToDec(StringLeft($aTemplate, $lSkillsBits))
$aTemplate = StringTrimLeft($aTemplate, $lSkillsBits)
Next
$lOpTail = Bin64ToDec($aTemplate)
ChangeSecondProfession($lProfSecondary, $aHeroNumber)
SetAttributes($lAttributeStr, $lAttributeLevelStr, $aHeroNumber)
LoadSkillBar($lSkills[0], $lSkills[1], $lSkills[2], $lSkills[3], $lSkills[4], $lSkills[5], $lSkills[6], $lSkills[7], $aHeroNumber)
EndFunc ;==>LoadSkillTemplate
;~ Description: Set attributes to the given values
;~ by ddarek
;~ Usage: Call like this:
;~ SetAttributes("34|36", "12|12") ; to set to 12 both spawning power(=36) and channeling magic(=34)
;~ SetAttributes($ATTR_DIVINE_FAVOR&"|"&$ATTR_HEALING_PRAYERS&"|"&$ATTR_CURSES, "9|12|9") ; to set 3 attributes
Func SetAttributes($fAttsID, $fAttsLevel, $aHeroNumber = 0)
Local $lAttsID = StringSplit(String($fAttsID), "|")
Local $lAttsLevel = StringSplit(String($fAttsLevel), "|")
DllStructSetData($mSetAttributes, 4, GetHeroID($aHeroNumber))
DllStructSetData($mSetAttributes, 5, $lAttsID[0]) ;# of attributes
DllStructSetData($mSetAttributes, 22, $lAttsID[0]) ;# of attributes
For $i = 1 To $lAttsID[0]
DllStructSetData($mSetAttributes, 5 + $i, $lAttsID[$i]) ;ID ofAttributes
Next
For $i = 1 To $lAttsLevel[0]
DllStructSetData($mSetAttributes, 22 + $i, $lAttsLevel[$i]) ;Attribute Levels
Next
Enqueue($mSetAttributesPtr, 152)
EndFunc ;==>SetAttributes
You have all you need to update the headers :Quote:
Hey guys, getting back into it.
I still have many bots from last year or so, for many purposes but not even one is working, even by replacing the old with new GWA2 in bot folders.
Kinda lost here tbh, i'm everything but a codelines-boļ :/
So... Yeah i'm looking for some help on making at least some of them work again, and if somebody has a good bot for speedbooking with heroes (suitable for any profession) i'll be glad to hear about it.
Best regards
Quote:
ex on old GWA2 :
On the Opcodes list from GWCA to find the good one :Code:Global Const $HEADER_MODE_SWITCH = 0xA2
just change the 0xA2 by 0xA3 and it's ok for this one.Code:GAME_CMSG_PARTY_SET_DIFFICULTY (0x00A3)
Best regardQuote:
But don't forget, some things need to be updated and need ASM knowledges :
- stringlogs
- loadfinished
- postmessage
- writechat
- buy/sell mats/adv mats
- buy/sell runes/insignias
- craft item
- use hero skill
- salvage
- rendering
- perform action iirc
- on-skill event
- on-chat event
and probably much more ....
sure, create a function that zones to a place instead of the guild hall function and create waypaths to the chest and merchant.Quote:
Is there any way this could be made so that it doesn't travel to GH but sells in Longeye's or in eye of the north? Maybe in a polish or russian district?
The autoit site is a good place to start learning:Quote:
Could someone point me in the right direction for modifying these scripts? (Newbie)
I've found a GWA2 file from the forums and have old bot scripts. I've read things about headers (not entirely sure) having already been changed in this file - though old scripts will interact incorrectly as function names and 'server' ID codes have changed as far as I understand?
I managed to get the vaettir script posted moving me, though I couldn't test it further as no build.
I tried loading and modifying the old bones CoF farm, starting from a different outpost, it tries to zone to Doomlore though is using the code for another, as I don't have the outpost unlocked. If starting the script from Doomlore, it will crash the client, the client error saying pathing is out of sync.
Not sure how to debug, how to find these codes without going down an excessive debugging route (again, also out of my league currently).
Thanks.
First of all, unlock the required outposts and skills. The "out of sync" error appears when the bot uses outdated headers afaik(Imagine this like each time the client is doing an action, it sends a number to the game server so the game server can verify the action and update itself. If you send a number the server does not know, it will send back an error and the client will crash.) To fix this error, you have to wait for someone to update the GWA2.Quote:
Could someone point me in the right direction for modifying these scripts? (Newbie)
I've found a GWA2 file from the forums and have old bot scripts. I've read things about headers (not entirely sure) having already been changed in this file - though old scripts will interact incorrectly as function names and 'server' ID codes have changed as far as I understand?
I managed to get the vaettir script posted moving me, though I couldn't test it further as no build.
I tried loading and modifying the old bones CoF farm, starting from a different outpost, it tries to zone to Doomlore though is using the code for another, as I don't have the outpost unlocked. If starting the script from Doomlore, it will crash the client, the client error saying pathing is out of sync.
Not sure how to debug, how to find these codes without going down an excessive debugging route (again, also out of my league currently).
Thanks.
Hey.Quote:
The autoit site is a good place to start learning:
[Only registered and activated users can see links. Click Here To Register...]
The problem with your CoF script is most likely something that is actually broken, for example loading a skillbar, and not movement (which works just fine). We can only know for certain if you post the script tho.
"Func RndTravel($aMapID) If GetMapLoading() == 2 Then Disconnected() #cs Local $UseDistricts = 7 ; 7=eu-only, 8=eu+int, 11=all(excluding America) ; Region/Language order: eu-en, eu-fr, eu-ge, eu-it, eu-sp, eu-po, eu-ru, us-en, int, asia-ko, asia-ch, asia-ja ;~ Local $Region[11] = [2, 2, 2, 2, 2, 2, 2, -2, 1, 3, 4] ;~ Local $Language[11] = [0, 2, 3, 4, 5, 9, 10, 0, 0, 0, 0] Local $Region[11] = [0, -2, 1, 3, 4] Local $Language[11] = [0, 0, 0, 0, 0] #ce Local $Random = Random(0, $UseDistricts - 1, 1) ; MoveMap($aMapID, $Region[$Random], 0, $Language[$Random]) TravelTo($aMapID) ; WaitMapLoading($aMapID) EndFunc"
Does such a thing already exist? I know nothing of coding haha.Quote:
sure, create a function that zones to a place instead of the guild hall function and create waypaths to the chest and merchant.
about the server, no need it already randomly joins a different district.