diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-04-12 16:37:08 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-04-12 19:21:46 -0400 |
commit | dc9c6ac482b353fe9a4b1e1628f691c487a517fc (patch) | |
tree | 655b6616766410e8880e8395298811beba8c742a /world/map/npc | |
parent | d55ee9ec4a43cbc7d52619b6a473a4760bb9acdb (diff) | |
download | serverdata-dc9c6ac482b353fe9a4b1e1628f691c487a517fc.tar.gz serverdata-dc9c6ac482b353fe9a4b1e1628f691c487a517fc.tar.bz2 serverdata-dc9c6ac482b353fe9a4b1e1628f691c487a517fc.tar.xz serverdata-dc9c6ac482b353fe9a4b1e1628f691c487a517fc.zip |
add default permissions
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/007-2/witch.txt | 2 | ||||
-rw-r--r-- | world/map/npc/017-9/npcs.txt | 10 | ||||
-rw-r--r-- | world/map/npc/commands/_atcommand_local.txt.example | 27 | ||||
-rw-r--r-- | world/map/npc/commands/_import.txt | 1 | ||||
-rw-r--r-- | world/map/npc/commands/changesex.txt | 16 | ||||
-rw-r--r-- | world/map/npc/commands/class.txt | 18 | ||||
-rw-r--r-- | world/map/npc/commands/debug.txt | 2 | ||||
-rw-r--r-- | world/map/npc/commands/destroynpc.txt | 6 | ||||
-rw-r--r-- | world/map/npc/commands/numa.txt | 12 | ||||
-rw-r--r-- | world/map/npc/commands/pullrabbit.txt | 2 | ||||
-rw-r--r-- | world/map/npc/commands/zeny.txt | 6 |
11 files changed, 35 insertions, 67 deletions
diff --git a/world/map/npc/007-2/witch.txt b/world/map/npc/007-2/witch.txt index 3e80dccc..360f2885 100644 --- a/world/map/npc/007-2/witch.txt +++ b/world/map/npc/007-2/witch.txt @@ -23,7 +23,7 @@ set @illia_iced_water, 4; set $@illia_min_level, 90; - if ((GM >= get(.valia, "GM") || debug) && getequipid(equip_head) == 647) + if ((GM >= DBG_VALIA || debug) && getequipid(equip_head) == 647) goto L_DeveloperBoard; if (BaseLevel < $@illia_min_level) goto L_Unexperienced; diff --git a/world/map/npc/017-9/npcs.txt b/world/map/npc/017-9/npcs.txt index 188ef2e0..2db61d1f 100644 --- a/world/map/npc/017-9/npcs.txt +++ b/world/map/npc/017-9/npcs.txt @@ -1,6 +1,6 @@ 009-1,42,43,0|script|#SecretDoor|32767,0,0 { - if (GM < get(.lounge, "GM") && GM < G_SYSOP && !debug) end; + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; gmlog "@warp 017-9"; warp "017-9", 27, 23; end; @@ -8,7 +8,7 @@ 020-1,60,76,0|script|#SecretDoor2|32767,0,0 { - if (GM < get(.lounge, "GM") && GM < G_SYSOP && !debug) end; + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; gmlog "@warp 017-9"; warp "017-9", 29, 21; end; @@ -16,7 +16,7 @@ 001-1,54,118,0|script|#SecretDoor3|32767,0,0 { - if (GM < get(.lounge, "GM") && GM < G_SYSOP && !debug) end; + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; gmlog "@warp 017-9"; warp "017-9", 21, 21; end; @@ -24,7 +24,7 @@ 027-2,118,111,0|script|#SecretDoor4|32767,0,0 { - if (GM < get(.lounge, "GM") && GM < G_SYSOP && !debug) end; + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; gmlog "@warp 017-9"; warp "017-9", 31, 21; end; @@ -32,7 +32,7 @@ 029-1,34,96,0|script|#SecretDoor5|32767,0,0 { - if (GM < get(.lounge, "GM") && GM < G_SYSOP && !debug) end; + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) end; gmlog "@warp 017-9"; warp "017-9", 23, 21; end; diff --git a/world/map/npc/commands/_atcommand_local.txt.example b/world/map/npc/commands/_atcommand_local.txt.example deleted file mode 100644 index ec1fae51..00000000 --- a/world/map/npc/commands/_atcommand_local.txt.example +++ /dev/null @@ -1,27 +0,0 @@ --|script|GM|32767 -{ - end; - -OnInit: - // command permissions here - set .zeny, G_ADMIN; - set .charzeny, G_SYSOP; - set .debug, G_ADMIN; - set .changesex, G_DEV; - set .charchangesex, G_GM; - set .class, G_DEV; - set .charclass, G_EVENT; - - // special permissions below - set .lounge, G_TESTER; // level to enter the GM Lounge & talk to Numa - set .killthegm, G_EVENT; // this is both for the event and the magic gm top hat - set .holiday, G_DEV; // holiday debug (xmas, halloween, ...) - set .event, G_EVENT; // event debug (open portals, disguise, ...) - set .scheduled, G_DEV; // scheduled broadcasts (schedule broadcast, stop broadcast, trigger broadcast, ...) - set .motd, G_DEV; // motd debug (show/hide motd) - - // very specific debug menus - set .valia, G_DEV; // illia quest debug info - - end; -} diff --git a/world/map/npc/commands/_import.txt b/world/map/npc/commands/_import.txt index d123d405..81994b80 100644 --- a/world/map/npc/commands/_import.txt +++ b/world/map/npc/commands/_import.txt @@ -1,5 +1,4 @@ npc: npc/commands/_procedures.txt -npc: npc/commands/_atcommand_local.txt npc: npc/commands/zeny.txt npc: npc/commands/marry.txt npc: npc/commands/debug.txt diff --git a/world/map/npc/commands/changesex.txt b/world/map/npc/commands/changesex.txt index ba08783d..fca27645 100644 --- a/world/map/npc/commands/changesex.txt +++ b/world/map/npc/commands/changesex.txt @@ -2,29 +2,27 @@ { callfunc "argv_splitter"; set .@n$, if_then_else(@argv$[1] != "", "char", "") + "changesex"; - if (GM < get(.changesex, "GM") && GM < G_SYSOP) goto L_GM; // check if you can use it on self + if (GM < CMD_CHANGESEX && GM < G_SYSOP) goto L_GM; // check if you can use it on self set .@target_id, BL_ID; if (@argv$[1] != "") set .@target_id, getcharid(3, @argv$[1]); if (@argv$[1] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self - if (@argv$[1] != "" && GM < get(.charchangesex, "GM") && GM < G_SYSOP) goto L_GM; // when target is not self, use charchangesex permission + if (@argv$[1] != "" && GM < CMD_CHARCHANGESEX && GM < G_SYSOP) goto L_GM; // when target is not self, use charchangesex permission + set .@s, 3; // default to non-binary if (@argv$[0] == "M" || @argv$[0] == "m") set .@s, 1; if (@argv$[0] == "F" || @argv$[0] == "f") set .@s, 0; set Sex, .@s, .@target_id; - goto L_Success; + gmlog "@"+.@n$+" " + @args$; + message strcharinfo(0), .@n$+" : The operation succeeded."; + end; L_Failed: // XXX: should we allow GMs to change sex of users that are not logged in? message strcharinfo(0), .@n$+" : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; end; -L_Success: - gmlog "@"+.@n$+" " + @args$; - message strcharinfo(0), .@n$+" : The operation succeeded."; - end; - L_GM: - message strcharinfo(0), .@n$+" : GM command is level "+ get(if_then_else(@argv$[1] != "", .charchangesex, .changesex), "GM") +", but you are level " + GM; + message strcharinfo(0), .@n$+" : GM command is level "+ if_then_else(@argv$[1] != "", CMD_CHARCHANGESEX, CMD_CHANGESEX) +", but you are level " + GM; end; OnInit: diff --git a/world/map/npc/commands/class.txt b/world/map/npc/commands/class.txt index f9275591..9143e08a 100644 --- a/world/map/npc/commands/class.txt +++ b/world/map/npc/commands/class.txt @@ -2,28 +2,26 @@ { callfunc "argv_splitter"; set .@n$, if_then_else(@argv$[1] != "", "char", "") + "class"; - if (GM < get(.class, "GM") && GM < G_SYSOP) goto L_GM; // check if you can use it on self + if (GM < CMD_CLASS && GM < G_SYSOP) goto L_GM; // check if you can use it on self set .@target_id, BL_ID; if (@argv$[1] != "") set .@target_id, getcharid(3, @argv$[1]); if (@argv$[1] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self - if (@argv$[1] != "" && GM < get(.charclass, "GM") && GM < G_SYSOP) goto L_GM; // when target is not self, use charclass permission + if (@argv$[1] != "" && GM < CMD_CHARCLASS && GM < G_SYSOP) goto L_GM; // when target is not self, use charclass permission + set .@c, 1; // default to human - if (@argv[0] >= 0 || @argv[0] <= 32767) set .@c, @argv[0]; + if (@argv[0] >= 1 || @argv[0] <= 32767) set .@c, @argv[0]; set Class, .@c, .@target_id; - goto L_Success; + gmlog "@"+.@n$+" " + @args$; + message strcharinfo(0), .@n$+" : The operation succeeded."; + end; L_Failed: // XXX: should we allow GMs to change class of users that are not logged in? message strcharinfo(0), .@n$+" : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; end; -L_Success: - gmlog "@"+.@n$+" " + @args$; - message strcharinfo(0), .@n$+" : The operation succeeded."; - end; - L_GM: - message strcharinfo(0), .@n$+" : GM command is level "+ get(if_then_else(@argv$[1] != "", .charclass, .class), "GM") +", but you are level " + GM; + message strcharinfo(0), .@n$+" : GM command is level "+ if_then_else(@argv$[1] != "", CMD_CHARCLASS, CMD_CLASS) +", but you are level " + GM; end; OnInit: diff --git a/world/map/npc/commands/debug.txt b/world/map/npc/commands/debug.txt index 7b653b26..19ac4114 100644 --- a/world/map/npc/commands/debug.txt +++ b/world/map/npc/commands/debug.txt @@ -924,7 +924,7 @@ L_Close: -|script|Debug Spell|32767 { - if(!debug && getgmlevel() < get(.debug, "GM")) end; + if(!debug && getgmlevel() < CMD_DEBUG) end; callfunc "Debug"; end; OnDeprecated: diff --git a/world/map/npc/commands/destroynpc.txt b/world/map/npc/commands/destroynpc.txt index fcda52ef..1ebede9e 100644 --- a/world/map/npc/commands/destroynpc.txt +++ b/world/map/npc/commands/destroynpc.txt @@ -1,7 +1,7 @@ -|script|@destroynpc|32767 { callfunc "argv_splitter"; - if (GM < get(.destroynpc, "GM") && GM < G_SYSOP) + if (GM < CMD_DESTROYNPC && GM < G_SYSOP) goto L_GM; set .@id, getnpcid(@argv$[0]); @@ -13,7 +13,7 @@ gmlog "@destroynpc " + @args$; message strcharinfo(0), "destroynpc : The operation succeeded."; debugmes "!!! => npc destroyed: `"+@argv$[0]+"` ("+.@id+")"; - if (1==1) destroy .@id; // FIXME: allow destroy to work as a non-terminator when arg0 is given + if (1==1) destroy .@id; // FIXME: allow destroy to work as a non-terminator when arg0 is given (TMWA) end; L_Confirm: @@ -26,7 +26,7 @@ L_Failed: end; L_GM: - message strcharinfo(0), "destroynpc : GM command is level "+ get(destroynpc, "GM") +", but you are level " + GM; + message strcharinfo(0), "destroynpc : GM command is level "+ CMD_DESTROYNPC +", but you are level " + GM; end; OnInit: diff --git a/world/map/npc/commands/numa.txt b/world/map/npc/commands/numa.txt index 4184743b..e8e8cabd 100644 --- a/world/map/npc/commands/numa.txt +++ b/world/map/npc/commands/numa.txt @@ -3,14 +3,14 @@ -|script|SuperDebug|32767 { - if (GM < get(.lounge, "GM") && GM < G_SYSOP && !debug) goto L_GM2; // make sure you can enter the gm lounge + if (GM < MAP_LOUNGE && GM < G_SYSOP && !debug) goto L_GM2; // make sure you can enter the gm lounge if (target(BL_ID,getnpcid("Numa"),1)) goto L_Main; npcaction 6, 12; title "Numa"; goto L_Main; L_GM2: - message strcharinfo(0), "numa : GM command is level "+ get(.lounge, "GM") +", but you are level " + GM; + message strcharinfo(0), "numa : GM command is level "+ MAP_LOUNGE +", but you are level " + GM; end; L_Main: @@ -36,7 +36,7 @@ L_WhoAmI: goto L_Main; L_Holiday: - if (GM < get(.holiday, "GM") && GM < G_SYSOP) goto L_GM; + if (GM < DBG_HOLIDAY && GM < G_SYSOP) goto L_GM; mes "What holiday do you want to debug?"; next; menu @@ -60,18 +60,18 @@ L_EasterDebug: goto L_Close; L_Event: - if (GM < get(.event, "GM") && GM < G_EVENT) goto L_GM; + if (GM < EVT_DEBUG && GM < G_EVENT) goto L_GM; gmlog strcharinfo(0) + " accessed the GM event debug."; callfunc "GmDebug"; goto L_Close; L_StoneBoard: - if (GM < get(.scheduled, "GM") && GM < G_SYSOP) goto L_GM; + if (GM < DBG_SCHEDULED && GM < G_SYSOP) goto L_GM; callfunc "SBConfig"; goto L_Close; L_MOTD: - if (GM < get(.motd, "GM") && GM < G_SYSOP) goto L_GM; + if (GM < DBG_MOTD && GM < G_SYSOP) goto L_GM; callfunc "MOTDConfig"; goto L_Close; diff --git a/world/map/npc/commands/pullrabbit.txt b/world/map/npc/commands/pullrabbit.txt index 3994b795..022f3753 100644 --- a/world/map/npc/commands/pullrabbit.txt +++ b/world/map/npc/commands/pullrabbit.txt @@ -1,6 +1,6 @@ -|script|@pullrabbit|32767 { - if (GM < get(.killthegm, "GM") && GM < G_SYSOP) end; + if (GM < EVT_KILLTHEGM && GM < G_SYSOP) end; if (getequipid(equip_head) != 888) end; getinventorylist; if ((checkweight("MurdererCrown", 1) == 0) || (@inventorylist_count == 100)) diff --git a/world/map/npc/commands/zeny.txt b/world/map/npc/commands/zeny.txt index 94c02c4b..513330b5 100644 --- a/world/map/npc/commands/zeny.txt +++ b/world/map/npc/commands/zeny.txt @@ -2,11 +2,11 @@ { callfunc "argv_splitter"; set .@n$, if_then_else(@argv$[1] != "", "char", "") + "zeny"; - if (GM < get(.zeny, "GM") && GM < G_SYSOP) goto L_GM; // check if you can use it on self + if (GM < CMD_ZENY && GM < G_SYSOP) goto L_GM; // check if you can use it on self set .@target_id, BL_ID; if (@argv$[1] != "") set .@target_id, getcharid(3, @argv$[1]); if (@argv$[1] != "" && !(isloggedin(.@target_id))) goto L_Failed; // do NOT fallback to self - if (@argv$[1] != "" && GM < get(.charzeny, "GM") && GM < G_SYSOP) goto L_GM; // when target is not self, use charzeny permission + if (@argv$[1] != "" && GM < CMD_CHARZENY && GM < G_SYSOP) goto L_GM; // when target is not self, use charzeny permission if (@argv$[0] == "--") goto L_Remove; if (@argv$[0] == "---") goto L_RemoveAll; if (@argv$[0] == "++") goto L_Max; @@ -67,7 +67,7 @@ L_Success: end; L_GM: - message strcharinfo(0), .@n$+" : GM command is level "+ get(if_then_else(@argv$[1] != "", .charzeny, .zeny), "GM") +", but you are level " + GM; + message strcharinfo(0), .@n$+" : GM command is level "+ if_then_else(@argv$[1] != "", CMD_CHARZENY, CMD_ZENY) +", but you are level " + GM; end; OnInit: |