longer sleeps and not just random ones... u need a getping style sleep. Also for different items there are different salvage recipes so look in a bot that does salvaging already and follow those methods.
Hey guys, i am working on some Nickset.Bot stuff. And i want to farm Devourers, which spawn from the ground if you are near by. I dont know why, but my bot (with other enemies there is no problem) just keeps running without killing the spawned devourers.
im pretty new to this code editing stuff, so i dont get where the problem is.
Func Kill()
Local $lTimer, $lEnemiesCount, $lMe, $lTargetID, $lTargetStruct, $target
$lTimer = TimerInit()
$lEnemiesCount = GetNumberOfFoesInRangeOfAgent()
CheckVoSCombat()
RndSleep(500)
If $lEnemiesCount >=1 Then
$target = GetNearestEnemyToAgent(-2)
ChangeTarget($target)
RndSleep(150)
Attack(-1)
Sleep(200)
If IsRecharged($sweep) Then
CheckVoSCombat()
TargetNearestEnemy()
UseSkill($sweep, -1)
RndSleep(200)
EndIf
Do
Out("Fighting")
If GetMapLoading() == 2 Then Disconnected()
If GetIsDead(-2) Then
StopMainLoop ()
Return
EndIf
CheckVoSCombat()
If GetIsDead($lTargetID) Then
$lTargetID = DllStructGetData(GetNearestEnemyToAgent(-2), 'ID')
If [MENTION=368499]Extended[/MENTION] > $RANGE_NEARBY Then ExitLoop
Attack(-1)
EndIf
$target = GetNearestEnemyToAgent(-2)
ChangeTarget($target)
RndSleep(150)
Attack(-1)
Sleep(200)
If IsRecharged($sweep) Then
CheckVoSCombat()
TargetNearestEnemy()
UseSkill($sweep, -1)
RndSleep(200)
EndIf
If GetIsDead(-2) Then
StopMainLoop ()
Return
EndIf
CheckVoSCombat()
TargetNearestEnemy()
Attack(-1)
If GetSkillbarSkillAdrenaline($crippling) >= 150 Then
CheckVoSCombat()
TargetNearestEnemy()
UseSkill($crippling, -1)
RndSleep(800)
EndIf
If GetIsDead(-2) Then
StopMainLoop ()
Return
EndIf
CheckVoSCombat()
TargetNearestEnemy()
Attack(-1)
If GetSkillbarSkillAdrenaline($reap) >= 120 Then
CheckVoSCombat()
TargetNearestEnemy()
UseSkill($reap, -1)
RndSleep(800)
EndIf
If GetIsDead(-2) Then
StopMainLoop ()
Return
EndIf
Sleep(100)
CheckVoSCombat()
TargetNearestEnemy()
Attack(-1)
If TimerDiff($lTimer) > 7000 Then PickUpLoot()
If TimerDiff($lTimer) > 150000 Then
PickUpLoot()
Return
EndIf
If GetIsDead(-2) Then
StopMainLoop ()
Return
EndIf
$lEnemiesCount = GetNumberOfFoesInRangeOfAgent()
Until $lEnemiesCount <= 0 Or TimerDiff($lTimer) > 150000
CancelAction()
Sleep(GetPing() + 250)
Out("Pick up loot")
PickUpLoot()
;Out("Moving")
EndIf
EndFunc
Func MoveRun:
Code:
Func MoveRun($DestX, $DestY)
If GetMapLoading() == 2 Then Disconnected()
If GetIsDead(-2) Then
StopMainLoop()
Return
EndIf
If GetMapID() = $MAP_ID_BH Then Return
StuckTimer()
;Local $Me
Local $Me = GetAgentByID(-2)
Move($DestX, $DestY)
Do
If GetMapLoading() == 2 Then Disconnected()
CheckVoS()
$Me = GetAgentByID(-2)
If GetIsDead(-2) Then
StopMainLoop()
Return
EndIf
If GetMapID() = $MAP_ID_BH Then Return
If DllStructGetData($Me, 'MoveX') == 0 Or DllStructGetData($Me, 'MoveY') == 0 Then Move($DestX, $DestY)
RndSleep(250)
Until ComputeDistance(DllStructGetData($Me, 'X'), DllStructGetData($Me, 'Y'), $DestX, $DestY) < 250
EndFunc
I dont know maybe it has sth to do with this Func:
Func GetNumberOfFoesInRangeOfAgent
Code:
Func GetNumberOfFoesInRangeOfAgent($aAgent = 0, $aRange = 2000)
If GetMapLoading() == 2 Then Disconnected()
Local $lAgent, $lDistance
Local $lCount = 0, $lAgentArray = GetAgentArray(0xDB)
If Not IsDllStruct($aAgent) Then $aAgent = GetAgentByID($aAgent)
For $i = 1 To $lAgentArray[0]
$lAgent = $lAgentArray[$i]
If BitAND(DllStructGetData($lAgent, 'typemap'), 262144) Then
If StringLeft(GetAgentName($lAgent), 7) <> "Servant" Then ContinueLoop
EndIf
If DllStructGetData($lAgent, 'Allegiance') <> 3 Then ContinueLoop
If DllStructGetData($lAgent, 'HP') <= 0 Then ContinueLoop
If BitAND(DllStructGetData($lAgent, 'Effects'), 0x0010) > 0 Then ContinueLoop
$lDistance = GetDistance($lAgent)
If $lDistance > $aRange Then ContinueLoop
$lCount += 1
Next
Return $lCount
EndFunc
I thought maybe it has something to do with too short "sleeps". but like the devourers just follow the bot the whole time...
I'm trying to get a bot to check that all party members are loaded before Resigning/Returning.
Is there a function for this? I've tried GetPartySize() but the function counts the not-yet loaded members as well. Not sure what else to try. Any help is appreciated.
longer sleeps and not just random ones... u need a getping style sleep. Also for different items there are different salvage recipes so look in a bot that does salvaging already and follow those methods.
The CanSalvage function already makes sure that the items returned can be salvaged to materials, which is why it only uses SalvageMaterials()
I don't see how using a sleep with getping would make a difference ? It is not functionnaly different than a random sleep. I will try longer sleeps though.
Anyway, this doesn't close the Salvage window, even when running it on only one item. I guess there should be a function in GWA that does it, but can't seem to find it
Func GetPartyMembers($aAgentArray = 0)
Local $lTeam = GetAgentProperty(GetAgentByID(GetMyID()), 'Team')
If $aAgentArray == 0 Then $aAgentArray = GetAgentArray(0xDB)
Local $lReturnArray[$aAgentArray[0]+1]
$lReturnArray[0] = 0
For $i = 1 To $aAgentArray[0]
If GetAgentProperty($aAgentArray[$i], 'Team') <> $lTeam Then ContinueLoop
If GetAgentProperty($aAgentArray[$i], 'LoginNumber') = 0 Then ContinueLoop
If GetAgentProperty($aAgentArray[$i], 'Allegiance') <> 1 Then ContinueLoop
If Not BitAND(GetAgentProperty($aAgentArray[$i], 'TypeMap'), 131072) Then ContinueLoop
$lReturnArray[0] += 1
$lReturnArray[$lReturnArray[0]] = $aAgentArray[$i]
Next
ReDim $lReturnArray[$lReturnArray[0] + 1]
Return $lReturnArray
EndFunc ;GetPartyMembers
I can scan the map and check the number of party members in it, which works fine in an explorable area.
But in an outpost it counts all players.
Is there a way to get beyond that and also check if the player in the outpost is also in my party?
Okay so I have tried a million times to try to fix this probably small error that I'm getting trying to fix this script. It cast the first 3 spells no issues but the 4th spell ( Shield of Absorption) its saying unknown function.. Is it not finding it somehow? Is the timing of the casting off? I am completely lost at this.
Okay so I have tried a million times to try to fix this probably small error that I'm getting trying to fix this script. It cast the first 3 spells no issues but the 4th spell ( Shield of Absorption) its saying unknown function.. Is it not finding it somehow? Is the timing of the casting off? I am completely lost at this.
It's because it is trying to call a function which is missing; "IsRecharged()".
The first 3 spells cast fine because they do not call that function when using them.
Code:
;~ Description: Returns if a skill is recharged.
Func IsRecharged($lSkill)
Return GetSkillBarSkillRecharge($lSkill) == 0
EndFunc ;==>IsRecharged
Plug that somewhere in your file (into "GWA2.au3" preferably).
Okay so I have tried a million times to try to fix this probably small error that I'm getting trying to fix this script. It cast the first 3 spells no issues but the 4th spell ( Shield of Absorption) its saying unknown function.. Is it not finding it somehow? Is the timing of the casting off? I am completely lost at this.
You are using an old GWA2... all latest bots with GWA2 got this function in.
Be sure to have latest updated files (GWA2 and Headers)
I'm looking at some crashes on already made scripts from here like vaettirs etc so I wanted to see if there was a way to verify which packet is causing the crash. I think I'll add a file.log on each enqueue and sendpacket call to see what it will yield.
hey everyone i have some problems i hope i can get help with
1: im using the getagentbyname function which works fine if i use it with a client on which i didnt run a bot but if i ran a bot on the client it doesnt work, anyone knows a fix?
For $i = 1 To GetMaxAgents()
$lAddress = $mStringLogBase + 256 * $i
$lName = MemoryRead($lAddress, 'wchar [128]')
$lName = StringRegExpReplace($lName, '[<]{1}([^>]+)[>]{1}', '')
If StringInStr($lName, $aName) > 0 Then Return GetAgentByID($i)
Next
EndFunc ;==>GetAgentByName
2: when i hit many foes with whirling defense (57) the bot starts to lag and doesnt seem to work properly even after theyre dead anyone know workaround?
3: is there code that allows the use of mods i want to use the "measure for measure" inscription but im unaware of a function that uses an item and also targets another(use measure for measure on great conch for example)
Oh and also i wanna ask if there is a way to adjust the height of a moveto command like when theres a bridge over an area and you use a moveto because you want to walk on the bridge but the code is understood as a moveto to the coordiantes under the bridge which are the same??
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