diff options
-rw-r--r-- | db/constants.conf | 9 | ||||
-rw-r--r-- | npc/003-1/town.txt | 5 | ||||
-rw-r--r-- | npc/009-1/town.txt | 3 | ||||
-rw-r--r-- | npc/012-1/town.txt | 3 | ||||
-rw-r--r-- | npc/017-1/town.txt | 5 | ||||
-rw-r--r-- | npc/018-5/town.txt | 2 | ||||
-rw-r--r-- | npc/020-1/town.txt | 4 | ||||
-rw-r--r-- | npc/024-1/town.txt | 4 | ||||
-rw-r--r-- | npc/functions/gmbot.txt | 1 | ||||
-rw-r--r-- | npc/functions/util.txt | 8 |
10 files changed, 31 insertions, 13 deletions
diff --git a/db/constants.conf b/db/constants.conf index a5be50f8b..161b6ee39 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4284,6 +4284,15 @@ constants_db: { MK_SIEGE_NIVAL: 4 MK_SIEGE_HALIN: 5 + comment__: "Report Bug Flags" + RB_NONE: 0 + RB_DISPBOTTOM: 1 + RB_DEBUGMES: 2 + RB_SPEECH: 4 + RB_ISFATAL: 8 + RB_PLEASEREPORT: 16 + RB_DEFAULT: 19 // dispbottom + debugmes + pleasereport + comment__: "Being actions" ACTION_STAND: 0 ACTION_MOVE: 1 diff --git a/npc/003-1/town.txt b/npc/003-1/town.txt index 2dfd2ed72..593785dce 100644 --- a/npc/003-1/town.txt +++ b/npc/003-1/town.txt @@ -4,8 +4,9 @@ // Description: // Reset LOCATION$ when entering a town -003-1,60,157,0 script #LocTulim NPC_HIDDEN,4,0,{ - LOCATION$="Tulim"; end; +003-1,60,157,0 script #LocTulim NPC_HIDDEN,4,1,{ +OnTouch: + EnterTown("Tulim"); end; } // Crocotree spawn experiment diff --git a/npc/009-1/town.txt b/npc/009-1/town.txt index bcb99e0d3..bef1fa1ae 100644 --- a/npc/009-1/town.txt +++ b/npc/009-1/town.txt @@ -5,6 +5,7 @@ // Reset LOCATION$ when entering a town 009-1,71,24,0 script #LocHalin NPC_HIDDEN,4,1,{ - LOCATION$="Halin"; end; +OnTouch: + EnterTown("Halin"); end; } 009-1,55,72,0 duplicate(#LocHalin) #LocHalinB NPC_HIDDEN,3,1 diff --git a/npc/012-1/town.txt b/npc/012-1/town.txt index 6c75ece4d..00501018d 100644 --- a/npc/012-1/town.txt +++ b/npc/012-1/town.txt @@ -5,7 +5,8 @@ // Reset LOCATION$ when entering a town 012-1,78,49,0 script #LocHurns NPC_HIDDEN,3,1,{ - LOCATION$="Hurns"; end; +OnTouch: + EnterTown("Hurns"); end; } 012-1,78,80,0 duplicate(#LocHurns) #LocHurnsS NPC_HIDDEN,3,1 012-1,54,61,0 duplicate(#LocHurns) #LocHurnsW NPC_HIDDEN,1,2 diff --git a/npc/017-1/town.txt b/npc/017-1/town.txt index 74ca14256..a475d1400 100644 --- a/npc/017-1/town.txt +++ b/npc/017-1/town.txt @@ -4,6 +4,7 @@ // Description: // Reset LOCATION$ when entering a town -017-1,219,91,0 script #LocLoF NPC_HIDDEN,1,1,{ - LOCATION$="LoF"; end; +017-1,219,91,0 script #LocLoF NPC_HIDDEN,2,2,{ +OnTouch: + EnterTown("LoF"); end; } diff --git a/npc/018-5/town.txt b/npc/018-5/town.txt index 9e91384ec..9b9905461 100644 --- a/npc/018-5/town.txt +++ b/npc/018-5/town.txt @@ -20,7 +20,7 @@ OnTouch: if (!.@q) goto L_AccessDenied; else - LOCATION$="Lilit"; + EnterTown("Lilit"); end; L_AccessDenied: diff --git a/npc/020-1/town.txt b/npc/020-1/town.txt index be6211294..b63e493ef 100644 --- a/npc/020-1/town.txt +++ b/npc/020-1/town.txt @@ -5,6 +5,8 @@ // Reset LOCATION$ when entering a town 020-1,71,102,0 script #LocNival NPC_HIDDEN,2,0,{ - LOCATION$="Nival"; end; +OnTouch: + EnterTown("Nival"); + end; } 012-1,106,55,0 duplicate(#LocNival) #LocNivalB NPC_HIDDEN,1,1 diff --git a/npc/024-1/town.txt b/npc/024-1/town.txt index fd7e7bb67..3e21e4fe2 100644 --- a/npc/024-1/town.txt +++ b/npc/024-1/town.txt @@ -5,6 +5,8 @@ // Reset LOCATION$ when entering a town 024-1,93,69,0 script #LocFrostia NPC_HIDDEN,2,0,{ - LOCATION$="Frostia"; end; +OnTouch: + EnterTown("Frostia"); + end; } diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt index 2c55f43ed..3e0cc2a2d 100644 --- a/npc/functions/gmbot.txt +++ b/npc/functions/gmbot.txt @@ -120,6 +120,7 @@ OnTimer90000: ++.@e; } unitwarp($@MK, .mp$, .@x, .@y); + sleep(50); // For some reason or other, adding sleep(norid) and sleep2(rid). .nearby=getusers(8); // Handle Mana Stone diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 60274204e..3f4ab0a09 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -651,9 +651,9 @@ function script gettimeparam { } -// Bug Warning -// ReportBug( BugID, {Flags{, Return Code}} ) -function script ReportBug { +// Something went wrong and must be reported (I tried to keep a syntax close to python) +// Exception( BugID, {Flags{, Return Code}} ) +function script Exception { // Fill variable .@msg$=getarg(0); .@gf=getarg(1,RB_DEFAULT); @@ -696,7 +696,7 @@ function script EnterTown { // Validade variable, see npc/000-1/exit.txt first setarray .@locs$, "Candor", "Tulim", "Halin", "Hurns", "LoF", "Lilit", "Nival", "Frostia"; if (array_find(.@locs$, .@v$) < 0) - return ReportBug("Invalid location passed to EnterTown: "+.@v$); + return Exception("Invalid location passed to EnterTown: "+.@v$); LOCATION$=.@v$; return; |