summaryrefslogtreecommitdiff
path: root/npc/012-1
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-06-12 11:02:45 -0300
committerJesusaves <cpntb1@ymail.com>2018-06-12 11:02:45 -0300
commit993998dd8eaf4738802903f8200419f7e4e87826 (patch)
tree0a00af5f1dfe1ffc48c996adc7d3881eec67f9bc /npc/012-1
parentb502fa80be7f85698a6d1f7a129c5dccacf1b004 (diff)
downloadserverdata-993998dd8eaf4738802903f8200419f7e4e87826.tar.gz
serverdata-993998dd8eaf4738802903f8200419f7e4e87826.tar.bz2
serverdata-993998dd8eaf4738802903f8200419f7e4e87826.tar.xz
serverdata-993998dd8eaf4738802903f8200419f7e4e87826.zip
Initial version of Hurnscald Liberation Day event. Ugh, so messy.
Yeah, this is a massive co-op, with monsters at your side.
Diffstat (limited to 'npc/012-1')
-rw-r--r--npc/012-1/guards.txt265
1 files changed, 262 insertions, 3 deletions
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
index a12e5d69a..c16b8b2b6 100644
--- a/npc/012-1/guards.txt
+++ b/npc/012-1/guards.txt
@@ -9,15 +9,52 @@
if (!$HURNS_LIBDATE && is_admin()) goto L_Admus;
if (strcharinfo(2) == "Monster King") goto L_MKControl;
mesn;
- mesq l("We are @@ since the last great attack from the Monster King.", FuzzyTime($HURNS_LIBDATE,1,2);
+ mesq l("We are @@ since the last great attack from the Monster King.", FuzzyTime($HURNS_LIBDATE,1,2));
close;
L_Admus:
- end;
+ mes col("Protip: Use @hide to don't interfer.", 9);
+ mes l("Determine Team Size (If everyone is ready and stdby at Tulimshar, use: @@. Minimum 2 players.)", getusers(1));
+ input $@BG1_SIZE;
+ if ($@BG1_SIZE < 2) close;
+ $@BG1_SIZE=$@BG1_SIZE+1;
+
+ kickwaitingroomall("Hurnsguard");
+ setmapflagnosave("012-1", "000-1", 22, 22);
+ setmapflag("012-1", mf_nocommand);
+ setmapflag("012-1", mf_battleground);
+ enablenpc "Hurnsguard";
+ donpcevent "Hurnsguard::OnSet";
+ addmapmask "012-1", 10;
+ pvpon("012-1");
+ disablenpc "#012-1_22_62";
+ disablenpc "#012-1_79_17";
+ disablenpc "#012-1_79_102";
+ disablenpc "#012-1_132_101";
+ disablenpc "#012-1_65_55";
+ disablenpc "#012-1_89_58";
+ disablenpc "#012-1_101_55";
+ disablenpc "#012-1_121_71";
+ disablenpc "#012-1_116_66";
+ disablenpc "#012-1_110_56";
+ disablenpc "#012-1_102_69";
+ disablenpc "Andrei Sakar";
+ disablenpc "Dyrin The Traveler";
+ disablenpc "Gwendolyn";
+ disablenpc "Jack";
+ disablenpc "Locamit";
+ disablenpc "Richard";
+ disablenpc "Soul Menhir#hurns";
+ disablenpc "HurnsShip";
+ announce l("##1Hear ya, hear ya! There are @@ vacant slots at Hurnsguard to LIBERATE HURNSCALD!", $@BG1_SIZE), bc_all | bc_npc;
+ mes "##1You are assigned to Monster Forces. Do not leave Hurnscald.";
+ close;
L_MKControl:
mesn;
mes l("Oh noes! You've found the Hurnscald control panel!");
+ close;
+/*
menu
l("Initiate small siege (lv. 20)"), L_MKSmall,
l("Initiate medium siege (lv. 30)"), L_MKMedium,
@@ -39,7 +76,7 @@ L_MKSmall:
L_MKMedium:
addmapmask "012-1", 2;
- changemusic "012-1", "eric matyas - ghoulish fun.ogg";
+ changemusic "012-1", "eric_matyas_ghouls.ogg";
disablenpc("Mana Stone");
$@SIEGE_HURNS=1; // factor one
pvpon("012-1");
@@ -185,6 +222,7 @@ OnTimer630000:
enablenpc "Lynn The Traveler";
stopnpctimer;
end;
+*/
OnInit:
.sex = G_MALE;
@@ -202,6 +240,227 @@ OnInit:
end;
}
+
+// Liberation Day Script
+003-1,122,25,0 script Hurnsguard NPC_PLAYER,{
+ query_sql("SELECT online FROM char WHERE charname='Saulc GM'", .@online);
+ if (!.@online) {
+ mesn;
+ mesq l("We are planning to take over Hurnscald from the Monster King, and we will need everybody's help.");
+ next;
+ mesn;
+ mesq l("As soon that Saulc GM get back, we can start.");
+ close;
+ }
+ mes col("Hurnscald Liberation Day special event", 3);
+ mes "";
+ mes col("The objective of this event is to ##Bslay the Monster Admiral##b.",9);
+ mes col("If you die, you ##Bwon't##b be able to rejoin, but you won't suffer the penalty.",9);
+ next;
+ mes col("If all players there die, Hurnscald WON'T BE LIBERATED.",9);
+ mes col("This basically means that it'll be another day without it.", 9);
+ mes col("Also, the more players survive, the better rewards will be given.", 9);
+ next;
+ mes col("Right click on this NPC to join the Hurnscald Alliance.", 3);
+ mes col("The number of players must be precise, meaning if someone doesn't joins,", 9);
+ mes col("the event won't start and HURNSCALD WON'T BE LIBERATED.", 9);
+ next;
+ mes col("Once you join the Alliance, you won't be able to talk with people outside it.", 9);
+ mes col("Additionaly, all your movement will be restricted until either you're warped or log out.", 9);
+ close;
+
+OnSet:
+ waitingroom("Hurnscald Alliance", $@BG1_SIZE, "start#hurns_lib::OnReadyCheck", $@BG1_SIZE-1);
+ end;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ setunitdata(.@npcId, UDT_HEADTOP, GoldenWarlordPlate); // Light armor
+ setunitdata(.@npcId, UDT_HEADMIDDLE, JeansChaps); // Pants
+ setunitdata(.@npcId, UDT_HEADBOTTOM, DeepBlackBoots); // Shoes
+ setunitdata(.@npcId, UDT_WEAPON, BugSlayer);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 13);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 7);
+ disablenpc(.name$);
+ end;
+
+OnEnterBG:
+ $@FK_Team1 = waitingroom2bg("012-1",141, 65,"start#hurns_lib::OnPlayerQuit","start#hurns_lib::OnPlayerDeath");
+ end;
+
+OnDoEvent:
+ mapannounce("012-1", "Find and slay the Monster Admiral! Don't let everyone die!", bc_map);
+ .@Pl=getmapusers("012-1");
+
+ monster("012-1", 65, 71, "Monster Admiral", GiantMutatedBat, 1, "Hurnsguard::OnVictory");
+ areamonster("012-1", 52, 45, 127, 80, "Monster Sergeant", Forain, .@Pl/2+1, "Hurnsguard::OnXtreem");
+ areamonster("012-1", 52, 45, 127, 80, "Monster Sergeant", Moonshroom, .@Pl/2+1, "Hurnsguard::OnXtreem");
+ areamonster("012-1", 52, 45, 127, 80, "Monster Soldier", AngryScorpion, .@Pl, "Hurnsguard::OnSkip");
+ for (.@i = 0; .@i < .@Pl; .@i++)
+ bg_monster($@FK_Team1, "012-1", rand(131, 141), rand(64, 80), "Friendly Guard", FallenGuard1, "Cassia::OnSkip");
+ initnpctimer();
+ end;
+
+OnSkip:
+ end;
+
+OnTimer210000:
+ .@Pl=getmapusers("012-1")+mobcount("012-1", "Cassia:OnSkip")-1;
+ .@Mb=mobcount("012-1", "Hurnsguard:OnSkip")+mobcount("012-1", "Hurnsguard::OnXtreem")+2; // Saulc GM is an enemy for server code
+ for (.@i = 0; .@i < .@Pl; .@i++)
+ bg_monster($@FK_Team1, "012-1", rand(131, 141), rand(64, 80), "Friendly Guard", FallenGuard1, "Cassia::OnSkip");
+
+ // See if we need extra guards, depending on how outnumbered allied forces are.
+ if ((.@Mb / .@Pl) > 7) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 141), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ if ((.@Mb / .@Pl) > 6) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 141), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ if ((.@Mb / .@Pl) > 5) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 141), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ if ((.@Mb / .@Pl) > 4) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 141), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ if ((.@Mb / .@Pl) > 3) {
+ bg_monster($@FK_Team1, "012-1", rand(131, 141), rand(64, 80), "Additional Guard", FallenGuard2, "Cassia::OnSkip");
+ }
+ .@Pl=getmapusers("012-1")+mobcount("012-1", "Cassia:OnSkip")-1;
+ .@Pla=getmapusers("012-1")-1;
+
+ mapannounce("012-1", "Survivors: "+.@Pla+" Hurnscald Alliance: "+.@Pl+" Monsters: "+.@Mb, bc_map);
+ initnpctimer;
+ end;
+
+OnTimer15000:
+OnTimer120000:
+OnTimer180000:
+ .@Pl=getmapusers("012-1");
+ for (.@i = 0; .@i < .@Pl; .@i++) {
+ .@mid=rand(1,13);
+ switch (.@mid) {
+ case 1:
+ .@monsterId = CaveMaggot ; break;
+ case 2:
+ .@monsterId = RedSlime ; break;
+ case 3:
+ .@monsterId = LavaSlime ; break;
+ case 4:
+ .@monsterId = BlackScorpion ; break;
+ case 5:
+ .@monsterId = AngryRedScorpion ; break;
+ case 6:
+ .@monsterId = Sarracenus ; break;
+ case 7:
+ .@monsterId = Snake ; break;
+ case 8:
+ .@monsterId = MountainSnake ; break;
+ case 9:
+ .@monsterId = GreenSlime ; break;
+ case 10:
+ .@monsterId = Bandit ; break;
+ case 11:
+ .@monsterId = SlimeBlast ; break;
+ case 12:
+ .@monsterId = rand(HouseMaggot, AngryScorpion) ; break; // Lucky bonus, probably a Bif
+ default: // case 13:
+ .@monsterId = Yeti ; break;
+ }
+ areamonster("012-1", 52, 45, 127, 80, "Monster Soldier", .@monsterId, 1, "Hurnsguard::OnSkip");
+ }
+ end;
+
+OnXtreem:
+ if (rand(0,100) <= 50)
+ Karma=Karma+1;
+ else
+ getitem StrangeCoin, 2;
+ end;
+
+OnVictory:
+ $HURNS_LIBDATE=gettimetick(2);
+ removemapflag("012-1", mf_nosave);
+ disablenpc "Hurnsguard";
+ pvpoff("012-1");
+ removemapflag("012-1", mf_nocommand);
+ removemapflag("012-1", mf_battleground);
+ enablenpc "#012-1_22_62";
+ enablenpc "#012-1_79_17";
+ enablenpc "#012-1_79_102";
+ enablenpc "#012-1_132_101";
+ enablenpc "#012-1_65_55";
+ enablenpc "#012-1_89_58";
+ enablenpc "#012-1_101_55";
+ enablenpc "#012-1_121_71";
+ enablenpc "#012-1_116_66";
+ enablenpc "#012-1_110_56";
+ enablenpc "#012-1_102_69";
+ enablenpc "Andrei Sakar";
+ enablenpc "Dyrin The Traveler";
+ enablenpc "Gwendolyn";
+ enablenpc "Jack";
+ enablenpc "Locamit";
+ enablenpc "Richard";
+ enablenpc "Soul Menhir#hurns";
+ enablenpc "HurnsShip";
+ announce "##2Hurnscald was recovered!", bc_all | bc_npc;
+ killmonster("012-1", "All");
+ maptimer("012-1", 10, "Hurnsguard::OnReward");
+ end;
+
+OnReward:
+ // Let's say we have 5 players for reference. Subtract a Game Master, he doesn't counts.
+ .@Pl=getmapusers("012-1")-1;
+ getexp .@Pl*600, .@Pl*30; // 3,000 exp, 150 jxp
+ Zeny=Zeny+.@Pl*300; // 1,500 gp
+ end;
+
+}
+
+//== Battleground Engine ======================
+012-1,0,0,0 script start#hurns_lib NPC_HIDDEN,{
+OnInit:
+ end;
+
+OnEnable:
+ end;
+
+OnPlayerQuit:
+OnPlayerDeath:
+ bg_leave();
+ // Check if we are done for.
+ warp "000-1", 22, 22;
+ .@Pl=getmapusers("012-1");
+ if (.@Pl <= 1) {
+ announce "##1Hurnscald is lost!", bc_all | bc_npc;
+ disablenpc "Hurnsguard";
+ pvpoff("012-1");
+ removemapflag("012-1", mf_nocommand);
+ removemapflag("012-1", mf_battleground);
+ killmonster("012-1", "All");
+ }
+ end;
+
+OnReadyCheck:
+ .@Alliance = getwaitingroomstate(0,"start#hurns_lib");
+ if ( .@Alliance < 1 )
+ end;
+ donpcevent "Hurnsguard::OnEnterBG";
+ donpcevent "Hurnsguard::OnDoEvent";
+ bg_warp $@FK_Team1,"012-1",141, 65;
+ //initnpctimer;
+ end;
+}
+
+
+
+
+
+
+
+
+
// Handle Guard's logic
function script CheckpointGuard {
mesn;