GW Working Bots 2020

08/27/2020 15:12 Restia Ashdoll#826
Quote:
Originally Posted by lemoutondu10 View Post
Hi there is there currently a buy and sell mats bot? Or an old one i could try to update?
Would be very much appreciated
Ty guys for the great work
just use toolbox for that?
08/27/2020 15:47 biohazardrain#827
Any chestrunning bot for kurz/lux chests like Eternal Grove?
08/27/2020 16:33 lemoutondu10#828
Quote:
Originally Posted by Restia Ashdoll View Post
just use toolbox for that?
Wait how?
08/27/2020 17:38 Restia Ashdoll#829
Quote:
Originally Posted by lemoutondu10 View Post
Wait how?
they have a buy or sell option just speak with the trader select how much you wanna buy/sell and u done
08/27/2020 18:01 RiflemanX#830
Quote:
Originally Posted by ForgottenRelic View Post
Okay so here goes once again a horrible attempt at creating something...


So lets say I wanna make an EXTREMELY NOOBISH script.....
(Farming a green boss w/heroes) <---- childish, right? its 2020.

I have kinda copied and pasted some functions that I know work from other scripts.

I have already figured out how to travel to said outpost, add heroes that I want with specific build needed and load my build for my character.

The bloody problem i'm having is this...

option 1 : just run to said place of boss and let heroes farm it ( no attacking required)
or option 2: target nearest foe and start attacking.


I have tried different ways all day yesterday and kept on getting errors. will attach my noobish script to it, any helpful pointers is much appreciated.
"Option 1"
First, To solve your first issue, load up a program to get your coordinates. Toolbox works fine for this. Move from your spawn point to the nearest exit and again get your coordinates (ensure you select the best path that prevents you from getting stuck. You may need to add more coordinates to move around obstacles).

Once you have your coordinates, then write out your movements. You can just simply write something like the below:

Code:
MoveTo(2331, 7832)
MoveTo(5478, 9872)
MoveTo(4312, 4391)
When I first write a script I might make some minor notes like:

Code:
MoveTo(2331, 7832) ;Stairs
MoveTo(5478, 9872) ;Near Merch
MoveTo(4312, 4391) ;Exit Portal
Once you do this then of course test and make sure its working smoothly and you don't get stuck anywhere. Also, try starting from a different town to make sure you don't get stuck when you zone to your target town and have a different spawn point.

Next get your portal way point and make sure to write this as:

Code:
Move(4532, 3421)
Remember, your MoveTo() function will send the command for your character to move to a certain location and then when it arrives it will go to the next movement or command so if you try to Zone with MoveTo() then you will often have a disconnect so always use Move() as this will simply begin to walk through the portal and immediately go to your next command which should be:

Code:
WaitMapLoading()
This will have your char wait until the map is loaded before proceeding to the next command.

Test a few times to ensure its working smoothly.

Next, map out your next path and get the coordinates to your boss. If there are no enemy between you and the boss and therefore no fighting then you can continue to use MoveTo() otherwise try something like MoveAggro() or MoveAggroing() or MoveKill() pull an example of a good moving and fighting function from a different script. Check scripts like Feather farmers, Kilroy, UW, or Froggy. Also, make sure to go through and look at the functions in GWA2 and become familiar with them as well.

"Option 2"
For your final fight, you can TargetNearestEnemy() and Attack() but you also want to try to work in some sort of cast engine for yourself. You should look at other scripts to see how they use the skills but you can also simply write a basic order for casting like:

Code:
UseSkill(1,-2)
UseSkill(2)
UseSkill(3)
UseSkill(4)
UseSkill(5,-2)
UseSkill(6)
UseSkill(7)
UseSkill(8)
From GWA2:
Code:
;~ Description: Use a skill.
Func UseSkill($aSkillSlot, $aTarget, $aCallTarget = False)
	Local $lTargetID

	If IsDllStruct($aTarget) = 0 Then
		$lTargetID = ConvertID($aTarget)
	Else
		$lTargetID = DllStructGetData($aTarget, 'ID')
	EndIf

	DllStructSetData($mUseSkill, 2, $aSkillSlot)
	DllStructSetData($mUseSkill, 3, $lTargetID)
	DllStructSetData($mUseSkill, 4, $aCallTarget)
	Enqueue($mUseSkillPtr, 16)
EndFunc   ;==>UseSkill
Here is an example of skill casting sequence from the Dervish Feather script and also the modified function:

Code:
Func KillOldVersion()
   If GetMapLoading() == 2 Then Disconnected()
   If GetIsDead(-2) Then Return
   If GetEffectTimeRemaining(1516) <= 0 Then UseSkillEx(8,-2)
   If GetEffectTimeRemaining(1540) <= 0 Then UseSkillEx(7,-2)
   If GetEffectTimeRemaining(1510) <= 0 Then UseSkillEx(1,-2)
   TargetNearestEnemy()
   WaitForSettle(800, 210)
   If IsRecharged(2) Then UseSkillEx(2,-2)
   If GetEnergy(-2) >= 10 Then
	  UseSkillEx(3,-2)
	  UseSkillEx(4,-1)
   EndIf
   While GetNumberOfFoesInRangeOfAgent(-2,900) > 0
	  If GetMapLoading() == 2 Then Disconnected()
	  If GetIsDead(-2) Then Return
	  TargetNearestEnemy()
	  If GetEffectTimeRemaining(1516) <= 0 Then UseSkillEx(8,-2)
	  If GetEffectTimeRemaining(1540) <= 0 Then UseSkillEx(7,-2)
	  If GetEffectTimeRemaining(1510) <= 0 And GetNumberOfFoesInRangeOfAgent(-2,300) > 1 Then UseSkillEx(1,-2)
	  If GetEffectTimeRemaining(1759) <= 0 Then UseSkillEx(2,-2)
	  Sleep(100)
	  Attack(-1)
   WEnd
   RndSleep(200)
   PickUpLoot()
   EndFunc
Another Example:

Code:
   If IsRecharged(2) Then UseSkillEx(2,-2)
   If GetEnergy(-2) >= 10 Then
	  UseSkillEx(3,-2)
	  UseSkillEx(4,-1)
   EndIf
   Attack(-1)
And here is the function for UseSkillEx()
Code:
Func UseSkillEx($lSkill, $lTgt = -2, $aTimeout = 3000)
    If GetIsDead(-2) Then Return
    If Not IsRecharged($lSkill) Then Return
    Local $Skill = GetSkillByID(GetSkillBarSkillID($lSkill, 0))
    Local $Energy = StringReplace(StringReplace(StringReplace(StringMid(DllStructGetData($Skill, 'Unknown4'), 6, 1), 'C', '25'), 'B', '15'), 'A', '10')
    If GetEnergy(-2) < $Energy Then Return
    Local $lAftercast = DllStructGetData($Skill, 'Aftercast')
    Local $lDeadlock = TimerInit()
    UseSkill($lSkill, $lTgt)
    Do
	    Sleep(50)
	    If GetIsDead(-2) = 1 Then Return
	    Until (Not IsRecharged($lSkill)) Or (TimerDiff($lDeadlock) > $aTimeout)
    Sleep($lAftercast * 1000)
EndFunc   ;==>UseSkillEx

Func CountFreeSlots($NumOfBags = 4)
   Local $FreeSlots, $Slots

   For $Bag = 1 to $NumOfBags
	  $Slots += DllStructGetData(GetBag($Bag), 'Slots')
	  $Slots -= DllStructGetData(GetBag($Bag), 'ItemsCount')
   Next

   Return $Slots
EndFunc
I like this function because it uses the skill and adds in the needed time before moving to the next skill so you do not need to add in sleep time or anything before your next skill or command.

Some skills are attack skills that target others and some are self targeting so that is why you see some written like:

Code:
UseSkillEx(1)
UseSkillEx(2)
UseSkillEx(3)
and some skills written like:

Code:
UseSkillEx(1, -2)
UseSkillEx(2, -2)
UseSkillEx(3, -2)
You just have to take note of this and the parameters of the skill function.

Code:
Func UseSkillEx($lSkill, $lTgt = -2, $aTimeout = 3000)
So in summary, there are many ways to write a basic boss farm script but I tried to make it as simple as I could here. Make these adjustments and try again. Post your results and lets see if you can get it.

Function Summary Example:

Code:
MoveTo(2331, 7832) ;Stairs
MoveTo(5478, 9872) ;Near Merch
MoveTo(4312, 4391) ;Exit portal near tree
Move(4532, 3421) ;Zoning 
WaitMapLoading() ;Waiting to load into Domain of Anguish
MoveAggroing(3455, 6532)  ;1st group of enemy
MoveAggroing(3421, 4321)  ;2nd group of enemy
MoveAggroing(3421, 2351)  ;3rd group of enemy
MoveAggroing(3421, 4321)  ;4th group of enemy near rock
MoveAggroing(3421, 2351)  ;5th group of enemy with monks
KillBoss()
PickUpLoot()
UpdateStats()
BackToTown()
08/27/2020 20:59 ForgottenRelic#831
Dude, thank you. this is exactly what i needed... I will update this into my script and learn the casting function.



Edit : Sorry LOL
08/28/2020 01:37 phat34#832
please don't reply with quote on messages that long... omg!

:eek:
08/29/2020 15:45 Junglestyle#833
Hello,

I use actually the Moss Farmer updated by Jokai93.

I need help, I don't think he recycles the roots but he sells them.

Someone can help me for script to modify as I wish.

Thanks

Jungle-
08/30/2020 01:11 dev0x#834
Hello,

Looks like Kilroy is not working for me. The first dialog has changed to x084 instead of x085. After entering the map, the bot does not attack. What needs to be changed for it to attack?
08/30/2020 02:30 ForgottenRelic#835
I have been using the kilroy all day, no problems for me. Can you link your script so i can take a look at it?
08/30/2020 13:20 azerty8585#836
Quote:
Originally Posted by FriendlyFarmer View Post
Assuming you are already at the correct NPC (so not sending packets when not near him)

It's either
  • Wrong dialog Id (like Zvend said)
    [*]You have more unspend kurzick factions than luxon faction, so you need an extra dialog. See [Only registered and activated users can see links. Click Here To Register...] for more info

What Rifleman said is incorrect.
Hey, it was this, thank you ;o
08/30/2020 14:51 MMOLuisChi#837
Quote:
Originally Posted by Aimcorp View Post
anyone interested in an updated ss/lb bot? the worm run.
got it running, if there is interest id be fixing the rest of the bot aswell.
+1 interested
08/30/2020 23:07 dev0x#838
Quote:
Originally Posted by ForgottenRelic View Post
I have been using the kilroy all day, no problems for me. Can you link your script so i can take a look at it?
It happens with every kilroy link in this thread. What else should I do to troubleshoot?
08/30/2020 23:22 OriginsEXE#839
Can anyone tell me "Type" numbers for Spears, Dagger, Bow, Wand?
08/31/2020 01:23 corey54321#840
my bad old info