Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Functions to staff.
Author Message
amonvangrell
Banned

Posts: 338
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #1
Functions to staff.
To help new GM a cool pack of Functions.

mtele allows you to use the function tele multiple times.
Code:
[FUNCTION mtele]
IF !<ARGS>
targetfg mtele 1
ELSE
go <targp>
targetfg mtele 1
ENDIF
mmove allows the staff to move a character multiple times.
Code:
[FUNCTION mmove]
IF !<ARGS>
targetf mmove 1
ELSE
IF !<ARGV[1]>
TRY UID.<ARGO.UID>.SAY @0480@ .
targetfg mmove 1,<argo.uid>
ELSE
TRY UID.<ARGV[1]>.P <TARGP>
TRY UID.<ARGV[1]>.UPDATE
targetf mmove 1
ENDIF
ENDIF
mremove allows the staff to remove more than 1 item/command
Code:
[FUNCTION mremove]
IF !<ARGS>
targetf mremove 1
ELSE
IF (<UID.<ARGO.UID>.ISITEM>)
TRY UID.<ARGO.UID>.REMOVE
ENDIF
targetf mremove 1
ENDIF
b function is a broadcast function for staff that id the lvl of the staff on its msg to the shard. Use ".b msg"
Code:
[FUNCTION b]
IF (<SRC.ACCOUNT.PLEVEL>= 2)
    SRC.SERV.ALLCLIENTS SYSMESSAGE @0790 [Cons] <SRC.NAME>: <ARGS>
ELSEIF (<SRC.ACCOUNT.PLEVEL>= 3)
    SRC.SERV.ALLCLIENTS SYSMESSAGE @0790 [Seer] <SRC.NAME>: <ARGS>
ELSEIF (<SRC.ACCOUNT.PLEVEL>= 4)
    SRC.SERV.ALLCLIENTS SYSMESSAGE @0790 [Gm] <SRC.NAME>: <ARGS>
ELSEIF (<SRC.ACCOUNT.PLEVEL>= 5)
    SRC.SERV.ALLCLIENTS SYSMESSAGE @0790 [Dev] <SRC.NAME>: <ARGS>
ELSEIF (<SRC.ACCOUNT.PLEVEL>= 6)
    SRC.SERV.ALLCLIENTS SYSMESSAGE @0790 [Admin] <SRC.NAME>: <ARGS>
ELSE
    SRC.SERV.ALLCLIENTS SYSMESSAGE @0790 [Owner] <SRC.NAME>: <ARGS>
ENDIF
saveonbank function move everything the player have to the player bank account inside a bag.
Code:
[FUNCTION saveonbank]
SRC.FINDLAYER(1).UNEQUIP
SRC.FINDLAYER(2).UNEQUIP
SRC.FINDLAYER(3).UNEQUIP
SRC.FINDLAYER(4).UNEQUIP
SRC.FINDLAYER(5).UNEQUIP
SRC.FINDLAYER(6).UNEQUIP
SRC.FINDLAYER(7).UNEQUIP
SRC.FINDLAYER(8).UNEQUIP
SRC.FINDLAYER(10).UNEQUIP
SRC.FINDLAYER(12).UNEQUIP
SRC.FINDLAYER(13).UNEQUIP
SRC.FINDLAYER(17).UNEQUIP
SRC.FINDLAYER(18).UNEQUIP
SRC.FINDLAYER(19).UNEQUIP
SRC.FINDLAYER(20).UNEQUIP
SRC.FINDLAYER(22).UNEQUIP        
SRC.FINDLAYER(23).UNEQUIP
SRC.FINDLAYER(24).UNEQUIP

IF (<SRC.FINDLAYER.21.COUNT> >= 1)
    SRC.FINDLAYER.21.ATTR=0
    SRC.FINDLAYER.21.COLOR=020
    SRC.FINDLAYER.21.NAME=Your items
    SRC.findlayer.21.cont=<SRC.findlayer.29>
    SRC.BANKSELF
    SRC.FIX
    SERV.NEWITEM i_gold
    NEW.ATTR=attr_invis
    NEW.BOUNCE
    SRC.CONSUME i_gold
    SRC.MESSAGE @0480 Your items were moved to your bank account inside a red bag.

ENDIF

P.S I am not the author of those codes am just sharing them.
Hope you guys like!Bye
(This post was last modified: 01-31-2014 06:42 AM by amonvangrell.)
01-31-2014 06:41 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Functions to staff.
saveonbank could be much smaller if you did:

Code:
        for 1 24
            if !(<local._for>==21) && !(<local._for>==16) && !(<local._for>==11)
                src.findlayer.<dlocal._for>.bounce
            endif
        endfor

[Image: 2nis46r.jpg]
01-31-2014 07:45 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 338
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #3
RE: Functions to staff.
cool thanks!
01-31-2014 08:07 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: 2 Guest(s)