Ryutoh
2013-06-02 04:06:28
How Long have You Played Runescape?
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, PHP
Are you a member of any other communities?
rune-server
Tell us about yourself…
Please show us one (or multiple) of your scripts.
Fighter:
Simple cooker:
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, PHP
Are you a member of any other communities?
rune-server
Tell us about yourself…
From: Ryutoh
College student in computer system technologies.
Enjoy playing RS on the side and recently started to make some bots using simba for fun. ;)
Previous owner of a large RSPS called OverloadX, and now an admin of RoatPkz (based off my original server).
http://www.rune-server.org/runescape-development/rs2-server/downloads/285639-pi-overloadx-317-a.html
http://www.roatpkz.com/home/
Other than that, not much else to mention that's relevant.
Please show us one (or multiple) of your scripts.
Fighter:
// //
// *-- Script by: Ryutoh --* //
// *-- 5/24/2013 --* //
// *-- Barrows Fighter V1 --* //
// //
program barrowsfighter;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$i SRL-OSR\SRL\misc\SmartGraphics.simba}
//Please fill in the configuration below.
//*I also recommend that you kill the barrows brothers before starting
const
//Email or Username
username = '';
//Password
password = '';
//HP to eat food at
hpToEat = 60;
//Teleport out when out of food or if hp drops too low? (Use any teletab)
teleportOut = 'false'; //(True/False)
//HP to teleport out at if almost dead?
hpToTeleAt = 15;
//Avalible pre-set food types: trout, salmon, tuna, lobster, monkfish, shark.
foodName = 'shark'; //*Recommend monkfish or sharks.
//1 top left box, 2 top right, 3 bottom left, 4 bottom right
trainingmode = 2;
//Spec weapons avalible: excalibur, dba(dragon battle axe)
specWeapon = 'excalibur'; //Leave empty if none
//If you're using spec, fill in main weapon info
mainWeaponName = 'cimitar'; //Use short part of weapon name
mainWepColor1 = 858228; //Color info
mainWepColor2 = 858748;
//Only right click monsters? Might prevent misclicks of opening doors
//but averages about 3 - 5k less exp/hour
rightClickOnly = 'false'; //(True/False)
//How fast to move the mouse?
customMouseSpeed = 16; //1-10 slow, 11-20 med, 20+ very fast
//Use a faster but less accurate method of fighting?
//Can improve exp rates by about 3 - 5k exp/hour
//(Works best with fast attacking weapons)
newFightMethod = 'true'; //(True/False)
//////////////////////////////////////////////////////////////////
var
X, Y, T, Clicked, teletab, skillwindow, changeSpecTime, blueHitSplat, redHitSplat, dbaDTM, KC, KillsPerHour, TimeGone, lost, totalExp, hitcount, counter, excalDTM : integer;
detectHitSplat : boolean;
npcToKill : string;
procedure declarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := username;
Pass := password;
Active := True;
end;
end;
procedure proggy;
begin
if not (KC < 1) then
begin
SMART_ClearCanvas;
TimeGone := GetTimeRunning / 1000;
KillsPerHour := 3600 * KC / TimeGone;
SMART_DrawText(8, 23, LoginChars, 'Barrows Fighter by Ryutoh', clwhite);
SMART_DrawText(8, 40, UpChars07, 'Kills per hour around:', clwhite);
SMART_DrawText(154, 40, UpChars07, '' + IntToStr(KillsPerHour) + ', or ' + IntToStr(KillsPerHour * 180) +' experience/hr', clyellow);
if (specWeapon = 'excalibur') or (specWeapon = 'dba') then
begin
SMART_DrawText(8, 54, UpChars07, 'Spec timer: ', clwhite);
SMART_DrawText(87, 54, UpChars07, '' + inttostr(TimeFromMark(T) / 1000) + ' / ' + IntToStr(changeSpecTime / 1000) + ' seconds.', clyellow);
end
end else
exit;
end;
procedure findMonster;
begin
writeln('Monsters lost, looking around.');
if lost > 10 then
begin
sleep(7000 + random(4000));
logout;
if (LoggedIn) then
begin
RunAway('e', True, 2, 3000);
sleep(3000 + random(1000))
logout;
end;
writeln('Unable to find monsters after 10 tries, logging out.');
writeln('Ran for: ' + TimeRunning);
totalExp := KC * 180;
writeln('Killcount: ' + IntToStr(KC) + ', thats ' + IntToStr(totalExp) + ' experience!');
terminatescript;
end else
begin
writeln('No monsters found, spinning.');
SetAngle(SRL_ANGLE_HIGH);
makecompass(randomrange(0, 360))
wait(200 + random(300))
Inc(lost)
end;
end;
procedure spec;
begin
if (specWeapon = 'excalibur') or (specWeapon = 'dba') then
begin
excalDTM := DTMFromString('mWAAAAHicY2FgYEhlYmDIB+JsIM4B4k9AsUdA/ACIHzOAACMc9zY3MyADLhRZCAYBAKQ4BvM=');
dbaDTM := DTMFromString('mggAAAHicY2NgYFADYikglgRiHiAWA2IZIE4C4kAgdgPiICAOBmJfBhBgxMAFEjwMXEAWOpbEqhqCIQAAKTMDcw==');
if (TimeFromMark(T) >= changeSpecTime) then
begin
gametab(tab_inv)
writeln('Time for spec!')
case (specWeapon) of
'excalibur':
if FindDTM(excalDTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MarkTime(T)
Mouse(X + random(2), Y + random(2), 2, 2, 1);
wait(500 + random(300))
end;
'dba':
if FindDTM(dbaDTM, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MarkTime(T)
Mouse(X + random(2), Y + random(2), 2, 2, 1);
wait(500 + random(300))
end;
end;
gametab(tab_Combat)
wait(300)
if FindColorTolerance(X, Y, 4229183, 700, 417, 712, 427, 20) then
begin
wait(100)
Mouse(647 + random(2), 423 + random(2), 2, 2, 1);
wait(200 + random(100))
changeSpecTime := 340000 + random(40000);
end else
begin
writeln('Not ready for spec yet, waiting longer.')
changeSpecTime := 60000;
end;
gametab(tab_inv)
wait(500)
if FindObjEx(X, Y, ['ield', mainWeaponName], [mainWepColor1, mainWepColor2], 12, 50, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Wielding main weapon back.')
Mouse(X + random(2), Y + random(2), 2, 2, 1);
end else
begin
writeln('Something is wrong with main weapon color or name.')
writeln('Please fix this, or dont use spec.')
sleep(15000)
terminatescript;
end
end;
FreeDTM(excalDTM)
FreeDTM(dbaDTM)
end
end;
Function attackLeft : boolean;
var
MonsterTPA, GreenHpTPA : TPointArray;
MonsterATPA : T2DPointArray;
MonsterBox : TBox;
r, i : integer;
begin
case (npcToKill) of
'bloodworms':
begin
if not FindObjEx(X, Y, ['ttak', 'loodwor'], [1000804, 4103847, 674403, 1206922, 1144980, 1596800], 12, 50, MSX1, MSY1, MSX2, MSY2) then
begin
findMonster;
exit;
end
end;
'rats': //Not done yet
begin
if FindColorsTolerance(MonsterTPA, 7178348, MSX1, MSY1, MSX2, MSY2, 10) then
begin
MonsterATPA := SplitTPAEx(MonsterTPA, 10, 10);
SortATPASize(MonsterATPA, True);
for i := 0 to high(MonsterATPA) do
begin
MonsterBox := GetTPABounds(MonsterATPA[i]);
if not FindColor(X, Y, 255, MonsterTPA[i].x-12, MonsterTPA[i].y-17, MonsterTPA[i].x+12, MonsterTPA[i].y+17) or not FindColor(X, Y, 65280, MonsterTPA[i].x-12, MonsterTPA[i].y-17, MonsterTPA[i].x+12, MonsterTPA[i].y+17) THEN
writeln('hp box not found');
if i = high(MonsterATPA) then
begin
writeln('None found');
end;
end;
r := random(length(MonsterTPA));
end else
begin
findMonster;
exit;
end
end;
'skeletons':
begin
end;
end;
Clicked := DTMFromString('mWAAAAHicY2FgYNBhZGAwhWIQ+xgDBJ+H4v9oGB0womEQAAC5ewf1');
writeln('Monster found at: ' + IntToStr(x) + ', ' + IntToStr(y));
if not IsUpText('oor') then
begin
ClickMouse(X, Y, mouse_left);
wait(50);
if FindDTM(Clicked, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
makecompass(randomrange(0, 360))
wait(2500 + random(1050))
Inc(KC)
lost := 0;
FreeDTM(Clicked);
end else
begin
writeln('Miss clicked, attempting to click again.');
wait(250 + random(50))
FreeDTM(Clicked);
attackLeft;
end;
end else
attackLeft;
end;
procedure attackRight;
begin
case (npcToKill) of
'bloodworms':
begin
if not FindObjEx(X, Y, ['ttak', 'loodwor'], [1000804, 4103847, 674403, 1206922, 1144980, 1596800], 12, 50, MSX1, MSY1, MSX2, MSY2) then
begin
findMonster;
exit;
end;
end;
'rats':
begin
if not FindObjEx(X, Y, ['ttak', 'iant', 'rypt', 'at'], [8358276, 6975078, 8358271, 6058844, 7244398, 6190685, 7371120, 9278344, 5136973, 4738632], 3, 50, MSX1, MSY1, MSX2, MSY2) then
begin
findMonster;
exit;
end;
end;
'skeletons':
begin
end;
end;
ClickMouse(X, Y, mouse_right);
wait(200+random(100));
if ChooseOptionMulti(['tta']) then
begin
ChooseOptionMulti(['tta']);
makecompass(randomrange(0, 360))
wait(2500 + random(1050))
Inc(KC)
lost := 0;
end else
begin
writeln('Miss clicked, attempting to click again.');
attackRight;
end
end;
procedure attackMonster;
begin
if not LoggedIn then LoginPlayer;
if (rightClickOnly = 'true') then
begin
attackRight;
end else
begin
case random(5) of
0..3 : begin attackLeft; end;
4 : begin attackLeft; end; //right
end
end
end;
procedure antiBan;
begin
case random(160) of
0..20: begin hoverskill(skill_strength, false) sleep(random(300)) end;
21..30: begin hoverskill(skill_hitpoints, false) sleep(random(300)) end;
31..40: begin hoverskill(skill_attack, false) sleep(random(300)) end;
41..50: begin hoverskill(skill_defence, false) sleep(random(300)) end;
51..53: begin hoverskill(skill_range, false) sleep(random(300)) end;
54..56: begin hoverskill(skill_prayer, false) sleep(random(300)) end;
57: begin hoverskill(skill_slayer, false) sleep(random(300)) end;
58: begin hoverskill(skill_woodcutting, false) sleep(random(300)) end;
59: begin hoverskill(skill_cooking, false) sleep(random(300)) end;
60: begin hoverskill(skill_fishing, false) sleep(random(300)) end;
61: begin hoverskill(skill_firemaking, false) sleep(random(300)) end;
62: begin hoverskill(skill_mining, false) sleep(random(300)) end;
63..65: begin HoverOnlineFriend; sleep(100 + random(100)) end;
66:
begin
case random(3) of
1:
begin
writeln('Taking short 20 - 50 second break.');
wait(20000 + random(30000))
end;
end
end;
//67: begin adjustmousespeed(2, 10, 20) sleep(random(300)) end;
67..69: begin randomRClick; sleep(random(300)) end;
70..71: begin hovermovingobject; sleep(random(300)) end;
72..75: begin MMouseOffClient('top'); sleep(random(300)) end;
76..79: begin MMouseOffClient('left'); sleep(random(300)) end;
80..83: begin MMouseOffClient('right'); sleep(random(300)) end;
84..87:begin MMouseOffClient('bottom'); sleep(random(300)) end;
88..89:
begin
if FindObjEx(X, Y, ['ttak', 'loodwor'], [1000804, 4103847, 674403, 1206922, 1144980, 1596800], 8, 50, MSX1, MSY1, MSX2, MSY2) then
Mouse(X, Y, 5, 5, 0);
wait(500 + random(500))
ChooseOptionMulti(['xamine']);
sleep(random(100))
end;
90..100: begin RandomTab(True); makecompass(randomrange(0, 360)) wait(500 + random(300)) end;
101..110: begin RandomMovement; sleep(random(500)) end;
111..145: begin makecompass(randomrange(0, 360)) wait(300 + random(100)) end;
146..147: begin BoredHuman; end;
148: begin ExamineInv; end;
149: begin RandomFKeys(True); end;
150: begin DragRandomInvSlot; end;
151..160: begin makecompass(randomrange(0, 360)) wait(300 + random(300)) end;
end
end;
procedure terminate(logoutMessage:string);
begin
if (logoutMessage = 'food') then
begin
writeln('No food found, attempting to logout.');
end
else if (logoutMessage = 'teletab') then
begin
writeln('Low hp found, attempting to logout.');
end;
sleep(7000 + random(4000))
logout;
if (LoggedIn) then
begin
RunAway('e', True, 2, 3000);
sleep(3000 + random(1000))
logout;
end;
writeln('Ran for: ' + TimeRunning);
totalExp := KC * 180;
writeln('Killcount: ' + IntToStr(KC) + ', thats ' + IntToStr(totalExp) + ' experience!');
terminatescript;
end;
procedure teleport;
begin
gametab(tab_inv)
wait(300 + random (200))
if gametab(tab_inv) then
begin
teletab := DTMFromString('mlwAAAHicY2dgYLBnYmDwA+IAKO0IxGZAbArE14Hyt4D4CRB/AOJPUPopAwgw4sG4ARG6AKj+CEc=');
if FindDTM(teletab, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Teleporting.');
MouseBox(X, Y, X, Y, mouse_right);
if ChooseOptionMulti(['rea']) then
begin
ChooseOptionMulti(['rea'])
wait(500)
FreeDTM(teletab);
end else
FreeDTM(teletab);
teleport;
end else
writeln('No teletab found.');
end
end;
procedure checkHealth;
begin
if GetSkillInfo('hitpoints', true) <= hpToTeleAt then
begin
if (teleportOut = 'true') then
begin
teleport;
terminate('teletab')
end
end;
if GetSkillInfo('hitpoints', true) > hpToEat then
begin
case random(6) of
0:
begin
writeln('Random antiban.');
antiBan;
end;
end
end else
begin
gametab(tab_inv)
wait(300 + random (200))
if gametab(tab_inv) then
begin
case (foodName) of
'trout':
if FindObjEx(X, Y, ['at', 'rout'], [7304076, 8949164, 5593195], 10, 50, MIX1, MIY1, MIX2, MIY2) THEN
begin
writeln('Eatting trout.');
MouseBox(X + 3, Y + 3, X + 3, Y + 3, mouse_left);
sleep(2000 + random(500))
end else
begin
if (teleportOut = 'true') then
begin
teleport;
end;
terminate('food');
end;
'salmon':
if FindObjEx(X, Y, ['at', 'almon'], [1459962, 6912203, 864166], 10, 50, MIX1, MIY1, MIX2, MIY2) THEN
begin
writeln('Eatting salmon.');
MouseBox(X + 3, Y + 3, X + 3, Y + 3, mouse_left);
sleep(2000 + random(500))
end else
begin
if (teleportOut = 'true') then
begin
teleport;
end;
terminate('food');
end;
'tuna':
if FindObjEx(X, Y, ['at', 'una'], [7238282, 8686246, 5527401], 10, 50, MIX1, MIY1, MIX2, MIY2) THEN
begin
writeln('Eatting tuna.');
MouseBox(X + 3, Y + 3, X + 3, Y + 3, mouse_left);
sleep(2000 + random(500))
end else
begin
if (teleportOut = 'true') then
begin
teleport;
end;
terminate('food');
end;
'lobster':
if FindObjEx(X, Y, ['at', 'obster'], [1664960, 1467065, 1200019], 10, 50, MIX1, MIY1, MIX2, MIY2) THEN
begin
writeln('Eatting lobster.');
MouseBox(X + 3, Y + 3, X + 3, Y + 3, mouse_left);
sleep(2000 + random(500))
end else
begin
if (teleportOut = 'true') then
begin
teleport;
end;
terminate('food');
end;
'monkfish':
if FindObjEx(X, Y, ['at', 'onkfish'], [4478822, 2436663, 3293259], 10, 50, MIX1, MIY1, MIX2, MIY2) THEN
begin
writeln('Eatting monkfish.');
MouseBox(X + 3, Y + 3, X + 3, Y + 3, mouse_left);
sleep(2000 + random(500))
end else
begin
if (teleportOut = 'true') then
begin
teleport;
end;
terminate('food');
end;
'shark':
if FindObjEx(X, Y, ['at', 'hark'], [5860483, 7375014, 6584980], 10, 50, MIX1, MIY1, MIX2, MIY2) THEN
begin
writeln('Eatting shark.');
MouseBox(X + 3, Y + 3, X + 3, Y + 3, mouse_left);
sleep(2000 + random(500))
end else
begin
if (teleportOut = 'true') then
begin
teleport;
end;
terminate('food');
end;
end;
end;
end;
end;
procedure isInCombat;
begin
if newFightMethod = ('true') then
begin
repeat
blueHitSplat := DTMFromString('mQwAAAHicY2ZgYOBkZGBgAeL/QPZuID4JxHuAmJm1FI6RASMSBgIA1cUEzA==');
redHitSplat := DTMFromString('mQwAAAHicY2ZgYPgIxC+A+B0QrwHidUC8C4izGRnhGBkwImEgAAAzRQYp');
if FindDTM(blueHitSplat, X, Y, 179, 126, 345, 255) or FindDTM(redHitSplat, X, Y, 179, 126, 345, 255) THEN
begin
Inc(hitcount)
Inc(counter)
//writeln('combat: true '+inttostr(counter)+'');//checking for combat
detectHitSplat := true;
wait(200)
FreeDTM(blueHitSplat)
FreeDTM(redHitSplat)
end else
begin
Inc(hitcount)
Dec(counter)
wait(200)
//writeln('combat: false '+inttostr(counter)+'');//checking for combat
FreeDTM(blueHitSplat)
FreeDTM(redHitSplat)
end;
until(hitcount = 4)
if not (counter <= -1) then
begin
proggy;
checkHealth;
wait(700 + random(300))
end else if (counter <= -1) then
begin
attackmonster;
end;
detectHitSplat := false;
hitcount := 0;
counter := 0;
end else
if FindColor(X, Y, 255, 213, 117, 305, 185) or FindColor(X, Y, 65280, 213, 117, 305, 185) THEN
begin
proggy;
checkHealth;
wait(1200 + random(500))
end else
begin
attackmonster;
end;
end;
procedure failsafes;
begin
skillwindow := DTMFromString('mWAAAAHicY2FgYHjByMDwF4pBbG6gmDwDgn6wowoFowNGNAwCALUWDHM=');
if FindDTM(skillwindow, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
writeln('Skill window found open, attempting to close.');
MouseBox(X + 3, Y + 3, X + 3, Y + 3, mouse_left);
FreeDTM(skillwindow)
end;
FreeDTM(skillwindow)
end;
begin
declarePlayers;
SetupSRL();
ActivateClient;
writeln('Barrows Fighter by Ryutoh')
writeln('Currently V1, please report bugs and errors on forum.')
MarkTime(T)
changeSpecTime := 1;
npcToKill := 'bloodworms'; //Still not complete, keep as bloodworms
repeat
if (not LoggedIn) then
begin
writeln('Logging player in.');
LogInPlayer;
setangle(0)
setrun(true)
setfightmode(trainingmode)
gametab(tab_stats)
writeln('Starting.');
MouseSpeed := customMouseSpeed;
end;
if (LoggedIn) then
begin
failsafes;
spec;
isInCombat;
end;
until(false)
end.
Simple cooker:
program roguecook;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.simba}
{$I SRL-OSR/SRL/Misc/SmartGraphics.Simba}
const
Username = '';
Pass = '';
Nick = '';
Pin = '';
FoodType = 'lobster'; //Only lobster, add your own if you want more
var
X, Y, T, rawLobster, bankOpen, levelUpInterface, expAmount, InvPerHour, TimeGone, InventoryCooked, foodColor1, foodColor2, levelsGained, foodSlot, orgiHP, hpcounter : integer;
foundFood : boolean;
foodName : string;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := Username;
Players[0].Pass := Pass;
Players[0].Nick := Nick;
Players[0].Pin := Pin;
Players[0].LampSkill:= skill_cooking;
Players[0].Active := True;
end;
procedure dtms;
begin
bankOpen := DTMFromString('mlwAAAHicY2dgYBAA4u+MEAxi7wbiK0DMBeRLMECwByMEqzIgMB8fDwr+P0MejvEBRjwYCgAUAQqs');
end;
procedure proggy;
begin
SMART_ClearCanvas;
if not (InventoryCooked < 1) then
begin
TimeGone := GetTimeRunning / 1000;
InvPerHour := 3600 * InventoryCooked / TimeGone;
end else
begin
InvPerHour := 0;
end;
SMART_DrawText(8, 23, LoginChars, 'Cooker by Ryutoh', clwhite);
SMART_DrawText(8, 40, UpChars07, 'Levels: ', clwhite);
SMART_DrawText(58, 40, UpChars07, '' + IntToStr(levelsGained) + '', clyellow);
SMART_DrawText(8, 54, UpChars07, 'Inventories: ', clwhite);
SMART_DrawText(94, 54, UpChars07, '' + IntToStr(InventoryCooked) + '', clyellow);
SMART_DrawText(8, 68, UpChars07, 'Inventories/hr: ', clwhite);
SMART_DrawText(113, 68, UpChars07, '' + IntToStr(InvPerHour) + ', or ' + IntToStr(InvPerHour * 28 * expAmount) +' experience/hr', clyellow);
end;
procedure antiBan;
begin
case random(200) of
1..66: begin hoverskill(skill_cooking, false) sleep(3000 + random(1500)) end;
67..70: begin hoverskill(skill_fishing, false) sleep(3000 + random(1500)) end;
71..73: begin HoverOnlineFriend; end;
74:
begin
case random(2) of
0:
begin
writeln('Taking short 20 - 30 second break.');
wait(20000 + random(10000))
end;
end
end;
75..77: begin adjustmousespeed(2, 10, 20) end;
78..80: begin randomRClick; end;
81..100: begin MMouseOffClient('top'); end;
101..120: begin MMouseOffClient('left'); end;
121..140: begin MMouseOffClient('right'); end;
141..160:begin MMouseOffClient('bottom'); end;
161: begin RandomTab(True); makecompass(randomrange(0, 360)) wait(500 + random(300)) end;
162..165: begin RandomMovement; end;
166: begin BoredHuman; end;
167..169: begin ExamineInv; end;
170: begin RandomFKeys(True); end;
171..200: begin makecompass(randomrange(0, 360)) wait(300 + random(500)) end;
end
end;
procedure food; //food types
begin
case (FoodType) of
'lobster':
begin
foodName := 'obster';
foodColor1 := 1851762;
foodColor2 := 1719403;
expAmount := 120;
rawLobster := DTMFromString('mWAAAAHicY2FgYChjYmAoBeIUIM4D4mtAsZdA/BCKGRgY4bjEWY4BGXChyEIwCAAAh54GMQ==');
if FindDTM(rawLobster, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
foundFood := true;
//writeln('Food: true');
end else
begin
foundFood := false;
//writeln('Food: false');
end;
FreeDTM(rawLobster)
end;
'shark':
begin
//add any other fish using the above as an example
end;
end;
end;
procedure cook;
begin
gametab(tab_inv)
wait(300 + random (200))
if gametab(tab_inv) then
begin
case random(3) of
0..1 :
begin
if FindObjEx(X, Y, [foodName], [foodColor1, foodColor2], 5, 50, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(X, Y, 5, 5, mouse_left);
Wait(100 + random(50));
end else
begin
writeln('Food name or color wrong.');
exit;
end;
end;
2 :
begin
if FindObjEx(X, Y, [foodName], [foodColor1, foodColor2], 5, 50, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(X, Y, 5, 5, mouse_right);
Wait(100 + random(50));
end else
begin
writeln('Food name or color wrong.');
exit;
end;
if ChooseOptionMulti(['se']) then
begin
ChooseOptionMulti(['se'])
wait(100 + random(50))
end else
cook;
end;
end;
if not FindObjCustom(X, Y, ['Use'], [2327454, 3052477, 3781862], 5) then
begin
cook;
end else
begin
writeln('Fire found.');
ClickMouse2(mouse_right);
wait(50 + random(50));
if not ChooseOptionMulti(['ire']) then
begin
cook;
end else
begin
ChooseOptionMulti(['ire']);
wait(100 + random(50))
MMouse(250, 405, 5, 5);
FindNormalRandoms;
if FindNormalRandoms = true then
cook;
if not WaitUpTextMulti(['ook', 'tion', 'ore'], 8000) = true then
cook;
FindNormalRandoms;
if FindNormalRandoms = true then
cook;
ClickMouse2(mouse_right)
ChooseOption('All');
Marktime(T)
repeat //Main cooking process
Inc(hpcounter);
if hpcounter = 50 then
begin
hpcounter := 0;
orgiHP := GetSkillInfo('hitpoints', true);
if (GetSkillInfo('hitpoints', true) < orgiHP) then
begin
WriteLn('Hp went down! Run!')
RunAway('E', true, 1, 5000 + random(1000))
end else
begin
writeLn('Hp is good.')
end;
end;
if not(gametab(tab_inv)) then
begin
gametab(tab_inv)
wait(500)
end;
food;
FindNormalRandoms;
if FindNormalRandoms = true then
foundFood := false;
proggy;
case random(40) of
0 :
begin
writeln('Random Antiban.');
antiban;
end;
end;
levelUpInterface := DTMFromString('m6wAAAHic42ZgYMgB4kwoXQLFy6H4EBDfBOIvQJzIyMBQA8T1QNwGxI1QugaJ3wzFDUAMJEnAxANGEjASAACGbhGb');
if FindDTM(levelUpInterface, X, Y, 0, 0, 764, 502) then //checks if leveled
begin
writeln('Level up!');
MouseBox(300 + random(5), 451, 300 + random(5), 451, mouse_left);
foundFood := false;
Inc(levelsGained);
wait(500)
end;
FreeDTM(levelUpInterface);
if (TimeFromMark(T) >= 80000) then
begin
writeln('Restarting cooking.');
foundFood := false;
wait(500)
end;
wait(200 + random(100))
until(foundFood = false)
Inc(InventoryCooked)
end
end
end;
end;
procedure bank;
begin
if FindObjCustom(X, Y, ['alk-to', 'merald'], [2114121, 595995], 5) then
begin
MouseBox(X + 3, Y + 3, X + 3, Y + 3, mouse_right);
wait(100 + random(100))
if ChooseOptionMulti(['ank']) then
begin
ChooseOptionMulti(['ank'])
wait(1000 + random(500))
end else
bank;
end;
if(PinScreen) then
begin
InPin(Players[0].Pin);
if PinPending then
begin
ConfirmPin();
wait(1000 + random(300))
end
end;
end;
procedure withdrawFood;
begin
if FindDTM(bankOpen, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
if WithdrawItemEx(foodColor1, 'color', foodSlot, 28, 'aw', [3]) then
begin
wait(300+random(100))
CloseBank;
end else
begin
writeln('Out of food.');
CloseBank;
wait(500)
logout;
wait(500)
if (LoggedIn) then
begin
sleep(5000 + random(1000))
logout;
end;
writeln('Inventories: ' + IntToStr(InventoryCooked));
writeln('Levels: ' + IntToStr(levelsGained));
terminatescript;
end
end else
begin
bank;
withdrawFood;
end
end;
procedure depositItems;
begin
bank;
if FindDTM(bankOpen, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
writeln('Bank found.');
DepositAll;
end else
begin
depositItems;
end;
end;
procedure startLoop;
begin
if not LoggedIn then LoginPlayer;
SMART_ClearCanvas;
food;
dtms;
if not (foundFood = true) then
begin
writeln('No raw food found.');
if (InvCount > 0) then
begin
writeln('Banking any items.');
depositItems;
end;
withdrawFood;
food;
end else if (foundFood = true) then
begin
writeln('Raw food found.');
cook;
end;
FreeDTM(bankOpen)
end;
begin
declarePlayers;
SetupSRL();
ActivateClient;
writeln('Time to cook!')
repeat
if (not LoggedIn) then
begin
writeln('Logging player in.');
LoginPlayer;
setangle(0)
setrun(true)
writeln('Starting.');
end;
if (LoggedIn) then
begin
startLoop;
end;
until(false)
end.