59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
#include "rd_questinc"
|
|
|
|
void main()
|
|
{
|
|
object oPC;
|
|
object oBoss;
|
|
int iVariance;
|
|
int iRandom;
|
|
string sTokenLine;
|
|
string sTag;
|
|
location lLoc;
|
|
|
|
oPC = GetPCSpeaker();
|
|
|
|
SetPartyInt(oPC,"QuestStep",1);
|
|
SetPartyInt(oPC,"QuestSteps",1);
|
|
SetLocalString(oPC,"QuestGiver",GetTag(OBJECT_SELF));
|
|
SetLocalInt(oPC,"Quest",1);
|
|
SetCustomToken(111, "");
|
|
SetCustomToken(112, "");
|
|
SetCustomToken(113, "");
|
|
|
|
SetToken(oPC,OBJECT_SELF,103,GetName(OBJECT_SELF));
|
|
|
|
oBoss = GetQuestCamp(oPC,OBJECT_SELF,"merc");
|
|
lLoc = GetLocation(oBoss);
|
|
sTag = GetTag(oBoss);
|
|
oBoss = CreateObject(OBJECT_TYPE_CREATURE,"en4_gtarg",lLoc,FALSE,sTag);
|
|
|
|
LevelMob(oBoss,GetHitDice(oPC));
|
|
DelayCommand(0.5f,EquipMob(oBoss,1));
|
|
|
|
iRandom = Random(100)+1-GetHitDice(oPC)/5;
|
|
|
|
if (iRandom<3)
|
|
GetArtifact(oBoss);
|
|
else if (iRandom<50)
|
|
GetMagicItem(oBoss);
|
|
else if (iRandom<60)
|
|
GetRareItem(oBoss);
|
|
|
|
|
|
iVariance = GetLocalInt(OBJECT_SELF,"QuestVariance");
|
|
if (iVariance == 0)
|
|
SetLocalInt(OBJECT_SELF,"QuestVariance",Random(2)+1);
|
|
|
|
sTokenLine = "I need to take care of General Targ before he is able to mass an army. I should also kill any mercenaries found with him. The general is located " + GetToken(102) + ".";
|
|
sTokenLine = FixTokenLine(sTokenLine,"REPEAT");
|
|
SetToken(oPC,OBJECT_SELF,111,sTokenLine);
|
|
|
|
|
|
RemoveJournalQuestEntry("jDelivery",oPC);
|
|
RemoveJournalQuestEntry("jCamp",oPC);
|
|
AddJournalQuestEntry("jCamp",1,oPC);
|
|
|
|
}
|
|
|
|
|