View Full Version : Another Question
Bobarkinator
02-25-2007, 10:34 PM
When you use the function NextPlayer(True/False) does it start the script over from the beginning with the new player or continue from the NextPlayer function?
Hey321
02-25-2007, 10:58 PM
Continue from the NextPlayer function i believe. It could restart though.
omgh4x0rz
02-25-2007, 11:09 PM
It continues from nextplayer, which means you have to put it at the end of some kind of loop so that when it reaches nextplayer, the next command will be back at the beginning of the loop.
WhiteShadow
02-25-2007, 11:44 PM
When you use the function NextPlayer(True/False) does it start the script over from the beginning with the new player or continue from the NextPlayer function?
It starts with NextPlayer! LOLL um, I'll elaborate.
You know PlayerArrays right? 0, 1, 2, 3, 4. Pretend CurrentPlayer:= 2;
You use NextPlayer(true); 3 would go next, if currentplayer is 4, 0 would go next.
Just so you know, NextPlayer logs out current player and the parameter (true or false) sets the player[]. activeeither to true or false.
Bobarkinator
02-25-2007, 11:48 PM
It starts with NextPlayer! LOLL um, I'll elaborate.
You know PlayerArrays right? 0, 1, 2, 3, 4. Pretend CurrentPlayer:= 2;
You use NextPlayer(true); 3 would go next, if currentplayer is 4, 0 would go next.
Just so you know, NextPlayer logs out current player and the parameter (true or false) sets the player[]. activeeither to true or false.
yes I know all that I was just wondering if you basically had to copy you loop below Next player of if it would start over at beginning of loop
WhiteShadow
02-25-2007, 11:49 PM
yes I know all that I was just wondering if you basically had to copy you loop below Next player of if it would start over at beginning of loop
I don't think I quite understand you. That would depend on your scripts looping wouldn't it?
If you can please post what you've made.
Bobarkinator
02-26-2007, 03:44 AM
Heres my main loop. I want it to go back to the beginning of the loop if it logs in a new player.
begin
Setup;
repeat
DoMine;
WalkToBank;
BankGood;
WalktoMine;
i:= i + 1;
ProgressReport
until(not(LoggedIn)) or (i=NumberofLoads);
if (not(LoggedIn)) then
begin
NextPlayer(False);
end else
if (i=NumberofLoads) then
begin
ProgressReport;
SRLRandomsReport;
TerminateScript;
end;
end.
Boreas
02-26-2007, 03:45 AM
Wrap it in another repeat
Bobarkinator
02-26-2007, 01:10 PM
What should my until be?
Boreas
02-26-2007, 02:54 PM
As long as you got
if (not(LoggedIn)) then
begin
NextPlayer(False);
inside the loop, it's ok to have until (false)
Get TOB's version of login.scar, so that when all players are false, there won't be a loop.
http://www.villavu.com/forum/showthread.php?t=3974
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.