SRL Archive - OSR Help

Please Help with my First Baby Script!


EZ41

2013-11-28 18:48:13

I have about 60 lines of code here, please someone help me fix it.

Firstly it wont compile, when I try it opens up the SRL.simba file and gives me this error

"[Error] C:\Simba\Includes\SRL-OSR\SRL.Simba(8:113): Semicolon (';') expected at line 8
Compiling failed."

But I can run other 07 scripts just fine so I don't know what to do.


Also if you read through this code, will the script work? I used some code from the SRL 6 documentation to change inventories but I don't know if I applied it correctly or if it even works with OSR scripts…


Finally are the mouse procedures and wait procedures good? any suggestions to make it less likely to get banned (obviously it needs an antiban procedure but anything else?

THANK YOU, This is the first time I've really tried making a script.


Program myhumidify

{$Define SMART}
{$I SRL-OSR/SRL.Simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := 'a';
Pass := 'a';
Pin := 'a';
WorldInfo := [a];
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Slayer;
Active := True;
Nick := 'a';
end;
end;

//Remember: Script does not kick out when out of runes
//Script starts logged in with empty fishbowl (1 click empty) in 5th invy spot

Procedure Humid
begin
repeat
if (gameTabs.isTabActive(TAB_BACKPACK)) then
begin
gameTabs.openTab(TAB_MAGIC); //opens magic tab
MMouse(568, 252,RandomRange(3, 3), RandomRange(3, 1)); //moves to spell
ClickMouse2(mouse_left); //clicks cast spell
gameTabs.openTab(TAB_INVENTORY); //switches to invy
MMouse(582, 262,RandomRange(3, 2), RandomRange(3, 4)); //moves to empty bowl
Wait(RandomRange(1700, 1850)); //waits for long spell animation
ClickMouse2(mouse_left); //clicks empty bowl, you have an empty fishbowl again and are at the backpack, script repeats
end;
end;

//Antiban to come

Begin
SetupSRL;
StartUp;
repeat
if (isLoggedIn(True)) then //if logged in then start humid procedure
begin
wait(400);
Humid;
end;
else
begin
if (isLoggedIn(False)) then //if not logged in then begin login procedure
begin
DeclarePlayers; //will this log me in? i'm just hoping that starting declareplayers with my info filled out would get it working
end;
end;
end.

Flight

2013-11-28 19:25:55

Phew, yeah it'll take a bit of work to get this to work how you want. Give me a little while while I fix it up and explain what I did in detail.

EZ41

2013-11-28 19:37:56

From: Flight
Phew, yeah it'll take a bit of work to get this to work how you want. Give me a little while while I fix it up and explain what I did in detail.


I will love you forever and always if you get this working for me.

Flight

2013-11-28 19:44:35

Ok obviously I didn't test this but I cleaned everything up. I think one of the problems you were having was you were trying to use functions native to SRL-6 but SRL-OSR is very much different. You'll need to look through the include to see what functions/procedures are available. You might also want to look at some other OSR scripts people have created to see how they write scripts.


Program MyHumidify;

{$Define SMART}
{$I SRL-OSR/SRL.Simba}

Procedure declarePlayers();
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := 'a';
Pass := 'a';
Pin := 'a';
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Slayer;
Active := True;
Nick := 'a'; // DON'T FORGET YOUR NICK! VERY IMPORTANT FOR ANTI-RANDOMS
end;
end;

//Remember: Script does not kick out when out of runes
//Script starts logged in with empty fishbowl (1 click empty) in 5th invy spot

Procedure humid();
begin
if (getCurrentTab() = TAB_INV) then
begin
gameTab(TAB_MAGIC); //opens magic tab
MMouse(568, 252, RandomRange(3,3), RandomRange(3,1)); //moves to spell
ClickMouse2(mouse_left); //clicks cast spell
gameTab(TAB_INV); //switches to invy
MMouse(582, 262, RandomRange(3,2), RandomRange(3,4)); //moves to empty bowl
Wait(RandomRange(1700,1850)); //waits for long spell animation
ClickMouse2(mouse_left); //clicks empty bowl, you have an empty fishbowl again and are at the backpack, script repeats
end;
end;

//Antiban to come

Begin
declarePlayers(); // Should always be called first
setupSRL(); // Setup SRL

Repeat
if not loggedIn() then // Player logged out
begin
loginPlayer(); // Log back in
setAngle(SRL_Angle_High); // Set your angle to highest
end;

findNormalRandoms(); // Check for random events

wait(400);
humid();
Until(AllPlayersInactive) // Repeat the script loop until all players inactive
end.

Also, when posting Simba scripts you can use the Simba tags: [Simba} script here… .

EZ41

2013-11-28 20:04:32

Thank you SOOOO much!! it seems to be working, i wont have finished dream mentor for a day or two so i won't get to fully test until then.

Sorry but I'm gonna ask a few more short questions :p

Do you think that if i got an antiban in this it would be safe to use?

Is there anywhere else i can/should be using random variables?

any small/easy changes/additions that i can try to do to improve it?

i'm gonna be training in pc bank (random-free) , i'm worried the antirandoms could cause me to get lured by legit players who get randoms outside the bank and try and screw bots over. Can i just not use findnormalrandoms?

Does the OSR include have any documentation that you know of (i've looked but i can't seem to find any)

But again thank you, you have been an immense help already.