Quote:
Originally Posted by NiliyaFlamme
dont work my hero still do nothing xDD
Func Start()
Sleep(2000)
MoveTo(15382.00, 6565.00)
Sleep(2500)
WaitMapLoading($Map_Drazach_Thicket,2000)
Sleep(2000)
FlagAll($aX, $aY);==>CommandAll(7550.48, 16992.20)
MoveTo(14993.40, 8953.10)
Sleep(35000)
UseHeroSkill(1,1)
UseHeroSkill(3,1)
Sleep(7000)
UseHeroSkill(1,2)
Sleep(7000)
UseHeroSkill(1,3)
UseHeroSkill(2,5)
UseHeroSkill(7,1)
Sleep(1000)
UseHeroSkill(2,4)
UseHeroSkill(7,2)
TakeQuest()
EndFunc^
this is what i try but my heros do nothing idk why if someone know what is fail pls help :)
|
I am confused beyond words. It may be helpful to see the gwa2 you are working with as it may have errors in the function. Please upload your script and I will look at it.
Also, when you zone, it is best to use Move() instead of MoveTo()
When you try to zone with MoveTo your bot will keep trying to reach the destination when the map screen is loading and this can cause Disconnect. Use MoveTo() to get closer to the portal and then use Move() to step through.
You also add sleep after MapLoading() but MapLoading already has sleep inside the function so no need to add more sleep unless you have lag issues in which case you should use something like the function PingSleep or simply write out the ping in the function.
When you have lag and timing is important:
Code:
Sleep(GetPing() + 2000)
This will detect your lag or ping rate and add it to your sleep time
Another way is to write a simple function:
Code:
PingSleep(2000)
Func PingSleep($msExtra = 0)
$ping = GetPing()
Sleep($ping + $msExtra)
EndFunc
As for your problem with your heroes not casting try also:
Code:
UseHeroSkill(1, 1, -2)
UseHeroSkill
if you are using gwa2 and there is no modifications to the function it should work as you have above using simply UseHeroSkill(1,1) or UseHeroSkill(1, 1, -2) however if you are attacking something you may want to make sure to target an enemy so all attack at the same time for effective spike.
Here is an example for the Raptor Farming script. In this script Hayda is moved to just outside the cave and casts buffs on the Warrior or Necro farmer.
Code:
Func MoveToBaseOfCave()
If GetMapID() <> $MAP_ID_RIVEN Then Return
If GetIsDead(-2) Then Return
Out("Moving to cave")
Move(-21975, -7372)
RndSleep(Random(1800, 2200))
UseHeroSkill(1, 3)
Moveto(-21213, -8134)
UseHeroSkill(1, 4, -2)
Sleep(1500)
;Rndsleep(1250)
UseHeroSkill(1, 5, -2)
Rndsleep(Random(20, 50))
UseHeroSkill(1, 6)
Rndsleep(Random(20, 50))
UseHeroSkill(1, 7)
Rndsleep(Random(20, 50))
UseHeroSkill(1, 8, -2)
Move(-20613, -9529, 40)
EndFunc