I updated my Tengu Bot and its still working but the Pickup Function is broken.
Any Tips what I have to change?
Find the Pickup_Loot function and take a look at as well as the CanPickUp() function. See what items it has listed and compare the function with a bot that is working.
If you post those functions here then we can see where there might be a problem.
Find the Pickup_Loot function and take a look at as well as the CanPickUp() function. See what items it has listed and compare the function with a bot that is working.
If you post those functions here then we can see where there might be a problem.
Regards,
RiflemanX
I have this one :
Func CanPickUp2($aitem)
$ModelID = DllStructGetData(($aitem), 'ModelID')
$ExtraID = DllStructGetData($aitem, "ExtraId")
$lRarity = GetRarity($aitem)
$t = DllStructGetData($aitem, 'Type')
If $t = 20 Then
Return True
ElseIf $ModelID == 36985 Then
$nbCitations += 1
GUICtrlSetData($stCitations, $nbCitations)
Return True
ElseIf GUICtrlRead($gold) = $GUI_CHECKED Then
If $lRarity = 2624 Then
Return True ; gold items
EndIf
ElseIf GUICtrlRead($green) = $GUI_CHECKED Then
If $lRarity = 2627 Then
Return True ; green items
EndIf
ElseIf $ModelID = 28434 Then
Return True
ElseIf $lRarity = 2624 Then
If GUICtrlRead($dragon) = $GUI_CHECKED Then
If $ModelID = 736 Then
Return True
EndIf
EndIf
If GUICtrlRead($bo) = $GUI_CHECKED Then
If $ModelID = 735 Then
Return True
EndIf
EndIf
If GUICtrlRead($bladed) = $GUI_CHECKED Then
If $ModelID = 778 Then
Return True
EndIf
EndIf
If GUICtrlRead($bladed) = $GUI_CHECKED Then
If $ModelID = 777 Then
Return True
EndIf
EndIf
If GUICtrlRead($spiked) = $GUI_CHECKED Then
If $ModelID = 871 Then
Return True
EndIf
EndIf
If GUICtrlRead($spiked) = $GUI_CHECKED Then
If $ModelID = 872 Then
Return True
EndIf
EndIf
If GUICtrlRead($jitte) = $GUI_CHECKED Then
If $ModelID = 741 Then
Return True
EndIf
EndIf
If GUICtrlRead($diamond) = $GUI_CHECKED Then
If $ModelID = 2294 Then
Return True
EndIf
EndIf
If GUICtrlRead($Iridescent) = $GUI_CHECKED Then
If $ModelID = 2298 Then
Return True
EndIf
EndIf
If GUICtrlRead($Iridescent) = $GUI_CHECKED Then
If $ModelID = 2299 Then
Return True
EndIf
EndIf
If GUICtrlRead($Iridescent) = $GUI_CHECKED Then
If $ModelID = 2297 Then
Return True
EndIf
EndIf
ElseIf GUICtrlRead($pcons) = $GUI_CHECKED Then
If $ModelID = 28434 Or $ModelID = 22752 Or $ModelID = 22269 Or $ModelID = 28436 Or $ModelID = 31152 Or $ModelID = 31151 Or $ModelID = 31153 Or $ModelID = 35121 Or $ModelID = 28433 Or $ModelID = 26784 Or $ModelID = 6370 Or $ModelID = 21488 Or $ModelID = 21489 Or $ModelID = 22191 Or $ModelID = 24862 Or $ModelID = 21492 Or $ModelID = 22644 Or $ModelID = 30855 Or $ModelID = 5585 Or $ModelID = 24593 Or $ModelID = 6375 Or $ModelID = 22190 Or $ModelID = 6049 Or $ModelID = 910 Or $ModelID = 28435 Or $ModelID = 6369 Or $ModelID = 21809 Or $ModelID = 21810 Or $ModelID = 21813 Or $ModelID = 6376 Or $ModelID = 6368 Or $ModelID = 29436 Or $ModelID = 21491 Then
Return True ; pcons
EndIf
ElseIf $ModelID = 146 Then
If $ExtraID = 10 Or $ExtraID = 12 Then
Return False
EndIf
If $ModelID = 22751 Then
Return True
EndIf
EndIf
EndFunc ;==>CanPickUp2
Ok, can you check two other things please. There should be another loot function that references this function, something like Loot() or Get_Loot, or PickupLoot. Post that function. Also, read your script down to where your bot makes it to the final waypoint coords and everyone is balled. After the Pop, you should see your PickUpLoot function called there, correct?
Trying to use the new GWA2 to update some old bots but I always get a crash when the bot tries to initialize. The Character selector works fine, but then the client always crashes. I have tried all combinations of the arguments, and have also tried a couple of scripts that people uploaded and claimed it works for them, still crashing. I also re-downloaded the GW client. Any insight would be appreciated.
The main thing is people don't know how to track the errors... People that are interested in botting need to download Scite. Open the scripts in scite and learn to put information lines in their script.
Add lines like this in your script to isolate where the file is crashing, and if its a script error like Andy mentioned above (double functions, variables used without being declared, syntax errors) then scite will tell you what and where the errors are...Here is an informational line and you can duplicate them through your script to isolate where the crash is happening and come here with the information and then we can really help.
Code:
; add lines like this in the script so you can see it passed this point without crashing
ConsoleWrite("Passing Line 200 ..everything ok..")
; sometimes you might want to know the value of a variable...
ConsoleWrite("Injected with Character name " & $charname & '@'CRLF);
;remove quotes from '@'
Hi Andy and Phat, I am sorry if I lead you to believe I was completely new to this. I have already cleaned the new GWA2, removed duplicate functions and added any missing ones. I have a very specific problem with the Initialize() function. When I run any script (either my own or any of the updated ones posted here the last couple of days) the client crashes at the initializing, i.e. the window does not get a new name, the crash window (prompting to send info to ArenaNet) pops up and when I press ok then the bot gui appears as normal. I have tried changing the arguments in the initialize() func (regarding eventmode, window rename etc) to any possible combination of True/Falses (as this sometimes caused crashes) but with no luck. I was wondering if there is anything else I am missing.
I have tried using it either inside an EventHandler func or in the beginning of the script. Any time the script tries to inject, it crashes my GW client. The character name functions seem to work OK as the correct names appear in my gui, so perhaps it is something with the modifymemory() func...
Ugh didnt look for a longer time into autoit code. You should try out the ISN Autoit Editor.
It offers a good debugger and you dont have to ConsoleWrite() every line to find out where the error is, lol.
Link:
i can help you more if you tell me where it gets stuck.
No, I don't have any custom Initialize() func in my script that would call this (like the vaettir bot posted in the other thread). I just call the normal Initialize() func in a simple Eventhandler():
Code:
Func EventHandler()
Switch (@GUI_CtrlId)
Case $btnStart
$boolRun = Not $boolRun
If $boolRun Then
GUICtrlSetData($btnStart, "Initializing...")
GUICtrlSetState($btnStart, $GUI_DISABLE)
Local $CharName = GUICtrlRead($Combo1)
If $CharName = "" Then
If Initialize(WinGetProcess("Guild Wars"), False, True, False) = False Then
MsgBox(0, "Error", "Guild Wars it not running.")
Exit
EndIf
Else
If Initialize($CharName, False, True, False) = False Then
MsgBox(0, "Error", "Can't find a Guild Wars client with that character name.")
Exit
EndIf
EndIf
GUICtrlSetData($btnStart, "Stop")
GUICtrlSetState($btnStart, $GUI_ENABLE)
Else
GUICtrlSetData($btnStart, "Continue")
EndIf
Case $cbxHideGW
If $mGWProcHandle <> 0 Then ToggleRendering()
Case $GUI_EVENT_CLOSE
If Not $Rendering Then ToggleRendering()
Exit
EndSwitch
EndFunc ;==>EventHandler
I have also removed the togglerendering part as it is currently not functional. I have also tried the vaettir bot that I mentioned before (which is reported as working) and I get the same crash of gw client (again during the initialize). The bots don't crash and they don't present any issues (with missing globals or funcs etc), it is the actual game that crashes when GWA2 tries to inject itself. I am also using Windows 7 if that makes any difference (?). Thanks in advance for your input
Good point, I always run both gw and the script as admin just to avoid any such issues. I will check the autoit version, this could be it. I will also try running things in Win 10 (which I haven't done so far) in case it's the OS...
EDIT: It was the ******* outdated Autoit................
Anyone got an example of an Assassin kill() function? I am having some trouble with the lead/second/third attack sequencing and getting the correct targets there... The sequence is the common jagged strike, fox fangs, death blossom.
Here is what I got so far but not working properly:
Code:
Func KillSin()
While GetNumberOfFoesInRangeOfAgent(-2, 1250) > 0
Local $jsOK = False
Local $ffOK = False
If GetIsDead(-2) Then Return
If CheckEnchantments() Then
TargetNearestEnemy()
PingSleep()
ChangeTarget(-1)
PingSleep()
If IsRecharged($js) And $jsOK = False And GetAgentExists(-1) And DllStructGetData(GetAgentByID(-1), "HP") > 0 Then
Do
If GetIsDead(-2) Then Return
UseSkillEx($js, -1)
PingSleep()
Until GetSkillBarSkillRecharge($js) <> 0 ; ensure first attack
$jsOK = True
If IsRecharged($ff) And $jsOK = True And $ffOK = False And GetAgentExists(-1) And DllStructGetData(GetAgentByID(-1), "HP") > 0 Then
Do
If GetIsDead(-2) Then Return
UseSkillEx($ff, -1)
PingSleep()
Until GetSkillBarSkillRecharge($ff) <> 0 ; ensure second attack
$ffOK = True
$jsOK = False
If IsRecharged($db) And $ffOK = True And GetAgentExists(-1) And DllStructGetData(GetAgentByID(-1), "HP") > 0 Then
Do
If GetIsDead(-2) Then Return
UseSkillEx($db, -1)
PingSleep()
Until GetSkillBarSkillRecharge($db) <> 0 ; ensure third attack
$ffOK = False
EndIf
EndIf
ElseIf GetAgentExists(-1) And DllStructGetData(GetAgentByID(-1), "HP") > 0 Then
Attack(-1)
PingSleep()
EndIf
EndIf
WEnd
EndFunc
Anyone got an example of an Assassin kill() function? I am having some trouble with the lead/second/third attack sequencing and getting the correct targets there... The sequence is the common jagged strike, fox fangs, death blossom.
Here is what I got so far but not working properly:
Code:
Func KillSin()
While GetNumberOfFoesInRangeOfAgent(-2, 1250) > 0
Local $jsOK = False
Local $ffOK = False
If GetIsDead(-2) Then Return
If CheckEnchantments() Then
TargetNearestEnemy()
PingSleep()
ChangeTarget(-1)
PingSleep()
If IsRecharged($js) And $jsOK = False And GetAgentExists(-1) And DllStructGetData(GetAgentByID(-1), "HP") > 0 Then
Do
If GetIsDead(-2) Then Return
UseSkillEx($js, -1)
PingSleep()
Until GetSkillBarSkillRecharge($js) <> 0 ; ensure first attack
$jsOK = True
If IsRecharged($ff) And $jsOK = True And $ffOK = False And GetAgentExists(-1) And DllStructGetData(GetAgentByID(-1), "HP") > 0 Then
Do
If GetIsDead(-2) Then Return
UseSkillEx($ff, -1)
PingSleep()
Until GetSkillBarSkillRecharge($ff) <> 0 ; ensure second attack
$ffOK = True
$jsOK = False
If IsRecharged($db) And $ffOK = True And GetAgentExists(-1) And DllStructGetData(GetAgentByID(-1), "HP") > 0 Then
Do
If GetIsDead(-2) Then Return
UseSkillEx($db, -1)
PingSleep()
Until GetSkillBarSkillRecharge($db) <> 0 ; ensure third attack
$ffOK = False
EndIf
EndIf
ElseIf GetAgentExists(-1) And DllStructGetData(GetAgentByID(-1), "HP") > 0 Then
Attack(-1)
PingSleep()
EndIf
EndIf
WEnd
EndFunc
Try this one.
Code:
Func Killsin()
Local $timerskills
Local $ldistance
While GetNumberOfFoesInRangeOfAgent(-2, 1250) > 0
If GetIsDead(-2) Then ExitLoop
If CheckEnchantments() Then
TargetNearestEnemy()
Sleep(getping() + 100)
$ldistance = getdistance(-1, -2)
If $ldistance > 100 Then ;Moving up to foe
attack(-1)
Do
Sleep(getping())
Until $ldistance < 100
EndIf
Do
If isrecharged($JS) Then
If GetIsDead(-1) Then Return False
$timerskills = TimerInit()
useskill($JS, -1)
Do
Sleep(getping())
Until Not isrecharged($JS) Or TimerDiff($timerskills) > 1250 Or GetIsDead(-1)
EndIf
If getisbleeding(-1) Then ;Making sure it hit him.
If isrecharged($FF) Then
If GetIsDead(-1) Then Return False
$timerskills = TimerInit()
useskill($FF, -1)
Do
Sleep(getping())
Until Not isrecharged($FF) Or TimerDiff($timerskills) > 1250 Or GetIsDead(-1)
EndIf
EndIf
If isrecharged($DB) Then
If Not isrecharged($FF) Then ;Making sure FF has been used.
If GetIsDead(-1) Then Return False
$timerskills = TimerInit()
useskill($DB, -1)
Do
Sleep(getping())
Until Not isrecharged($DB) Or TimerDiff($timerskills) > 1250 Or GetIsDead(-1)
EndIf
EndIf
Until GetIsDead(-1)
EndIf
WEnd
EndFunc ;==>Killsin
Hi and thanks, it still does not work very well so I am trying different things. I also found this func from an old thread:
Code:
func canUseCombo($skill, $target)
if not isDllStruct($target) then $target = getAgentByID($target)
if not isDllStruct($skill) then $skill = getSkillById($skill)
switch dllStructGetData($skill, "comboReq")
case 1
return dllStructGetData($target, "laststrike") = 3
case 2
return dllStructGetData($target, "laststrike") = 1
case 4
return dllStructGetData($target, "laststrike") = 2
endSwitch
return true
endFunc
but I am not exactly sure how it should be called in the fighting function...
Hello guys, i got hacked and gm didnt help me :( so i ask for help here 12/22/2009 - Kal Online - 25 Replies Hello guys, i got hacked 7 days ago, i sent a c/s to gms connected my id card, they told me twrite back after 7 days...
GM Reply
Hello.
This is Kalonline.
We checked over your report and blocked hackers.
HELP! I need help scripting 02/06/2007 - Conquer Online 2 - 1 Replies OK, I want to know how u ppl do it! I what program do u use to make them? cause i wanna help but i dun know how... somone plz reply!
L2Walker, scripting questions/help 12/13/2006 - Lineage 2 - 0 Replies Hey, just asking a few questions hope you don't mind ^_^
I'm looking to make a script so when I cast magic on something, the walker bot will cast, say Wind Strike, on the same thing, at the same time.
I've looked through the options in walker and have it setup now, but it doesn't cast at the same time, but when I've finished casting.
If this isn't possible, last time I checked Walker scripts could not pickup what was said in chat, is this still the case?
Thanks. ^_^
Note: If you...
I need help scripting 09/05/2006 - General Coding - 0 Replies Ok I am tired of leeching I am ready to try my hand at scripting but I dont know where to start and I was wondering if someone could help me get started or tell me a website that can help me learn so I can make my own hacks and contribute to the epvp community that we all love :D