diff options
-rw-r--r-- | GNUmakefile | 8 | ||||
-rw-r--r-- | world/map/npc/020-1/KrickKrackKrock.txt | 6 | ||||
-rw-r--r-- | world/map/npc/annuals/halloween/munro.txt | 2 | ||||
-rw-r--r-- | world/map/npc/annuals/xmas/barriers.txt | 16 | ||||
-rw-r--r-- | world/map/npc/annuals/xmas/config.txt | 18 | ||||
-rw-r--r-- | world/map/npc/annuals/xmas/debug.txt | 8 | ||||
-rw-r--r-- | world/map/npc/annuals/xmas/mobmanager.txt | 8 | ||||
-rw-r--r-- | world/map/npc/doc/magic | 2 | ||||
-rw-r--r-- | world/map/npc/functions/magic.txt | 8 |
9 files changed, 42 insertions, 34 deletions
diff --git a/GNUmakefile b/GNUmakefile index 415d91a4..d5a29c2a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -17,6 +17,14 @@ world/map/conf/magic-secrets.sex: world/map/conf/magic-secrets.sex.template worl cd world/map/conf && ./build-magic.sh world/map/conf/secrets-build: +format: + find world/map/npc -type f -exec sed -ri \ + -e "s%([^|]+)\|script\|([^|]+)\|-1%\1|script|\2|32767%ig" \ + -e "s/\.gat//g" -e "s/\r\n/\n/g" -e "s/\t/ /g" \ + -e "s%([^|]+)\|script\|([^|]+)\|([0-9]+)(,[0-9]+)?(,[0-9]+)?[^{]*\{%\1|script|\2|\3\4\5\n{%ig" \ + -e "s%function\|script\|([^| {]+)[^{]*\{%function|script|\1\n{%ig" \ + {} \; -exec vi -escwq {} \; -print + mobxp: mobxp-impl indent-mobs mobxp-impl: mv world/map/db/mob_db.txt world/map/db/mob_db.old diff --git a/world/map/npc/020-1/KrickKrackKrock.txt b/world/map/npc/020-1/KrickKrackKrock.txt index 8ba67feb..64dc6785 100644 --- a/world/map/npc/020-1/KrickKrackKrock.txt +++ b/world/map/npc/020-1/KrickKrackKrock.txt @@ -21,9 +21,9 @@ // mes "\"Hello " + strcharinfo(0) + ", do you want to play Krick-Krack-Krock?\""; // L_Menu: // menu -// "Let's start!", L_Start, -// "What's this?", L_info, -// "Well, not for the moment.", -; +// "Let's start!", L_Start, +// "What's this?", L_info, +// "Well, not for the moment.", -; // close; // L_Start: // mes @NPC_NAME$; diff --git a/world/map/npc/annuals/halloween/munro.txt b/world/map/npc/annuals/halloween/munro.txt index 3b894901..45abfaa8 100644 --- a/world/map/npc/annuals/halloween/munro.txt +++ b/world/map/npc/annuals/halloween/munro.txt @@ -1,5 +1,5 @@ // Part of Annual halloween -026-1.gat,24,37,0|script|Munro|183 +026-1,24,37,0|script|Munro|183 { callfunc "HalloweenCheckOld"; callfunc "TrickOrTreatTally"; diff --git a/world/map/npc/annuals/xmas/barriers.txt b/world/map/npc/annuals/xmas/barriers.txt index 3e6aad65..6bb1e082 100644 --- a/world/map/npc/annuals/xmas/barriers.txt +++ b/world/map/npc/annuals/xmas/barriers.txt @@ -20,13 +20,13 @@ L_Hint: mes "\"What are you doing? Come, see me in the caves below!\""; mes "\"I said go north till you reach the snowman. Then head into the cave to the east.\""; close2; - warp "020-1.gat",33,94; + warp "020-1",33,94; set @getout, 1; goto L_Return; L_Warp: message strcharinfo(0), "I said get out, We've no time for your kind here."; - warp "020-1.gat",33,94; + warp "020-1",33,94; set @getout, 1; goto L_Return; @@ -35,7 +35,7 @@ L_Return: } // Annual Xmas Boss Fight Door -030-2.gat,153,21,0|script|#DarkDoor|45,0,0 +030-2,153,21,0|script|#DarkDoor|45,0,0 { callfunc "XmasStates"; @@ -52,7 +52,7 @@ L_XmasMain: L_Open: if ($@XmasBattleStatus) goto L_BattleInProgress; - warp "030-4.gat",34,48; + warp "030-4",34,48; goto L_Close; L_BattleInProgress: @@ -71,7 +71,7 @@ L_Close: // Annual Xmas secret passage to a trapdoor in Santa's Inn Basement -030-3.gat,27,24,0|script|SmallCrack#XmasPassage|400,0,1 +030-3,27,24,0|script|SmallCrack#XmasPassage|400,0,1 { callfunc "XmasStates"; @@ -126,7 +126,7 @@ L_QueryWarp: "No", L_Close; L_Warp: - warp "030-2.gat",47,44; + warp "030-2",47,44; goto L_Close; L_Fail: @@ -138,7 +138,7 @@ L_Close: } // Annual Xmas Escape Hatch -030-2.gat,48,44,0|script|#BasementDoor|45,0,0 +030-2,48,44,0|script|#BasementDoor|45,0,0 { callfunc "XmasStates"; @@ -153,7 +153,7 @@ L_XmasMain: "No.", L_Close; L_Open: - warp "030-3.gat",27,26; + warp "030-3",27,26; goto L_Close; L_NotActive: diff --git a/world/map/npc/annuals/xmas/config.txt b/world/map/npc/annuals/xmas/config.txt index 90eab504..d3c51664 100644 --- a/world/map/npc/annuals/xmas/config.txt +++ b/world/map/npc/annuals/xmas/config.txt @@ -12,14 +12,14 @@ // Nibble_1: @xmas_karma, Event Behavior // 0-15: 0: Naughty, 15: Nice // List BITS: -// 8: 021-1.gat,87,66,0|script|Ayasha|258 -// 9: 021-1.gat,63,107,0|script|Latif|262 -// 10: 021-1.gat,123,116,0|script|Charda|260 -// 11: 021-1.gat,78,87,0|script|Faris|259 -// 12: 021-1.gat,98,25,0|script|Rasin|263 -// 13: 021-1.gat,155,25,0|script|Ghada|265 -// 14: 025-1.gat,80,88,0|script|Rossy|114 -// 15: 001-2.gat,76,59,0|script|Kadiya|174 +// 8: 021-1,87,66,0|script|Ayasha|258 +// 9: 021-1,63,107,0|script|Latif|262 +// 10: 021-1,123,116,0|script|Charda|260 +// 11: 021-1,78,87,0|script|Faris|259 +// 12: 021-1,98,25,0|script|Rasin|263 +// 13: 021-1,155,25,0|script|Ghada|265 +// 14: 025-1,80,88,0|script|Rossy|114 +// 15: 001-2,76,59,0|script|Kadiya|174 // Helper Bit // 16: Bedding End // 17: Bedding Starts @@ -248,7 +248,7 @@ L_Main: setarray $@xmas_mob_names$, "Santa Slime", "Candied Slime", "Candied Slime"; setarray $@xmas_mob_spawns, "1015", "1111", "1111"; setarray $@xmas_mob_counts, 10, 5, 5; - setarray $@xmas_map_spawns$, "019-1.gat", "019-3.gat", "030-3.gat"; + setarray $@xmas_map_spawns$, "019-1", "019-3", "030-3"; if(getarraysize($@xmas_mob_spawns) != getarraysize($@xmas_map_spawns$)) goto L_XmasError; if(getarraysize($@xmas_mob_names$) != getarraysize($@xmas_map_spawns$)) diff --git a/world/map/npc/annuals/xmas/debug.txt b/world/map/npc/annuals/xmas/debug.txt index d67c3de8..f0170a0d 100644 --- a/world/map/npc/annuals/xmas/debug.txt +++ b/world/map/npc/annuals/xmas/debug.txt @@ -172,7 +172,7 @@ L_Close: return; } -020-1.gat,86,76,0|script|XmasDebug#1|105 +020-1,86,76,0|script|XmasDebug#1|105 { callfunc "XmasDebug"; goto L_End; @@ -186,7 +186,7 @@ L_End: end; } -030-2.gat,193,62,0|script|XmasDebug#2|105 +030-2,193,62,0|script|XmasDebug#2|105 { callfunc "XmasDebug"; goto L_End; @@ -200,7 +200,7 @@ L_End: end; } -030-3.gat,26,26,0|script|XmasDebug#3|105 +030-3,26,26,0|script|XmasDebug#3|105 { callfunc "XmasDebug"; goto L_End; @@ -214,7 +214,7 @@ L_End: end; } -030-4.gat,30,30,0|script|XmasDebug#4|111 +030-4,30,30,0|script|XmasDebug#4|111 { callfunc "XmasDebug"; goto L_End; diff --git a/world/map/npc/annuals/xmas/mobmanager.txt b/world/map/npc/annuals/xmas/mobmanager.txt index 5d97e340..bb9f2a3f 100644 --- a/world/map/npc/annuals/xmas/mobmanager.txt +++ b/world/map/npc/annuals/xmas/mobmanager.txt @@ -1,6 +1,6 @@ // Spawns mobs -019-1.gat,0,0,0|script|XmasSpawnManager|400 +019-1,0,0,0|script|XmasSpawnManager|400 { end; @@ -54,7 +54,7 @@ L_End: end; } -019-1.gat,0,0,0|script|XmasSpawnCounter#0|400 +019-1,0,0,0|script|XmasSpawnCounter#0|400 { end; @@ -63,7 +63,7 @@ OnTally: end; } -019-3.gat,0,0,0|script|XmasSpawnCounter#1|400 +019-3,0,0,0|script|XmasSpawnCounter#1|400 { end; @@ -72,7 +72,7 @@ OnTally: end; } -030-3.gat,0,0,0|script|XmasSpawnCounter#2|400 +030-3,0,0,0|script|XmasSpawnCounter#2|400 { end; diff --git a/world/map/npc/doc/magic b/world/map/npc/doc/magic index 82fa7629..8a2b84e1 100644 --- a/world/map/npc/doc/magic +++ b/world/map/npc/doc/magic @@ -20,4 +20,4 @@ the `@Q_MASK' and `@Q_SHIFT' variables appropriately. There are a few exceptions (such as the Kadiya quest) wherein a separate helper function sets a dedicated local variable, or some hackery -in Auldsbel wherein we read stati directly, merely to enable certain options.
\ No newline at end of file +in Auldsbel wherein we read stati directly, merely to enable certain options. diff --git a/world/map/npc/functions/magic.txt b/world/map/npc/functions/magic.txt index aaa8a618..6acc5f5f 100644 --- a/world/map/npc/functions/magic.txt +++ b/world/map/npc/functions/magic.txt @@ -164,10 +164,10 @@ L_MenuItems: // ------------------------------------------------------------ // Level up a skill -// @SUP_id skill ID to level up -// @SUP_lvl skill level to attain -// @SUP_name$ name of the skill to level up -// @SUP_xp # of experience points to award if the level up succeeds +// @SUP_id skill ID to level up +// @SUP_lvl skill level to attain +// @SUP_name$ name of the skill to level up +// @SUP_xp # of experience points to award if the level up succeeds // ------------------------------------------------------------ function|script|SkillUp { |