SRL Archive - First Scripts

SRL #16 pRo Pk3rz


Mark

2008-05-23 21:10:24

OK here we go this is my first script its a PK AIDER and for those who dont have a clue what that is. Its a script that will help you in performing tasks like

¤ Turn ON-OFF Various Prayers
¤ Use The Bounty Locate Spell
¤ Drink a Dose Of Your Str Pot
¤ Eat a Lobster
¤ Join Your Clan
¤ Turn ON-OFF Your Special Attack
¤ Switch Between Weapons
¤ Run BH Bank To Restock And Back (not fully working yet)

I WILL BE UPDATING THIS SCRIPT TO PERFECTION
All i Ever Do On Runescape Is Pk So All The People Like ME i Think This Would Be Very Helpful So Everyone Post Your Progs And Give Me your Views
And Go Own Some Chooobs :f:

benjaa

2008-05-23 22:32:13

Dude, awesum idea :)

Simple, yet very effective
As long as the user doesnt accidently touch the mouse while the script is doing something or course

StrikerX

2008-05-23 23:16:26

I think RM made one of these

You should also make it eat food and make it choose which prayer to use

i havent made a script in a while but the prayer thing should be easy

shrubie1

2008-05-24 00:15:46

so this script is for pking? if im wrong correct me but it seems a bit stupid to get a script to pk for you…

Sir R. M8gic1an

2008-05-24 01:54:06

From: strikerx25
I think RM made one of these

You should also make it eat food and make it choose which prayer to use

i havent made a script in a while but the prayer thing should be easy


wow, i'm surprised anyone remembers that. unfortunately it was just after the pk update. i did have quite a good private version.

not bad for a first script, i suggest you use Fkeys (F1, F2, F3) instead of ctrl and alt, in my opinion it's easier. also you should always use Mouse, i see you have a ClickMouse in there. you could use CastSpell and ClickPrayer, they're in:

srl/srl/skills/magic.scar
srl/srl/skills/prayer.scar

you could also make it eat food. and you could also have a look at my super old PK Aider, in the fighting section, probably somewhere towards the end of the page or on the next pages.

GJ!

~RM

Mark

2008-05-24 03:47:09

I actually used ClickPrayer('21'),true(false) but u have to make anouther hotkey just to turn it off. Im going to add the CastSpell to it now didnt thinks of that lol:duh: i did have a auto lobster eater in the script but im struglin on using to many hotkeys atm lol i real want to keey them all around the arrows keys coz for some reason when im pkin im alwayz twiddling with them but let me know wat you guys do and ill try make the script fit you all.
I trying to make is a drink a str pot now but im not sure which is the best and more effective way i was thinking FindObject im new to this so i dont realy know which are more effective.

please keep me posted with the ideas tho im more than happy to fit it to all your needs.

thanks

CRU1Z1N………..:(h):

Mark

2008-05-24 06:01:26

From: shrubie1
so this script is for pking? if im wrong correct me but it seems a bit stupid to get a script to pk for you…



Lol all it does is make it faster so like if u press 2 it will drink a pot faster than u prob could and then moves the mouse back to the middle of the play screen or turn ur prayer on or off spec all just by pressing 1 button :D

kor

2008-05-24 07:24:19

instead of TypeSend('put your clan name here'); you could make a const like Clan_Chat := Runescape; and have it like TypeSend(Clan_Chat); .

i think thats correct, didnt try it tho, try it out ;)

Mark

2008-05-24 07:42:42

Lol im about to post an update tell me what you think :D

Ohmygod

2008-05-24 10:05:13

I dont understand this script to be honest with you, I would much prefer to do it myself, Then u can get abit of fun out of it

kor

2008-05-24 10:15:40

wth? why is he banned ? :S anyways, good job on the update :)

Mark

2008-05-24 18:08:33

UPDATED my script peeps come get your views going please

Starblaster100

2008-05-24 18:36:49

Hey, the script is looking good! Here are some of my own pointers:

You could change the global variables x, y, xx and yy into local variables in your procedure you use them in. It will free up memory and make your script more efficient.

You use the procedure Waiting only once. Is it worth keeping it in a separate procedure?

[php]
TypeSend('put your clan name here'); //put your clan name here
[/php]

You can make this into a constant!

[php]
const
ClanName = '';

procedure …
begin
…
TypeSend(ClanName);
end;
[/php]

You use 'if then', however you should try combining 'else' into your script as it maximizes efficiency. Here is an example:

[php]
if Something then
Something2
else if SomethingElse then
SeomthingElses
else if …
[/php]

Here is some thinking for you:

[php]
if spam = 5 then
begin
prog;
spam:= 0;
wait(10000)
Cleardebug;
end;
[/php]

In your script, you have Wait(10000). What happens if I want to press a F key in this 10 second period? The script wouldn't let me. Any way of getting around this?

Other than that, well done!

Keep on scripting!

Starblaster100

Mark

2008-05-25 13:29:13

Im getting right on it finaly some1 who gives me a proper view on my script takes sometime doesn't it lol anyway thanks allot im just working on a banking procedure atm so it will run the bank deposit all with draw a pot lobs arrows ect then run back

thanks very much tho

CRU1Z1N………………


spam := spam + 1
if spam = 5 then
begin
ClearDebug;
prog;
spam:= 0;


THAT SEEMS TO WORK WELL WAT YOU THINK

UPDATED SCRIPT PLEASE CHECK IT OUT

X!X

2008-05-26 00:04:02

Nice script.. Advice: For procedure R2h you should use a DTM, so people can have a r2h in any inventory slot..

Here.. add this to procedure LoadDTM

R2Ha := DTMFromString('78DA6314656060106140010159A50CFF81342' +
'310FF0702460920838B012B6084D1B240829D801A1920C143408D' +
'24901024A006E46609026A8481842C0135FC404281801A6E20A14' +
'2400DC84F3204D408618633861A71C2E1030080B60830');
declare the R2H dtm as a int.
var
//These are for my DTM's
DrinkStrPotDTM, CookedLobsterDTM, x,y, R2Ha:integer;

And then edit procedure R2h like so…
procedure R2h;
begin
if FindDTM(R2Ha, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x, y, 1, 1, true);
end;
end;

It should find a R2H in any slot.. But i haven't tested it, and I am semi new to scripting so it might not..

:)

And in procedure Banking
Mouse(xx,yy,2,2,False);
should just be
Mouse(x,y,2,2,False);

And you can always add Smart into it..
http://www.villavu.com/forum/showthread.php?t=27482

Mark

2008-05-26 05:15:15

xx,yy integer has already been changed i just aint updated it on here yet and as for the DTm of 2h i didnt see any point as people usual have the 2h in first slow for fast switching i think it just loading a unessercery DTM when i could just use my simple MouseItem(1,true); faster and no need to load a DTM and as for loading smart lol wtf itsa pking script why would anyone want it to have smart wtf…

and Btw next time try making the DTM more accurate make sure all the background is black this is a quik code ive just wrote


[PHP]var
R2hDTM,x,y :integer;
procedure LoadDTM;
begin
R2hDTM := DTMFromString('78DA63E4676060106640017E19C50C92409A1' +
'188FF030100210E0563');
end;


procedure R2h;
begin
GameTab(4);
if (FindDTM(R2hDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x,y,5,5,true);
writeln('weap switched');
end else
writeln('you dont haev a r2h!');
exit;
end.[/PHP]

StrikerX

2008-05-26 06:54:32

From: Rasta Magician
wow, i'm surprised anyone remembers that. unfortunately it was just after the pk update. i did have quite a good private version.

not bad for a first script, i suggest you use Fkeys (F1, F2, F3) instead of ctrl and alt, in my opinion it's easier. also you should always use Mouse, i see you have a ClickMouse in there. you could use CastSpell and ClickPrayer, they're in:

srl/srl/skills/magic.scar
srl/srl/skills/prayer.scar

you could also make it eat food. and you could also have a look at my super old PK Aider, in the fighting section, probably somewhere towards the end of the page or on the next pages.

GJ!

~RM


Only because i was going to make a script like yours

and how did you do it. After you eat one food make it click the other inv spots? unless you used DTM's

Mark

2008-05-27 19:38:10

Well i have used DTM's lol try Redownloading the script work a hell of a alot betta now keep post coming tho peeps

Wizzup?

2008-05-30 03:36:49

Your indenting is bit messed up… But original idea. :)

Mark

2008-06-01 09:59:45

anybody gonna give me some ideas to improve this script

ShowerThoughts

2008-06-01 10:26:44

From: CRU1Z1N
anybody gonna give me some ideas to improve this script


Add more credits ;)

Do you have my new msn?
[email]Hermpie@live.nl[/email]
@everyone
Note:
Do something like this

Srl Name / Real Name(if you want to)

that makes stuff allot easier!

Mark

2008-06-01 10:32:32

From: Hermpie
Add more credits ;)

lol i will do when i update it alrite m8 and no lol i just aint been on for a few days lol ill be on soon tho m8 ill add credits for the ideas tho lol

lil-g

2008-06-04 13:26:12

var
R2hDTM,x,y :integer;
procedure LoadDTM;
begin
R2hDTM := DTMFromString('78DA63E4676060106640017E19C50C92409A1' +
'188FF030100210E0563');
end;


procedure R2h;
begin
GameTab(4);
if (FindDTM(R2hDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x,y,5,5,true);
writeln('weap switched');
end else
writeln('you dont haev a r2h!');
exit;
end.

sk8boyrider55

2008-06-04 18:14:37

Wow Very good idea

a really really long name

2008-06-04 21:33:55

looks gr8, ill try it out some time ^.^

Mark

2008-06-04 22:56:36

From: lil-g
var
R2hDTM,x,y :integer;
procedure LoadDTM;
begin
R2hDTM := DTMFromString('78DA63E4676060106640017E19C50C92409A1' +
'188FF030100210E0563');
end;


procedure R2h;
begin
GameTab(4);
if (FindDTM(R2hDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x,y,5,5,true);
writeln('weap switched');
end else
writeln('you dont haev a r2h!');
exit;
end.

dude i know how to do it thanks anyway but the idea was so it can be done with any item first slot lol and i just couldn't be assed doing all the possible weps but i have updated and i will be updating soon



thanks anyway


CRU1Z1N………

destige

2008-06-05 09:39:05

not bad a script

Mark

2008-06-05 13:17:39

From: destige
not bad a script


Im not getting many proggies so please try do your best adn give me one please m8:duh:

Shane1022

2008-06-05 20:15:10

isent Pking pretty much dead? besides bounty hunter and that other mini game lol.
look very nice though. but i dont PK much anymore

public3n3my

2008-06-06 08:24:54

I played around with a bit, but as Shane said, PKing is fairly dead so I didn't do that much with it.

Mark

2008-06-06 08:28:57

Well this has been made For BH it just does the simple task faster than you could do it thus giving you thus handicap on the other player

Nava2

2008-06-07 11:42:16

Hmm, since you helped me on my script.. I will give you a thorough review of it after I post something else :).

Nava2

Nava2

2008-06-07 13:11:00

Some stuff :)

Firstly, in your declaring of your variables, try to clean it up.

You have:
var
//These are for my DTM's
DrinkStrPotDTM, CookedLobsterDTM, x,y, RScimmyDTM, R2HDTM, RBAxeDTM:integer;

//This is for my proggie
Kills : integer;//reports how many kills you got
DosesDrank : Integer;//Reports how many pot doses drank
Ate : Integer;//Reports how many lobs you ate
Target : Integer;//Reports how many you used BH Locate
Died : integer;//Reports how many times you died lol
Special, spam : Integer;//Reports how many spec attack you used

You don't need to tell everyone what each thing does! :D Honestly; most people don't care and less lines means smaller file which means happier people anyways. You could show it like this:

var

x,y: integer;
DrinkStrPotDTM, CookedLobsterDTM, RScimmyDTM, R2HDTM, RBAxeDTM:integer;
Kills, DosesDrank, Ate, Target, Died, Special, spam : Integer;
Notice how I shortened it ALOT and it still reads nicely. The comments were unneeded! :)

Standards, yours are wank haha. Well this is what you have:
   procedure Waiting;
begin
wait(1000 + random(500));
MouseSpeed:=(MSpeed);
end;

Should be:

procedure Waiting;
begin
wait(1000 + random(500));
MouseSpeed := MSpeed;
end;
On a side note, is this really worth having a whole procedure? Unless you use it to check for randoms or something like that every second etc, is it really worth it? Also, whats with the MouseSpeed := MSpeed… it doesn't do anything haha. Oh and you don't need the brackets around MSpeed. Parenthesis are only used for math functions and declaring parameters.

Your DTM procedure:

//This loads the the cooked lobster DTM//
procedure LoadDTM;
begin
CookedLobsterDTM:= DTMFromString('78DA6314646060E06140013B9224182481342' +
'310FF07020021C70567');
DrinkStrPotDTM:= DTMFromString('78DA63E463606090644001572E8580851881F' +
'83F1000002E890639')
R2HDTM := DTMFromString('78DA63E4606060106640017E19C50C92409A1' +
'188FF0301002019055C');
RScimmyDTM := DTMFromString('78DA63E4626060E06340010E61F10C92409A1' +
'188FF0301001CBE0525');
RBAxeDTM := DTMFromString('78DA6364636060606540013601910C92409A1' +
'188FF0301233F90C185AAC62E38064C3342F900E0810610');


end;

Your DTM's seem small; or maybe mine are just big! But How many points are you using? You should be using one main point and three subpoints. All of the subpoints should be black and the main point should have a tolerance of about 10.

This is one of my DTM's compare the size:

  'hammer': DTM := DTMFromString('78DA639464606078C08002C2ACB818B880342' +
'310FF0702462920E32A031A60442281B41A90B849408D28907843' +
'408D00116A40E63CC4AF060020E20A8C');
See what I mean, thats only for a hammer with 3 points… Yours should be the same size or maybe even bigger. :P

RunBack:

procedure RunBack;
begin
MakeCompass('n');
if(RadialRoadWalk(FindBhRoadColor,180 ,270 , 72, 5, 5))then
begin
RadialRoadWalk(FindBhRoadColor,180 ,270 , 72, 5, 5)
end;
end;

Standards boy, standards… ANYWAYS; you should have a global variable for the BH road color. So when you declare it in your vars you then assign the BH color to it! :)

For example:

var BHRoadColor : Integer;

procedure RunBack;
var z : integer;
begin
MakeCompass('n');
if BHRoadColor = 0 then
BHRoadColor := FindBHRoadColor;
MarkTime(z);
repeat
RadialRoadWalk(BhRoadColor,180 ,270 , 72, 5, 5)
until FindSymbol('bank', x, y) or (TimeFromMark(z) = 15000);
end;

Now, that procedure is very different. I removed the two RadialRoadWalks and made a Loop. The loop allows the script to keep walking until it finds the bank symbol, in which case it will stop walking. Or the loop has been running for 15s as a failsafe. That SHOULD get there from ANY of the caves. Also, if you want the script to walk to the bank from any compass angle, check out my Independant Compass Radial Walk… that way you don't have to use the MakeCompass('n') and it will walk from any angle.

Banking:

procedure Banking;
begin
MakeCompass('n');
wait(1000);
if(FindObjTPA(x, y, (Bcolor1),11,-1, 7, 7, 15, ['alk-to']))then
begin
Mouse(x,y,2,2,False);
Wait(300);
ChooseOption('ank');
Wait(3500);
DepositAll;
WithDraw((C1),(R1),(Lobbies));
CloseBank;
GameTab(4);
RunBack;
end else
if not(FindObjTPA(x, y, (Bcolor1),11,-1, 7, 7, 15, ['alk-to']))then
begin
MakeCompass('e');
wait(1000);
if(FindObjTPA(x, y, (Bcolor2),11,-1, 7, 7, 15, ['alk-to']))then
begin
Mouse(x,y,2,2,False);
Wait(300);
ChooseOption('ank');
wait(3500);
DepositAll;
WithDraw((C1),(R1),(Lobbies));
CloseBank;
GameTab(4);
RunBack;
end else
if not(FindObjTPA(x, y, (Bcolor2),11,-1, 7, 7, 15, ['alk-to']))then
begin
Banking;
end;
end;
end;

UGH STANDARDS!!!!!!! USE THEM! Either way; why do you have a MakeCompass North? The procedure shouldn't use that at all. You also have a wait right off the bat. You start waiting before the procedure starts… why? Anyways. You also bank EVERYTHING. That includes the 2h, and strength pots. Thats kinda useless eh? You need to make sure that you only deposit certain things. Randomness. You haven't got much. You have some in your Mouse but in your waits they are all exact. Thats just asking for a bank. Try:
Wait(200+random(150));
That would give you sufficient randomness. Also, you use if..then .. else wrong. The whole point of it is that if the function you call in the if statement is not what you want then it will run the else. So when you call:
if(FindObjTPA(x, y, (Bcolor1),11,-1, 7, 7, 15, ['alk-to']))then
begin
Mouse(x,y,2,2,False);
Wait(300);
ChooseOption('ank');
Wait(3500);
DepositAll;
WithDraw((C1),(R1),(Lobbies));
CloseBank;
GameTab(4);
RunBack;
end else
if not(FindObjTPA(x, y, (Bcolor1),11,-1, 7, 7, 15, ['alk-to']))then
begin
MakeCompass('e');
wait(1000);
end;
You are double calling, because the second one is not needed. The first calling will return a false, and hence the FindObjTPA is already going to return a false so the function is just repeating itself. Waste of some MS. Lastly, does this even work?
     if not(FindObjTPA(x, y, (Bcolor2),11,-1, 7, 7, 15, ['alk-to']))then
begin
Banking;
end;
Can you call the current running procedure in the procedure you are running? It would create an infinite loop basically until the FindObjTPA returns true. Also, if you want to use two colors for a TPA function, maybe you should write your own :), just include two colors!

RunBank:

Read the RunBack, same things apply. Except you don't need to change GameTabs for SetRun. It automatically changes to tab 11, and back I think. Not sure on that one. Also remove your vars, you never use them.

EatLobster:

procedure EatLobster;
begin
GameTab(4);
if (FindDTM(CookedLobsterDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x,y,5,5,true);
writeln('Ate a cooked lobster!');
end else
writeln('You dont have a cooked lobster!');
exit;
end;

Firstly, standards. Thats getting pretty standard to say… Uhm your function has some useless lines. After an else, if you are having more than one line of code you need to include identifiers (begin, end). So, currently the procedure, if it doesn't find a lobster, it will just write the line and exit. Like it should I guess. Which leads to the exit doesn't need to be there. Also, why do you have the writeln's. The user cannot see the scar window, nor would they really care while pking! :D So, they aren't really needed. Also, you should almost make this a loop so it keeps clicking until the lobster disappears. My version of this might look like:

procedure EatLobster;
var z : integer;
color : string;
begin
GameTab(4);
if (FindDTM(CookedLobsterDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x,y,5,5,true);
Wait(300+random(200));
if ExistsItem(CoordsToItem(x, y)) then
begin
Mouse(x, y, 1, 1, true);
Wait(300+random(200));
end;
end;
end;
My version just checks that the lobster is eaten, and if its not then it retries once, if it is eaten it exits :). Also, the standards are now right.

DrinkPot:

Same as the latter explaination but why the MMouse?

JoinCC:

   procedure JoinCC;
begin
GameTab(10)
Mouse(593,442,2,2,true);
wait(100)
TypeSend(ClanName); //This is for the clan chat
MMouse(285,182,5,5);
end;

Randomness in your waits; and what the MMouse for!? Also, you should make a MouseBox for the Join Chat button. Its a lot safer then using Coords.

BHLocate:

procedure BhLocate;
begin
GameTab(7);
Mouse(691,285,2,2,true);
MMouse(285,182,5,5);
end;

This is good, but why not try using a Bitmap and some If's for failsafes. Why not modify the CastSpell in Magic.scar for your needs. Remove the cases for it etc. WTH IS THE MMOUSE!?

StrPrayerOnOff, RangePrayerOnOff:

procedure StrPrayerOnOff;
begin
GameTab(6);
Mouse(718,305,2,2,true);
wait(50)
Mouse(569,339,2,2,true);
MMouse(285,182,5,5);
end;

//Turns eagle eye ON or OFF//
procedure RangePrayerOnOff;
begin
GameTab(6);
Mouse(568,377,2,2,true);
MMouse(285,182,5,5);
end;

Both of these functions could be combined into one. Also, you should have the option of turning on the Protect Item prayer, as well as piety and the other one haha. Both are used. You could combine these simply by using a case! Which you don't seem to use many of… Like so:
procedure PrayerOnOff(CombatType: string);
begin
GameTab(6);
case Lowercase(combatType) of
'melee' : begin
Mouse(718,305,2,2,true);
wait(100+random(100));
Mouse(569,339,2,2,true);
MMouse(285,182,5,5);
end;
'range' :
begin
GameTab(6);
Mouse(568,377,2,2,true);
MMouse(285,182,5,5);
end;
end;
end;

You should also look into checking if the prayers are on already and there is sufficient prayer points. You need to make sure the player defines the pking style in the constants if you want to use that case function I wrote. Here is a great procedure for F2p prayers by Mickalicious and Hy:
(*¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\\
|| DoTehPrayer - Activates prayer 'emotes' ||
|| By: Mickaliscious / Edit by Hy71194 ||
\\_________________________________________________________________*)
procedure DoTehPrayer;
var Pray: integer;
begin
if not UsePrayer then
Exit;
if not LoggedIn then
Exit;
if Players[0].Strings[0] = '' then
begin
WriteLn('Please set a valid Fight String for '+Players[0].Name+'.');
WriteLn('Valid strings are: ''melee'', ''range'', or ''mage''.');
Exit;
end;
begin
Pray := Players[0].Level[5];
Wait(30 + Random(5000));
GameTab(6);
Wait(300 + Random(1000));
Inc(Anti);
Inc(ReportVars[9]);
case Players[0].Strings[0] of
'melee':
begin
if Pray > 33 then MouseBox(554,330,579,350,1) else // Incredible Reflexes
if Pray > 15 then MouseBox(633,258,653,275,1) else // Improved Reflexes
if Pray > 6 then MouseBox(632,222,651,238,1); // Clarity of Thought
if Pray > 30 then MouseBox(705,296,727,314,1) else // Ultimate Strength
if Pray > 12 then MouseBox(594,257,615,275,1) else // Superhuman Strength
if Pray > 3 then MouseBox(595,221,615,238,1); // Burst of Strength
end;
'range':
begin
if Pray > 43 then MouseBox(559,373,575,388,1) else // Eagle Eye
if Pray > 25 then MouseBox(596,298,614,313,1) else // Hawk Eye
if Pray > 7 then MouseBox(668,223,689,237,1); // Sharp Eye
end;
'mage':
begin
if Pray > 44 then MouseBox(594,369,616,387,1) else // Mystic Might
if Pray > 26 then MouseBox(631,297,653,314,1) else // Mystic Lore
if Pray > 8 then MouseBox(704,224,726,238,1); // Mystic Will
end;
end;
end;
end;
If you use this credit them!

SpecAttack:

procedure SpecAttack;
begin
GameTab(1);
Mouse(609,422,1,1,true);
MMouse(285,182,5,5);
end;
MMOUSE WTF!? and coord clicking is a nono. Make sure you use a MouseBox at least.

R2H:

procedure R2h;
begin
GameTab(4);
if (FindDTM(R2HDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x,y,5,5,true);
if not(FindDTM(R2HDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
end else
if (FindDTM(RScimmyDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x,y,5,5,true);
end else
if not(FindDTM(RScimmyDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
if (FindDTM(RBAxeDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Mouse(x,y,5,5,true);
end;
end;
Wow.. I'm confused. You have so many if statements I'm suprised the function compiles. Reread some of my earlier comments on if statements. and you have useless ones.. I'm not going to correct this one because I'm not sure I understand it.

Main:

procedure Main;
begin

//Ult str and incr reflex ON or OFF//
if(IsfKeyDown(Str)) then
begin
GameTab(6)
StrPrayerOnOff;
end else

//Walks bank deposits and witdraws//
if(IsfKeyDown(Banker))then
begin
RunBank;
end else
//Eagle eye ON or OFF//
if(IsfKeyDown(Range)) then
begin
RangePrayerOnOff;
end else
//Spec attack ON//
if(IsfKeyDown(SpecOn)) then
begin
SpecAttack;
Special :=Special + 1;//Adds a point to your spec'd
end else
//Bounty locate sepll//
if(IsfKeyDown(Locate)) then
begin
BhLocate;
Target :=Target + 1;//Adds a point to located
end else
//Join your ClanChat//
if(IsfKeyDown(CC)) then
begin
JoinCC;
end else
//Eat a lobster//
if(IsfKeyDown(Eat)) then
begin
EatLobster;
Ate :=Ate + 1;//Adds a point to lobs ate
end else
Waiting;
//Drink a str pot//
if(IsfKeyDown(Pot)) then
begin
DrinkPot;
DosesDrank :=DosesDrank + 1;//Adds a point to your potted
end else
//detects if you killed someone//
if(FindBlackChatMessage('You catch a lobster'))then
begin
Kills :=Kills + 1;//Adds a point to your kills
end else
//Detects if you got owned lol//
if(FindBlackChatMessage('You have been defeated'))then
begin
Died :=Died + 1;//Adds a point to death's
end else
//Switch to r2h adn back//
if(IsfKeyDown(Use2h))then
begin
R2h;
end;
end;
You made this much more complicated then it needed to be. You have all sorts of end elses for no reason.. and you have a wierd thing for seeing if you killed someone :rolleyes:. Here, I removed a lot…

procedure Main;
begin
if(IsfKeyDown(Str)) then // Combine these...
StrPrayerOnOff;
if(IsfKeyDown(Range)) then
RangePrayerOnOff;

if(IsfKeyDown(Banker))then
RunBank;

if(IsfKeyDown(SpecOn)) then
begin
SpecAttack;
Inc(Special);//Adds a point to your spec'd
end;

if(IsfKeyDown(Locate)) then
begin
BhLocate;
Inc(Target);//Adds a point to located
end;

if(IsfKeyDown(CC)) then
JoinCC;

if(IsfKeyDown(Eat)) then
begin
EatLobster;
Inc(Ate);//Adds a point to lobs ate
end;

//Waiting; <- USELESS! :( First time its called.. its not useful here at ALL.

if(IsfKeyDown(Pot)) then
begin
DrinkPot;
Inc(DosesDrank);//Adds a point to your potted
end;

if(FindBlackChatMessage('You catch a lobster'))then
Inc(Kills);//Adds a point to your kills

//Detects if you got owned lol//
if(FindBlackChatMessage('You have been defeated'))then
Inc(Died);//Adds a point to death's

if(IsfKeyDown(Use2h))then
R2h;
end;
Well, I changed a lot and found more errors. I left in a funny one, but you will have to find that. ANYWAYS. The command Inc(var) is a much faster way of doing:
 var := var + 1;
It speeds up running time. Now, you had so many end elses that the script would most likely lag. Simple if's are suffice, if the key isn't down, the script continues down! :) also, after an if statement if there is only one line of code, no identifiers are needed. Also, the waiting procedure really is useless.. haha only place it is called.

Prog:

procedure Prog;
begin
Writeln('[]-------------------------------------------[]');
Writeln('Killed : ' + IntToStr(Kills) + ' Noobs');
Writeln('Drank : ' + IntToStr(DosesDrank) + ' str doses');
Writeln('Ate : ' + IntToStr(Ate) + ' lobs');
Writeln('Target : ' + IntToStr(Target));
Writeln('Special : ' + IntToStr(Special));
Writeln('You Died : ' + IntToStr(Died) + ' Times owned lol');
Writeln('[]--------------------------------------------[]');
end;


This looks fine, but if you want a nice fenced proggy, try using the Padr('') command. Its makes nice ones! :)

Program:

   begin
LoadDTM;
activateclient;
repeat
main;
spam := spam + 1;
if spam = 5 then
begin
ClearDebug;
prog;
spam:= 0;
end;
until(false)
end.

Hmm, there are some subtle changes that can be made, like the Inc and things like that. Also, your progress report will come up EXTREMILY often. Maybe every half second? Its try making the number bigger. Also, you never setup SRL. You NEED to call it first. Well here is my edit:

begin
SetupSRL; // You forgot this.
LoadDTM;
activateclient;
repeat
main;
Inc(spam); // <- Inc(var x);
if spam = 20 then // test that, change it to what ever! :)
begin
ClearDebug;
prog;
spam := 0;
end;
until(Not LoggedIn) // This is a better finish, because if the player isn't logged in, its really not useful is it? So it might as well finish ;)
end.
Also you need to free your DTMs.

Okay, well this is your first script, and although you have a LOT to work on, gratz. You have come up with an original idea and I hope to see it come to fruition. Make sure that you learn… STANDARDS. Its obnoxious to read with out them.

If you need any help feel free to ask me for my msn.

Also, if you use any of my procedures, please credit.

Nava2.

P.S. That took like almost two hours… :(

Mark

2008-06-11 11:45:07

From: Nava2
Some stuff :)


:duh::eek::mad: lol dont be so nasty


lol nice one fella and thanks for taking the time to give me a full on review ill get back to work on it right away been doing exams so ive been quite busy:(h)::f:

kor

2008-06-11 13:44:50

CRU1Z1N, Why would you get angry because of that? :confused:

Mark

2008-06-11 13:48:31

lol im not lol im just messing about

Nava2

2008-06-12 08:29:48

From: CRU1Z1N
From: Nava2
Some stuff :)



:duh::eek::mad: lol dont be so nasty


lol nice one fella and thanks for taking the time to give me a full on review ill get back to work on it right away been doing exams so ive been quite busy:(h)::f:


No worries, it was my pleasure. I just hope you can learn from what I wrote! :)

Nava2

Mark

2008-06-12 08:38:22

From: Nava2
No worries, it was my pleasure. I just hope you can learn from what I wrote! :)

Nava2


LOL i think ive sorted out my standards now lol anyway that MMouse(414,523,5,5) or wateva it was
it moves the mouse back to the centre of the screen so if your pking it you can just click and move the mouse a lil to attack again or wateva…u get me?

bukowski

2008-07-01 04:11:23

nice creative script :D thats all that matters.