SphereCommunity
Some Admin Scripts - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Submissions (/Forum-Script-Submissions)
+--- Thread: Some Admin Scripts (/Thread-Some-Admin-Scripts)



Some Admin Scripts - Ultima One - 05-16-2013 01:00 AM

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