PDA

View Full Version : another question



XcanadamanX
11-12-2006, 02:34 PM
could somebody help me get my script to: if it doesnt find the door on the MM, to log out and then start again?

please help:duh:

Hey321
11-12-2006, 03:06 PM
Wouldn't it be something along the lines of



if (findcolour=true) then
//code here
else
NextPlayer;
end;?

Correct me if im wrong but i think thats it.

XcanadamanX
11-12-2006, 03:10 PM
i think id be something like that...not quite sure though

edit: tried that but it says invalid number of parameters

IronTeapot
11-12-2006, 05:40 PM
Did you put =true? if you did then it wont work. Also if you dont have the players setup, nextplayer wont do anything. so you would just put logout. If you post what you tried(and the code thats related to it) then i could fix it up for you.

Boreas
11-12-2006, 06:23 PM
You need a point to start again from where you know it's correct.

For example,

This makes sure I am within range of furnace symbol
tries2:=0
done:=false
repeat
tries:=0;
repeat
rotate a little
tries:=tries+1;
until found furnace symbol or tries= somenumber
if tries=somenumber then
begin
tries2:=tries2+1;
logout and then login current player
end;
if found furnacesymbol then done:=true;
until done or tries2:=someothernumber
if done then writeln 'found furnace'
if tries2=someothernumber then
begin
writeln 'I tried and tried but couldnt find furnace, im hopelessly lost'
writeln 'switching player'
currentplaye active =false
logout
end;

Then all your other stuff should have if loggedin around them, so since its not logged in,
it will skip over that stuff til the end where it says,
if not(loggedin) and currentplayer active=false then switch to next player.




Check out bbankf for the looping and stuff. It rotates the map while trying to look for bank stuff, and will logout and in after a number of tries.

You may find redd useful, it finds the eastern most door on mm.

solarwind
11-12-2006, 06:29 PM
Omg man, if findcolor takes 2 arguments (x, y).

Boreas
11-12-2006, 06:46 PM
Omg man, if findcolor takes 2 arguments (x, y).

I think that was just pseudo code, (like my whole post was).

solarwind
11-12-2006, 06:51 PM
I think that was just pseudo code, (like my whole post was).

No, I was talking to xcanadamanx.

Boreas
11-12-2006, 06:52 PM
O right, I see now. Nvm lol.