summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/001-8/hub.txt6
-rw-r--r--npc/003-1/quirino.txt2
-rw-r--r--npc/012-6/nurse.txt4
-rw-r--r--npc/015-8-1/campaign.txt83
-rw-r--r--npc/015-8/config.txt2
-rw-r--r--npc/functions/hub.txt4
-rw-r--r--npc/functions/mobpoint.txt2
7 files changed, 81 insertions, 22 deletions
diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt
index d3d3044a5..72232e111 100644
--- a/npc/001-8/hub.txt
+++ b/npc/001-8/hub.txt
@@ -171,7 +171,7 @@ OnBegin:
// Free player, let's start!
delcells "qhubN";
delcells "qhubS";
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
specialeffect(60, AREA, getcharid(3));
specialeffect(11, AREA, getcharid(3));
dispbottom col(l("Run! Event started!"), 1);
@@ -344,7 +344,7 @@ OnPCLogoutEvent:
// } Deal with the player {
clearitem();
if (checkpcblock() & PCBLOCK_ATTACK)
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
// Check if to reduce clearitem() efficiency you've used the cart in an illegal way.
getcartinventorylist();
@@ -386,7 +386,7 @@ OnPCLogoutEvent:
end;
OnCancel:
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
warp "Save", 0, 0;
end;
diff --git a/npc/003-1/quirino.txt b/npc/003-1/quirino.txt
index 669cb61ed..031bf842f 100644
--- a/npc/003-1/quirino.txt
+++ b/npc/003-1/quirino.txt
@@ -97,7 +97,7 @@ L_SignUp:
warp "001-8", rand(42, 57), 57;
// Prevent further movements!
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, true);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, true);
//dispbottom l("Stay ready!");
dispbottom l("##1DON'T MOVE until the signal. Stay ready! If you move, you will desync client!");
close;
diff --git a/npc/012-6/nurse.txt b/npc/012-6/nurse.txt
index ad1bf2339..8a1419894 100644
--- a/npc/012-6/nurse.txt
+++ b/npc/012-6/nurse.txt
@@ -59,7 +59,7 @@ L_BLCore:
percentheal -90, 0;
addtimer(180000, "Hurnscald's Nurse::OnDonationComplete");
slide 34, 29;
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE, true);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, true);
dispbottom l("Any movement/skill/item will be without effect until time is up.");
closedialog;
close;
@@ -69,7 +69,7 @@ L_BLCore:
OnDonationComplete:
if (checkpcblock() & PCBLOCK_ATTACK)
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE, false);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false);
slide 58, 67;
percentheal 100, 0;
getexp readparam(Hp)*2, readparam(Hp)/100;
diff --git a/npc/015-8-1/campaign.txt b/npc/015-8-1/campaign.txt
index 96a943782..352432db7 100644
--- a/npc/015-8-1/campaign.txt
+++ b/npc/015-8-1/campaign.txt
@@ -14,37 +14,96 @@
// There is no instance init
OnBegin:
.@m$=getmap();
- .@in=getq2(HurnscaldQuest_Sagratha);
+ .@n$=instance_npcname(.name$);
+ //.@in=getq2(HurnscaldQuest_Sagratha);
//debugmes "Initialized - Inst ID %d", .@in;
//debugmes "Map %s.gat - NPC Name %s", .@m$, .name$;
//debugmes "NPC UUID %s (%s)", instance_npcname(.name$), instance_npcname(.name$, .@in);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_SITSTAND|PCBLOCK_IMMUNE|PCBLOCK_CHAT|PCBLOCK_MOVE, true); // Same as 255
setq3 HurnscaldQuest_Sagratha, 1;
// We're in an instance, ofc. Here we still have player attached.
//npctalk3 l("Open your eyes!");
//npctalk("Sagratha: Open your eyes!", instance_npcname(.name$, .@in), false);
//npctalk("Sagratha: Open your eyes!");
- mapannounce(.@m$, l("Sagratha: Open your eyes!"), 0);
- .SAGRATHA=monster(.@m$, 52, 40, "Sagratha", Sagratha, 1, instance_npcname(.name$, .@in)+"::OnError", Size_Medium, 2);
+ //mapannounce(.@m$, l("Sagratha: Open your eyes!"), 0);
- unittalk(.SAGRATHA, l("Open your eyes!"));
+ .SAGRATHA=monster(.@m$, 52, 40, "Sagratha", Sagratha, 1, .@n$+"::OnSagrathaDie", Size_Medium, 2);
+ .BOSS=monster(.@m$, 52, 40, l("Masked Assassin"), HoodedAssassin, 1, .@n$+"::OnSagrathaWin");
- monster .@m$, 49, 45, "Real Monster", RedSlime, 1;
- // max AI id 4. You are in 49,39
- monster .@m$, 49, 41, "AI Tx", RedSlime, 1, instance_npcname(.name$)+"::OnError", Size_Medium, 2;
- monster .@m$, 51, 41, "AI Xt", RedSlime, 1, instance_npcname(.name$)+"::OnError", Size_Medium, 2;
+ unitstop(.SAGRATHA);
+ unitstop(.BOSS);
- addtimer(5000, instance_npcname(.name$)+"::OnError");
+ unittalk(.SAGRATHA, l("What are you doing here, @@!", get_race()));
+
+ addtimer(1000, .@n$+"::OnS02");
+ end;
+
+OnS02:
+ .@m$=getmap();
+ .@n$=instance_npcname(.name$);
+
+ unitstop(.SAGRATHA);
+ unitstop(.BOSS);
+
+ unittalk(.SAGRATHA, l("I don't need help!"));
+ unittalk(.BOSS, l("Die already!"));
+
+ addtimer(1500, .@n$+"::OnS03");
+ end;
+
+OnS03:
+ .@m$=getmap();
+ .@n$=instance_npcname(.name$);
+
+ unitstop(.SAGRATHA);
+ unitstop(.BOSS);
+
+ unittalk(.SAGRATHA, l("If you don't want to die, fight!"));
+ unittalk(.BOSS, lg("Murder her too!", "Murder him too!"));
+
+ addtimer(1500, .@n$+"::OnS04");
+ end;
+
+OnS04:
+ .@m$=getmap();
+ .@n$=instance_npcname(.name$);
+
+ // Assassin's Army
+ areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, HoodedNinja), HoodedNinja, 4;
+ areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, Assassin), Assassin, 7;
+
+ // Sagratha's Army
+ areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, Mouboo), Mouboo, 2, .@n$+"::OnError", Size_Medium, 2;
+ areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, ForestMushroom), ForestMushroom, 2, .@n$+"::OnError", Size_Medium, 2;
+
+ // Heal them because you should not be fighting (yet).
+ setunitdata(.BOSS, UDT_HP, getunitdata(.BOSS, UDT_MAXHP));
+ setunitdata(.SAGRATHA, UDT_HP, getunitdata(.SAGRATHA, UDT_MAXHP));
+
+ // Objective announce
+ mapannounce(.@m$, "##2"+l("Victory Conditions: Defeat the assassin!"), 0);
+ mapannounce(.@m$, "##1"+l("Defeat Conditions: Sagratha gets killed!"), 0);
+
+ // Status cleanup
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_SITSTAND|PCBLOCK_IMMUNE|PCBLOCK_CHAT|PCBLOCK_MOVE, false);
end;
// Assassin, HoodedNinja, HoodedAssassin (boss)
// Mouboo, ForestMushroom, Fluffy, Sagratha (boss)
+OnSagrathaDie:
+ npctalk "Defeat";
+ end;
+
+OnSagrathaWin:
+ npctalk "Victory";
+ end;
OnError:
- unittalk(.SAGRATHA, l("Watch out!"));
- debugmes "Error";
- npctalk "Error";
+ //unittalk(.SAGRATHA, l("Watch out!"));
+ //debugmes "Error";
+ //npctalk "Error";
end;
OnInit:
diff --git a/npc/015-8/config.txt b/npc/015-8/config.txt
index 986e4bc65..d70a444a1 100644
--- a/npc/015-8/config.txt
+++ b/npc/015-8/config.txt
@@ -4,7 +4,7 @@
// Description:
// 015-8 Sagratha Cave Configuration File
-015-8 mapflag zone MMO
+//015-8 mapflag zone MMO
015-8-1 mapflag zone MMO
015-8,99,179,0 script #Exit0158 NPC_HIDDEN,0,0,{
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 2c178da98..168823cf4 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -38,7 +38,7 @@ function script HUB_Logout {
// Logout while donating blood
if (getq(HurnscaldQuest_BloodDonor) == 2) {
slide 35, 28;
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE, false);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE, false);
setq HurnscaldQuest_BloodDonor, 0, gettimetick(2)+3600; // one hour penalty
}
// Logout/Death on Nard's ship hold
@@ -91,7 +91,7 @@ function script HUB_Logout {
.@trueid=getcharid(3);
//detachrid();
attachrid(killerrid);
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_COMMANDS, true);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS, true);
sc_start SC_WALKSPEED,120000,50;
sc_end SC_CASH_PLUSEXP;
sc_end SC_OVERLAPEXPUP;
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 2054b5493..eec6166a1 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -21,7 +21,7 @@ function script mobpoint {
OnUnlock:
if (checkpcblock() & PCBLOCK_ATTACK)
- setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_ITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
+ setpcblock(PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_MOVE|PCBLOCK_COMMANDS, false);
end;
OnNPCKillEvent: