diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-05-02 02:47:12 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-05-02 02:47:12 -0300 |
commit | d6b43c03851b2643041fbe447908dba37b9fa485 (patch) | |
tree | 69785d973d37f97bb9846f016db9ea9a18e5a40a /npc | |
parent | 22e8f5793a870c10c687b01a7d8d88de121cb881 (diff) | |
download | serverdata-d6b43c03851b2643041fbe447908dba37b9fa485.tar.gz serverdata-d6b43c03851b2643041fbe447908dba37b9fa485.tar.bz2 serverdata-d6b43c03851b2643041fbe447908dba37b9fa485.tar.xz serverdata-d6b43c03851b2643041fbe447908dba37b9fa485.zip |
Move a chunk of code around to shut up engine
Diffstat (limited to 'npc')
-rw-r--r-- | npc/014-4/kamelot.txt | 46 | ||||
-rw-r--r-- | npc/042-5/ctrl.txt | 45 |
2 files changed, 46 insertions, 45 deletions
diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt index 952c5d1b3..d5c7ec05d 100644 --- a/npc/014-4/kamelot.txt +++ b/npc/014-4/kamelot.txt @@ -180,3 +180,49 @@ OnInit: end; } +///////////////////////////////////////////////////////////////////////////// +// KamelotCaveSpawn(Amount, x1, y1, x2, y2, power{, map}) +function script KamelotCaveSpawn { + .@label$=instance_npcname(.name$)+"::OnKillMob"; + .@gcount=getarg(0); + .@x1=getarg(1); + .@y1=getarg(2); + .@x2=getarg(3); + .@y2=getarg(4); + .@avg=getarg(5); + .@m$=instance_mapname(getarg(6, .map$)); + //debugmes "Total %d, map %s (power %d)", .@gcount, .@m$, .@avg; + freeloop(true); + for (.@i=0; .@i < .@gcount; .@i++) { + .@mobId=any(CursedSoldier, CursedArcher); // 50-50 ratio + .@mob=areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mobId), .@mobId, 1, .@label$); + // Reconfigure the monster + setunitdata(.@mob, UDT_LEVEL, .@avg+1); + setunitdata(.@mob, UDT_STR, 1+.@avg*6/10); + setunitdata(.@mob, UDT_AGI, 1+.@avg*5/10); + setunitdata(.@mob, UDT_VIT, 1+.@avg*5/10); + setunitdata(.@mob, UDT_INT, 1+.@avg*6/10); + setunitdata(.@mob, UDT_DEX, 1+.@avg*6/10); + setunitdata(.@mob, UDT_LUK, 1+.@avg*5/10); + setunitdata(.@mob, UDT_ADELAY, 1372); + setunitdata(.@mob, UDT_ATKRANGE, (.@mobId == CursedArcher ? any(6,7) : any(1,2))); + // Battle Status + setunitdata(.@mob, UDT_MAXHP, .@avg*40); + setunitdata(.@mob, UDT_HP, .@avg*40); + setunitdata(.@mob, UDT_ATKMIN, .@avg*52/10); + setunitdata(.@mob, UDT_ATKMAX, .@avg*72/10); + setunitdata(.@mob, UDT_DEF, 1+.@avg*12/10); + setunitdata(.@mob, UDT_MDEF, 1+.@avg*8/10); + setunitdata(.@mob, UDT_HIT, .@avg*6); // Advised: x3 + setunitdata(.@mob, UDT_FLEE, .@avg*45/10); // Advised: x4 + // Critical calculation + .@min=15; + .@max=max(.@min, min(40, .@avg/3)); + setunitdata(.@mob, UDT_CRIT, rand2(.@min, .@max)); + // Loop through + } + freeloop(false); + return; +} + + diff --git a/npc/042-5/ctrl.txt b/npc/042-5/ctrl.txt index 4a4701a94..1a75e767f 100644 --- a/npc/042-5/ctrl.txt +++ b/npc/042-5/ctrl.txt @@ -235,49 +235,4 @@ function script KamelotBoss { -///////////////////////////////////////////////////////////////////////////// -// KamelotCaveSpawn(Amount, x1, y1, x2, y2, power{, map}) -function script KamelotCaveSpawn { - .@label$=instance_npcname(.name$)+"::OnKillMob"; - .@gcount=getarg(0); - .@x1=getarg(1); - .@y1=getarg(2); - .@x2=getarg(3); - .@y2=getarg(4); - .@avg=getarg(5); - .@m$=instance_mapname(getarg(6, .map$)); - //debugmes "Total %d, map %s (power %d)", .@gcount, .@m$, .@avg; - freeloop(true); - for (.@i=0; .@i < .@gcount; .@i++) { - .@mobId=any(CursedSoldier, CursedArcher); // 50-50 ratio - .@mob=areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mobId), .@mobId, 1, .@label$); - // Reconfigure the monster - setunitdata(.@mob, UDT_LEVEL, .@avg+1); - setunitdata(.@mob, UDT_STR, 1+.@avg*6/10); - setunitdata(.@mob, UDT_AGI, 1+.@avg*5/10); - setunitdata(.@mob, UDT_VIT, 1+.@avg*5/10); - setunitdata(.@mob, UDT_INT, 1+.@avg*6/10); - setunitdata(.@mob, UDT_DEX, 1+.@avg*6/10); - setunitdata(.@mob, UDT_LUK, 1+.@avg*5/10); - setunitdata(.@mob, UDT_ADELAY, 1372); - setunitdata(.@mob, UDT_ATKRANGE, (.@mobId == CursedArcher ? any(6,7) : any(1,2))); - // Battle Status - setunitdata(.@mob, UDT_MAXHP, .@avg*40); - setunitdata(.@mob, UDT_HP, .@avg*40); - setunitdata(.@mob, UDT_ATKMIN, .@avg*52/10); - setunitdata(.@mob, UDT_ATKMAX, .@avg*72/10); - setunitdata(.@mob, UDT_DEF, 1+.@avg*12/10); - setunitdata(.@mob, UDT_MDEF, 1+.@avg*8/10); - setunitdata(.@mob, UDT_HIT, .@avg*6); // Advised: x3 - setunitdata(.@mob, UDT_FLEE, .@avg*45/10); // Advised: x4 - // Critical calculation - .@min=15; - .@max=max(.@min, min(40, .@avg/3)); - setunitdata(.@mob, UDT_CRIT, rand2(.@min, .@max)); - // Loop through - } - freeloop(false); - return; -} - |