Simba Code:
//////////////////////////////////////////////////
// (Beta Version)Script by Ryutoh //
// //
// 1. Set your bones in top left bank corner //
// 2. Set house name and other user info //
// 3. Start in Yanille bank or house //
//////////////////////////////////////////////////
program new;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$i SRL-OSR\SRL\misc\debug.simba}
var
X, Y, i: integer;
Portal, altarlocation, altarangle:Boolean;
const
housename = 'housename'; //Name of the host
nickname = 'nickname'; //Nickname/Username (ign)
username = 'emailoruser'; //Email/user
password = 'pass'; //Password
bonecolor = 11447993; //Custon bone colors if you wish
bonecolor2 = 4342342;
bonecolor3 = 10329514;
//NOTE: You might need to change the road color, go below and find "RoadColor :=", set the color there
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := username;
Pass := password;
nick := nickname;
Active := True;
end;
end;
procedure Altar;
begin
repeat
if FindObjEx(X, Y, ['Altar', 'Pray', 'Use'], [9405829, 1355193, 1687772, 1351091, 9669000, 1888494, 11977670, 4510942], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
begin
if altarangle = false THEN
begin
altarangle := true;
altarlocation := true;
writeln('Altar found! Using bones on altar...')
Mouse(X, Y, 5, 5, 0);
wait(100+ random(50))
ChooseOptionMulti(['Altar', 'Pray']);
wait(100+ random(50))
SetAngle(SRL_ANGLE_HIGH);
end else
begin
altarlocation := true;
writeln('Altar found! Using bones on altar...')
Mouse(X, Y, 5, 5, 0);
wait(100+ random(50))
ChooseOptionMulti(['Altar', 'Pray']);
wait(100+ random(50))
end
end else
begin
writeln('Altar not found! Looking around...')
altarlocation := false;
SetAngle(SRL_ANGLE_LOW);
altarangle := false;
wait(500+random(200))
makecompass(randomrange(0, 360))
wait(400+random(200))
end;
until(altarlocation = true);
end;
procedure LetsWalk(path:Integer);
begin
RoadColor := 6545612;//Road color here
GetNewRoadColor(mmx1, mmy1, mmx2, mmy2, 8)
if not LoggedIn then LogInPlayer;
case path of
1: RadialWalkTolerance(RoadColor,0,45,65,5,5,12);
2: RadialWalkTolerance(RoadColor,-10,25,65,5,5,12);
3: RadialWalkTolerance(RoadColor,-30,10,65,5,5,12);
4: RadialWalkTolerance(RoadColor,-20,20,65,5,5,12);
5: RadialWalkTolerance(RoadColor,0,30,35,5,5,12);
6: if FindColor(X, Y, 5889774, MMX1, MMY1, MMX2, MMY2) THEN
begin
Mouse(X, Y, 5, 5, 1);
wait(4000);
end; //bank
7: RadialWalkTolerance(RoadColor,190,230,60,5,5,12);
8: RadialWalkTolerance(RoadColor,180,220,72,5,5,12);
9: RadialWalkTolerance(RoadColor,140,190,65,5,5,12);
10: RadialWalkTolerance(RoadColor,180,210,65,5,5,12);
11: RadialWalkTolerance(RoadColor,180,205,35,5,5,12);
12: if FindColor(X, Y, 9639252, MMX1, MMY1, MMX2, MMY2) THEN
begin
Mouse(X, Y, 7, 0, 1);
wait(4000);
end; //portal
end;
end;
procedure backtoportal;
begin
MakeCompass('E')
SetAngle(SRL_ANGLE_HIGH);
setrun(true)
gametab(tab_Inv)
Writeln('Walking to portal...');
if FindObjEx(X, Y, ['orta', 'nte'], [12010639, 11480961, 6953555, 5375801], 13, 50, MSX1, MSY1, MSX2, MSY2) THEN
begin
writeln('Portal found, moving to portal...')
Portal := true
Mouse(X, Y, 5, 5, 1);
wait(4000+random(1000))
Mouse(260, 429, 3, 3, 1);
wait(3000+random(300))
TypeSend(housename);
wait(3000+random(300))
end;
for i := 7 to 12 do
begin
Writeln('You are on Walk Number ' + IntToStr(i));
LetsWalk(i);
wait(500+random(500))
end;
repeat
if FindObjEx(X, Y, ['orta', 'nte'], [12010639, 11480961, 6953555, 5375801], 13, 50, MSX1, MSY1, MSX2, MSY2) THEN
begin
writeln('Portal found, moving to portal...')
Portal := true
Mouse(X, Y, 5, 5, 1);
wait(4000+random(1000))
Mouse(260, 429, 3, 3, 1);
wait(3000+random(300))
TypeSend(housename);
wait(3000+random(300);
end else
begin
writeln('Portal not found, rotating...')
Portal := false
SetAngle(SRL_ANGLE_LOW);
wait(500+random(200))
makecompass(randomrange(0, 360))
wait(400+random(200))
end;
until(Portal = true);
end;
procedure bank;
var
obank: Boolean;
begin
if FindObjEx(X, Y, ['ank', 'ooth'], [7443106, 3107720, 542302], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
begin
obank := true
Mouse(X, Y, 5, 5, 1);
wait(500+random(200))
if Bankscreen = false THEN
begin
bank;
wait(1500+random(500))
end else
begin
writeln('Found bank...')
Withdraw(0, 0, 28);
wait(1000+random(500))
CloseBank;
wait(1000+random(200))
backtoportal;
end;
end else
begin
MakeCompass('E')
SetAngle(SRL_ANGLE_HIGH);
setrun(true)
gametab(tab_Inv)
Writeln('Walking to bank...');
for i := 1 to 6 do
begin
Writeln('You are on Walk Number ' + IntToStr(i));
LetsWalk(i);
wait(500+random(500))
end;
repeat
if FindObjEx(X, Y, ['ank', 'ooth'], [7443106, 3107720, 542302], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
begin
obank := true
Mouse(X, Y, 5, 5, 1);
wait(500+random(200))
if Bankscreen = false THEN
begin
bank;
wait(1500+random(500))
end else
begin
writeln('Found bank...')
Withdraw(0, 0, 28);
wait(1000+random(500))
CloseBank;
wait(1000+random(200))
backtoportal;
end;
end else
begin
obank := false
writeln('Bank not found, looking around...')
SetAngle(SRL_ANGLE_HIGH);
wait(500+random(200))
makecompass(randomrange(0, 360))
wait(400+random(200))
end;
until obank = true;
end;
end;
procedure start;
var
i : integer;
begin
if FindObjEx(X, Y, ['ank', 'ooth'], [7443106, 3107720, 542302], 2, 50, MSX1, MSY1, MSX2, MSY2) THEN
begin
bank;
end else
begin
if (not FindColor(X, Y, bonecolor, MIX1, MIY1, MIX2, MIY2)) THEN
begin
writeln('No bones found, looking for portal...')
repeat
if FindObjEx(X, Y, ['orta', 'nte'], [12010639, 11480961, 6953555, 5375801], 13, 50, MSX1, MSY1, MSX2, MSY2) and not FindObjEx(X, Y, ['arroc', 'alado', 'haryrl', 'umbridg'], [12010639, 11480961, 6953555, 5375801], 13, 50, MSX1, MSY1, MSX2, MSY2) THEN
begin
writeln('Portal found, moving to portal...')
Portal := true
Mouse(X, Y, 5, 5, 1);
wait(5000+random(1000))
bank;
end else
begin
writeln('Portal not found, rotating...')
Portal := false
SetAngle(SRL_ANGLE_LOW);
wait(500+random(200))
makecompass(randomrange(0, 360))
wait(600+random(200))
end;
until(Portal = true);
end else
begin
writeln('Looking for bones in inventory...')
if FindObjEx(X, Y, ['ur', 'one'], [bonecolor, bonecolor2, bonecolor3], 5, 50, MIX1, MIY1, MIX2, MIY2) THEN
begin
writeln('Bones found! Looking for altar...')
Mouse(X, Y, 5, 5, 0);
wait(100+ random(50))
ChooseOptionMulti(['Use']);
wait(100+ random(50))
Altar;
end;
end;
end;
end;
begin
disguise('Gilded Altar')
SetupSRL();
ActivateClient;
WriteLn('Starting...')
SelectWorld(330)
DeclarePlayers;
SRL_CombatRandoms := False;
repeat
if (not LoggedIn) then
begin
LogInPlayer;
setrun(true)
MouseSpeed := 25;
MakeCompass('N')
SetAngle(SRL_ANGLE_HIGH);
gametab(tab_Inv)
wait(1500+random(500))
writeln('Ready!')
end;
if (LoggedIn) then
begin
start;
end;
until(false);
end.