// ccc jul05 corpse
// This pseudo dialog only opens the itemexchange interface for looting corpses
// one could also add dialogchoices for reawakening or burial
void ProcessDialogEvent()
{
ref NPChar;
aref Link, Diag;
DeleteAttribute(&Dialog,"Links");
makeref(NPChar,CharacterRef);
makearef(Link, Dialog.Links);
makearef(Diag, NPChar.Dialog);
ref PChar;
PChar = GetMainCharacter();
int loc_id = FindLocation(PChar.location);
switch(Dialog.CurrentNode)
{
case "exit":
Diag.CurrentNode = Diag.TempNode;
DialogExit();
if(Npchar.middlename!=""){LAi_tmpl_SetFollow(Npchar, CharacterFromId(Npchar.middlename), 120000);}
break;
case "first time":
Dialog.defAni = "dialog_stay1";
Dialog.defCam = "1";
Dialog.defSnd = "dialogs\0\017";
Dialog.defLinkAni = "dialog_1";
Dialog.defLinkCam = "1";
Dialog.defLinkSnd = "dialogs\woman\024";
Dialog.ani = "dialog_stay2";
Dialog.cam = "1";
Dialog.snd = "voice\PADI\PADI001";
// ccc Dec 05 You are recognized for your pirating actions
if(GetServedNation() != PIRATE || GetCurrentLocationNation() == PIRATE) // PB: Link this to acting as a pirate
{
Dialog.Text = DLG_TEXT[0] + GetMySimpleName(PChar) + DLG_TEXT[1];
Link.l1 = DLG_TEXT[2];
Link.l1.go = "exit";
}
else
{
if (frnd() < GetChanceDetectFalseFlag()) // MT: If your false flag gets detected, then:
{
int MyNation = PERSONAL_NATION;
int MyFlag = GetCurrentFlag();
string nationme, nationhim;
if(GetRMRelation(PChar, sti(Npchar.nation)) <= REL_WAR) //MT: If you, personally, are at war with the pirates
{
if(MyFlag == PIRATE) //MT: found out as a fake pirate
{
Dialog.Text = DLG_TEXT[3];
Link.l1 = DLG_TEXT[4];
Link.l1.go = "exit";
LAi_group_SetRelation("random_pirates_group", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY);
}
else
{
if(CalcCharacterSkill(pchar, SKILL_LEADERSHIP)>5) //MT: Found out as dangerous intruder
{
Dialog.Text = DLG_TEXT[5];
Link.l1 = DLG_TEXT[6];
Link.l1.go = "exit";
LAi_group_SetRelation("random_pirates_group", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY);
}
else // MT: Found out as ordinary intruder
{
Dialog.Text = DLG_TEXT[7] + GetMySimpleName(PChar) + DLG_TEXT[8];
Link.l1 = DLG_TEXT[9];
Link.l1.go = "exit";
LAi_group_SetRelation("random_pirates_group", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY);
}
}
}
else //MT: If you, personally, are NOT at war with the pirates
{
if(MyFlag == PIRATE && (CalcCharacterSkill(pchar, SKILL_LEADERSHIP)>5) // MT: If you're famous and using the pirate flag as a false one
{
Dialog.Text = DLG_TEXT[12];
Link.l1 = DLG_TEXT[13];
Link.l1.go = "exit";
}
else // MT: If average Joe and they don't care about your false flag
{
Dialog.Text = DLG_TEXT[14];
Link.l1 = DLG_TEXT[15];
Link.l1.go = "exit";
}
}
}
else // MT: If your false flag did not get detected, then:
{
MyFlag = GetCurrentFlag();
if(GetFlagRMRelation(sti(Npchar.nation)) <= REL_WAR && rand(10)>8) // MT: 20% chance of being attacked when being here under hostile flag
{
Dialog.Text = DLG_TEXT[7] + GetMySimpleName(PChar) + DLG_TEXT[8];
Link.l1 = DLG_TEXT[9];
Link.l1.go = "exit";
LAi_group_SetRelation("random_pirates_group", LAI_GROUP_PLAYER, LAI_GROUP_ENEMY);
}
else
{
if(myflag == MakeInt(Npchar.nation)) // MT: If using the pirate flag, which is a false flag, but they think you're for real
{
Dialog.Text = DLG_TEXT[16];
Link.l1 = DLG_TEXT[17];
Link.l1.go = "exit";
}
else
{
Dialog.Text = DLG_TEXT[18]; // MT: Ordinary non-detection
Link.l1 = DLG_TEXT[19];
Link.l1.go = "exit";
}
}
}
}
Diag.TempNode = "first time";
break;
}
}