SRL Archive - First Scripts

Dirty Kebab Buyer


Invalid

2012-03-19 15:49:57

Hi.
I started this script a while back. Myself & a guy named Sirenia have been working on it, he has helped me quite a bit (Thanks man).

To test the script you will need 28+Gp on you and have your PIN already activated.

What does it do?
It buys Kebabs from Karim in Al-Kharid and then banks them!


[ATTACH]14876[/ATTACH]

Nebula

2012-03-19 16:34:34

Looks nice for a first script :)

Your standards are pretty good too.

J J

2012-03-21 17:26:15

Looks good, but you might want to add some regularity to your scripts. Some times you have things like
if FindNPCChatText('kebab', nothing)then
And some times you have it like this;
if FindNPCChatText('please', nothing) then
So you might want to add a space to the first example.

Also for this part
if FindColorTolerance(X, Y,14340569,MSX1, MSY1, MSX2, MSY2, 2)then
–>
if FindColorTolerance(X, Y, 14340569, MSX1, MSY1, MSX2, MSY2, 2) then

It's always good to start off with getting all the standards 100% right :) Atleast, that's what I did and it's easy to find specific parts in my scripts now :P

Overall it looks pretty good!
Oh yeah, you might want to look into using Cases. It's something that I enjoy doing to add randomness.

An example from one of my scripts. This withdraw the required items on a couple different ways to add extra randomness and to look more like a human that switches things up sometimes!

case random(36) of
0..9: begin;
Withdraw(2, 0, 5);
Withdraw(2, 0, 9);
Withdraw(3, 0, 5);
Withdraw(3, 0, 9);
end;

10..19: begin;
Withdraw(2, 0, 9);
Withdraw(2, 0, 5);
Withdraw(3, 0, 9);
Withdraw(3, 0, 5);
end;

20..23: begin;
Withdraw(3, 0, 5);
Withdraw(3, 0, 9);
Withdraw(2, 0, 5);
Withdraw(2, 0, 9);
end;

24..27: begin;
Withdraw(3, 0, 9);
Withdraw(3, 0, 5);
Withdraw(2, 0, 9);
Withdraw(2, 0, 5);
end;

28..29: begin;
Withdraw(2, 0, 9);
Withdraw(2, 0, 5);
Withdraw(3, 0, 5);
Withdraw(3, 0, 9);
end;

30..31: begin;
Withdraw(3, 0, 9);
Withdraw(3, 0, 5);
Withdraw(2, 0, 5);
Withdraw(2, 0, 9);
end;

32: begin;
Withdraw(3, 0, 9);
Withdraw(2, 0, 5);
Withdraw(3, 0, 5);
Withdraw(2, 0, 9);
end;

33: begin;
Withdraw(3, 0, 5);
Withdraw(2, 0, 9);
Withdraw(3, 0, 9);
Withdraw(2, 0, 5);
end;

34: begin;
Withdraw(3, 0, 5);
Withdraw(2, 0, 9);
Withdraw(3, 0, 5);
Withdraw(2, 0, 5);
end;

35: begin;
Withdraw(3, 0, 9);
Withdraw(2, 0, 9);
Withdraw(3, 0, 5);
Withdraw(2, 0, 5);
end;

36: begin;
Withdraw(3, 0, 5);
Withdraw(2, 0, 5);
Withdraw(3, 0, 9);
Withdraw(2, 0, 9);
end;
end;
I'm currently trying to figure out how to shorten this code and how to let Simba calculate all the possibilities. I can probably achieve that by using multiple arrays or something, but that's another story.

Good luck!

Invalid

2012-03-23 06:59:46

From: RuneScapeJJ
I'm currently trying to figure out how to shorten this code and how to let Simba calculate all the possibilities. I can probably achieve that by using multiple arrays or something, but that's another story.

Good luck!


Thanks for your feedback. ;)

krushsawa

2012-03-24 12:22:32

I shall give this a test =] thankyou very much for making this script !! =]

rotchy1

2012-03-24 14:27:49

giving it a shot now

krushsawa

2012-03-24 15:50:20

seems to work fine , ran for 2 hours flawlessly… forgot i was doing it on a new account that has the trade limit fml lol ! =]

C3NTRIX

2012-03-24 16:36:25

Always stops at the bank for me… HMm

Invalid

2012-03-27 09:48:30

From: krushsawa
seems to work fine , ran for 2 hours flawlessly… forgot i was doing it on a new account that has the trade limit fml lol ! =]


Wow, that's GREAT! 2hours is awesome. ^-^