summaryrefslogtreecommitdiff
path: root/npc/003-13
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-10-02 13:15:00 -0300
committerJesusaves <cpntb1@ymail.com>2019-10-02 13:46:15 -0300
commit6f886ae8bbd79a13fc94c375a0e0869d77a17b71 (patch)
tree6e1794618e5ad97f6440dc9b6f6673a58990c9d2 /npc/003-13
parent3b34fd8957521d96debc55018397e8a35eeb9217 (diff)
downloadserverdata-6f886ae8bbd79a13fc94c375a0e0869d77a17b71.tar.gz
serverdata-6f886ae8bbd79a13fc94c375a0e0869d77a17b71.tar.bz2
serverdata-6f886ae8bbd79a13fc94c375a0e0869d77a17b71.tar.xz
serverdata-6f886ae8bbd79a13fc94c375a0e0869d77a17b71.zip
Doppelganger Challenge (rewrite - Untested)r10.1_191002
Diffstat (limited to 'npc/003-13')
-rw-r--r--npc/003-13/arnea.txt150
1 files changed, 111 insertions, 39 deletions
diff --git a/npc/003-13/arnea.txt b/npc/003-13/arnea.txt
index 2107bda43..01736af69 100644
--- a/npc/003-13/arnea.txt
+++ b/npc/003-13/arnea.txt
@@ -39,8 +39,8 @@ L_Manage:
mesn;
select
l("warp back"),
- rif(!'UDTf, l("begin UDT Challenge")),
- l("UDT Challenge Ranking"),
+ rif(!'UDTf, l("begin Doppelganger Challenge")),
+ l("Doppelganger Challenge Ranking"),
l("cancel");
switch (@menu)
@@ -50,26 +50,73 @@ L_Manage:
break;
case 2:
mesc l("spawn challenge monster! How far can you go?"), 2;
- mesc l("The UDT Challenge will create a Gladiator Monster which should somehow emulate a PvP experience.");
+ mesc l("The Doppelganger Challenge will create a Gladiator Monster which should somehow emulate a PvP experience.");
+ mesc l("In other words, it'll make a copy of youself.");
mesc l("Defeating it will advance the round. How far can you survive?");
next;
- mesc l("Really begin the UDT Challenge?");
+ mesc l("Really begin the Doppelganger Challenge?");
+ mesc l("Switching from strong to weak equipments WON'T make it go any easier on you!"), 1;
if (askyesno() == ASK_NO)
break;
- npctalk l("UDT Challenge, @@ began the fight!", strcharinfo(0));
- // Save data
+ npctalk l("Doppelganger Challenge, @@ began the fight!", strcharinfo(0));
+ // Save permanent data
'udt_blv=BaseLevel;
- 'udt_bhp=MaxHp;
'udt_Str=readparam2(bStr);
'udt_Agi=readparam2(bAgi);
'udt_Vit=readparam2(bVit);
'udt_Int=readparam2(bInt);
'udt_Dex=readparam2(bDex);
'udt_Luk=readparam2(bLuk);
+ 'udt_Dly=readbattleparam(UDT_ADELAY);
+ 'udt_Rng=readbattleparam(UDT_ATKRANGE);
+
+ // Save (b)ase data
+ 'udt_bhp=MaxHp;
+ 'udt_bAtk1=readbattleparam(UDT_ATKMIN);
+ 'udt_bAtk2=readbattleparam(UDT_ATKMAX);
+ 'udt_bMatk=readbattleparam(UDT_MATKMAX);
+ 'udt_bDef=readbattleparam(UDT_DEF);
+ 'udt_bMdef=readbattleparam(UDT_MDEF);
+ 'udt_bHit=readbattleparam(UDT_HIT);
+ 'udt_bFlee=readbattleparam(UDT_FLEE);
+
+ // Save (p)rogression data
+ 'udt_php='udt_bhp/4;
+ 'udt_pAtk1='udt_bAtk1/4;
+ 'udt_pAtk2='udt_bAtk2/4;
+ 'udt_pMatk='udt_bMatk/4;
+ 'udt_pDef='udt_bDef/4;
+ 'udt_pMdef='udt_bMdef/4;
+ 'udt_pHit='udt_bHit/4;
+ 'udt_pFlee='udt_bFlee/4;
+
+ /*
+ .@a1=readbattleparam(UDT_ATKRANGE);
+ .@a2=readbattleparam(UDT_ATKMIN);
+ .@a3=readbattleparam(UDT_ATKMAX);
+ .@d1=readbattleparam(UDT_DEF);
+ .@d2=readbattleparam(UDT_MDEF);
+ .@c1=readbattleparam(UDT_HIT);
+ .@c2=readbattleparam(UDT_FLEE);
+ .@m1=readbattleparam(UDT_MATKMIN);
+ .@m2=readbattleparam(UDT_MATKMAX);
+ .@m3=readbattleparam(UDT_ELETYPE);
+ .@s1=readbattleparam(UDT_STR);
+ .@s2=readbattleparam(UDT_ADELAY);
+ .@s3=readbattleparam(UDT_DMOTION);
+
+ debugmes "Unit Data %d (Str %d)", getcharid(3), .@s1;
+ debugmes "Atk (%d~%d) Range %d", .@a2, .@a3, .@a1;
+ debugmes "Def %d MDef %d", .@d1, .@d2;
+ debugmes "Hit %d Flee %d", .@c1, .@c2;
+ debugmes "MAtk (%d~%d) Element %d", .@m1, .@m2, .@m3;
+ debugmes "Attack delay %d Stun %d", .@s2, .@s3;
+ */
// Begin the fight
doevent instance_npcname(.name$)+"::OnGladius";
+ addtimer 5000, instance_npcname(.name$)+"::OnVerify";
closeclientdialog;
break;
case 3:
@@ -85,44 +132,69 @@ L_Manage:
OnGladius:
sleep(800);
.@mg=monster(instance_mapname("003-13"), 38, 32, "Gladiator", TestingMob, 1, instance_npcname(.name$)+"::OnGladius");
+ // Set "permanent" data
+ setunitdata(.@mg, UDT_ADELAY, 'udt_Dly-'UDTf);
+ setunitdata(.@mg, UDT_ATKRANGE, 'udt_Rng+limit(0, 'UDTf/10, 3));
+
+ // Set base data
setunitdata(.@mg, UDT_LEVEL, 'udt_blv+'UDTf);
- setunitdata(.@mg, UDT_MAXHP, 'udt_bhp+('UDTf*45));
- setunitdata(.@mg, UDT_HP, 'udt_bhp+('UDTf*45));
-
- setunitdata(.@mg, UDT_STR, 'udt_Str+('UDTf*rand(1,3)));
- setunitdata(.@mg, UDT_AGI, 'udt_Agi+('UDTf*rand(1,3)));
- setunitdata(.@mg, UDT_VIT, 'udt_Vit+('UDTf*rand(1,3)));
- setunitdata(.@mg, UDT_INT, 'udt_Int+('UDTf*rand(1,3)));
- setunitdata(.@mg, UDT_DEX, 'udt_Dex+('UDTf*rand(1,3)));
- setunitdata(.@mg, UDT_LUK, 'udt_Luk+('UDTf*rand(1,3)));
-
- // Now, I don't have this info from player, so...
- // We must generate it
- .@str=getunitdata(.@mg, UDT_STR);
- .@agi=getunitdata(.@mg, UDT_AGI);
- .@vit=getunitdata(.@mg, UDT_VIT);
- .@int=getunitdata(.@mg, UDT_INT);
- .@dex=getunitdata(.@mg, UDT_DEX);
- .@luk=getunitdata(.@mg, UDT_LUK);
- .@blv=getunitdata(.@mg, UDT_LEVEL);
-
- // And then fill it
- setunitdata(.@mg, UDT_ATKRANGE, any(1,1,1,2));
- setunitdata(.@mg, UDT_ATKMIN, .@blv+(.@str*2)+('UDTf*4));
- setunitdata(.@mg, UDT_ATKMAX, .@blv+(.@str*2)+.@luk+('UDTf*6));
-
- setunitdata(.@mg, UDT_DEF, .@blv+.@vit+('UDTf*2));
- setunitdata(.@mg, UDT_MDEF, .@blv+.@int+('UDTf*2));
- setunitdata(.@mg, UDT_HIT, (.@blv*2)+.@dex+('UDTf*4));
- setunitdata(.@mg, UDT_FLEE, .@blv+.@agi+('UDTf*2));
- setunitdata(.@mg, UDT_PDODGE, min(30, .@luk/10+('UDTf/3)));
- setunitdata(.@mg, UDT_CRIT, (.@blv/2)+.@luk+('UDTf*2));
+ setunitdata(.@mg, UDT_STR, 'udt_Str+'UDTf);
+ setunitdata(.@mg, UDT_AGI, 'udt_Agi+'UDTf);
+ setunitdata(.@mg, UDT_VIT, 'udt_Vit+'UDTf);
+ setunitdata(.@mg, UDT_INT, 'udt_Int+'UDTf);
+ setunitdata(.@mg, UDT_DEX, 'udt_Dex+'UDTf);
+ setunitdata(.@mg, UDT_LUK, 'udt_Luk+'UDTf);
+
+ // Set variable data
+ setunitdata(.@mg, UDT_MAXHP, 'udt_bhp+'udt_php*('UDTf-1));
+ setunitdata(.@mg, UDT_HP, 'udt_bhp+'udt_php*('UDTf-1));
+
+ setunitdata(.@mg, UDT_ATKMIN, 'udt_bAtk1+'udt_pAtk1*('UDTf-1));
+ setunitdata(.@mg, UDT_ATKMAX, 'udt_bAtk2+'udt_pAtk2*('UDTf-1));
+ setunitdata(.@mg, UDT_MATKMIN, 'udt_bMatk+'udt_pMatk*('UDTf-1));
+ setunitdata(.@mg, UDT_MATKMAX, 'udt_bMatk+'udt_pMatk*('UDTf-1));
+ setunitdata(.@mg, UDT_DEF, 'udt_bDef+'udt_pDef*('UDTf-1));
+ setunitdata(.@mg, UDT_MDEF, 'udt_Mdef+'udt_pMDef*('UDTf-1));
+ setunitdata(.@mg, UDT_HIT, 'udt_bHit+'udt_pHit*('UDTf-1));
+ setunitdata(.@mg, UDT_FLEE, 'udt_bFlee+'udt_pFlee*('UDTf-1));
+ setunitdata(.@mg, UDT_CRIT, 'udt_bCrit+'udt_pCrit*('UDTf-1));
+
+ setunitdata(.@mg, UDT_PDODGE, min(30, 'udt_Luk/10+('UDTf/3)));
+
'UDTf+=1;
- npctalk ("UDT Challenge, wave " + 'UDTf + "!");
+ npctalk ("Doppelganger Challenge, wave " + 'UDTf + "!");
+ maptimer(instance_mapname("003-13"), 10, instance_npcname(.name$)+"::OnUDTUpdate");
+ end;
+
+OnUDTUpdate:
if ('UDTf > UDTRANK)
UDTRANK='UDTf;
end;
+// Check for possible cheats, and update default values
+OnVerify:
+ if (readbattleparam(UDT_ATKRANGE) > 'udt_Rng)
+ 'udt_Rng=readbattleparam(UDT_ATKRANGE);
+
+ if (readbattleparam(UDT_ATKMAX) > 'udt_bAtk1) {
+ 'udt_bAtk1=readbattleparam(UDT_ATKMIN);
+ 'udt_bAtk2=readbattleparam(UDT_ATKMAX);
+ }
+
+ if (readbattleparam(UDT_DEF) > 'udt_bDef)
+ 'udt_bDef=readbattleparam(UDT_DEF);
+
+ if (readbattleparam(UDT_MDEF) > 'udt_bMdef)
+ 'udt_bMdef=readbattleparam(UDT_MDEF);
+
+ if (readbattleparam(UDT_MATKMAX) > 'udt_bMatk)
+ 'udt_bMatk=readbattleparam(UDT_MATKMAX);
+
+ if (readbattleparam(UDT_ADELAY) < 'udt_bDly)
+ 'udt_bDly=readbattleparam(UDT_DELAY);
+
+ end;
+
OnInit:
.@npcId = getnpcid(.name$);
setunitdata(.@npcId, UDT_HEADTOP, Darkelm);