KeepBotting
06-04-2012, 11:25 PM
Okay, so, here are my two procedures.
First one:procedure WalkRocks;
begin
WriteLn('Status: We are now on the surface of Crandor. Proceeding to adamant rocks.');
FindNormalRandoms;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE,['7_9','7_8']);
WriteLn('Status: Found walkpath! Walking to rocks.');
WalkToRocks := [Point(3171, 3627), Point(3172, 3616), Point(3170, 3611), Point(3170, 3604), Point(3168, 3599), Point(3169, 3591), Point(3169, 3583), Point(3166, 3581), Point(3166, 3573), Point(3163, 3567), Point(3164, 3557), Point(3162, 3552), Point(3161, 3547), Point(3156, 3542), Point(3147, 3540), Point(3137, 3539), Point(3132, 3551), Point(3128, 3558), Point(3121, 3568), Point(3121, 3576), Point(3123, 3586), Point(3125, 3592), Point(3128, 3599), Point(3130, 3607), Point(3131, 3617), Point(3133, 3624), Point(3135, 3633), Point(3137, 3641), Point(3138, 3653), Point(3143, 3662), Point(3146, 3667), Point(3148, 3674), Point(3156, 3678), Point(3162, 3678), Point(3166, 3678), Point(3182, 3678)];
SPS_WalkPath(WalkToRocks);
Flag;
end;
Second one: procedure HopWorlds; //All credit for this procedure goes to I Am Legend.
var WorldNum: integer;
begin
WriteLn('Status: Hopping Worlds!');
FindNormalRandoms;
WriteLn('Status: Exiting to Lobby.');
ExitToLobby;
wait(500);
WriteLn('Status: Opening WorldScreen.');
OpenWorldScreen;
wait(500);
WriteLn('Status: Choosing random World.');
WorldNum := RandomWorld(false,false) ;
if (WorldNum = 106) then
WorldNum := RandomWorld(false,false) ;
if SelectWorld(WorldNum) then
WorldsHopped := WorldsHopped + 1;
WriteLn('Status: Logging back in!');
LoginPlayer;
end;
Okay, so my problem is that when running WalkRocks (and walking to the rocks) the script randomly runs HopWorlds for no reason whatsoever. I tried adding Flag; to tell the script to wait until the Flag disappears before doing anything else, but as soon as the Flag moves offscreen, HopWorlds runs.
Dafuq?
My mainloop:begin
Smart_Server := WORLD; //This sets up the SMART Minimizing Autoing Resource Thing.
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
SetupSRL; //This sets up SRL.
GetInfo; //This runs your GetInfo procedure, giving you information about this particular kbScript.
DeclarePlayers; //This runs your DeclarePlayers procedure, making sure that the script has a player to run.
LoginPlayer; //This logs in your player.
repeat
TeleSarim; //working but needs improvement
WalkBoat; //working
SailBoat; //working but needs improvement
CrossPlank; //working but needs improvement
WalkVolcano; //working
IntoVolcano; //working
WalkDoor; //undetermined
OpenDoor; //working
MeepMeep; //working but may need edited to improve ClimbRope
ClimbRope; //working but needs improvement
WalkRocks; //working
repeat
MineRock1; //working but needs tweaked
MineRock2; //working but needs tweaked
MineRock3; //working but needs tweaked
HopWorlds; //working
until InvFull; //working but it hops a world once before realising that invo is full lol wtf
TeleBank;
WalkBank;
GetBank;
DoBanking;
ProgressReport;
until AllPlayersInactive;
end.
What could be going wrong?
First one:procedure WalkRocks;
begin
WriteLn('Status: We are now on the surface of Crandor. Proceeding to adamant rocks.');
FindNormalRandoms;
MakeCompass('N');
SetAngle(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE,['7_9','7_8']);
WriteLn('Status: Found walkpath! Walking to rocks.');
WalkToRocks := [Point(3171, 3627), Point(3172, 3616), Point(3170, 3611), Point(3170, 3604), Point(3168, 3599), Point(3169, 3591), Point(3169, 3583), Point(3166, 3581), Point(3166, 3573), Point(3163, 3567), Point(3164, 3557), Point(3162, 3552), Point(3161, 3547), Point(3156, 3542), Point(3147, 3540), Point(3137, 3539), Point(3132, 3551), Point(3128, 3558), Point(3121, 3568), Point(3121, 3576), Point(3123, 3586), Point(3125, 3592), Point(3128, 3599), Point(3130, 3607), Point(3131, 3617), Point(3133, 3624), Point(3135, 3633), Point(3137, 3641), Point(3138, 3653), Point(3143, 3662), Point(3146, 3667), Point(3148, 3674), Point(3156, 3678), Point(3162, 3678), Point(3166, 3678), Point(3182, 3678)];
SPS_WalkPath(WalkToRocks);
Flag;
end;
Second one: procedure HopWorlds; //All credit for this procedure goes to I Am Legend.
var WorldNum: integer;
begin
WriteLn('Status: Hopping Worlds!');
FindNormalRandoms;
WriteLn('Status: Exiting to Lobby.');
ExitToLobby;
wait(500);
WriteLn('Status: Opening WorldScreen.');
OpenWorldScreen;
wait(500);
WriteLn('Status: Choosing random World.');
WorldNum := RandomWorld(false,false) ;
if (WorldNum = 106) then
WorldNum := RandomWorld(false,false) ;
if SelectWorld(WorldNum) then
WorldsHopped := WorldsHopped + 1;
WriteLn('Status: Logging back in!');
LoginPlayer;
end;
Okay, so my problem is that when running WalkRocks (and walking to the rocks) the script randomly runs HopWorlds for no reason whatsoever. I tried adding Flag; to tell the script to wait until the Flag disappears before doing anything else, but as soon as the Flag moves offscreen, HopWorlds runs.
Dafuq?
My mainloop:begin
Smart_Server := WORLD; //This sets up the SMART Minimizing Autoing Resource Thing.
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
SetupSRL; //This sets up SRL.
GetInfo; //This runs your GetInfo procedure, giving you information about this particular kbScript.
DeclarePlayers; //This runs your DeclarePlayers procedure, making sure that the script has a player to run.
LoginPlayer; //This logs in your player.
repeat
TeleSarim; //working but needs improvement
WalkBoat; //working
SailBoat; //working but needs improvement
CrossPlank; //working but needs improvement
WalkVolcano; //working
IntoVolcano; //working
WalkDoor; //undetermined
OpenDoor; //working
MeepMeep; //working but may need edited to improve ClimbRope
ClimbRope; //working but needs improvement
WalkRocks; //working
repeat
MineRock1; //working but needs tweaked
MineRock2; //working but needs tweaked
MineRock3; //working but needs tweaked
HopWorlds; //working
until InvFull; //working but it hops a world once before realising that invo is full lol wtf
TeleBank;
WalkBank;
GetBank;
DoBanking;
ProgressReport;
until AllPlayersInactive;
end.
What could be going wrong?