Simba Code:
[CODE]
program AIOFighter;
// I, Shorteh96, would like to thank the following users:
// RequiredOne: I used part of your AutoFighter script as backbone.
// Eduard: I used a lot of your Fight Cave script as backbone to convert to SMART.
// Ogre: Thank you for helping me with my remedial errors in the chatbox every time I asked for help.
// I, Shorteh96, would like to take very little credit for this script
// as I have no idea how to code in all honesty but am capable of reading
// and copying premade code into a new working script. Thank you!
{$i SRL/SRL.simba}
{$i P07Include.simba}
var
x, y: Integer;
Combat1, num1, num2, attnum: Integer;
const
// REQUIRED CONFIGURATION BY USER:
FightStyle = 1; // 1 = Att, 2 = Str, 3 = Contr, 4 = Def
MNick = 'oblin'; // Monster name without the first letter
MColor = 2195834; // Monster Color 1
MColor2 = 205112; // Monster Color 2
// OPTIONAL CONFIGURATION BY USER
ABan1 = 'Attack'; // First skill for the anti-ban to check
ABan2 = 'Hitpoints'; // Second skill for the anti-ban to check
Loot1 = 'Coins'; // Loot 1 name including the first letter
LColor1 = 1479346; // Color of Loot 1 to pick up
Loot2 = 'Bones'; // Loot 2 name including the first letter
LColor2 = 13882585; // Color of Loot 2 to pick up
procedure P07_DeclarePlayers;
begin
P07_PlayerName := 'guthix_tree1'; // Username for 07Scape
P07_PlayerPass := 'asdqwe123'; // Password for 07Scape
end;
// END OF CONFIGURATION
procedure P07_SetRun(Run: Boolean);
var
x, y: integer;
begin
if not P07_TabInventoryTab(12) then
begin
writeln('ERROR: Could not P07_TabInventoryTab(12) -> Error in P07 include or random! Exiting');
Exit;
end;
if (FindColor(x, y, 4342852, 627, 416, 658, 444)) then
begin
writeln('-> Run = on!');
mouse(x, y, 1, 1, 1);
end;
writeln('-> Going to inventory tab');
P07_TabInventoryTab(4);
end;
procedure SetMeUp;
begin
writeln('-- Configuring player --');
writeln('-> Checking AutoRetaliate.');
P07_AutoRetaliate(true);
writeln('-> Checking CombatStance');
if(FightStyle = 0) then
begin
writeln('ERROR: Please fill in the FightStyle settings!');
TerminateScript;
end;
P07_CombatStance(FightStyle);
writeln('-> CombatStance = '+Inttostr(FightStyle)+'');
writeln('-> Making Compass South');
P07_MakeCompassSouth;
writeln('-> Making Camera Angle High');
P07_MakeCameraAngleHigh;
P07_SetRun(true);
writeln('-- Configuration completed --');
writeln('');
end;
procedure ProgressReport;
begin
Wait(5000);
cleardebug();
writeln('-- AIO Fighter Release 0.1 --');
writeln(' Time Running: '+TimeRunning+'');
end;
procedure Random1;
begin
attnum := (Random(1000));
end;
procedure Attack;
var x, y: Integer;
begin
wait(500 + random(800))
if P07_FindObjCustom(x,y, ['ttack', MNick], [MColor, MColor2], 5) then
begin
if combat1 = (0) then
begin
P07_MouseBox(X, Y, X, Y, mouse_left);
wait(random(500));
end;
end;
end;
procedure Combat;
Begin
Combat1 := 1;
if (FindColor(X, Y, 65280, 220, 110, 330, 220)) then
begin
WriteLn('In Combat . . .');
end
else Combat1 := 0;
if (FindColor(X, Y, 65280, 220, 110, 330, 220)) = false then
if Loot1 = ('') = false then
if P07_FindObjCustom(x,y, [Loot1], [LColor1], 5) then
begin
wait (randomrange(100, 200));
ClickMouse2(mouse_right);
wait(randomrange(800, 1000));
P07_ChooseOptionMulti([Loot1]);
end;
if Loot2 = ('') = false then
if P07_FindObjCustom(x,y, [Loot2], [LColor2], 5) then
begin
wait (randomrange(100, 200));
ClickMouse2(mouse_right);
wait(randomrange(800, 1000));
P07_ChooseOptionMulti([Loot2]);
end;
end;
Procedure Antiban;
Begin
num2 := (5);
num1 := (random(30));
sleep(2000)
if num2 < num1 then
Case Random(10) Of
1: P07_HoverSkill(ABan1,RandomRange(2500,3500));
3: Boredhuman;
4: Wait(2500 + random(4500));
5: p07_HoverSkill(ABan2,RandomRange(2500,3500));
6: PickUpMouse;
7: RandomMovement;
8: RandomRClick;
9: P07_MakeCompassdegree(randomrange(0, 360));
end;
end;
begin
P07_DeclarePlayers;
SetupSRL();
SetupP07Include;
ClearDebug;
writeln('Hello, welcome to SMART AIO Fighter Release 0.1');
writeln('Please submit all bugs/troubles on the forum for fast fixes!');
writeln('');
if (not P07_LoggedIn) then
P07_LogInPlayer;
SetMeUp;
repeat
if (not P07_LoggedIn) then
begin
P07_LogInPlayer;
SetMeUp;
end;
if combat1 = 0 then
Random1;
Combat;
if Combat1 = 0 then
Attack;
Antiban;
progressreport;
wait(2000 + random(100));
until (false)
end. [/CODE]