diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-05-31 14:57:55 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-05-31 14:57:55 -0300 |
commit | dbbb00b0b2743ca819b7662140473c5dc92a3e6c (patch) | |
tree | 9b680f6fe92cf73f2dca51807813023dc490ebcb /npc | |
parent | 3893aeef67894e0b43def48a3ca5b61ac747f51e (diff) | |
download | serverdata-dbbb00b0b2743ca819b7662140473c5dc92a3e6c.tar.gz serverdata-dbbb00b0b2743ca819b7662140473c5dc92a3e6c.tar.bz2 serverdata-dbbb00b0b2743ca819b7662140473c5dc92a3e6c.tar.xz serverdata-dbbb00b0b2743ca819b7662140473c5dc92a3e6c.zip |
This sort out the lag issue in Impregnable Fortress, but removing 3,000+ mobs.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/026-4/ctrl.c | 4 | ||||
-rw-r--r-- | npc/026-5/ctrl.c | 9 | ||||
-rw-r--r-- | npc/functions/maze.txt | 17 |
3 files changed, 22 insertions, 8 deletions
diff --git a/npc/026-4/ctrl.c b/npc/026-4/ctrl.c index 2ebc2cf47..c3a8222ff 100644 --- a/npc/026-4/ctrl.c +++ b/npc/026-4/ctrl.c @@ -31,8 +31,8 @@ OnMon2359: // Reload .InstId (weekly takeover) debugmes "Reloading B4F... %d", gettimetick(0); killmonsterall("026-4"); - MazeMobs(145, false, 9, "026-4"); // Initiate Lv 145 mobs - MazeMobs(115, false, 24, "026-4"); // Initiate Lv 115 mobs + MazeMobs(145, false, 18, "026-4", 50); // Initiate Lv 145 mobs + MazeMobs(115, false, 52, "026-4", 50); // Initiate Lv 115 mobs debugmes "Reloaded B4F, %d", gettimetick(0); // Move NPCs around goto OnClock1843; diff --git a/npc/026-5/ctrl.c b/npc/026-5/ctrl.c index 003e7c895..7611ba0c0 100644 --- a/npc/026-5/ctrl.c +++ b/npc/026-5/ctrl.c @@ -20,10 +20,10 @@ OnMon2358: // Check if this is causing time leak debugmes "Reloading B5F... %d", gettimetick(0); killmonsterall("026-5"); - MazeMobs(145, false, 9, "026-5"); // Initiate Lv 145 mobs - MazeMobs(175, false, 60, "026-5"); // Initiate Lv 175 mobs + MazeMobs(145, false, 32, "026-5", 65); // Initiate Lv 145 mobs + MazeMobs(175, false, 96, "026-5", 30); // Initiate Lv 175 mobs debugmes "Reloaded B5F, %d", gettimetick(0); - end; + goto OnClock1843; // Initialize the dungeon OnInit: @@ -33,9 +33,8 @@ OnInit: instance_set_timeout(0, 0, .InstId); instance_init(.InstId); debugmes "Impregnable Fortress B5F (%d): Init OK", .InstId; - MazeMobs(145, false, 7, "026-5"); // Initiate Lv 145 mobs setmapflag("026-5", mf_zone, "SuperMMO"); - goto OnClock1843; + goto OnMon2358; OnClock1843: if (!.InstId) end; diff --git a/npc/functions/maze.txt b/npc/functions/maze.txt index d03160c18..68a1886f8 100644 --- a/npc/functions/maze.txt +++ b/npc/functions/maze.txt @@ -141,7 +141,7 @@ function script InitMaze { } ///////////////////////////////////////////////////////////////////////////////// -// MazeMobs(level=BaseLevel, chests=yes, density_redux=10, map=MAZE_MAP$) +// MazeMobs(level=BaseLevel, chests=yes, density_redux=10, map=MAZE_MAP$, buff=0) // Puts monsters on the maze. Less density_redux is more mobs. function script MazeMobs { .@m$=getarg(3, MAZE_MAP$); @@ -389,10 +389,25 @@ function script MazeMobs { /* Spawn them and make hostile */ freeloop(true); + debugmes "[Maze] Summoned %s Lv %d mobs in %s", fnum(.@tl), .@lv, .@m$; for (.@i = 0; .@i < 1+(.@tl); .@i++) { .@mid = any_of(.@mb); .@m=areamonster(.@m$, 20, 20, .@mx, .@my, strmobinfo(1, .@mid), .@mid, 1); set_aggro(.@m); + if (getarg(4, 0) > 0) { + .@bat=getunitdata(.@m, UDT_ATKMAX)+(.@s*2/3); + .@bai=getunitdata(.@m, UDT_ATKMIN)+(.@s/2); + .@bdf=getunitdata(.@m, UDT_DEF)+(.@s/3); + .@bht=min(32767, getunitdata(.@m, UDT_HIT)+(.@s*3/5)); + .@bhp=getunitdata(.@m, UDT_MAXHP); + .@s = getarg(4, 1); + setunitdata(.@m, UDT_ATKMAX, .@bat); + setunitdata(.@m, UDT_HIT, .@bht); + setunitdata(.@m, UDT_ATKMIN, .@bai); + setunitdata(.@m, UDT_DEF, .@bdf); + setunitdata(.@m, UDT_MAXHP, (.@bhp * (100+.@s)) / 100); + setunitdata(.@m, UDT_HP, (.@bhp * (100+.@s)) / 100); + } } freeloop(false); return; |