diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-10-28 14:17:35 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-10-28 14:17:35 -0300 |
commit | 03562f1ef1a8896a3056b0d3ef667b0c02ad19a3 (patch) | |
tree | 6eb1c19bfa8f500673b6d490f1869880e256c712 | |
parent | e086d8c87aa007a4dfe8dd675abb60ff32fc78af (diff) | |
download | serverdata-03562f1ef1a8896a3056b0d3ef667b0c02ad19a3.tar.gz serverdata-03562f1ef1a8896a3056b0d3ef667b0c02ad19a3.tar.bz2 serverdata-03562f1ef1a8896a3056b0d3ef667b0c02ad19a3.tar.xz serverdata-03562f1ef1a8896a3056b0d3ef667b0c02ad19a3.zip |
Blightbringer (original acquisition)
-rw-r--r-- | db/re/item_db.conf | 2 | ||||
-rw-r--r-- | npc/026-7/boss.txt | 51 | ||||
-rw-r--r-- | npc/commands/grantpower.txt | 19 | ||||
-rw-r--r-- | npc/functions/gmbot.txt | 1 | ||||
-rw-r--r-- | npc/functions/scoreboards.txt | 2 | ||||
-rw-r--r-- | npc/functions/util.txt | 3 | ||||
-rw-r--r-- | npc/items/books.txt | 3 |
7 files changed, 72 insertions, 9 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index efa479dd4..490d07122 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -14355,7 +14355,7 @@ item_db: ( Id: 3605 AegisName: "Blightbringer" Name: "Blightbringer" - Type: "IT_ARMOR" + Type: "IT_WEAPON" Buy: 9999999 Sell: 0 Weight: 2000 diff --git a/npc/026-7/boss.txt b/npc/026-7/boss.txt index efe35478e..6d785cb6a 100644 --- a/npc/026-7/boss.txt +++ b/npc/026-7/boss.txt @@ -167,7 +167,8 @@ OnTimer10000: kamibroadcast("The MONSTER KING has WON the showdown!", "WORLD HEART"); } stopnpctimer; - end; + //end; + goto OnPrepBlight; } /* Prepare some combat data */ @@ -525,7 +526,8 @@ L_NextAct: //charcommand("@reloadbattleconf"); // Careful! //donpcevent("@exprate::OnReload"); //donpcevent("@droprate::OnReload"); - end; + //end; + goto OnPrepBlight; OnVictory: // Not killed by a player? It doesn't counts, then @@ -536,7 +538,7 @@ OnVictory: getitem StrangeCoin, 50; if (!MK_WINNER) { MK_WINNER=gettimetick(2); // TODO - getitem StrangeCoin, 2450; + getitem StrangeCoin, 1950; // Total: 2,000 Strange Coins on first win getitembound MysteriousFruit, 3, 4; // You get 3 char bound fruits } // Effects @@ -544,12 +546,47 @@ OnVictory: // Bailout sleep2(5000); warp "025-1", 99, 22; - // Disabled code (for translation only) - /* - dispbottom l("For defeating the Monster King, you've got the Legendary @@.", getitemlink(AegisShield)); + close; + +OnPrepBlight: + if ($SHADY_HOLDER$ != "") end; + .@c=getunits(BL_PC, .@pcs, MAX_CYCLE_PC, "026-7"); + .@mvp=0;.@def=-1; + for (.@i = 0; .@i < .@c; .@i++) { + .@atk = readbattleparam(.@pcs[.@i], UDT_ATKMAX); + if (.@atk > .@def) { + // Lets check if they qualify + attachrid(.@pcs[.@i]); + if (islegendary()) .@atk=false; // Already legendary, so nope + if (ispcdead()) .@atk=false; // Dead, so nope + if (!checkweight(Blightbringer, 1)) .@atk=false; // Overweight, so nope + detachrid(); + // They qualify: Remember this, and look for someone worthier + if (.@atk) { + .@mvp=.@pcs[.@i]; + .@def=.@atk; + } + } // if qualified + } // for Loop + if (.@mvp) { + attachrid(.@mvp); + addtimer(10, "Impregnable#B7F::OnBlightbringer"); + } + end; + +OnBlightbringer: + // Repeat all checks + if ($SHADY_HOLDER$ != "") end; + if (islegendary()) end; + if (ispcdead()) end; + inventoryplace Blightbringer, 1; + + $SHADY_HOLDER$ = strcharinfo(0); + getitembound Blightbringer, 1, 1; // Account bound or char bound? (1 or 4) + dispbottom l("For defeating the Monster King, you've got the Legendary @@.", getitemlink(Blightbringer)); dispbottom l("This item cannot be traded normally and is a Legendary Item."); dispbottom l("You can transfer it with \"@grantpower\" command. Please contact a GM for more info."); - dispbottom l("Protip: If you plan in selling it, it's adviseable to ask for GM mediation."); */ + dispbottom l("Protip: If you plan in selling it, it's adviseable to ask for GM mediation."); end; } diff --git a/npc/commands/grantpower.txt b/npc/commands/grantpower.txt index 406d1a111..1762bdd5d 100644 --- a/npc/commands/grantpower.txt +++ b/npc/commands/grantpower.txt @@ -38,6 +38,7 @@ OnCall: rif(countitem(Tyranny), l("Tyranny")), Tyranny, rif(countitem(Runestaff), l("Runestaff")), Runestaff, rif(countitem(AegisShield), l("Aegis Shield")), AegisShield, + rif(countitem(Blightbringer), l("Blightbringer")), Blightbringer, l("Abort"), 0; mes ""; .@ori=getcharid(3); @@ -62,6 +63,8 @@ OnCall: $RUNES_HOLDER$ = .@request$; break; case AegisShield: $AEGIS_HOLDER$ = .@request$; break; + case Blightbringer: + $SHADY_HOLDER$ = .@request$; break; default: Exception("Invalid legendary item "+str(.@ite), RB_DEFAULT|RB_IRCBROADCAST); break; @@ -199,6 +202,22 @@ OnClock0238: } } ////////////////////////////////////////// + if ($SHADY_HOLDER$ != "") { + .@nb = query_sql("SELECT last_login, char_id, account_id FROM `char` WHERE `name` = '"+$SHADY_HOLDER$+"' LIMIT 1", .@login, .@cid, .@aid); + if (.@login < .@kban) { + // Destroy the item by force + DelItemFromEveryPlayer(Blightbringer); + $SHADY_HOLDER$=""; + kamibroadcast("The Blightbringer has given up on its previous owner and is now available for someone worthier."); + } else if (legendaryTimeCheck(.@login, .@kick)) { + // Send warning via API + legendaryAPIWarning(.@aid); + } else if (legendaryTimeCheck(.@login, .@warn)) { + // Send warning ingame + legendaryRodexWarning(.@cid); + } + } + ////////////////////////////////////////// end; } diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt index 0c60fe847..2e270a88d 100644 --- a/npc/functions/gmbot.txt +++ b/npc/functions/gmbot.txt @@ -244,6 +244,7 @@ function matrixlb { .@cr+=(GHQ_WINNER ? 1 : 0); .@cr+=(FORT_1ST_VISIT ? 1 : 0); .@cr+=(MOUBOOTAUR_WINNER ? 1 : 0); + .@cr+=(MK_WINNER ? 1 : 0); // Bonus deed (optional) .@cr=limit(0, .@cr, 7); .@pts+=.@cr; diff --git a/npc/functions/scoreboards.txt b/npc/functions/scoreboards.txt index 921673953..decc25ffd 100644 --- a/npc/functions/scoreboards.txt +++ b/npc/functions/scoreboards.txt @@ -453,6 +453,8 @@ function script HallOfGame { mes l("The accurate hero: %s", $TYRAN_HOLDER$); mes l("The sorcerer hero: %s", $RUNES_HOLDER$); mes l("The frontier hero: %s", $DEMUR_HOLDER$); + if ($SHADY_HOLDER$ != "") + mes l("The anti-hero: %s", $SHADY_HOLDER$); mes ""; } else { mes l("The absolute hero: %s", l("Andrei Sakar")); diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 4ffd4a884..5f7553ff6 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -712,7 +712,8 @@ function script islegendary { .@you$ == $AEGIS_HOLDER$ || .@you$ == $TYRAN_HOLDER$ || .@you$ == $RUNES_HOLDER$ || - .@you$ == $DEMUR_HOLDER$); + .@you$ == $DEMUR_HOLDER$ || + .@you$ == $SHADY_HOLDER$); } // Returns if an event is a ranked Aurora Event or not diff --git a/npc/items/books.txt b/npc/items/books.txt index 2d37f00aa..4027e922c 100644 --- a/npc/items/books.txt +++ b/npc/items/books.txt @@ -490,6 +490,7 @@ function myself { .@doct = EPISODE_WINNER; .@fort = FORT_1ST_VISIT; .@seal = MOUBOOTAUR_WINNER; + .@king = MK_WINNER; detachrid(); attachrid(.@why); mes ".:: " + l("Personal Feats") + " ::."; @@ -511,6 +512,8 @@ function myself { mesc l("First visit to Fortress Is. %s ago", FuzzyTime(.@fort)); if (.@seal) mesc l("Defeated the Moubootaur (Sealed) %s ago", FuzzyTime(.@seal)); + if (.@king) + mesc l("Defeated the Monster King %s ago", FuzzyTime(.@king)); /* Heroic Data */ detachrid(); |