summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-05-15 11:41:34 -0300
committerJesusaves <cpntb1@ymail.com>2020-05-15 11:41:34 -0300
commit426eff10025a7a614085eaa80d2ebcdace0c058c (patch)
tree97f65967b05be5b2a8d8707c069b0f0844f7fdb6 /npc
parent1f3aae21ccc3dfefbd8475ad25125da9b99163b4 (diff)
downloadserverdata-426eff10025a7a614085eaa80d2ebcdace0c058c.tar.gz
serverdata-426eff10025a7a614085eaa80d2ebcdace0c058c.tar.bz2
serverdata-426eff10025a7a614085eaa80d2ebcdace0c058c.tar.xz
serverdata-426eff10025a7a614085eaa80d2ebcdace0c058c.zip
This should get rid of Katazuli issues
Diffstat (limited to 'npc')
-rw-r--r--npc/042-10/ctrl.txt44
-rw-r--r--npc/functions/event.txt2
2 files changed, 43 insertions, 3 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);
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 33892439c..1ca0c8a81 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -3,7 +3,7 @@
// Jesusalva
// Description:
// Controls world events so Saulc and I can take vacations.
-// The event specifics are more often scattered accross seasons.txt, command/event.txt
+// See also: seasons.txt, command/event.txt, aurora.txt
// 003-1/events.txt, soulmenhir.txt and, of course, the event maps (if any).
// Schedule, if needed to change, can be found in the OnInit loop.
// An event, obviously, cannot last more than 7... 15 days at WORST.