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-nmm6 (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-nmm6 (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-nmm6 (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
Some Admin Scripts
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
Some Admin Scripts
Time to share some scripts we use frequently on TUP. Some may be in need of updating.

Delete all items of a specific id
Use: .massdelete i_gold
Code:
[FUNCTION massdelete]
IF (<isempty <ARGS>>)
    SRC.SYSMESSAGE You must set some args.
ELSE
    LOCAL.itemsdeleted = 0
    FORINSTANCES <ARGS>
        REMOVE
        LOCAL.itemsdeleted += 1
    ENDFOR
    IF (<SRC.ISGM> )
    SRC.SYSMESSAGE Success. Deleted <eval <LOCAL.itemsdeleted>> <ARGS>
    ENDIF
ENDIF

Staff Chat
Use: .y Hello World!
Code:
[FUNCTION y]
serv.allclients f_to_staff <args>

[FUNCTION f_to_staff]
   if !( <isgm> || <iscouns> )
      return 0
   endif
   SYSMESSAGE @0b72 [ <SRC.NAME> ]: <args>



Staff Title - Will give you a nice colourful name and title. Looks epic and makes staff stand out.
Use: .staff
Code:
[events e_zoragath_staff_title]
on=@click
IF    (<account.plevel><2)
    EVENTS -e_zoragath_staff_title
    RETURN 0

ELIF (<account.plevel>==2)
    message="@0b4e Counselor <name>"
    message=@0b4e <SERV.NAME> Staff

ELIF (<account.plevel>==3)
    message="@07a1 Seer <name>"

ELIF (<account.plevel>==4)
    message="@086b Game Master <name>"
    message=@086b <SERV.NAME> Staff

ELIF (<account.plevel>==5)
    message="@09f3 Head GM <name>"
    message=@09f3 <SERV.NAME> Staff
    
ELIF (<account.plevel>==6)
    message="@07a1 Admin <name>"
    message=@07a1 <SERV.NAME> Staff

ELIF (<account.plevel>==7)
    message="@07a1 Admin <name>" // Change to Owner if wanted
    message=@07a1 <SERV.NAME> Staff

ENDIF    
RETURN 1



Move character wand, useful for moving players about.
Use: Double click wand item, target player then location to send to.
Code:
[ITEMDEF i_wand_Mover]
NAME=Move Character Wand
ID=i_wand_2
TYPE=T_WAND
WEIGHT=1
CATEGORY=Provisions - GM Items
DESCRIPTION=Move Character Wand

ON=@Create
   COLOR=0785
   ATTR= 05

ON=@DClick
   EQUIP
   LINK = 04fffffff    //clear the link
   TARGET Select the player you would like to move.
   RETURN 1

ON=@TARGON_Char
   IF ( <LINK> == 04fffffff )
      LINK = <SRC.TARG.UID>    
      TARGETG Where would you like to move them?
   ELSE
      SRC.ANIM 9
      LINK.GO <SRC.TARG.P>
      LINK = 04fffffff
   ENDIF  
   RETURN 1

ON=@TARGON_item
   IF ( <LINK> == 04fffffff )
      SRC.SYSMESSAGE You can only move players with this wand.
   ELSE
      SRC.ANIM 9
      LINK.GO <SRC.TARG.P>
      LINK = 04fffffff
   ENDIF
   RETURN 1

ON=@TARGON_ground
   IF ( <LINK> == 04fffffff )
      SRC.SYSMESSAGE You can only move players with this wand.
   ELSE
      SERV.LOG <src.account><src.name> is moving <link.name> <link.uid> <link.account> to <SRC.TARGP>
      SRC.ANIM 9
      LINK.GO <SRC.TARGP>
      LINK = 04fffffff
   ENDIF
   RETURN 1

ULTIMA ONE
The modern, sphere powered Ultima Online server
05-16-2013 01:00 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)