Event

To set an event:

if (playerchats && strequals(#g,Events Team) && startswith(/setevent,#c)){ tokenize #c; setstring server.event,#t(1); }

Level:

if (Playerenters)setshape 1,32,32; if (playertouchsme)setlevel #s(server.event);

Now how do I make it so when you are on the guild Events Team, and you say /start a box counts down from 10 to 1 and boxes dissappear so the player can walk around rooms with numbers in them, then when you say /choose you choose a random number, 1-8?

Edit: Someone please help? I really need it.

Lol, he’s talking about the event “Chance.”

Yes, thats it.

Here, this may be a more creative way, but also more complicated (for you).

if(playerchats && strequals(#c,/start) && streqauls(#g,Events Team)){
  for(this.i=10;this.i>0;this.i--){
    message #v(this.i);
    sleep 1;
  }
  if(this.i==0){
    message Start!;
    sleep 2;
    message  ;
  }
}

Basically, uses forloop and message, as well as sleeps.

Also, nice job doing things yourself so far xP Those two scripts you have are looking nice

For the image you want to hide…

if(playerchats && streqauls(#g,Events Team))){
if(strequals(#c,/start)){
sleep 10;
hide;
}
if(strequals(#c,/end)){
show;
}
}

Then for the random numbers…

if(playerchats && strequals(#c,/choose)){
  message Choosing...;
  sleep 2;
  this.count=int(random(1,9));
  message Number Chosen: #v(this.count);
}

Then, in the same NPC as the chooser NPC, you would want to do use these things…

if(playerx in |first x value,second x value| && playery in |first y value,second y vale| && this.count==1){
setplayerprop #c,I lost;
sleep 0.5;
setlevel2 levelname.nw,x,y;
}

So you are checking if they are in a certain area when the number is for that box…

Thanks :smiley:

Fixed it, there was a mistake in the forloop…now try it, if it didn’t work before.

There is one problem, it neven ends, it goes into the negatives.

That’s because he never programmed the part where it restarts after saying /start. >_>

Ok, ok, tested and should work x.x

if(playerchats && strequals(#c,/start) && strequals(#g,Events Team)){
  this.i=10;
  for(this.i=10;this.i>0;this.i--){
    message #v(this.i);
    sleep 1;
  }
  if(this.i==0){
    message Start!;
    sleep 2;
    message  ;
  }
}

Thanks.[COLOR=“Silver”]

---------- Post added at 04:29 PM ---------- Previous post was at 04:26 PM ----------

[/COLOR]It works now! Thanks![COLOR=“Silver”]

---------- Post added at 04:31 PM ---------- Previous post was at 04:29 PM ----------

[/COLOR]Theres one problem, when I start it then do all that stuff, end it, choose, then when I start it again the Choosen thing wont disappear.

Yeah, I did that on purpose since I didn’t know how long you wanted it to stay up…

Here, it’ll stay up for 5 seconds…

if(playerchats && strequals(#c,/choose)){
  message Choosing...;
  sleep 2;
  this.count=int(random(1,9));
  message Number Chosen: #v(this.count);
  sleep 5;
  message  ;
}

Thanks.