//NPC to set the state for killing the bandit lord.
// Variables used: nibble 0 of QUEST_Hurnscald
011-6,27,200,0|script|Bryant|126
{
set @state, ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
if (@state >= 5) goto L_Bryant_Quiet;
if (@state == 4) goto L_Bryant_Waits;
if (@state == 3) goto L_Bryant_Summon;
mes "[Bryant]";
mes "\"I'm looking everywhere for the bandit leader. I can't seem to find him.\"";
goto L_Close;
L_Bryant_Summon:
mes "[Bryant]";
mes "\"I ran into that bandit lord and he got me good. I'm going to stay here for a while and heal. He dropped this key. Take it. You might be able to handle him better than I could.\"";
next;
mes "Bryant gives you a key, shaped to look like a small silver arrow.";
next;
mes "\"I believe I saw him run into a cave south and east of here. There is a red carpet in front of the cave entrance. Be careful and good luck.\"";
set @state, 4;
callsub S_Update_Var;
monster "011-6",260,250,"",1065,1, "Bryant::OnBanditLordDead";
goto L_Close;
OnBanditLordDead:
message strcharinfo(0), "You killed the bandit lord.";
set @state, ((QUEST_Hurnscald & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
if (@state != 4)
goto L_End;
set @state, 5;
callsub S_Update_Var;
getexp 10000, 0;
set BOSS_POINTS, BOSS_POINTS + 20;
message strcharinfo(0), "You gain 20 Boss Points giving you a total of " + BOSS_POINTS + ".";
goto L_End;
L_End:
set @state, 0;
end;
L_Bryant_Waits:
mes "[Bryant]";
mes "\"I think the bandit lord is still around. I fear this could be dangerous for the people of Hurnscald. When you went to the cave with the red carpet in front of it, did you find him and kill him?\"";
menu
"No.", L_Bryant_No,
"Yes.", L_Bryant_Yes;
L_Bryant_No:
mes "[Bryant]";
mes "\"Well, maybe he ran off. I'm pretty sure he should be there now.\"";
killmonster "011-6", "Bryant::OnBanditLordDead";
monster "011-6",260,250,"",1065,1, "Bryant::OnBanditLordDead";
goto L_Close;
L_Bryant_Yes:
mes "[Bryant]";
mes "\"I don't think you killed him. Please try to find and kill him. He should be in the cave south and east of here with the red carpet in front of it.\"";
killmonster "011-6", "Bryant::OnBanditLordDead";
monster "011-6",260,250,"",1065,1, "Bryant::OnBanditLordDead";
goto L_Close;
L_Bryant_Quiet:
mes "[Bryant]";
mes "\"Glad that bandit leader got what was coming to him.\"";
goto L_Close;
L_Close:
set @state, 0;
close;
S_Update_Var:
set QUEST_Hurnscald, (QUEST_Hurnscald & ~(NIBBLE_0_MASK) | (@state << NIBBLE_0_SHIFT));
return;
}