can someone please have a look at my superheater script and tell me wats wrong with it thanks
What is wrong with it. Describe what goes wrong and it will be easier to help you.
He was getting Line 215: [Error] (14910:1): Identifier expected in script. What I found at line 155 or Procedure WithdrawOres, in that procedure I counted 11 begins, and 10 ends. Might want to look over it again. It is saying Identifier expected because that procedure hasn't completely ended. Did that help?
dude.. semi colons
SCAR Code:program SuperHeat;
{.include SRL/SRL.scar}
{.include srl/srl/skill/Magic.scar}
{
==========================================================================
This script superheats any ore
==========================================================================
Created for scar 3.12 and SRL 4
1. USE Runescape with Low Detail, Very Bright.
2. Set your Screen to 32 bit TRUE color.
3. Set Playernames and Passwords in DeclarePlayers.
4. Set NumberOfPlayers.
5. Position Players at any bank with fire staff equiped
6. Make sure your Players have ores and nature runes
==========================================================================
}
Var
DTM,x,y,OreAmount,rock1,rock2,TotalBars,NatAmount,nat:integer;
Const StartPlayer = 0; // Determines who will play first
MSpeed = 13; //speed of the mouse...higher number slower speed, lower number higher speed
MySRLID = '107'; // Must be a string!
MySRLPassword = 'narellan'; // Must be a string!
VersionNumber = 1; // No need to change
Procedure DeclarePlayers;
begin
HowManyPlayers:= 1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:= StartPlayer; // CurrentPlayer = Array Index
Players[0].Name :='name'; //username
Players[0].Pass :='pass'; //password
Players[0].Nick :='nick'; //3-4 consecutive letters of your user name(NOT First letter)
Players[0].Strings[0] :='addy'; //type of bar bronze,iron,steel,mith,addy,rune,gold,silver,
Players[0].Pin :=0; //Pin number(not a string!!)
Players[0].integers[0]:=100; //how many times to use superheat per log in
Players[0].Active :=True; //are you going to use this player
end;
Procedure LoadDtms; //taken from Xcans Smelter
Begin
DTM := DTMFromString('78DA637466626078C28002FC92FD18FE03694' +
'620FE0F048CEE40356F19D000231209A403806A1E1350630A54F3' +
'8A801A6BA09A87F8D50000EA6D0BDC');
case Lowercase(Players[CurrentPlayer].Strings[0]) of
'bronze':
begin
rock1 := DTMFromString('78DA639CC0C0C0C0C3C8800C7A9B9B1944803' +
'448F43F10304E063118D000231209A4E700090E46FC6ABA808424' +
'01357540828F809AA9404204BF1A0097F90A64');
rock2 := DTMFromString('78DA634C64606038C080021E345A328800694' +
'620FE0F048CB940C60E0634C0884402E954207182809A68207196' +
'801A7F207118BF1A00ACC90B66');
OreAmount:=27;
end;
'iron':
begin
rock1 := DTMFromString('78DA63DCCFC0C0E0CB80027CF59519B880342' +
'310FF0702C60D404618031A60442281F40E20114D40CD3120114A' +
'40CD6920E1855F0D00E4FC0A09');
rock2:=0
OreAmount:=27;
end;
'steel':
begin
rock1 := DTMFromString('78DA63DCCFC0C0E0CB80027CF59519B880342' +
'310FF0702C60D404618031A60442281F40E20114D40CD3120114A' +
'40CD6920E1855F0D00E4FC0A09');
rock2 := DTMFromString('78DA63EC676060F06140012626CA0C5C409A1' +
'188FF0301E374202394010D30229140BA11488411503307487811' +
'50D30D24A2F1AB0100797E090A');
OreAmount:=27;
end;
'silver':
begin
rock1 := DTMFromString('78DA6314636060106140011B36EC62E002D28' +
'C40FC1F0818F9810C050634C0884402690E202145408D0C116A14' +
'8184007E3500FB290711');
rock2:=0
OreAmount:=27;
end;
'gold':
begin
rock1 := DTMFromString('78DA631463606010614001F7B749317001694' +
'620FE0F048CFC408602031A604422813407909022A04686083520' +
'7B84F0AB0100B99E06A7');
rock2:=0
OreAmount:=27;
end;
'mith':
begin
rock1 := DTMFromString('78DA631462606010644001BEFEC50C5C409A1' +
'188FF0301A33C90C1CD8006189148202D0924C408A8E103123204' +
'D4B0030951FC6A004D1805E6');
rock2 := DTMFromString('78DA63EC676060F06140012626CA0C5C409A1' +
'188FF0301E374202394010D30229140BA11488411503307487811' +
'50D30D24A2F1AB0100797E090A');
OreAmount:=25;
end;
'addy':
begin
rock1 := DTMFromString('78DA634C646060F06340013E09BE0C22409A1' +
'188FF0301632E90E1CE8006189148201D0324A209A8F1C7B40B43' +
'4D3A9008C5AF06005E91088B');
rock2 := DTMFromString('78DA63EC676060F06140012626CA0C5C409A1' +
'188FF0301E374202394010D30229140BA11488411503307487811' +
'50D30D24A2F1AB0100797E090A');
OreAmount:=28;
end;
'rune':
begin
rock1 := DTMFromString('78DA631463606010624001FE19250C5C409A1' +
'188FF0301A32090A1C08006189148200DD22049408D0C909022A0' +
'46114808E057030066CC0623');
rock2 := DTMFromString('78DA63EC676060F06140012626CA0C5C409A1' +
'188FF0301E374202394010D30229140BA11488411503307487811' +
'50D30D24A2F1AB0100797E090A');
OreAmount:=27;
end;
end;
end;
Function FindT:boolean;
Begin
repeat
if (not(Loggedin)) then exit;
wait(100+random(200));
Until (FindText(x, y, 'Enter amount:', UpChars, MCX1, MCY1, MCX2, MCY2));
result:=true
End;
Procedure WithdrawNats;
Begin
if (not(Loggedin)) then exit;
nat := DTMFromString('78DA633CC5C0C090C980023A1BEAC1342394C' +
'F781D4824A3AAD9BF7D1BAA9AF340A204554D656101AA9A7D4022' +
'17558DA78309AA9A639876CD99381155CD4D209187AA66C5DC39A' +
'86A8E008962543591C1C1286A00FD5E12FA');
// NatAmount:= (Players[currentplayer].integers[0])
if FindDTM(nat,x,y,MSX1,MSY1,MSX2,MSY2) then
begin;
Mouse(x,y,3,3,false)
wait(100+random(50))
if ChooseOption('x') then
TypeSend(inttostr(Players[currentplayer].integers[0]))
end;
end;
Procedure WithdrawOres(option1,option2:string;amount1,amount2,rock1,rock2:integer);
Begin
if (not(Loggedin)) then exit;
if rock2=0 then
begin
if FindDTM(rock1,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,3,3,false)
repeat
wait(10)
Until(ChooseOption('All'))
end else
Begin
Writeln('Logging Out')
closebank;
closebank;
exit;
end;
end else
begin
if FindDTM(rock1,x,y,MSX1,MSY1,MSX2,MSY2) then
Begin
repeat
Mouse(x,y,3,3,false)
wait(10)
Until(ChooseOption(option1))
if option1='X' then
begin
if FindT then
TypeSend(inttostr(amount1))
end;
If FindDTM(Rock2,x,y,MSX1,MSY1,MSX2,MSY2) then
Begin
repeat
Mouse(x,y,3,3,false)
wait(10)
Until(ChooseOption(option2))
if option2='X' then
begin
if FindT then
TypeSend(inttostr(amount2))
end;
end else
Begin
Writeln('Logging Out')
closebank;
closebank;
NextPlayer(false)
exit;
end;
end else
Begin
Writeln('Logging Out')
closebank;
closebank;
NextPlayer(false);
exit;
end;
end;
end;
Procedure InBank;
Begin
if (not(Loggedin)) then exit;
if (not(bankscreen)) then exit;
Case lowercase(Players[CurrentPlayer].Strings[0]) of
'bronze':WithdrawOres('X','All',13,13,rock1,rock2)
'iron','silver','gold':WithdrawOres('All','',0,0,rock1,rock2)
'steel':WithdrawOres('X','X',9,18,rock1,rock2)
'mith':WithdrawOres('X','X',5,20,rock1,rock2)
'addy':WithdrawOres('X','All',4,0,rock1,rock2)
'rune':WithdrawOres('X','X',3,24,rock1,rock2)
End;
end;
Procedure CastSuperheats;
begin
if (not(Loggedin)) then exit;
Gametab(7)
Cast('Superheat Item')
FindDTM(inttostr(Players[currentplayer].strings[0]));
Wait(450+random(150));
end;
Procedure Bank;
begin
Mouse(MouseCoordX, MouseCoordy, 5, 5, false)
Wait(50+random(50))
ChooseOption(x, y, 'All')
Wait(50+random(50))
Loads := Loads+1
end;
ClearDebug;
Writeln('<|----------------------------------------------|>');
Writeln(' AutoFighter v'+VerNumber+' by Bonfield ');
Writeln(' Worked for: '+GetTimeRunning;
Writeln(' Banked ' + IntToStr(Loads));
Writeln('<|----------------------------------------------|>');
begin
setupSrl;
Mousespeed:=Mspeed;
DeclarePlayers;
ActivateClient;
LoadDtms;
LoginPlayer;
MakeCompass('n')
repeat
WithdrawNats
WithdrawOres
CastSuperheats
ProgressReport;
until(Loads = Players[currentplayer].integers[0]);
if(LoggedIn) then LogOut;
if(Players[CurrentPlayer].Active = false) then NextPlayer(false)
else NextPlayer(true);
until(false);
end.
line 236, i didn't understand what you wanted to do there. theres probably some other errors left.
you had forgotten some end; btw, remember that a CASE also needs a end; like in line 221![]()
SCAR Code:Procedure CastSuperheats;
begin
if (not(Loggedin)) then exit;
Gametab(7);
Cast('Superheat Item');
Wait(450+random(150));
If FindDTM (Rock1, x, y, MIX1, MIY1, MIX2, MiY2) then
begin
MMouse(x,y,2,2);
wait(50+random(150));
if IsUpText('OreText') then
begin
Mouse(x,y,5,5,True);
Wait(450+random(150));
end;
end;
end;
It's just a simple finding you should try to add in some antirandom or antiban in it.
do you have that? nevermind.SCAR Code:{.include SRL/Skills/Magic.scar}
~ Metagen
because that includes the magic.scar from srl. Cast('Superheat Item'); is from magic.scar![]()
lol yea silly me
i changed my script a little and i added some antiban stuff but i need some help with the banking procedure
any help would be good
SCAR Code:program SuperHeat;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/magic.scar}
{
==========================================================================
This script superheats any ore
==========================================================================
Created for scar 3.12 and SRL 4
1. USE Runescape with Low Detail, Very Bright.
2. Set your Screen to 32 bit TRUE color.
3. Set Playernames and Passwords in DeclarePlayers.
4. Set NumberOfPlayers.
5. Position Players at any bank with fire staff equiped
6. Make sure your Players have ores and nature runes
Version 1- Original release
==========================================================================
}
Var
BankDTM,DTM,x,y,OreAmount,rock1,rock2,TotalBars,NatAmount,nat:integer;
Const StartPlayer = 0; // Determines who will play first
MSpeed = 13; //speed of the mouse...higher number slower speed, lower number higher speed
MySRLID = '107'; // Must be a string!
MySRLPassword = 'narellan'; // Must be a string!
VersionNumber = 1; // No need to change
Procedure DeclarePlayers;
begin
HowManyPlayers:= 1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:= StartPlayer; // CurrentPlayer = Array Index
Players[0].Name :='name'; //username
Players[0].Pass :='pass'; //password
Players[0].Nick :='nick'; //3-4 consecutive letters of your user name(NOT First letter)
Players[0].Strings[0] :='addy'; //type of bar bronze,iron,steel,mith,addy,rune,gold,silver,
Players[0].Pin :=0; //Pin number(not a string!!)
Players[0].integers[0]:=100; //how many times to use superheat per log in
Players[0].Active :=True; //are you going to use this player
end;
Procedure LoadDtms; //taken from Xcans Smelter
Begin
BankDTM := DTMFromString('78DA63EC60626008614001FFFFFF676060042' +
'310FB3F6303508D37448E09AAE6ED5B08CD08E583D50413A1269C' +
'809A0AC26A00E665129F');
DTM := DTMFromString('78DA637466626078C28002FC92FD18FE03694' +
'620FE0F048CEE40356F19D000231209A403806A1E1350630A54F3' +
'8A801A6BA09A87F8D50000EA6D0BDC');
case Lowercase(Players[CurrentPlayer].Strings[0]) of
'bronze':
begin
rock1 := DTMFromString('78DA639CC0C0C0C0C3C8800C7A9B9B1944803' +
'448F43F10304E063118D000231209A4E700090E46FC6ABA808424' +
'01357540828F809AA9404204BF1A0097F90A64');
rock2 := DTMFromString('78DA634C64606038C080021E345A328800694' +
'620FE0F048CB940C60E0634C0884402E954207182809A68207196' +
'801A7F207118BF1A00ACC90B66');
OreAmount:=27;
end;
'iron':
begin
rock1 := DTMFromString('78DA63DCCFC0C0E0CB80027CF59519B880342' +
'310FF0702C60D404618031A60442281F40E20114D40CD3120114A' +
'40CD6920E1855F0D00E4FC0A09');
rock2:=0
OreAmount:=27;
end;
'steel':
begin
rock1 := DTMFromString('78DA63DCCFC0C0E0CB80027CF59519B880342' +
'310FF0702C60D404618031A60442281F40E20114D40CD3120114A' +
'40CD6920E1855F0D00E4FC0A09');
rock2 := DTMFromString('78DA63EC676060F06140012626CA0C5C409A1' +
'188FF0301E374202394010D30229140BA11488411503307487811' +
'50D30D24A2F1AB0100797E090A');
OreAmount:=27;
end;
'silver':
begin
rock1 := DTMFromString('78DA6314636060106140011B36EC62E002D28' +
'C40FC1F0818F9810C050634C0884402690E202145408D0C116A14' +
'8184007E3500FB290711');
rock2:=0
OreAmount:=27;
end;
'gold':
begin
rock1 := DTMFromString('78DA631463606010614001F7B749317001694' +
'620FE0F048CFC408602031A604422813407909022A04686083520' +
'7B84F0AB0100B99E06A7');
rock2:=0
OreAmount:=27;
end;
'mith':
begin
rock1 := DTMFromString('78DA631462606010644001BEFEC50C5C409A1' +
'188FF0301A33C90C1CD8006189148202D0924C408A8E103123204' +
'D4B0030951FC6A004D1805E6');
rock2 := DTMFromString('78DA63EC676060F06140012626CA0C5C409A1' +
'188FF0301E374202394010D30229140BA11488411503307487811' +
'50D30D24A2F1AB0100797E090A');
OreAmount:=25;
end;
'addy':
begin
rock1 := DTMFromString('78DA634C646060F06340013E09BE0C22409A1' +
'188FF0301632E90E1CE8006189148201D0324A209A8F1C7B40B43' +
'4D3A9008C5AF06005E91088B');
rock2 := DTMFromString('78DA63EC676060F06140012626CA0C5C409A1' +
'188FF0301E374202394010D30229140BA11488411503307487811' +
'50D30D24A2F1AB0100797E090A');
OreAmount:=28;
end;
'rune':
begin
rock1 := DTMFromString('78DA631463606010624001FE19250C5C409A1' +
'188FF0301A32090A1C08006189148200DD22049408D0C909022A0' +
'46114808E057030066CC0623');
rock2 := DTMFromString('78DA63EC676060F06140012626CA0C5C409A1' +
'188FF0301E374202394010D30229140BA11488411503307487811' +
'50D30D24A2F1AB0100797E090A');
OreAmount:=27;
end;
end;
end;
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
if not LoggedIn then Exit;
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;
Function FindT:boolean;
Begin
repeat
if (not(Loggedin)) then exit;
wait(100+random(200));
Until (FindText(x, y, 'Enter amount:', UpChars, MCX1, MCY1, MCX2, MCY2));
result:=true
End;
procedure FindRandoms;
begin
FindFastRandoms;
FindNormalRandoms;
end;
Procedure WithdrawNats;
Begin
if (not(Loggedin)) then exit;
nat := DTMFromString('78DA633CC5C0C090C980023A1BEAC1342394C' +
'F781D4824A3AAD9BF7D1BAA9AF340A204554D656101AA9A7D4022' +
'17558DA78309AA9A639876CD99381155CD4D209187AA66C5DC39A' +
'86A8E008962543591C1C1286A00FD5E12FA');
// NatAmount:= (Players[currentplayer].integers[0])
if FindDTM(nat,x,y,MSX1,MSY1,MSX2,MSY2) then
begin;
Mouse(x,y,3,3,false)
wait(100+random(50))
if ChooseOption('x') then
TypeSend(inttostr(Players[currentplayer].integers[0]))
end;
end;
Procedure WithdrawOres(option1,option2:string;amount1,amount2,rock1,rock2:integer);
Begin
if (not(Loggedin)) then exit;
if rock2=0 then
begin
if FindDTM(rock1,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,3,3,false)
repeat
wait(10)
Until(ChooseOption('All'))
end else
Begin
Writeln('Logging Out')
closebank;
closebank;
exit;
end;
end else
begin
if FindDTM(rock1,x,y,MSX1,MSY1,MSX2,MSY2) then
Begin
repeat
Mouse(x,y,3,3,false)
wait(10)
Until(ChooseOption(option1))
if option1='X' then
begin
if FindT then
TypeSend(inttostr(amount1))
end;
If FindDTM(Rock2,x,y,MSX1,MSY1,MSX2,MSY2) then
Begin
repeat
Mouse(x,y,3,3,false)
wait(10)
Until(ChooseOption(option2))
if option2='X' then
begin
if FindT then
TypeSend(inttostr(amount2))
end;
end else
Begin
Writeln('Logging Out')
closebank;
closebank;
NextPlayer(false)
exit;
end;
end else
Begin
Writeln('Logging Out')
closebank;
closebank;
NextPlayer(false);
exit;
end;
end;
end;
Procedure InBank;
Begin
if (not(Loggedin)) then exit;
if (not(bankscreen)) then exit;
Case lowercase(Players[CurrentPlayer].Strings[0]) of
'bronze':WithdrawOres('X','All',13,13,rock1,rock2)
'iron','silver','gold':WithdrawOres('All','',0,0,rock1,rock2)
'steel':WithdrawOres('X','X',9,18,rock1,rock2)
'mith':WithdrawOres('X','X',5,20,rock1,rock2)
'addy':WithdrawOres('X','All',4,0,rock1,rock2)
'rune':WithdrawOres('X','X',3,24,rock1,rock2)
End;
end;
Procedure CastSuperheats;
begin
if (not(Loggedin)) then exit;
Gametab(7);
Cast('Superheat Item');
Wait(450+random(150));
If FindDTM (Rock1, x, y, MIX1, MIY1, MIX2, MiY2) then
begin
MMouse(x,y,2,2);
wait(50+random(150));
if IsUpText('OreText') then
begin
Mouse(x,y,5,5,True);
Wait(450+random(150));
end;
end;
end;
function FindBankers(var x, y: Integer): Boolean;
begin
if not LoggedIn then Exit;
Result := DTMRotated(BankDTM, x, y, MMX1, MMY1, MMX2, MMY2);
end;
Procedure ProgressReport
ClearDebug;
Writeln('<|----------------------------------------------|>');
Writeln(' AutoFighter v'+VerNumber+' by Bonfield ');
Writeln(' Worked for: '+GetTimeRunning;
Writeln(' Banked ' + IntToStr(Loads));
Writeln('<|----------------------------------------------|>');
begin
setupSrl;
Mousespeed:=Mspeed;
DeclarePlayers;
ActivateClient;
LoadDtms;
LoginPlayer;
MakeCompass('n')
repeat
WithdrawNats;
WithdrawOres;
CastSuperheats;
FindRandoms;
Bank;
ProgressReport;
until(Loads = Players[currentplayer].integers[0]);
if(LoggedIn) then LogOut;
if(Players[CurrentPlayer].Active = false) then NextPlayer(false)
else NextPlayer(true);
until(false);
end.
Remove your user name and pass (obviously i didnt quote the pass's);MySRLID = '107'; // Must be a string!
MySRLPassword = 'yourpass'; // Must be a string!
SCAR Code:Begin
Writeln('Logging Out')
closebank;
closebank;
exit;
end;
Whats the reasoning for the two closebank's?
SCAR Code:if(LoggedIn) then LogOut;
if(Players[CurrentPlayer].Active = false) then NextPlayer(false)
else NextPlayer(true);
No need for the Logout, NextPlayer will do it for you.
Also, why are you swaping the actives on the characters?.
//Edit, tried to change SRL stats pass for you but i guess it doesn't have that facility. Id adivse for you to get it changed just incase some newb wants to spam it.
Rogeruk's Al-Kharid Tanner V1.1 [Released]
Rogeruk's Barbarian Crafter [Coming Soon]
Rogeruk's Guild Fisher [Coming Soon]
!! - Taking Requests - !!
the two closebanks were because sometimes it didnt work but two solved it. i just left it like that. and bonfield just took that stuff so thats why its like that.
So the script isnt really yours? Most of the procedures are someone elses?
Rogeruk's Al-Kharid Tanner V1.1 [Released]
Rogeruk's Barbarian Crafter [Coming Soon]
Rogeruk's Guild Fisher [Coming Soon]
!! - Taking Requests - !!
If you're going to use someone's procedures/functions, then ask them for permission first, and then be sure to credit them in your script!
If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig
There are currently 1 users browsing this thread. (0 members and 1 guests)