SRL Archive - Help and Support

Help improve my scripting


traitors

2006-06-15 00:35:21

Hey I have bin scripting since kaitneiks but i havn't really made a seriouse script sicne then lol and i wanna start.Um im really new to SRL so if u see some really new mistakes please point them out and tell me with an example how to fix it please thx :D

program New;
{.include SRL/SRL.scar}
{.include srl\srl\skill\Mining.scar}
//{.include boxbreaker2.txt}
//MADE BY TRAITORS
//++++ rep me don't just leech please
//Since aryan down i decided to help and get back into scar
//will update it soon when i get back from boarding school
var
movecounter:integer;

const
ore1=2442345; //Ore color

moveuntil=24; //How many moves until scipt terminates
Mwait=3000; //how long it waits until it clicks again for ore
procedure setup;
begin
setupsrl;
SetupSRLMining;
//BoxOpenerSetup;
end;

procedure Kscript;
begin
killscript(1);
end;

procedure gasfind;
begin
GasColors(1,1);
end;

procedure Core;
begin
SetRandomOreColor;
end;

procedure Pmine;
begin
ClickMSColorTol(ore1,1,true);
wait(Mwait+random(2000));

if findmscolor(x,y,ore1)then
wait(1000+(500));

if findmscolor(x,y,ore1)then
wait(1000+(500));

end;

procedure Odrop;
begin
DropTo(5,28);
end;

procedure Phead;
begin
findpick
end;

procedure Aban;
begin
RandomChat;
AntiBan;
end;

procedure Aran;
begin
FindNormalRandoms;
FindMod;
if FindFight then
logout;
TalkToRand;
FindLamp('mining');
FindScapeRune;
FindCerter;
SetUpDemon;
//FindStrangeBox;
end;

begin
setup;
Kscript;
repeat
repeat
gasfind;
Core;
Pmine;
Phead;
Aran;
movecounter:=movecounter+1
until(movecounter=moveuntil)
writeln('End of script'); // You may also include further code after the loop
Odrop;
Aban;
until(false)
end.

WhiteShadow

2006-06-15 01:21:42

- Dude you don't need BoxBreaker. SRL solves the Old Man Random. :D
- FindNormalRandoms covers like everything except for skill related things. So try something like this:
procedure Aran;
begin
FindNormalRandoms;
if (FindFight) then
begin
RunAwayDirection('N');//Directions could also be : 'N', "S', 'E', 'W'
Wait(8000 + random(3000));//Waits 8 seconds + random 3000 miliseconds
RunBack;//Goes back to original place
end;
end;
- Add this to your script.
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); 
SRL scans for Randoms by the nick so you need that.
- Have a WieldPick const And add something like this. So if player's pick is equipped it dropsall and if in iinvetory it skipd first invetory spot, and drops all starting from the seconds inventory spot.
procedure ODrop;
begin
if(not(WieldPick))then
begin
DropAll;
end else
begin
DropTo(2, 28);
end;
end;
- You can easily add standards to your procedures by spacing 2 times.
- This is probably alot better.
procedure Pmine;
begin
repeat
//Add stuff for gas here For Gas safes you should use Wizzups.
ClickMSColorTol(Ore1, 5, true);
Wait(3000 + random(1000));
FindPick;
Aran;
until(InvFull)
end;
- I'm not to sure about what you were trying to doin a couple things. These are just somethings I noticed. But anyways, it's still alright! Keep trying and you'll be pakin' it hot soon with great script. :)

I remember first post=p

2006-06-15 01:41:11

From: traitors
Hey I have bin scripting since kaitneiks but i havn't really made a seriouse script sicne then lol and i wanna start.Um im really new to SRL so if u see some really new mistakes please point them out and tell me with an example how to fix it please thx :D

program New;
{.include SRL/SRL.scar}
{.include srl\srl\skill\Mining.scar}
//{.include boxbreaker2.txt}
//MADE BY TRAITORS
//++++ rep me don't just leech please
//Since aryan down i decided to help and get back into scar
//will update it soon when i get back from boarding school
var
movecounter:integer;

const
ore1=2442345; //Ore color

moveuntil=24; //How many moves until scipt terminates
Mwait=3000; //how long it waits until it clicks again for ore
procedure setup;
begin
setupsrl;
SetupSRLMining;
//BoxOpenerSetup;
end;

procedure Kscript;
begin
killscript(1);
end;

procedure gasfind;
begin
GasColors(1,1);
end;

procedure Core;
begin
SetRandomOreColor;
end;

procedure Pmine;
begin
ClickMSColorTol(ore1,1,true);
wait(Mwait+random(2000));

if findmscolor(x,y,ore1)then
wait(1000+(500));

if findmscolor(x,y,ore1)then
wait(1000+(500));

end;

procedure Odrop;
begin
DropTo(5,28);
end;

procedure Phead;
begin
findpick
end;

procedure Aban;
begin
RandomChat;
AntiBan;
end;

procedure Aran;
begin
FindNormalRandoms;
FindMod;
if FindFight then
logout;
TalkToRand;
FindLamp('mining');
FindScapeRune;
FindCerter;
SetUpDemon;
//FindStrangeBox;
end;

begin
setup;
Kscript;
repeat
repeat
gasfind;
Core;
Pmine;
Phead;
Aran;
movecounter:=movecounter+1
until(movecounter=moveuntil)
writeln('End of script'); // You may also include further code after the loop
Odrop;
Aban;
until(false)
end.


Wow, your a rep whore. Using a script, and not giving rep is not leeching idiot. All they have to do is provide a progress report, and don't even try and ask for rep.