diff options
Diffstat (limited to 'world')
-rw-r--r-- | world/map/conf/permissions.txt | 1 | ||||
-rw-r--r-- | world/map/db/params.txt | 1 | ||||
-rw-r--r-- | world/map/npc/commands/_import.txt | 1 | ||||
-rw-r--r-- | world/map/npc/commands/automod.txt | 90 |
4 files changed, 93 insertions, 0 deletions
diff --git a/world/map/conf/permissions.txt b/world/map/conf/permissions.txt index 98c62b34..856b2dae 100644 --- a/world/map/conf/permissions.txt +++ b/world/map/conf/permissions.txt @@ -13,6 +13,7 @@ CMD_CHARWARP 60 CMD_MUTE 60 CMD_NPCTALK 40 CMD_MUSIC 40 +CMD_AUTOMOD 60 // special permissions below MAP_LOUNGE 20 // level to enter the GM Lounge & talk to Numa diff --git a/world/map/db/params.txt b/world/map/db/params.txt index cc0ac377..b2ff80c8 100644 --- a/world/map/db/params.txt +++ b/world/map/db/params.txt @@ -58,3 +58,4 @@ MUTE_GLOBAL 1082 1 MUTE_WHISPER 1083 1 MUTE_PARTY 1084 1 //MUTE_GUILD 1085 1 +AUTOMOD 1086 1 diff --git a/world/map/npc/commands/_import.txt b/world/map/npc/commands/_import.txt index 814530bc..47aa978f 100644 --- a/world/map/npc/commands/_import.txt +++ b/world/map/npc/commands/_import.txt @@ -15,3 +15,4 @@ npc: npc/commands/npctalk.txt npc: npc/commands/music.txt npc: npc/commands/python.txt npc: npc/commands/gm.txt +npc: npc/commands/automod.txt diff --git a/world/map/npc/commands/automod.txt b/world/map/npc/commands/automod.txt new file mode 100644 index 00000000..09544852 --- /dev/null +++ b/world/map/npc/commands/automod.txt @@ -0,0 +1,90 @@ +-|script|@automod|32767 +{ + end; + +OnCall: + if (GM < CMD_AUTOMOD && GM < G_SYSOP) goto L_GM; + set @PREV_AUTOMOD, AUTOMOD; + if (@args$ == "") goto L_Info; + elif (@args$ == "off") goto L_Off; + elif (@args$ == "kill") goto L_Kill; + elif (@args$ == "move") goto L_Move; + elif (@args$ == "block") goto L_Block; + elif (@args$ == "kick") goto L_Kick; + + message strcharinfo(0), "automod : invalid mode."; + goto L_Info; + +L_Off: + set AUTOMOD, 0; + set ##AUTOMOD, AUTOMOD; + message strcharinfo(0), "automod : mode changed to ##Boff##b"; + // send a fixpos to remove the current collision, if any + if (@PREV_AUTOMOD == 3) set Sex, Sex; + end; + +L_Kill: + set AUTOMOD, 1; + set ##AUTOMOD, AUTOMOD; + message strcharinfo(0), "automod : mode changed to ##Bkill##b"; + message strcharinfo(0), "automod : players sitting on you will automatically be killed and then moved."; + // send a fixpos to remove the current collision, if any + if (@PREV_AUTOMOD == 3) set Sex, Sex; + end; + +L_Move: + set AUTOMOD, 2; + set ##AUTOMOD, AUTOMOD; + message strcharinfo(0), "automod : mode changed to ##Bmove##b"; + message strcharinfo(0), "automod : players sitting on you will automatically be moved."; + // send a fixpos to remove the current collision, if any + if (@PREV_AUTOMOD == 3) set Sex, Sex; + end; + +L_Block: + set AUTOMOD, 3; + set ##AUTOMOD, AUTOMOD; + message strcharinfo(0), "automod : mode changed to ##Bblock##b"; + message strcharinfo(0), "automod : players will be unable to sit or walk over you while you are sitting. (experimental)"; + set Sex, Sex; + end; + +L_Kick: + set AUTOMOD, 4; + set ##AUTOMOD, AUTOMOD; + message strcharinfo(0), "automod : mode changed to ##Bkick##b"; + message strcharinfo(0), "automod : players sitting on you will automatically be kicked from the server."; + // send a fixpos to remove the current collision, if any + if (@PREV_AUTOMOD == 3) set Sex, Sex; + end; + +L_GM: + message strcharinfo(0), "automod : GM command is level "+ CMD_AUTOMOD +", but you are level " + GM; + end; + +L_Info: + if (AUTOMOD == 0) + message strcharinfo(0), "automod : current mode: ##Boff##b kill move block kick"; + elif (AUTOMOD == 1) + message strcharinfo(0), "automod : current mode: off ##Bkill##b move block kick"; + elif (AUTOMOD == 2) + message strcharinfo(0), "automod : current mode: off kill ##Bmove##b block kick"; + elif (AUTOMOD == 3) + message strcharinfo(0), "automod : current mode: off kill move ##Bblock##b kick"; + elif (AUTOMOD == 4) + message strcharinfo(0), "automod : current mode: off kill move block ##Bkick##b"; + message strcharinfo(0), "automod : you can change mode by doing @automod (mode)"; + end; + +OnPCLoginEvent: + if (GM >= CMD_AUTOMOD && ##AUTOMOD) + set AUTOMOD, ##AUTOMOD; + elif (##AUTOMOD) + set ##AUTOMOD, 0; + end; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "automod", strnpcinfo(0) + "::OnCall"; + registercmd chr(ATCMD_SYMBOL) + "automode", strnpcinfo(0) + "::OnCall"; + end; +} |