SRL Archive - OSR Help

[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:202): Invalid number


fulldragons

2013-05-07 20:37:46

[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(229:202): Invalid number of parameters at line 228
Compiling failed.


Help me please.

Spiker

2013-05-08 04:06:26

Need to see the code/script to help you.

fulldragons

2013-05-08 04:38:13

program Yew_Chopper;
{$DEFINE SMART8}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
{$i SRL-OSR\SRL\misc\SmartGraphics.simba}
//.______ _______ ___ _______
//| _ \ | ____| / \ | \ _
//| |_) | | |__ / ^ \ | .–. |(_)
//| / | __| / /_\ \ | | | |
//| |\ \—-.| |____ / _____ \ | '–' | _
//| _| `._____||_______/__/ \__\ |_______/ (_)

// Please post any bugs on the forum:
// http://villavu.com/forum/showthread.php?t=101510

// Be sure to post your Proggy:
// http://villavu.com/forum/showthread.php?t=101510


// Do not edit anything beyond this point Unless you know what ur doing!
// Declaring things
var
Status : string;
Name : string;
Yew_log, Maple_log, index, index1, ProggyB, waitTime,Trips, ChoppedLogs, Count, InvSelfCount, prevHP, ToTreeP, Times, checkTime : integer;
OurPos : TPoint;
Rotated, BankFound, Wielding_Axe : boolean;

// FORM
Edits: Array [0..3] Of TEdit;
Checkbox1: TCheckbox;
ComboBox1: TCombobox;
frmDesign: TForm;
Button1: TButton;
Button2: Tbutton;
Button3: Tbutton;
Label60: TLabel;
Label61: Tlabel;
Labels: Array [0..5] Of TLabel;
LabelName: Array Of String;
Value : string;


// V 1.1 Multi_Location

// Added Maple Seers village Should work…

// Fixed X, Y, X1, Y1
// And some minor things

// ______ ______ .__ __. .___________. ___ ______ .___________.
// / | / __ \ | \ | | | | / \ / || | _
//| ,—-'| | | | | \| | `—| |—-` / ^ \ | ,—-'`—| |—-`(_)
//| | | | | | | . ` | | | / /_\ \ | | | |
//| `—-.| `–' | | |\ | | | / _____ \ | `—-. | | _
// \______| \______/ |__| \__| |__| /__/ \__\ \______| |__| (_)


// Skype: Maikel23350
// Forum: http://villavu.com/forum/showthread.php?t=101510

// Uses SRL random solvers, make sure you have the latest version!
// Credits, Maikel233 and Jelknab my friend for the HUGE support.


Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(1);
CurrentPlayer := 0;

// PLAYER INFO, TIP Your RS Username, Password, Pin IS NOT REQUIRED SIMPLY DISABLE SMART when Runescape Loads.
// Wielding_Axe:= False;
wielding_axe :=Checkbox1.checked;
Players[0].Name :=Edits[0].text;
Players[0].Pass :=Edits[1].text;
Players[0].Nick :=Edits[2].text;
Players[0].Pin :=Edits[3].text;
Players[0].Active:=True;
Players[0].LampSkill:= skill_woodcutting;


SetScreenName(Players[0].Nick);
end;

// Start of the form.

Procedure ButtonClick(Sender: TObject);
Begin
frmDesign.ModalResult:= mrOk;
End;
Procedure ButtonClick2(Sender: TObject);
Begin
ShowMessage('The nickname should be the last four digits of your username!');
Writeln('MSGBOX: The nickname should be the last four digits of your username! ');
end;

Procedure ButtonClick3(Sender: TObject);
Begin
ShowMessage('When the checkbox is checked you should equip the axe Manualy.');
ShowMessage('When the checkbox is unchecked you should keep the axe in the last inventory spot!.');
Writeln('MSGBOX: ');
end;

procedure InitForm;
begin
frmDesign := CreateForm; // This will create your form. MUST be called first.
frmDesign.Left := 100; // How many pixels from the left must the form be vissible?
frmDesign.Top := 100; // How many pixels from the top must the form be vissible?
frmDesign.Width := 400; // The width of you form in pixels
frmDesign.Height := 400; // The height of you form in pixels
frmDesign.Caption := 'Seers Village Maple & Yew Chopper!'; // The name of your form? This will be shown in the upper left balk
frmDesign.Color := ClWhite; // The background color of your form ("ClWhite", "ClBlack" ect, or just an color like: 123456)
frmDesign.Font.Color := ClBlack; // The color of the text (Tlabels) when you have those
frmDesign.Font.Name := 'Comic Sans MS'; // The name of the font you want the Tlabels to be


Button1 := TButton.Create(FrmDesign); // This will create the button. Must be called.
Button1.Parent := FrmDesign; // The parent is very important. Without the parrent set to the formname the button won't be visible
Button1.Left := 25; // how many pixels from the left
Button1.Top := 350; // how many pixels from the top
Button1.Height := 30; // the height of the button
Button1.Width := 350; // the width of the button
Button1.Caption := 'Start script!'; // The text on the button!
Button1.OnClick := @ButtonClick; //Dont forget the @

Button2 := TButton.Create(FrmDesign); // This will create the button. Must be called.
Button2.Parent := FrmDesign; // The parent is very important. Without the parrent set to the formname the button won't be visible
Button2.Left := 345; // how many pixels from the left
Button2.Top := 100; // how many pixels from the top
Button2.Height := 30; // the height of the button
Button2.Width := 50; // the width of the button
Button2.Caption := '?'; // The text on the button!
Button2.OnClick := @ButtonClick2; //Dont forget the @

Button3 := TButton.Create(FrmDesign); // This will create the button. Must be called.
Button3.Parent := FrmDesign; // The parent is very important. Without the parrent set to the formname the button won't be visible
Button3.Left := 345; // how many pixels from the left
Button3.Top := 200; // how many pixels from the top
Button3.Height := 30; // the height of the button
Button3.Width := 50; // the width of the button
Button3.Caption := '?'; // The text on the button!
Button3.OnClick := @ButtonClick3; //Dont forget the @

Checkbox1 := TCheckbox.Create(FrmDesign); // This will create the button. Must be called.
Checkbox1.Parent := FrmDesign; // The parent is very important. Without the parrent set to the formname the button won't be visible
Checkbox1.Left := 125; // how many pixels from the left
Checkbox1.Top := 200; // how many pixels from the top
Checkbox1.Height := 30; // the height of the button
Checkbox1.Width := 100; // the width of the button
Checkbox1.Caption := 'Equip axe?'; // The text on the button!




LabelName := ['Username:', 'Password:', 'Nickname:', 'Bank Pin:'];
For Index := 0 To 3 Do
Begin
Labels[Index] := TLabel.Create(FrmDesign);
Labels[Index].Parent := FrmDesign;
Labels[Index].Left := 10;
Labels[Index].Top := 10 + (45 * Index); // this will nicely line it up
Labels[Index].Caption := LabelName[Index];


End;



Label60 := TLabel.Create(FrmDesign); // This will create the label. Must Be called.
Label60.Parent := FrmDesign; // The parent is very important. Without the parrent set to the formname the label wont be visible
Label60.Top := 300; // how many pixels from the left
Label60.Left := 125; // how many pixels from the top
Label60.Caption := 'Created by maikel233'; // What does your label need to say?

Label61 := TLabel.Create(FrmDesign); // This will create the label. Must Be called.
Label61.Parent := FrmDesign; // The parent is very important. Without the parrent set to the formname the label wont be visible
Label61.Top := 250; // how many pixels from the left
Label61.Left := 10; // how many pixels from the top
Label61.Caption := 'Location:'; // What does your label need to say?


ComboBox1 := TComboBox.Create(FrmDesign);
ComboBox1.Parent := FrmDesign;
ComboBox1.Top := 250;
ComboBox1.Left := 125;
ComboBox1.Width := 200;
ComboBox1.Height := 20;
ComboBox1.Items.Add('Seers Village Yew');
ComboBox1.Items.Add('Seers Village Maple');




For Index := 0 To 3 Do
Begin
Edits[Index] := TEdit.Create(FrmDesign);
Edits[Index].Parent := FrmDesign;
Edits[Index].Top := 10 + (45 * Index);
Edits[Index].Left := 125;
Edits[Index].Width := 200;
Edits[Index].Height := 20;
end; // Edits[index].PasswordChar := '*'; // If you want Everything cencored
end;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('InitForm', v);
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

// end of the fucking form.


Procedure Proggy;
var
x, y, XpEarned,Inventory, Nests, Trips, TimeGone : integer;
Box : Tbox;
begin
if Wielding_Axe then
begin
Count := InvCount;
end else
Count := InvCount - 1;
if not (InvSelfCount = InvCount) and (InvCount > 0) then
begin
Yew_log := BitmapFromString(3, 3, 'meJyzyWnlMAzgcI8HkbreHE5RUNLE' + 'HQBVWgW5');
Maple_log := BitmapFromString(3, 3, 'meJxjaGhgQEYMYARmAwBwGwgB');
Box := IntToBox(InvBox(InvCount).X1,InvBox(InvCount).Y1,InvBox(InvCount).X2,InvBox(InvCount).Y2)
if findBitmapToleranceIn(Yew_log, x, y, Box.x1, Box.y1, Box.x2, Box.y2, 15) then
begin
SMART_ClearCanvas;
inc(ChoppedLogs);
SMART_DrawCircle(False, Point(x, y), 10, False, clred);
InvSelfCount := InvCount;
end;
FreeBitmap(Yew_log);
FreeBitmap(Maple_log);
end;
ClearDebug;
writeln('########Seers village' + Name + ' by Maikel233########');
Writeln('| Running for: ' + timeRunning);
Writeln('| Status: ' + Status);
if (ChoppedLogs < 1) then exit;
TimeGone := (GetTimeRunning/1000);
XpEarned := (ChoppedLogs * 250);
Writeln('| Chopped: ' + IntToStr(ChoppedLogs) + ' logs, that is ' + IntToStr(3600 * (ChoppedLogs) / TimeGone) + ' per hour!');
Writeln('| We earned: ' + IntToStr(XpEarned) + ' XP this sesion, that is ' + IntToStr(3600 * XpEarned / TimeGone) + ' per hour');
Writeln('| We did: ' + IntToStr(Trips) + ' trips')
// Writeln('| Found: ' + IntToStr(Nests) + ' bird nests')
Writeln('| Profit Gained: ' + IntToStr(Choppedlogs * 439) + ' GP!'); // // http://forums.zybez.net/pages/2007-price-guide?id=820 // Check Zybez for the CURRENT PRICE
Writeln('#######################################################');
end;

Procedure AntiBan;
var
AntiBanRandom : integer;
begin
AntiBanRandom := Random(100);
Case AntiBanRandom Of
1: Status := 'AntiBan: Checking skill';
2: Status := 'AntiBan: Checking skill';
3: Status := 'AntiBan: Bored human';
4: Status := 'AntiBan: Random wait';
6: Status := 'AntiBan: Pick up mouse';
7: Status := 'AntiBan: Random right click';
8: Status := 'AntiBan: Compass movement';
9: Status := 'AntiBan: hover over friends tab';
10: Status := 'AntiBan: random movement';
end;
proggy;
Case AntiBanRandom Of
1: HoverSkill('woodcutting', False);
2: HoverSkill('hitpoints)', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
6: PickUpMouse;
7: RandomRClick;
8: CompassMovement(5, 30, true);
9: HoverOnlineFriend;
10: RandomMovement;
end;
end;

Function isChopping: Boolean;
begin
Result := (AveragePixelShift(IntToBox(MSCX-20, MSCY-20, MSCX+20, MSCY+20), 250, 500) > 50);
end;

function CheckLocation : string;
begin
OurPos := SPS_GetMyPos;

if pointInBox(OurPos, IntToBox(2637, 2814, 2640, 2820)) then Result := 'church';
Result := 'church';

if pointInBox(OurPos, IntToBox(2700, 2670, 2742, 2679)) then
Result := 'Bank_Maple';

if pointInBox(OurPos, IntToBox(2706, 2703, 2736, 2715)) then
Result := 'Bank';
end;

procedure Check;
var
CheckVar: TPointArray;
begin

if (GetSkillInfo('hitpoints', true) < prevHp) then
RunAway('E', true, 1, 2000);
prevHp := GetSkillInfo('hitpoints', true);

end;
procedure ToBank;
var
ToBankVar: TPointArray;
begin

case ComboBox1.TEXT of
'Seers Village Yew': begin
Name := 'Seers Village Yew Chopper'
if (CheckLocation = 'Bank') then exit;

Status := 'Walking to bank'; proggy;
ToBankVar:= [Point(2656, 2825), Point(2689, 2830), Point(2709, 2816), Point(2714, 2798), Point(2721, 2776), Point(2721, 2756), Point(2721, 2735), Point(2721, 2714)];
SPS_WalkPath(ToBankVar);
if (CheckLocation = 'Bank') then exit;
SPS_BlindWalk(Point(2721, 2714))
end;

'Seers Village Maple': begin
Name := 'Seers Village Maple Chopper'

if (CheckLocation = 'Bank') then exit;

Status := 'Walking to bank'; proggy;
// ToBankVar:= [Point(2726, 2675), Point(2713, 2676), Point(2694, 2679), Point(2688, 2690), Point(2684, 2704), Point(2691, 2727), Point(2705, 2741), Point(2721, 2738), Point(2724, 2715)];
ToBankVar:= [Point(2726, 2675), Point(2724, 2715)];
SPS_WalkPath(ToBankVar);
// if (CheckLocation = 'Bank') then exit;
// SPS_BlindWalk(Point(2721, 2714))
end;
end;
end;



procedure ToTree;
var
ToTreeVar: TPointArray;
begin

case ComboBox1.TEXT of
'Seers Village Yew': begin
Name := 'Seers Village Yew Chopper'

if (CheckLocation = 'church') then exit;

Status := 'Walking to the church'; proggy;
ToTreeVar:=[Point(2721, 2715), Point(2722, 2740), Point(2727, 2762), Point(2715, 2776), Point(2709, 2792), Point(2699, 2816), Point(2685, 2825), Point(2663, 2827)];
SPS_WalkPath(ToTreeVar)
if (CheckLocation = 'church') then exit;
SPS_BlindWalk(Point(2663, 2827))

end;

'Seers Village Maple': begin
Name := 'Seers Village Maple Chopper'

if (CheckLocation = 'Bank_Maple') then exit;

Status := 'Walking to the behind the bank'; proggy;
// ToTreeVar := [Point(2720, 2712), Point(2722, 2732), Point(2708, 2733), Point(2695, 2728), Point(2688, 2712), Point(2688, 2693), Point(2693, 2679), Point(2706, 2676), Point(2723, 2675), Point(2733, 2676)];
ToTreeVar := [Point(2724, 2715), Point(2726, 2675)];
SPS_WalkPath(ToTreeVar)
if (CheckLocation = 'Bank_Maple') then exit;
SPS_BlindWalk(Point(2730, 2673))

end;
end;
end;

procedure BankItems;
var
x, y, Inventory, BankColor : integer;

begin
repeat

if not (CheckLocation = 'Bank') then
ToBank;

Status := 'Searching bank'; proggy;
MakeCompass(5); // Rotation
BankColor := 8229017; // Color of the bank glass

if FindObj(x, y, 'ooth', BankColor, 15) then
begin
Mouse(x, y, 5, 5, true);
BankFound := true;
wait(randomRange(250, 1000))
end;

if(PinScreen) then
InPin(Players[0].Pin);
if PinPending then
ConfirmPin();

until BankScreen;
if not bankscreen then bankitems;

Status := 'Banking'; proggy;
if Wielding_Axe then
DepositAll
else // Else estatement.
Deposit(1,27,27);

CloseBank;
Mouse(MMCX, MMCY + 50, 5, 5, true);

inc(Trips);
BankFound := false;
if InvFull then
bankItems
end;


procedure chop;
var
x, y, TreeColor : integer;
Chopping : boolean;
TreeText : string;
TreeTextt : string;

begin
case ComboBox1.TEXT of
'Seers Village Yew': begin
Name := 'Seers Village Yew Chopper'
repeat
FindNormalRandoms;

if not loggedin then terminateScript;

Chopping := isChopping;
treecolor := 4089180

if FindObj(x, y, 'hop', TreeColor, 5) then
// I'm so used to code in VB.NET and C# So lets see if the its detects Tree,Oak, Maple.
begin

TreeText := GetTextAtExWrap(79, 0, 109, 20, 0, 5, 1, 52171, 65, 'P07UpChars');
TreeTextt := GetTextAtExWrap(75, 0, 109, 20, 0, 5, 1, 13882113, 65, 'P07UpChars');

Writeln(TreeText)
writeln(Treetextt)
if (TreeTextt = 'Tree') then
SPS_BlindWalk(Point(2663, 2827));

if (TreeTextt = 'Oak') then
SPS_BlindWalk(Point(2663, 2827));

if (TreeTextt = 'Maple') then
SPS_BlindWalk(Point(2663, 2827));

if (TreeText = 'Yew') then
begin
Status := 'Thats an ENT tree!'; proggy;
Mouse(MSCX, MSCY, 0, 0, true)
end else
if (distance(x, y, MSCX, MSCY) > 140) or not Chopping then
begin
Mouse(x, y + 12, 3, 3, true);
Status := 'Cutting Yew tree'; proggy;
Check; // Checks Hitpo SPS_BlindWalk(Point(2663, 2827)); ints, Should be waaay faster then old method.
// Remove the Check; If you dont want slower chopping Chopping progress increasingwith 1 sec…
end;
end else if not Chopping then
SPS_BlindWalk(Point(2663, 2827));

if not (CheckLocation = 'church') and not Chopping then
ToTree;




Antiban;
proggy;
until InvFull
end;

'Seers Village Maple': begin
Name := 'Seers Village Maple Chopper'

repeat
FindNormalRandoms;

if not loggedin then terminateScript;

Chopping := isChopping;
treecolor := 9556

if FindObj(x, y, 'hop', TreeColor, 5) then
// I'm so used to code in VB.NET and C# So lets see if the its detects Tree,Oak, Maple.
begin

TreeText := GetTextAtExWrap(79, 0, 109, 20, 0, 5, 1, 52171, 65, 'P07UpChars');
TreeTextt := GetTextAtExWrap(75, 0, 109, 20, 0, 5, 1, 13882113, 65, 'P07UpChars');

Writeln(TreeText)
writeln(Treetextt)
if (TreeTextt = 'Tree') then
SPS_BlindWalk(Point(2730, 2673));

if (TreeTextt = 'Oak') then
SPS_BlindWalk(Point(2730, 2673));

if (TreeTextt = 'Yew') then
SPS_BlindWalk(Point(2730, 2673));

if (TreeText = 'Maple') then
begin
Status := 'Thats an ENT tree!'; proggy;
Mouse(MSCX, MSCY, 0, 0, true)
end else
if (distance(x, y, MSCX, MSCY) > 140) or not Chopping then
begin
Mouse(x, y + 12, 3, 3, true);
Status := 'Cutting Maple tree'; proggy;
Check; // Checks Hitpo SPS_BlindWalk(Point(2663, 2827)); ints, Should be waaay faster then old method.
// Remove the Check; If you dont want slower chopping Chopping progress increasingwith 1 sec…
end;
end else if not Chopping then
// SPS_BlindWalk(Point(2663, 2827));

if not (CheckLocation = 'Bank_Maple') and not Chopping then
ToTree;




Antiban;
proggy;
until InvFull
end;
end;
end;

procedure Seers_Yew;
begin
repeat

FindNormalRandoms;

if InvFull then
begin
ToBank;
BankItems;
end;

if not InvFull then
begin
ToTree;
chop;
end;

until false
end;

procedure Seers_Maple;
begin
repeat

FindNormalRandoms;

if InvFull then
begin
ToBank;
BankItems;
end;

if not InvFull then
begin
ToTree;
chop;
end;

until false
end;


begin
SafeInitForm; // those 2 function are the action form setup. Thise one creates your form
SafeShowFormModal; // and this one makes it visible
case ComboBox1.TEXT of
'Seers Village Yew': begin
Name := 'Seers Village Yew Chopper'

DeclarePlayers;
SetUpsrl;
SPS_Debug := true;
SPS_Setup(runescape_surface, ['6_6']);
ActivateClient;
DeclarePlayers;
LoginPlayer;
PrevHP := GetSkillInfo('hitpoints', true);
MakeCompass(5);
SetAngle(0);
InvSelfCount := InvCount;

Writeln('Thank you for trying this script!')
proggy;

Seers_Yew;
;
end;
// This one uses other loop, I could recode public version to Cases, but i wont want an Flawless chopper, Only my private haves that.
'Seers Village Maple': begin
Name := 'Seers Village Maple Chopper'

DeclarePlayers;
SetUpsrl;
SPS_Debug := true;
SPS_Setup(runescape_surface, ['6_6']);
ActivateClient;
DeclarePlayers;
LoginPlayer;
PrevHP := GetSkillInfo('hitpoints', true);
MakeCompass(5);
SetAngle(0);
InvSelfCount := InvCount;

Writeln('Thank you for trying this script!')
proggy;

Seers_Maple;
end;
end;
end.

fulldragons

2013-05-08 04:40:16

this is the script. Help someone please

tealc

2013-05-08 04:59:05

Have you installed smart 8?

fulldragons

2013-05-08 05:01:08

idk, some link? i will try.

fulldragons

2013-05-08 05:10:47

think than not, could you send me some link?

tealc

2013-05-08 05:12:43

http://villavu.com/forum/showthread.php?t=87801
http://villavu.com/forum/showthread.php?t=100478

fulldragons

2013-05-08 05:20:11

i dont speak good english, so the first link - were i can extract the files? Help please and excuse me for english

tealc

2013-05-08 05:26:33

Extract to the plugins folder, something like C:\Simba\Plugins

fulldragons

2013-05-08 05:34:38

i downloaded file.zip, extracted to plugins and still dont work. Any help please?

tealc

2013-05-08 05:50:25

follow this tutorial http://www.youtube.com/watch?v=IqukGefbw48

fulldragons

2013-05-08 06:12:06

yes, thank you so much. It work now