Log in

View Full Version : Made script but can't use chooseoption!!!



10wnu9
03-20-2012, 12:12 AM
Hey Guys, I have Endevoured On Making an easy Tree cutter around the G.E that then Drops Logs, Everything Is working But at the end To Drop I have

"ChooseOption('Dro');"

I keep Getting this error saying Type Mismatch, HELP I'm so close!!!!!!!!!!!!!!

10wnu9
03-20-2012, 12:14 AM
I never Explained, as Soon As I have somebody here to Help I will explain better, I am Currently Using YOHOJO's Video guides, really good, slightly confusing for the first time scripter though.

x[Warrior]x3500
03-20-2012, 12:15 AM
the chooseoption part is ok. some other part must be wrong.

Gucci
03-20-2012, 12:15 AM
Use ChooseOption('rop'); as you usually leave out the first letter or it could be like a missed ; before that lime

10wnu9
03-20-2012, 12:17 AM
Hmm I think I have Tried that Gucci Wait up but thanks.

x[Warrior]x3500
03-20-2012, 12:18 AM
"ChooseOption('Dro');" compiles. thus it isnt the issue. u need to post the code for us to even think about helping u. :)

10wnu9
03-20-2012, 12:18 AM
No, Not working gucci, should I send you part of the script?:duh:

Gucci
03-20-2012, 12:19 AM
Sure I'll take a look

10wnu9
03-20-2012, 12:19 AM
Post The code....?

Explain, Like post part Of the script?

It's Messy due to It being my first time.

10wnu9
03-20-2012, 12:20 AM
Begin

LogDTM := DTMFromString('mbQAAHicY2VgYHRmYmAwA2JTIHYHY18gfgI UfwTE74D4LRDfBWJFKOUgyYSCzNgAkYsGAwAMsgHha==');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15, 19,23,27,4,8,12,16,20,16,12,8,4];

For I:=0 To 27 Do
Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.X1,Slotbox.Y1, SlotBox.X2, Slotbox.Y2) Then

begin
MouseItem(LogPattern[I],False)
ChooseOption('rop')
End;
End;

End;



There, that is My dropping Part Of the script...Sometimes I have Errors if I put ; on the end of things and works if I leave it? wtf nvm.

10wnu9
03-20-2012, 12:24 AM
Anybody?

x[Warrior]x3500
03-20-2012, 12:26 AM
MouseItem(LogPattern[I],mouse_Right);


edit: ;)

Gucci
03-20-2012, 12:27 AM
Whats the error? So far just ;'s missing

E: Warrior you ninja

10wnu9
03-20-2012, 12:27 AM
If That Works I will Be VERY thankful!

It does compile now to run it.

bolshak25
03-20-2012, 12:28 AM
mouseitem(logpattern[i],Mouse_right);
chooseoption('rop');

parameters changed on mouse things, and you need the semicolons

10wnu9
03-20-2012, 12:30 AM
Added SemiColons, Fixed, now Running, Can Anybody Possibly find me a Tree colour that is reliable even after It Is cut down or is that too much to ask, mine don't work well.

Gucci
03-20-2012, 12:35 AM
Use Auto Color Aid

10wnu9
03-20-2012, 12:45 AM
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]


How do I change this, It crashes my script, the script gets full invo of logs, does antiban checks a random stat then stops instead of dropping?

Help, I'm not impatient, I have all week, How long did it take you guys to make you first Woodcutting/fishing/mining bot?

Gucci
03-20-2012, 12:47 AM
My first script was a ivy cutter and took me about a day to get it good enough for release and it would help if you posted the entire script

10wnu9
03-20-2012, 12:48 AM
Isn't it something Like FreeDTM'S?

Where do I place that, I learnt It somewhere.

10wnu9
03-20-2012, 12:49 AM
:garfield: Yeah might do, But I know It's hardly gunna get leeched lool but won't it be too long?

Gucci
03-20-2012, 12:51 AM
No you use freedtms when you actually making dtms for something in the script. Just ignore that, and place script in Simba tags

10wnu9
03-20-2012, 12:52 AM
Sorry for being a newb, Explain and elaborate on Simba tags?

I'm not a good scripter or good on these forums I see.

Gucci
03-20-2012, 12:55 AM
Everbody was a newb once :) and place script between

10wnu9
03-20-2012, 12:57 AM
Eek? Like What are simba tags, sorry for being so bad, doesn't help it being 1:00am in the UK and Being 13 means I'm bloody well tired.

Still want the script done Lol.

So show an example of Simba Tags PLEASE! :D

Gucci
03-20-2012, 12:59 AM
Oops it didn't show up :p like this : ["SIMBA"][/"SIMBA"] remove the quotation marks

10wnu9
03-20-2012, 01:03 AM
program TreeANNIHILATORV10;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const

World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;




procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := ''; // 3 letters of your username (not the first letter)
Players[0].Active := True;

end;
Function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
Begin
MMouse(x,y,5,5);
If WaitUptext(Uptext, 1500+Random(500)) Then
Begin
Result:= True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;




procedure AntiBan;

begin

if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(6782+Random(298));
Gametab(Tab_Inv);
MakeCompass('W');
Wait(6788+Random(222));
HoverSkill('Woodcutting', false);
wait(3876+Random(229));
end;
1: PickUpMouse;
2:
begin
MakeCompass('S');
wait(222+random(133));
MakeCompass('W');
wait(50+random(133));
MakeCompass('E');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var x, y, PlusOne, TreeCounter: integer;
begin
PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, 3424846, 5, 1, 15, 60, 600, ['Cho'])then

Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;






repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

//Breaker!


then Mouse(x, y, 2, 2, false);
ChooseOption('hop')
Wait(198+Random(128));

//Breaker!

FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

//Breaker!

then
Mouse(x,y,0,0,false);
ChooseOption('hop')
Wait(222+Random(122));


//Breaker!

WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');


end;
repeat
Wait(75+Random(286)); MakeCompass('W');
Wait(500+Random(122));
Wait(75+Random(133)); MakeCompass('E');
MarkTime(TreeCounter);
wait(400+random(250));
AntiBan;
If InvCount=PlusOne Then
WriteLn('We ANNIHILATED another log!');
Until not IsUpText('ew') or (InvFull);
until(InvFull);

End;

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin

LogDTM := DTMFromString('mbQAAHicY2VgYHRmYmAwA2JTIHYHY18gfgI UfwTE74D4LRDfBWJFKOUgyYSCzNgAkYsGAwAMsgHha==');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15, 19,23,27,4,8,12,16,20,16,12,8,4];

For I:=0 To 27 Do
Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.X1,Slotbox.Y1, SlotBox.X2, Slotbox.Y2) Then

begin
MouseItem(LogPattern[I],1);
ChooseOption('rop');
End;
End;

End;




begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;

repeat

ChopTree;
If Invfull then
DropLogs;
until(False);

End.

There, nearly left details in, might be some random stuff not been cleared up yet though.

10wnu9
03-20-2012, 01:09 AM
Yeah, Cuts Exactly Until Inventory full, Once It Discovers It can't cut I get some queer DTM error and IF FINDDTM(LOGDTM,X,Y,SLOTBOX,X1 part goes orange. Erm error?

10wnu9
03-20-2012, 01:21 AM
Any Luck Gucci???

x[Warrior]x3500
03-20-2012, 01:30 AM
the dtmfromstring is not a real dtm. u need to create a new one.

10wnu9
03-20-2012, 01:33 AM
Dayumn, I'll fix a little bit, show you it then go.

10wnu9
03-20-2012, 01:43 AM
Okay So, You basically mean, Create a new Log DTM and Replace it for this faulty one?

x[Warrior]x3500
03-20-2012, 01:44 AM
exactly

10wnu9
03-20-2012, 01:48 AM
Done, Testing now, should I expect it to drop the logs?

Gucci
03-20-2012, 01:56 AM
Sorry I was out for dinner. But yeah there are a lot of missing semicolons still, also you could replace all the slotbox's with MIX1, MIY1, MIX2, MIY2, these are for items in inventory

Also try it like this

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin

LogDTM := DTMFromString('mbQAAHicY2VgYHRmYmAwA2JTIHYHY18gfgI UfwTE74D4LRDfBWJFKOUgyYSCzNgAkYsGAwAMsgHha==');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15, 19,23,27,4,8,12,16,20,16,12,8,4];

if InvFull then //added

begin // added

For I:=0 To 27 Do
Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,MIX1,MIY1, MIX2, MIY2) Then

begin
MouseItem(LogPattern[I],1);
ChooseOption('rop');
End;
End;

End;
End;

10wnu9
03-20-2012, 01:56 AM
Okay, Not Neccessary but If It doesn't take long, how do I fix my Jerky Little cursor?

Can I make it smoother easily?

10wnu9
03-20-2012, 02:11 AM
ARGH!!!!

Right YOHOJO says put in some queer thing called StatsGuise, done it and It won't work....NEEYAHHHH!!!!!!!!

Gucci
03-20-2012, 02:14 AM
Did you try what I posted?

Also:

Okay well simplest way is to set up dropping like

procedure Dropping;
begin

If InvFull then

begin
DropAll;
end;
end;
end;

This will go vertically through each row until Inv is empty

x[Warrior]x3500
03-20-2012, 02:14 AM
ARGH!!!!

Right YOHOJO says put in some queer thing called StatsGuise, done it and It won't work....NEEYAHHHH!!!!!!!!

its some procedure made by someone in this community. essentially just do:

status('');
or
disguise('');

10wnu9
03-20-2012, 02:18 AM
Never Mind that for now I don't see it necessary for my script.

I have a problem atm, might find my own fix, I'll ask you guys after.

I'm really bloody tired.

10wnu9
03-20-2012, 02:23 AM
program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const

World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;




procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := ''; // 3 letters of your username (not the first letter)
Players[0].Active := True;

end;
Function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
Begin
MMouse(x,y,5,5);
If WaitUptext(Uptext, 1500+Random(500)) Then
Begin
Result:= True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;




procedure AntiBan;

begin

if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(7873+Random(298));
Gametab(Tab_Inv);
MakeCompass('W');
Wait(9346+Random(222));
MakeCompass('E');
end;
1: PickUpMouse;
2:
begin
MakeCompass('S');
wait(222+random(1335));
MakeCompass('W');
wait(561+random(133));
MakeCompass('E');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var x, y, PlusOne, TreeCounter: integer;
begin
PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, 3424846, 5, 1, 15, 60, 600, ['Cho'])then

Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;



repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198+Random(128));

FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then
Mouse(x,y,0,0,false);
ChooseOption('hop');
Wait(222+Random(122));

WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');

end;

Flag;
MarkTime(TreeCounter);

repeat
Wait(75+Random(286)); MakeCompass('W');
Wait(500+Random(122));
Wait(75+Random(133)); MakeCompass('E');
wait(400+random(250));
AntiBan;
If InvCount=PlusOne Then
WriteLn('We ANNIHILATED another log!');
Until not IsUpText('ew') or (InvFull);
until(InvFull);

End;

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin

LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfg IUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15, 19,23,27,4,8,12,16,20,16,12,8,4];

If InvFull then

begin
For I:=0 To 27 Do

Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then

begin
MouseItem(LogPattern[I],1);
ChooseOption('Dro');
End;
End;

End;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;

repeat

ChopTree;
If Invfull then
DropLogs;
until(False);

end.

Okay, So I get the orange bar through end.

Why? It Happens frequently, somebody explain please My brain is about to just go, screw you SRL theres a pillow.

Trust me.

10wnu9
03-20-2012, 02:33 AM
Bolshak i know your reading, your experienced, my brain isn't working, explain why i get the orange bar error on "end."

expected semi colon or something for the end of script.

bolshak25
03-20-2012, 02:35 AM
Begin

LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfg IUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15, 19,23,27,4,8,12,16,20,16,12,8,4];

If InvFull then

begin
For I:=0 To 27 Do

Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then

begin
MouseItem(LogPattern[I],1);
ChooseOption('Dro');
End;
End;
end;
End;

you were missing an end;

now try it