Above is my very simple chicken fighter, ripped straight from one of the tutorials and updated to fit the latest API. Here are my questions:Code:program BrainyChickenFighter; {$DEFINE SMART} {$i AeroLib/AeroLib.Simba} {$i reflection/Reflection.Simba} var MyPlayer: TReflectLocalPlayer; procedure FightChicken; var Point: TPoint; Chicken: TReflectNpc; begin while MyPlayer.GetInteractingIndex < 0 do begin if Chicken.Find('Chicken') then begin Point := Reflect.Tiles.TileToMS(Chicken.GetTile); HumanMMouse(Point, 2, 2); FastClick(MOUSE_LEFT); Wait(1500 + Random(100)); while MyPlayer.IsMoving do Wait(50 + Random(100)); end; end; end; begin InitAL; reflect.Setup; LoginPlayer(False); MyPlayer.Create; repeat begin FightChicken; end; until(false); end.
1. Are there working SRL docs? When I try to visit the page, it times out.
2. How do I check that my character is in combat? Is there some code using animations? I can't access the documentation so I can't even help myself.
3. How do I handle the annoying Level Up dialog?
4. If the npc is moving, then my clicking will obviously not be able to keep up with the NPC's movement. Is there a better way to handle mouse movement and clicking?
5. How do I handle accidental misclicks?
6. With my current method, once my current chicken reaches 0 health, but has not disappeared off the screen yet, the script will select this already dead chicken as its new target and continue to spam click it until it disappears. Then it will choose an actually alive chicken. How do I fix this problem?
My goal here before I start adding bone burial and antiban is for the script to be able to smoothly click once to attack a chicken, do nothing while in combat, then once the chicken reaches 0 health, immediately smoothly target and click to attack the next chicken without having to wait for the dead chicken to do its death animation.


Reply With Quote
