View Single Post
  #2  
Old 11-05-2001, 08:11 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Even easier (but more complicated scripting-wise) method:

NPC Code:
if(playerenters){
if(isleader){
setstring server.gamenumber,#v(strtofloat(#s(server.gamenumb er))+1);
//=start a new game-may not be necessary, since it's covered in Victory
} if(strtofloat(#s(gamenumber))<strtofloat(#s(server .gamenumber))){
//=if the player was not previously in this game
setstring gamenumber,#s(server.gamenumber);
//=Set the player's game number to the current game number
timereverywhere;
timeout=0.05; }else{
//=the player was already in this game once
setlevel2 outside.graal,30,30;
//=kick the player out
}
}
if(timeout){
if(strtofloat(#s(gamenumber))<strtofloat(#s(server .gamenumber))){
//=if your game number no longer matches up (ie the game has ended)
setlevel2 outside.graal,30,30;
}else{
if(playerscount=1){
//=you're the only one in the game
if(this.battlebegan>0){
//=there were previously other people in this room
setstring server.gamenumber,#v(strtofloat(#s(server.gamenumb er))+1);
//=set the next game number
this.battlebegan=0;
//=clear that, it's a new game
setstring victories,#v(strtofloat(#s(victories))+1);
//=Add a victory to your scorecard
setlevel victory.graal;
//=kick you to the congratulations level
}
}else{
this.battlebegan=1;
//=remember that there have been more than 1 person in the room }
timereverywhere;
timeout=0.05;
}
}


This will work, poorly, for any one room that you only want a person to be able to enter once per game. It's the same basic idea as the Capture the Flag game, but with a few tweaks. Note also; you can do a much better one with playerdies. If it's absolutely necessary, I'll write that one out too...
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote