SRL Archive - OSR Help

script help missing semicolon?


pcap

2013-03-01 18:37:03

idk wats wrong

Procedure Eat_Food;
Begin
Repeat
If (HPPercent <10) then
P07_FindObjcustom(x,y ['rout'], [7238283], 2) then
Clickmouse(mouse_left);
End;

says missing semi colon on line 37

Press Play

2013-03-01 18:47:29

From: pcap
idk wats wrong

Procedure Eat_Food;
Begin
Repeat
If (HPPercent <10) then
P07_FindObjcustom(x,y ['rout'], [7238283], 2) then
Clickmouse(mouse_left);
End;


says missing semi colon on line 37


Please post simba code in simba tags as I have done above :) What script are you using? If it is an anti-leech, I cannot help you.

pcap

2013-03-01 18:51:55

i m trying to make a cow killer script idk what i m doing wrong ill post script that eats when low

program Cow_Killer;

{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}

var
x, y: Integer;
Test: Tstringarray;


procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
End;

procedure Kill_Cow;
Begin
repeat
If P07_FindObjCustom (x,y, ['ow'], [1848381, 11975615],3) then
ClickMouse2(Mouse_left);
Wait(4500)
until(HPPercent <10);
End;

Procedure Eat_Food;
Begin
Repeat
If (HPPercent <10) then
P07_FindObjcustom(x,y ['rout'], [7238283], 2) then
Clickmouse(mouse_left);
End;

begin
SetupP07Include;
DeclarePlayers;
P07_LoginPlayer;
Repeat
Kill_Cow;
Until(false);

end.

i do not know how to post in simba tags sorry

Element17

2013-03-01 18:56:05

Use SIMBA tags man….he already said that, but try this? I don't have the include soooo

program Cow_Killer;

{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
//{$I P07Include.Simba}

var
x, y: Integer;
Test: Tstringarray;


procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :='pcapp5';
Players[0].Pass :='paul5';
Players[0].Nick :='capp';
Players[0].Active:=True;
End;

procedure Kill_Cow;
Begin
repeat
//If P07_FindObjCustom (x,y, ['ow'], [1848381, 11975615],3) then
ClickMouse2(Mouse_left);
Wait(4500)
until(HPPercent <10);
End;

Procedure Eat_Food;
Begin
Repeat
If (HPPercent <10) then
P07_FindObjcustom(x,y ['rout'], [7238283], 2)
Clickmouse2(True);
End;

begin
SetupP07Include;
DeclarePlayers;
P07_LoginPlayer;
Repeat
Kill_Cow;
Until(false);

end.

Also you had a random then somewhere which shouldn't be. Just remove the //

Saint//+

2013-03-01 18:57:13

you do it like this

[(Simba)]
your code here
[(/)simba]

but without the parenthesis

look at the 4th 5th and 6th lines of code from your first post
think about how if… then statements work

pcap

2013-03-01 19:03:15

…. i cant get it i changed some things but still same thing about semicolon

pcap

2013-03-01 19:05:39

how do i put in simba tag? so i m can post it better

Ian

2013-03-01 19:11:07

From: pcap
how do i put in simba tag? so i m can post it better


Click "go advanced", then click the picture of Simba above the chatbox. Then click "ok" if a window pops up. Then put your text inside the tags (between "]" and "[/" )

Press Play

2013-03-01 19:17:41

Your EatFood procedure was screwed ahah :) Replace it with this, and it will compile:
Procedure Eat_Food;
Begin
Repeat
If (HPPercent <10) then
if PO7_FindObjcustom(x,y, ['rout'], [7238283], 2) then
Clickmouse2(mouse_left);
until(HPPercent > 50)
End;

However, you should not use FindObjcustom(); for objects in your inventory. Try looking up a tutorial on DTM's in the beginner section :)

E: You mistakes in the procedure:
  • Repeat with no closing Until()
  • No comma between y and ['rout']

pcap

2013-03-01 19:18:51

edit

pcap

2013-03-01 19:22:24

From: -daazndagger-
Your EatFood procedure was screwed ahah :) Replace it with this, and it will compile:
Procedure Eat_Food;
Begin
Repeat
If (HPPercent <10) then
if PO7_FindObjcustom(x,y, ['rout'], [7238283], 2) then
Clickmouse2(mouse_left);
until(HPPercent > 50)
End;

However, you should not use FindObjcustom(); for objects in your inventory. Try looking up a tutorial on DTM's in the beginner section :)

E: You mistakes in the procedure:
  • Repeat with no closing Until()
  • No comma between y and ['rout']


yea i think i gotta look up a new DTM cus now its saying unkown identifier for the P07_findobjcustom

Press Play

2013-03-01 19:28:01

From: pcap
yea i think i gotta look up a new DTM cus now its saying unkown identifier for the P07_findobjcustom

Yes, make sure {$I P07Include.Simba} is still defined at the top. And don't double post please, just edit your previous post :)

pcap

2013-03-01 19:29:21

it is anything else that would make that unkown? btw thank you very much for help i m new to scripting