summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-28 17:45:20 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-28 17:45:20 -0300
commit7f545106a402a54110d2545ebbb49fc6d270dd07 (patch)
treee0948d0e198a5babbfeca80d8eb8525508bcdfc9 /npc
parent44a929b118885561c5f8de4d12fff1fdbd900b19 (diff)
downloadserverdata-7f545106a402a54110d2545ebbb49fc6d270dd07.tar.gz
serverdata-7f545106a402a54110d2545ebbb49fc6d270dd07.tar.bz2
serverdata-7f545106a402a54110d2545ebbb49fc6d270dd07.tar.xz
serverdata-7f545106a402a54110d2545ebbb49fc6d270dd07.zip
Allow some warm up exercises by Arthur
Diffstat (limited to 'npc')
-rw-r--r--npc/042-0/arthur.txt73
1 files changed, 73 insertions, 0 deletions
diff --git a/npc/042-0/arthur.txt b/npc/042-0/arthur.txt
index fbdd993e8..f6cb6d64c 100644
--- a/npc/042-0/arthur.txt
+++ b/npc/042-0/arthur.txt
@@ -7,6 +7,7 @@
// TODO: Random guard (Tezer) on the cursed soldier statues (easter egg)
042-0,58,28,0 script King Arthur NPC_KING_ARTHUR,{
+ function arthurSpawn;
.@g=getcharid(2);
.@pos=getguildrole(.@g, getcharid(3));
if (.@pos > GPOS_VICELEADER) goto L_Refusal;
@@ -76,6 +77,10 @@ L_Quest:
if (!is_admin()) // FIXME: This should be unconditional
$KAMELOT_COOLDOWN[.@g] = gettimeparam(GETTIME_WEEKDAY);
mapannounce(getmap(), "##1KAMELOT CASTLE, GUILD DUNGEON: MISSION START!", bc_map);
+ // Spawn a few foot soldiers
+ arthurSpawn(1, 25, 29, 43, 37);
+ arthurSpawn(3, 22, 43, 43, 73);
+ arthurSpawn(5, 76, 55, 98, 77);
mesc l(".:: KAMELOT CASTLE, THE GUILD DUNGEON ::."), 1;
mes "";
mes l("1. Investigate Kamelot Basements");
@@ -155,6 +160,56 @@ L_Refusal:
mesc l("I better leave talking to him to the guild Vice Leaders and Master.");
close;
+OnKillMob:
+ if (!playerattached()) end;
+ .@g=getcharid(2);
+ if (.@g < 1) percentheal -100, -100;
+ getexp $KAMELOT_MX[.@g], $KAMELOT_MX[.@g]/2+1;
+ end;
+
+function arthurSpawn {
+ .@label$=instance_npcname(.name$)+"::OnKillMob";
+ .@gcount=getarg(0);
+ .@x1=getarg(1);
+ .@x2=getarg(3);
+ .@y1=getarg(2);
+ .@y2=getarg(4);
+ .@g=getcharid(2);
+ if (.@g < 1) percentheal -100, -100;
+ .@avg=$KAMELOT_MX[.@g];
+ .@m$=getmap();
+ for (.@i=0; .@i < .@gcount; .@i++) {
+ .@mobId=CursedSoldier;
+ .@mob=areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mobId), .@mobId, 1, .@label$);
+ // Reconfigure the monster
+ setunitdata(.@mob, UDT_LEVEL, .@avg);
+ setunitdata(.@mob, UDT_STR, 1+.@avg/6);
+ setunitdata(.@mob, UDT_AGI, 1+.@avg/7);
+ setunitdata(.@mob, UDT_VIT, 1+.@avg/6);
+ setunitdata(.@mob, UDT_INT, 1+.@avg/6);
+ setunitdata(.@mob, UDT_DEX, 1+.@avg/7);
+ setunitdata(.@mob, UDT_LUK, 1+.@avg/6);
+ setunitdata(.@mob, UDT_ADELAY, 2072);
+ setunitdata(.@mob, UDT_ATKRANGE, 1);
+ // Battle Status
+ setunitdata(.@mob, UDT_MAXHP, .@avg*20);
+ setunitdata(.@mob, UDT_HP, .@avg*20);
+ setunitdata(.@mob, UDT_ATKMIN, .@avg*3);
+ setunitdata(.@mob, UDT_ATKMAX, .@avg*5);
+ setunitdata(.@mob, UDT_DEF, 1+.@avg*6/10);
+ setunitdata(.@mob, UDT_MDEF, 1+.@avg*3/10);
+ setunitdata(.@mob, UDT_HIT, .@avg*35/10); // Advised: x3
+ setunitdata(.@mob, UDT_FLEE, .@avg*25/10); // Advised: x4
+ // Critical calculation
+ .@min=1;
+ .@max=max(.@min, min(15, .@avg/6));
+ setunitdata(.@mob, UDT_CRIT, rand2(.@min, .@max));
+ // Loop through
+ }
+ freeloop(false);
+ return;
+}
+
OnInit:
.distance=4;
.sex=G_MALE;
@@ -173,6 +228,14 @@ OnInstanceInit:
+
+
+
+
+
+
+
+
042-0,69,24,0 script #K042-0_69_24 NPC_HIDDEN,0,0,{
end;
@@ -198,6 +261,16 @@ OnTouch:
+
+
+
+
+
+
+
+
+
+
042-0,86,27,0 script Guinevere NPC_GUINEVERE,{
function guinevereSpawn;
.@g=getcharid(2);