Hey asap1
!
First of all, its good to know that you're trying to learn how to make your own script, don't worry nobody was born with any kind of abilities, so don't worry. Also don't worry about copying from others, that's how i started as well! Good to see that you already started to credit, that's great! Now i will try to fix your script a little bit, remove unnecessary things and do the best from it, and i am going to give you the first steps of the things that you're trying to do.
First of all, here's your script edited by me:
Simba Code:
Program Al_Kharid_Warrior_Killer;
{$i srl\srl\misc\smart.simba}
{$i SRL\SRL.simba}
{$i srl\srl\skill\fighting.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Bankpin Here
Players[0].BoxRewards := ['Xp'];
end;
///// All credit for anti-ban goes to kevin33
procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
procedure FightingAntiban;
begin
StatsGuise('Antiban')
Case Random(11) Of
0: Begin GameTab(tab_Stats) HoverSkill('attack', False) End;
1: Begin SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin GameTab(tab_Inv) ExamineInv; End;
3: Begin RandomAngle(1); End;
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); End;
5: Begin GameTab(tab_Stats) HoverSkill('random', False); End;
6: Begin GameTab(tab_Stats) HoverSkill('strength', False); End;
7: Begin GameTab(tab_Stats) HoverSkill('defence', False); End;
8: Begin GameTab(tab_Stats) HoverSkill('ranged', False); End;
9: Begin GameTab(tab_Stats) HoverSkill('magic', False); End;
10: Begin GameTab(tab_Stats) HoverSkill('constitution', False); End;
end;
end;
///// Credit goes to Tickyy
Procedure Bankit;
Var
i: Integer;
Begin
If (Not (LoggedIn)) Then Exit;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then
begin
Withdraw(10, 1, 28);
break;
end;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;
As you can see I've fixed your standards, removed some unnecessary stuff(but you probably won't know what exactly but i am going to show you
).
__
Simba Code:
begin
Smart_Server := 0;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end.
This used to be at the top of the script but this is actually the mainloop. What is a mainloop? Mainloop is basically like this, you can do 1000 of functions and procedures, but if you want to use them you have to call them at the mainloop. The mainloop is always at the end of the script and always ends with a dot!
__
Simba Code:
procedure FightingAntiban;
begin
Case Random(250) Of
0: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('attack', False) GameTab(28) End;
1: Begin StatsGuise('Antiban') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('Antiban') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
6: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('strength', False); GameTab(28); End;
7: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('defence', False); GameTab(28); End;
8: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('ranged', False); GameTab(28); End;
9: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('magic', False); GameTab(28); End;
10: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('constitution', False); GameTab(28); End;
end;
This antiban is the unnecessary part that i mentioned. You missed a "end;" and the StatsGuise procedure is ok, but unnecessary imo, so i changed it to this:
Simba Code:
procedure FightingAntiban;
begin
StatsGuise('Antiban')
Case Random(250) Of
0: Begin GameTab(tab_Stats) HoverSkill('attack', False) End;
1: Begin SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin GameTab(tab_Inv) ExamineInv; End;
3: Begin RandomAngle(1); End;
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); End;
5: Begin GameTab(tab_Stats) HoverSkill('random', False); End;
6: Begin GameTab(tab_Stats) HoverSkill('strength', False); End;
7: Begin GameTab(tab_Stats) HoverSkill('defence', False); End;
8: Begin GameTab(tab_Stats) HoverSkill('ranged', False); End;
9: Begin GameTab(tab_Stats) HoverSkill('magic', False); End;
10: Begin GameTab(tab_Stats) HoverSkill('constitution', False); End;
end;
end;
__
Simba Code:
/////Credit goes to Tickyy////
Procedure Bankit;
Var
i: Integer;
Begin
If (Not (LoggedIn)) Then Exit;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then
Withdraw(10, 1, 28);
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;
To:
Simba Code:
///// Credit goes to Tickyy
Procedure Bankit;
Var
i: Integer;
Begin
If (Not (LoggedIn)) Then Exit;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then
begin
Withdraw(10, 1, 28);
break;
end;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;
Another begin and end; was added because the break was needed the function itself will exit in case bank is open(SRL failsafe) but still... it loops.
_
now here's a gift from me for the "eating" part.
Simba Code:
Function LowHPLetsEat(What: String): Boolean;
var
I, x, y: Integer;
begin
Result := (HPPercent < 50) and (LoggedIn);
If(not(Result)) then
Exit;
if Result then
If InvEmpty then
begin
Logout;
TerminateScript;
end else
for i := 1 to 28 do
begin
InvMouse(I, 3);
Wait(RandomRange(150, 250));
if WaitUpText(What, RandomRange(250, 300)) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Exit;
end else
Continue;
end;
end;
Just call LowHPLetsEat('lobster'): for lobster, edit the lobster to salmon or whatever you like. It will start eating if hp is below 50 %
so basically that's it... look around the tutorials and read carefully, you can join the IRC and ask for help there.
GL
!