SRL Archive - RS3 Outdated / Broken Scripts

[SRL] AutoKebabber - by The Claw


The Claw

2007-05-06 08:36:30

Welcome to my AutoKebabber! Current Version: 0.03

Basically, what this script does is buy a load of kebabs from the seller in Al-Kharid, banks, and then repeats the whole process. The reason I chose Kebabs to buy is cause theyre the best F2P food imo, and the cheapest by a lot. If you didnt know, Kebabs can heal from 2 to full hp on you, and sometimes boost your attack, str and def levels temporarily. Sometimes Kebabs even damage you by 2, but very rarely. :D And Kebabs are a pain to buy legitly, theres a lot of clicking involved just to buy 1. Plus, Kebabs only cost 1gp each ;)

To run, just start in al kharid bank with about 1k gold coins in the first invent slot.

Yeh this is my first script in SCAR ever. So any feedback at all is appreciated, even if its just a "thanks". If you post proggies thats even better:)

This script is not perfect, there are a couple of things that ive known to go wrong which I will post below.

Current features:
- Multi-player
- Lots of fail safes
- Radial walking, well its only a few steps to walk anyway lol
- Anti-randoms, thanks to a procedure by WT-Fawaki
- Player switching depending on how many loads you set it to do

Known bugs:
- If the door is shut the whole script stuffs up
- It sometimes cant decide on where to click on karim, the mouse jumps between sides of him.

Changelog:
- 0.01: Basic script. Buys kebabs, and banks.
- 0.02: Better walking to Karim. Added progress report, and option of how many loads to buy before ending script. Better talking to Karim. Better banking.
- 0.03: MultiPlayer! Better walking, and more consistent bank and kebab shop finding. Lots of failsafes.

Credits:
Pentti, rkroxpunk, in_jeopardy - all three were a great help:p

so yer. Please post proggies, bugs, suggestions, improvements, comments etc…:D

The Claw

2007-05-10 05:54:21

4 views, 0 replies..:( please reply even if its with a thank you, and even better a progress report

Santa_Clause

2007-05-10 06:10:49

Thankyou For The Script 'Claw'. However…No Thanks For The Double Post…:p

P.S - I'm From Australia Too…;)

Mr.Klean

2007-05-10 08:09:13

I will try it when i get back from work tonight as i am poor when it comes to buying food.

PwNZoRNooB

2007-05-10 08:18:20

This can be too repeatitive

  MakeCompass('E')
lowestangle;

If it does that every time, it can be a bit "weird/robotic" ;)

BeaconofBacon

2007-05-10 12:27:17

For a first script, it's not bad. Keep it up.

The Claw

2007-05-11 23:43:08

thanks for all the replies :p

and PwNZoRNooB, i think you might be right. do you know of any other way to do it differently?

PwNZoRNooB

2007-05-13 15:58:17

Just try to use OpenBankSilent or something like that :D

Ps. Is it ok with you if Id make a kebab buyer too?
As for practice.

The Claw

2007-05-14 07:50:14

yeh go for it. if you want to take any of my code thats cool, just PM me first and put me in credits please. :p

PwNZoRNooB

2007-05-14 10:43:37

From: The Claw
yeh go for it. if you want to take any of my code thats cool, just PM me first and put me in credits please. :p


Nah I'll do it 100% by myself because I said
As for practice.

:)

kautkto

2007-05-17 04:25:04

Hehe downloaded it. When I get time I will test it and post a proggy. Looks good though for a first script.

Ashur2Good

2007-05-25 23:12:17

Just a quick check through, and i found that you had

  if(not(LoggedIn)) then exit;
Instead of:

if (not(Loggedin)) then NextPlayer(false);

Just a quick check through, hope that helped.


-Ashur

The devil

2007-05-30 02:56:46

Hey thanks for that.

No offence but what am i gonna do with kebabs.

Ps:IM FOR AUS TOO!!!

igotgrapes

2007-05-31 02:28:36

From: The devil
Hey thanks for that.

No offence but what am i gonna do with kebabs.

Ps:IM FOR AUS TOO!!!


Jesus all of your posts seem like spam. He clearly states what you're going to do with kebabs in his first post. Learn to read.

tenzin

2007-06-30 01:37:48

weird ;o wen i start it..it says running script but it just stands there and the mouse doesnt move either got any ideas?

sum1uallno

2007-07-13 09:39:29

Havnt tryed it but i like your style. The kebabs nice.

159lloll

2007-07-28 00:24:17

it doesn't work for me. idk how to fix it:mad:

Smartzkid

2007-07-28 00:49:04

What error do you get?

What version of SCAR do you have?

Timothegreat

2007-07-28 00:58:53

ver cool script il try it soon :)

159lloll

2007-07-28 03:29:29

It says this,

Line 315: [Error] (14764:26): Unknown identifier 'CountItemColorTol' in script

And i have SCAR Divi 3.06

drnewheart

2007-08-15 15:59:58

Surprising this is your first script even though your post count is so high. Good Script :p I likey it a lot

kushal

2007-08-25 05:00:10

update it for SRL 4 please, and if it is, i get this error

Line 129: [Error] (12360:17): Unknown identifier 'x' in script C:\Documents and Settings\kushal\Desktop\ \AutoKebabber v0.03 - The Claw.scar

if it isnt updated, ive really wanted to try this, please update. Thanks.

ShowerThoughts

2007-08-25 05:15:32

look nice the claw

neG

2007-10-02 21:07:25

Updated for SRL4 here.
//----------------
// Welcome to AutoKebabber v0.03, by The Claw!
//
// Support: [url]http://www.villavu.com/forum/showthread.php?t=9678[/url]
// [url]http://www.rs-resources.com/mxvfh/viewtopic.php?f=17&t=5483[/url]
//
// If you use this script, please take the time to post a proggy or some comments
// on either of the two topics above. Thanks :)
//----------------

program KebabBuyer;
{.include SRL\SRL.scar}

var
x, y, cx, cy, zx, zy, bx, by, bkx, bky: Integer; //variables for the mouse to move to.
KebabCount: Integer; //how many kebabs bought
BankCount: Integer; //how many times banked, shown in proggy
LoadsNumb: Integer; //how many times banked, used for switching players
KebabSign: Integer; //kebabsign bmp
InStore: Boolean; //if in store or not
InBank: Boolean; //if in bank or not
S: Integer; //number of times to search for Karim before giving up

const
Loads = 5; //set this for the number of loads to buy.
Karim = 7159399; //colour of Karim's purple shirt
Talk = 65278; //colour of the Talk-to when you right click Karim
KebabColour = 1410574; //colour of green part of a kebab in inventory
BankColour = 5034473; //colour of the bank symbol, the yellow bit
SandColour = 5876155; //colour of the sand on the minimap
BankFloor = 4550516; //colour of the bank floor on minimap

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '----';
Players[0].Pass := '----';
Players[0].Nick := 'iti';
Players[0].Active := True;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;

procedure LoadBmps;
begin
KebabSign := BitmapFromString(5, 3, '00000000FF0011FF0161FF' +
'2E00FF00000000000000000000F52825000000000000119201F52' +
'825F52825000000');
end;

procedure FreeBmps;
begin
FreeBitmap(KebabSign);
end;

/// Finding Randoms \\\
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;

procedure FindRandoms;
begin
FindFastRandoms;
end;

procedure Login;
begin
if(not(LoggedIn)) then
LoginPlayer;
end;

//// Walking from Bank to the store \\\\
procedure StoreWalk;
begin
if(not(LoggedIn)) then exit;
InBank := True;
Instore := false;
RadialWalk(Sandcolour, 39, 13, 50, 5, 5);
Flag;
LoadBmps;
if(FindDeformed(x, y, KebabSign, 553, 6, 720, 160)) then
begin
Wait(100+random(10));
Mouse(x, y, 1, 1, true);
Writeln('Walking to Kebab Store');
Flag;
FreeBmps;
InStore := True;
InBank := False;
Writeln('We are in the store!');
end else
begin
Writeln('Store Bitmap not found...');
NextPlayer(False);
Exit;
end;
end;

//// Buying the Kebabs from Karim \\\\
procedure KarimTrade;
begin
if(not(LoggedIn)) then exit;
S:=0
if(InStore = true) then
begin
repeat
if(not(LoggedIn)) then exit;
FindRandoms; //Finding randoms
Wait(300 + random(100))
Writeln('In Store...attempting to right-click Karim');
S:=S+1;
if(FindObj(cx, cy, 'arim', Karim, 10)) then
begin
Mouse(cx, cy, 1, 1, false);
Wait(750 + random(250));
end;
if(S=50) then //change S to change number of times you look for karim
begin
Writeln('Took too long to find Karim...');
NextPlayer(False);
Exit;
end;
until(FindColorTolerance(zx, zy, Talk, 0, 0, 512, 337, 3)) or (S=50) //change S here as well
S:=0; //dont touch this S.
end;
begin
Wait(500+random(50));
ClickOption('alk',1)
Writeln('Talking to Karim');
Flag;
end;
end;

// Clicks on the text down the bottom of the screen to buy the kebabs. \\
procedure BuyKebabs;
begin
if(not(LoggedIn)) then exit;
KebabCount:=KebabCount;
ClickToContinue;
Wait(1200 + random(100));
ClickNPCChatText('Yes please.',true);
Wait(1200 + random(100));
ClickToContinue;
end;

// Deposits the kebabs into the bank. \\
procedure Depositing;
begin
if(not(LoggedIn)) then exit;
Writeln('bank opened, depositing..');
Deposit(2, 28, 2);
CloseBank;
Writeln('deposited, closing bank');
BankCount:=BankCount+1;
LoadsNumb:=LoadsNumb+1;
Writeln('Successfully banked! Starting loop all over again. ');
end;

/// Banking \\\
procedure Banking;
begin
if(not(LoggedIn)) then exit;
BankCount:=BankCount;
KebabCount:=KebabCount;
LoadsNumb:=LoadsNumb;
if(InStore = true) then
begin
FindRandoms; //Finding randoms
RadialWalk(SandColour, 178, 194, 70, 10, 10);
Writeln('Getting closer to the bank...');
Flag;
InStore := False;
end;
Writeln('finding bank symbol by symbol..');
if(FindSymbol(bx, by, 'Bank')) then
begin
Mouse(bx, by, 1, 1, true);
Flag;
InBank := True;
Writeln('in the bank');
FindRandoms; //Finding randoms
MakeCompass('E');
LowestAngle;
Writeln('opening bank');
OpenBankGlass('akb', false, false);
end else
if(FindColorTolerance(bkx, bky, BankColour, MSX1, MSY1, MSX2, MSY2, 5)) then
begin
Writeln('bank symbol not found. trying to find it by color instead');
Mouse(bkx, bky, 2, 2, true);
Flag;
InBank := True;
Writeln('in the bank');
FindRandoms; //Finding randoms
MakeCompass('E');
LowestAngle;
Writeln('opening bank');
OpenBankGlass('akb', false, false);
end;
begin
If(InBank = False) then
begin
Writeln('InBankbank symbol not found.');
NextPlayer(False);
Exit;
end;
end;
if(not(BankScreen)) then
begin
Writeln('opening bank quiet, seeing as the other bank isnt there');
OpenBankQuiet('akb');
end;
if(BankScreen) then
begin
Depositing;
end else
begin
Writeln('unable to open up the bank. logging out');
NextPlayer(False);
Exit;
end;
end;

/// Progress Report \\\
procedure ProgressReport;
begin
ClearDebug;
Writeln(' ');
Writeln(' ');
Writeln(' ');
WriteLn('<============== AutoKebbabber v0.03 =================>');
Writeln('Worked for '+ TimeRunning);
WriteLn('Banked '+IntToStr(BankCount)+' loads[s].');
WriteLn('Bought '+IntToStr(KebabCount)+' kebab[s].');
WriteLn('<============== AutoKebbabber v0.03 =================>');
end;

procedure SetupScript;
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
end;

//// Main Loop \\\\
begin;
SetupScript;
Writeln('Somebody set us up the AutoKebabber. All your Kebab are belong to us.');
Writeln('Setup to buy a total of ' + IntToStr(Loads) + ' load[s] of kebabs.');
Wait(1000 + random(300))
repeat
Login;
HighestAngle;
FindRandoms; //Finding randoms
StoreWalk;
Wait(3000 + random(121)) //waits in store for a bit, seems to reduce errors in finding karim.
repeat
KarimTrade;
Wait(1500 + random(500));
BuyKebabs;
until(InvFull);
if(InvFull) then
begin
Status('Inventory full, banking.');
KebabCount:=KebabCount + CountItemsColor('inv', KebabColour, 10);
Banking;
end;
ProgressReport;
until(LoadsNumb = Loads) or (InChat('have enough coins.'));
if(LoadsNumb = Loads) then
begin
NextPlayer(True);
LoadsNumb:=0;
Highestangle;
end;
end.

Nice script Claw :)

Dumpin

2007-10-04 09:52:43

cool, thanks!! will try it when have some time :)

The Claw

2007-10-04 10:33:06

i reccommend you dont try this script…it was the first script i ever made and tbh its really bad lol. id be suprised if it got through 1 load.

neG

2007-10-04 20:12:44

Haha it still works well man.
I had a look at it for a script im making.
It theives the warriors in Al Kharid and eats until you are outta food, then buys kebabs. Haha.