The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






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)