SRL Archive - Help

quick help


wantonman

2012-01-02 02:56:01


PROCEDURE CHOPWOOD;
VAR
X,Y:INTEGER;
BEGIN
IF
FINDOBJCUSTOM(x, y, ['Map', 'le'], [1649232, 3036025, 2639739, 2242667], 7)
THEN BEGIN
MOUSE(X,Y,6,6,TRUE);
REPEAT
IF NOT // HERE IS WHERE IT FAILS
(IsUpTextMultiCustom('Map', 'le')) // HOW CAN YOU REWRITE THIS FUNCTION TO MAKE SENSE
THEN BEGIN
CHOPWOOD;
UNTIL
(INVENFULL);
END;
END;
END;


Kyle Undefined

2012-01-02 02:56:54

What are you trying to do?

YoHoJo

2012-01-02 03:00:56

First, fix your standards! (Spacing)
Second DO NOT CAPITALIZE bold words, EVERYONE hates it! :p
Third, after finding the object you are saying Mouse (which CLICKS) so no need to check for uptext once you have already clicked it, right?
ALSO THIRD, FindObj checks for uptext already, which is why you have '['Map', 'le']' already inside of findobj!

Ghetto Sample Code:
PROCEDURE CHOPWOOD;
VAR
X,Y:INTEGER;
BEGIN
IF FINDOBJCUSTOM(x, y, ['Map', 'le'], [1649232, 3036025, 2639739, 2242667], 7) THEN
Writeln('We Found Tree And Clicked It!')
END;

Repeat
ChopWood;
FindNormalRandoms;
Antiban;
Until(InvVull)

wantonman

2012-01-02 03:07:29

i just want to get it to compile, i got invalid number of parameters… lol i forgot how to use a function in this way.



procedure vlof;
begin
IF NOT (IsUpTextMultiCustom('Map', 'le'))THEN
BEGIN
CHOPWOOD;
until(invfull)
end;
end;

YoHoJo

2012-01-02 03:09:51

You can type the function into the text box on the function list into simba and look it up:
{*******************************************************************************
function IsUpTextMultiCustom(Text: TStringArray): Boolean;
By: Starblaster100 / Nielsie95 / Freddy1990
Description: Checks for the occurance of any of the strings in the array.
Use: IsUpTextMultiCustom(['Att', 'ttac', 'ack', 'monst', 'ster'])
*******************************************************************************}

You forgot []s around it!

wantonman

2012-01-02 03:10:38

its my way of letting us know that we chopped down the maple, now its time to find a new maple

wantonman

2012-01-02 03:12:53

oh once again, thank you yoho… lol btw i watched your vid tut on woodchopping :P


im on all day and i guess i missed a little detail like that…

YoHoJo

2012-01-02 03:14:18

Well that will only work if you keep your mouse hovering over the tree after initially clicking it in the first place.
Unless the tree is adjacent to you, after you click it your character will move, and therefor your mouse will no longer be over the tree anymore, so the uptext WILL NEVER be maple, get me?

wantonman

2012-01-02 03:27:59

true, so i must get mouse pos right after the click then movemouse to x,y…



PROCEDURE CHOPWOOD;
VAR
X,Y:INTEGER;
BEGIN
IF
FINDOBJCUSTOM(x, y, ['Map', 'le'], [1649232, 3036025, 2639739, 2242667], 7)
THEN BEGIN
MOUSE(X,Y,6,6,TRUE);
REPEAT
IF NOT
(IsUpTextMultiCustom(['Map', 'le']))
THEN BEGIN
CHOPWOOD;
UNTIL(INVENFULL);// IDENTIFIER EXPECTED?
END;
END;
END;