// TMW2 scripts.
// Authors:
// Jesusalva
// Description:
// Sagratha
// SaggyScoreUpdate( amount )
function script SaggyScoreUpdate {
.@val=getarg(0);
SAGRATHA_SCORE=max(-50, min(50, SAGRATHA_SCORE+.@val));
return;
}
function script SaggyMobCount {
switch (killedrid) {
// She gets angry
case Mouboo:
case AlphaMouboo:
SaggyScoreUpdate(-5);
break;
case Pollet:
case Fluffy:
case IcedFluffy:
SaggyScoreUpdate(-3);
break;
case PoisonSpikyMushroom:
case LogHead:
case ForestMushroom:
SaggyScoreUpdate(-2);
break;
case Squirrel:
case SpringSquirrel:
case LofSquirrel:
case FrozenSquirrel:
case FairysSquirrel:
SaggyScoreUpdate(-1);
break;
// She may get happy. Who knows.
case ViciousSquirrel:
case WickedMushroom:
case Bluepar:
case BlackScorpion:
case AngryScorpion:
case AngryRedScorpion:
SaggyScoreUpdate(any(0,0,1));
break;
}
return;
}
014-5-1,33,37,0 script Sagratha NPC_SAGRATHA,{
if (array_find(.SaggyHats, getequipid(EQI_HEAD_TOP)) >= 0)
goto L_HatAttack;
if (SAGRATHA_SCORE < 0)
goto L_Unhappy;
mesn;
if (.@good >= 2)
mesc l("@@ nods as she notices you.", .name$);
if (.@good == 1)
mesc l("@@ raises an eyebrow as you address her.", .name$);
if (.@good == 0)
mesc l("@@ glances at you, suspicion evident in her eyes.", .name$);
mesq l("Hello.");
close;
L_HatAttack:
mesn;
mesc l("@@ seems to be trembling with disgust as she stares at your headgear.", .name$);
mes l("\"Do you think that is funny?\" she snarls.");
next;
mesn;
mesq l("You have no idea what that poor creature felt!");
next;
mesn;
mesc l("She snaps her fingers.");
mesq l("Let me show you...");
specialeffect 312, SELF, getcharid(3);
heal -300, 0;
close;
L_Unhappy:
mesn;
mesc l("@@ glares at you in anger.", .name$);
mesq l("I wonder if you can still sleep after killing those innocent forest creatures!");
next;
mesn;
mesq l("I am sure that they will come back to haunt you in your dreams!");
close;
OnInit:
setarray .SaggyHats, FluffyHat, MoubooHat, AlphaMoubooHat;
.distance=5;
npcsit;
end;
OnInstanceInit:
disablenpc instance_npcname(.name$);
end;
}