Jump to content
  • 0

chatroom change every 5sec


Seiro

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  42
  • Reputation:   0
  • Joined:  10/24/12
  • Last Seen:  

A script for a chatroom that changes every 5 seconds..

I want to use this for my PvP NPC that shows the amount of people in 2 rooms.. To do this the chatroom should change and showing each room every 5 seconds.

Room #1 [0/100] (pvp_n_2-3)

Room#2 [0/50[ (guild_vs2)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

prontera,154,181,5    script    kdjsfhksfjh    100,{
   end;
OnInit:
   setarray .@disp_waitingroom0$, "1", "pvp_n_2-3", "100"; // 2 dimension array
   setarray .@disp_waitingroom1$, "2", "guild_vs2", "50";

   while (1) {
       waitingroom "Room #"+ getd( ".@disp_waitingroom"+ .@i +"$[0]" ) +" ["+ getmapusers( getd( ".@disp_waitingroom"+ .@i +"$[1]" ) ) +"/"+ getd( ".@disp_waitingroom"+ .@i +"$[2]" ) +"]", 0;
       sleep 5000;
       .@i++;
       if ( .@i == 2 ) .@i = 0;
       delwaitingroom;
   }
   end; // doesn't read
}

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  183
  • Reputation:   15
  • Joined:  06/10/12
  • Last Seen:  


OnInit:
waitingroom "",0;
 OnTimer5000:
  setarray .@Display$,"Room #1 ["+getmapusers("pvp_n_2-3")+"/100]","Room #2 ["+getmapusers("guild_vs2")+"/100]"";
   set .@msg, rand(getarraysize(.@Display$));
   delwaitingroom;
    waitingroom .@Display$[.@msg],0;
     initnpctimer;

try this

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  42
  • Reputation:   0
  • Joined:  10/24/12
  • Last Seen:  

I tried it :o

errorzch.png

Edited by Seiro
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

getmapusers("guild_vs2")+"/100]"";

Typo-e I believe (see red quote

setarray .@Display$,"Room #1 ["+getmapusers("pvp_n_2-3")+"/100]","Room #2 ["+getmapusers("guild_vs2")+"/100]";

Edited by Ryokem
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...