diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-01-13 00:25:06 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-01-13 00:25:06 -0300 |
commit | d53f5cad963c43437abdc80538a618ecd98a3a9f (patch) | |
tree | cc1d8d109764b98cb5609190c258a027e651b2c1 | |
parent | 8872ce533b86653dea03629918723fd12ac94217 (diff) | |
download | serverdata-d53f5cad963c43437abdc80538a618ecd98a3a9f.tar.gz serverdata-d53f5cad963c43437abdc80538a618ecd98a3a9f.tar.bz2 serverdata-d53f5cad963c43437abdc80538a618ecd98a3a9f.tar.xz serverdata-d53f5cad963c43437abdc80538a618ecd98a3a9f.zip |
Serena's Draft
-rw-r--r-- | npc/001-2-32/serena.txt | 165 | ||||
-rw-r--r-- | npc/001-2-34/samantha.txt | 37 | ||||
-rw-r--r-- | npc/functions/scoreboards.txt | 22 |
3 files changed, 187 insertions, 37 deletions
diff --git a/npc/001-2-32/serena.txt b/npc/001-2-32/serena.txt index fa650ef1..677f90a7 100644 --- a/npc/001-2-32/serena.txt +++ b/npc/001-2-32/serena.txt @@ -1,52 +1,143 @@ -// Evol scripts. +// The Mana World scripts. // Author: // Reid +// Jesusalva // Description: // Artis's Legion of Aemil officier of the fighting room. +// Note: +// ATL - Artis Training Legion +// TODO: Handle death +// TODO: Handle logout and cheats +// TODO: This NPC must be on the instance D: +// TODO: Handle victory (3 waves?) +// TODO: EVERYTHING!! 001-2-32,27,27,0 script Serena NPC_SERENA,{ mesn; mesq lg("Oh darling, what brought you here?"); // TRANSLATORS: Darling - Expresses familiarity or elderliness in relation to PC. - // <scratch> - // [ PC]: I was just looking around. - // [NPC]: Did not someone offer guidance? - // [NPC]: Enora was supposed to be helping you... - // [NPC]: ...but, she is young, and often absent-minded; did you ask? - // [NPC]: (Alt.) It seems you rushed ahead of her. Go back and talk to Enora. - // ([Enora]: Beyond here is the fighting room o_o;) - // ([Enora]: I... uh... well, you will need alies in there.) - // ([Enora]: And... you see... this is my good outfit and...) - // ([Enora]: ...I've only just cleaned up in there >.>) - // But if you keep getting stronger; that will be the day. - - // Alt-Ready: - // [NPC]: Beyond here is the Fight Room. - // [NPC]: [conditions]* - // [NPC]: Good-luck | Bonne-chance. - - // (Alt.) [NPC]: I used to be an adventurer, like you. - // [NPC]: But there was no one to join for quests. - // [NPC]: So I enlisted for a post at this chapter. - // [NPC]: But my "friends" joined the Brotherhood! - - // [NPC]: The Brotherhood knows a lot more about monsters. - // [NPC]: But they could not "break the Legion's power" without burning all cities to the ground. - // [NPC]: The cities grow fast, ruining farmers and peasants. - // [NPC]: Our differences lead to friction. - - // Alt-What - // The secret is out: We really did create a mutant. - // None of the members were informed until it went out-of-control. - // [...] - // Muahaha-ha! My beautiful mutant. The city of Artis is mine. - // </scratch> - - // Alt-Siege - // The city is being attacked. Go help the warriors and town-guard. + close; + +L_Begin: + npctalk l("Training Arena, %s, get ready!", strcharinfo(0)); + // Save permanent data + .atl_blv=BaseLevel; + .atl_Str=readbattleparam(getcharid(3), bStr); + .atl_Agi=readbattleparam(getcharid(3), bAgi); + .atl_Vit=readbattleparam(getcharid(3), bVit); + .atl_Int=readbattleparam(getcharid(3), bInt); + .atl_Dex=readbattleparam(getcharid(3), bDex); + .atl_Luk=readbattleparam(getcharid(3), bLuk); + .atl_Dly=readbattleparam(getcharid(3), UDT_ADELAY); + .atl_Rng=readbattleparam(getcharid(3), UDT_ATKRANGE); + + // Save (b)ase data + .atl_bhp=MaxHp; + .atl_bAtk1=readbattleparam(getcharid(3), UDT_ATKMIN); + .atl_bAtk2=readbattleparam(getcharid(3), UDT_ATKMAX); + .atl_bMatk=readbattleparam(getcharid(3), UDT_MATKMAX); + .atl_bDef=readbattleparam(getcharid(3), UDT_DEF); + .atl_bMdef=readbattleparam(getcharid(3), UDT_MDEF); + .atl_bHit=readbattleparam(getcharid(3), UDT_HIT); + .atl_bFlee=readbattleparam(getcharid(3), UDT_FLEE); + .atl_bCrit=readbattleparam(getcharid(3), UDT_CRIT); + // Save (p)rogression data + .atl_php=.atl_bhp/5; + .atl_pAtk1=.atl_bAtk1/10; + .atl_pAtk2=.atl_bAtk2/10; + .atl_pMatk=.atl_bMatk/5; + .atl_pDef=.atl_bDef/5; + .atl_pMdef=.atl_bMdef/5; + .atl_pHit=.atl_bHit/10; + .atl_pFlee=.atl_bFlee/15; + .atl_pCrit=.atl_bCrit/10; + + // Begin the battle + doevent(instance_npcname(.name$)+"::OnGladius"); + addtimer(5000, instance_npcname(.name$)+"::OnVerify"); + closeclientdialog; close; +OnGladius: + sleep(800); + // TODO: Coordinates, Helpers? + .@mg=monster(instance_mapname("001-2-35"), 38, 32, "Gladiator", LegionLieutenant, 1, instance_npcname(.name$)+"::OnGladius"); + // Set "permanent" data + setunitdata(.@mg, UDT_ADELAY, .atl_Dly-.atlf); + setunitdata(.@mg, UDT_ATKRANGE, .atl_Rng+cap_value(.atlf/10, 0, 3)); + + // Set base data + setunitdata(.@mg, UDT_LEVEL, .atl_blv+.atlf); + setunitdata(.@mg, UDT_STR, .atl_Str+.atlf); + setunitdata(.@mg, UDT_AGI, .atl_Agi+.atlf); + setunitdata(.@mg, UDT_VIT, .atl_Vit+.atlf); + setunitdata(.@mg, UDT_INT, .atl_Int+.atlf); + setunitdata(.@mg, UDT_DEX, .atl_Dex+.atlf); + setunitdata(.@mg, UDT_LUK, .atl_Luk+.atlf); + + // Set variable data + setunitdata(.@mg, UDT_MAXHP, .atl_bhp+.atl_php*(.atlf-1)); + setunitdata(.@mg, UDT_HP, .atl_bhp+.atl_php*(.atlf-1)); + + setunitdata(.@mg, UDT_ATKMIN, .atl_bAtk1+.atl_pAtk1*(.atlf-1)); + setunitdata(.@mg, UDT_ATKMAX, .atl_bAtk2+.atl_pAtk2*(.atlf-1)); + setunitdata(.@mg, UDT_MATKMIN, .atl_bMatk+.atl_pMatk*(.atlf-1)); + setunitdata(.@mg, UDT_MATKMAX, .atl_bMatk+.atl_pMatk*(.atlf-1)); + setunitdata(.@mg, UDT_DEF, .atl_bDef+.atl_pDef*(.atlf-1)); + setunitdata(.@mg, UDT_MDEF, .atl_Mdef+.atl_pMdef*(.atlf-1)); + setunitdata(.@mg, UDT_HIT, .atl_bHit+.atl_pHit*(.atlf-1)); + setunitdata(.@mg, UDT_FLEE, .atl_bFlee+.atl_pFlee*(.atlf-1)); + setunitdata(.@mg, UDT_CRIT, .atl_bCrit+.atl_pCrit*(.atlf-1)); + + setunitdata(.@mg, UDT_PDODGE, min(30, .atl_Luk/10+(.atlf/3))); + + .atlf+=1; + npctalk ("Training Arena, wave " + .atlf + "!"); + maptimer(instance_mapname("001-2-35"), 10, instance_npcname(.name$)+"::OnATLUpdate"); + end; + +OnATLUpdate: + if (.atlf > ATLRANK) + ATLRANK=.atlf; + getexp .atlf*7, .atlf*5; // Provide some reward + end; + +// Check for possible cheats, and update default values +OnVerify: + if (readbattleparam(getcharid(3), UDT_ATKRANGE) > .atl_Rng) + .atl_Rng=readbattleparam(getcharid(3), UDT_ATKRANGE); + + if (readbattleparam(getcharid(3), UDT_ATKMAX) > .atl_bAtk1) { + .atl_bAtk1=readbattleparam(getcharid(3), UDT_ATKMIN); + .atl_bAtk2=readbattleparam(getcharid(3), UDT_ATKMAX); + .atl_pAtk1=.atl_bAtk1/10; + .atl_pAtk2=.atl_bAtk2/10; + } + + if (readbattleparam(getcharid(3), UDT_DEF) > .atl_bDef) { + .atl_bDef=readbattleparam(getcharid(3), UDT_DEF); + .atl_pDef=.atl_bDef/5; + } + + if (readbattleparam(getcharid(3), UDT_MDEF) > .atl_bMdef) { + .atl_bMdef=readbattleparam(getcharid(3), UDT_MDEF); + .atl_pMdef=.atl_bMdef/5; + } + + if (readbattleparam(getcharid(3), UDT_MATKMAX) > .atl_bMatk) { + .atl_bMatk=readbattleparam(getcharid(3), UDT_MATKMAX); + .atl_pMatk=.atl_bMatk/5; + } + + // TODO: Ignore haste potion effects + // TODO: Update battle statuses on the fly + if (readbattleparam(getcharid(3), UDT_ADELAY) < .atl_bDly) + .atl_bDly=readbattleparam(getcharid(3), UDT_DELAY); + + addtimer(5000, instance_npcname(.name$)+"::OnVerify"); + end; + OnInit: .sex = G_FEMALE; .distance = 3; diff --git a/npc/001-2-34/samantha.txt b/npc/001-2-34/samantha.txt index a571ccf6..0d9ac813 100644 --- a/npc/001-2-34/samantha.txt +++ b/npc/001-2-34/samantha.txt @@ -9,6 +9,43 @@ mesq lg("Look who we have here, did you come for a training session?"); close; + // <scratch> + // [ PC]: I was just looking around. + // [NPC]: Did not someone offer guidance? + // [NPC]: Enora was supposed to be helping you... + // [NPC]: ...but, she is young, and often absent-minded; did you ask? + // [NPC]: (Alt.) It seems you rushed ahead of her. Go back and talk to Enora. + // ([Enora]: Beyond here is the fighting room o_o;) + // ([Enora]: I... uh... well, you will need alies in there.) + // ([Enora]: And... you see... this is my good outfit and...) + // ([Enora]: ...I've only just cleaned up in there >.>) + // But if you keep getting stronger; that will be the day. + + // Alt-Ready: + // [NPC]: Beyond here is the Fight Room. + // [NPC]: [conditions]* + // [NPC]: Good-luck | Bonne-chance. + + // (Alt.) [NPC]: I used to be an adventurer, like you. + // [NPC]: But there was no one to join for quests. + // [NPC]: So I enlisted for a post at this chapter. + // [NPC]: But my "friends" joined the Brotherhood! + + // [NPC]: The Brotherhood knows a lot more about monsters. + // [NPC]: But they could not "break the Legion's power" without burning all cities to the ground. + // [NPC]: The cities grow fast, ruining farmers and peasants. + // [NPC]: Our differences lead to friction. + + // Alt-What + // The secret is out: We really did create a mutant. + // None of the members were informed until it went out-of-control. + // [...] + // Muahaha-ha! My beautiful mutant. The city of Artis is mine. + // </scratch> + + // Alt-Siege + // The city is being attacked. Go help the warriors and town-guard. + OnInit: .sex = G_FEMALE; .distance = 3; diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt index 0dd54b23..120425ee 100644 --- a/npc/functions/scoreboards.txt +++ b/npc/functions/scoreboards.txt @@ -101,6 +101,22 @@ function script HallOfAcorns { return; } +function script HallOfATL { + mes ""; + mes l("##BHall Of Artis Legion Training Arena: TOP10##b"); + mesf("1. %s (%d)", $@atl_name$[0], $@atl_value[0]); + mesf("2. %s (%d)", $@atl_name$[1], $@atl_value[1]); + mesf("3. %s (%d)", $@atl_name$[2], $@atl_value[2]); + mesf("4. %s (%d)", $@atl_name$[3], $@atl_value[3]); + mesf("5. %s (%d)", $@atl_name$[4], $@atl_value[4]); + mesf("6. %s (%d)", $@atl_name$[5], $@atl_value[5]); + mesf("7. %s (%d)", $@atl_name$[6], $@atl_value[6]); + mesf("8. %s (%d)", $@atl_name$[7], $@atl_value[7]); + mesf("9. %s (%d)", $@atl_name$[8], $@atl_value[8]); + mesf("10. %s (%d)", $@atl_name$[9], $@atl_value[9]); + return; +} + // HallOfGame() function script HallOfGame { if ($MOST_HEROIC$) @@ -159,6 +175,7 @@ OnInit: .@nb = query_sql("select name, job_level from `char` ORDER BY job_level DESC LIMIT 15", $@hojlvl_name$, $@hojlvl_value); .@nb = query_sql("select name, guild_lv from `guild` ORDER BY guild_lv DESC LIMIT 5", $@hoguild_name$, $@hoguild_value); .@nb = query_sql("SELECT c.name, i.amount FROM `storage` AS i, `char` AS c WHERE i.nameid="+Acorn+" AND i.account_id=c.account_id ORDER BY i.amount DESC LIMIT 15", $@hoa_name$, $@hoa_value); + .@nb = query_sql("SELECT c.name, i.value FROM `char_reg_num_db` AS i, `char` AS c WHERE i.key='ATLRANK' AND i.char_id=c.char_id ORDER BY i.value DESC LIMIT 10", $@atl_name$, $@atl_value); consolemes(CONSOLEMES_DEBUG, "Scoreboards reloaded"); if (!$@SCOREBOARD_BIND) { bindatcmd "scoreboard", "@scoreboard::OnCall", 0, 100, 0; @@ -180,6 +197,7 @@ OnCall: l("Hall Of Job Level"), l("Hall Of Guilds"), l("Hall Of Acorns"), + l("Hall Of Artis Legion Training Arena"), l("Game Statistics"), l("Quit"); mes ""; @@ -205,6 +223,10 @@ OnCall: next; break; case 6: + HallOfATL(); + next; + break; + case 7: HallOfGame(); next; break; |