Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Client Cycle
Author Message
Ultima One
Journeyman
*

Posts: 238
Likes Given: 7
Likes Received: 10 in 6 posts
Joined: Jan 2013
Reputation: 6

Ultima One

Post: #1
Client Cycle
Time to share some scripts we use frequently on TUP. Some may be in need of updating.

Client Cycle is a script to just cycle through all logged in clients, we use it when we want to just check up on everyone, make sure they are not doing something they shouldn't be.

Use: .cycle

Code:
//********************************************************************//
//                                  CYCLE                             //
//********************************************************************//

[FUNCTION cycleinit]
  SRC.TAG.GOCLI_CYCLE    = 0
  SRC.TAG.CYCLE        =

[FUNCTION cycle]
  ctag.admin_numplayers=0
  SERV.ALLCLIENTS admin_getplayers
  
  if ( 0<SRC.TAG.GOCLI_CYCLE> == 0 )
     SRC.cycleinit
  elseif ( <SRC.TAG.GOCLI_CYCLE> == <EVAL <CTAG0.ADMIN_NUMPLAYERS>> )
     SRC.cycleinit
  endif

  IF !( <SERV.CLIENT.<SRC.TAG.GOCLI_CYCLE>.UID>=<SRC.UID> )
      IF ( <SERV.CLIENT.<SRC.TAG.GOCLI_CYCLE>.ACCOUNT.PLEVEL> >= 6)
          SRC.TAG.GOCLI_CYCLE    = <eval (<SRC.TAG.GOCLI_CYCLE> + 1)>
      ENDIF
             SERV.LOG <SRC.NAME>[<SRC.ACCOUNT>] cycles to <SERV.CLIENT.<SRC.TAG.GOCLI_CYCLE>.NAME>[<SERV.CLIENT.<SRC.TAG.GOCLI_CYCLE>.ACCOUNT>][<SERV.CLIENT.<SRC.TAG.GOCLI_CYCLE>.P>]
             GOCLI            = <SRC.TAG.GOCLI_CYCLE>
  ENDIF
  SRC.TAG.GOCLI_CYCLE    = <eval (<SRC.TAG.GOCLI_CYCLE> + 1)>


  if ( <SRC.TAG.GOCLI_CYCLE> >= <EVAL <CTAG0.ADMIN_NUMPLAYERS>> )
     SRC.cycleinit
     return 0
  endif

ULTIMA ONE
The modern, sphere powered Ultima Online server
05-16-2013 12:48 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)