diff options
Diffstat (limited to 'npc/042-10')
-rw-r--r-- | npc/042-10/ctrl.txt | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/npc/042-10/ctrl.txt b/npc/042-10/ctrl.txt index bb13e8d5c..162f7cac4 100644 --- a/npc/042-10/ctrl.txt +++ b/npc/042-10/ctrl.txt @@ -205,9 +205,10 @@ function script KatazuliCore { // (Probably spawn Dark Rose Field) // PS. Every monster in this floor will drop them getmapxy(.@m$, .@x, .@y, 0); + KamelotCaveSpawn($KAMELOT_PC[.@g], .@x-rand2(4), .@y-rand2(4), .@x+rand2(4), .@y+rand2(4), $KAMELOT_MX[.@g], "042-10"); .@x+=any(-3,-2,-1,1,2,3); .@y+=any(-3,-2,-1,1,2,3); - monster(.@m$, .@x, .@y, strmobinfo(1, MagicGoblin), MagicGoblin, rand2(3,6)); + monster(.@m$, .@x, .@y, strmobinfo(1, MagicGoblin), MagicGoblin, (@kataspam == 1 ? 6 : (@kataspam == 2 ? 5 : (@kataspam == 3 ? 4 : 3))) ); // Take away some HP and MP, but do not make you stand percentheal -1, -5; @@ -282,6 +283,25 @@ OnInstanceInit: initnpctimer; end; +OnKillMob: + if (!playerattached()) + end; + .@g=getcharid(2); + + // Handle Dark Petal + // XXX: How MX/PC should affect drop rates? + // I imagine a higher MX will increase DR.... (Right now, level 100 = +20% DR) + .@r=rand2(500); + if (.@r < 100+$KAMELOT_MX[.@g]) { + getmapxy(.@m$, .@x, .@y, 0); + makeitem(DarkPetal, 1, .@m$, rand2(.@x-1, .@x+1), rand2(.@y-1, .@y+1)); + } + + // Maybe a reward is due + if (.@g < 1) die(); + getexp $KAMELOT_MX[.@g]*10, $KAMELOT_MX[.@g]*5; + end; + // Every minute, recover some energy OnTimer60000: explode(.@map$, .map$, "@"); @@ -346,6 +366,25 @@ OnInstanceInit: initnpctimer; end; +OnKillMob: + if (!playerattached()) + end; + .@g=getcharid(2); + + // Handle Dark Petal + // XXX: How MX/PC should affect drop rates? + // I imagine a higher MX will increase DR.... (Right now, level 100 = +20% DR) + .@r=rand2(500); + if (.@r < 100+$KAMELOT_MX[.@g]) { + getmapxy(.@m$, .@x, .@y, 0); + makeitem(DarkPetal, 1, .@m$, rand2(.@x-1, .@x+1), rand2(.@y-1, .@y+1)); + } + + // Maybe a reward is due + if (.@g < 1) die(); + getexp $KAMELOT_MX[.@g]*10, $KAMELOT_MX[.@g]*5; + end; + // Every minute, recover some energy OnTimer60000: explode(.@map$, .map$, "@"); @@ -541,6 +580,8 @@ OnInit: OnKillMob: if (!playerattached()) goto OnRespawn; + .@g=getcharid(2); + // Handle Dark Petal // XXX: How MX/PC should affect drop rates? // I imagine a higher MX will increase DR.... (Right now, level 100 = +20% DR) @@ -551,7 +592,6 @@ OnKillMob: } // Maybe a reward is due - .@g=getcharid(2); if (.@g < 1) die(); getexp $KAMELOT_MX[.@g]*10, $KAMELOT_MX[.@g]*5; .@delay=max(5000, 30000-$KAMELOT_PC[.@g]*1250); |