42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
#include "rtg_i0_generic"
|
|
|
|
int StartingConditional()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
object oItem = GetItemPossessedBy(oPC, GetLocalString(oPC, "RTG_ItemTag"));
|
|
string sAssignedBy = GetLocalString(oPC, "RTG_AssignedByTag");
|
|
|
|
|
|
if(sAssignedBy != "" && sAssignedBy == GetTag(OBJECT_SELF) && GetIsObjectValid(oItem))
|
|
{
|
|
if(GetLocalInt(oPC, "RTG_TaskType") == RTG_TASK_TYPE_KILLNSTEAL)
|
|
{
|
|
struct RTG_TaskCompletePhraseData newTaskCompletePhrase = RTG_CompletedTask(oPC);
|
|
RTG_RemoveTaskFromObject(GetPCSpeaker());
|
|
PlaySound("gui_quest_done");
|
|
SetCustomToken(3372, newTaskCompletePhrase.sText);
|
|
return TRUE;
|
|
}
|
|
else if(GetLocalInt(oPC, "RTG_TaskType") == RTG_TASK_TYPE_DELIVERY && GetTag(oItem) == "RTG_RECEIPT")
|
|
{
|
|
struct RTG_TaskCompletePhraseData newTaskCompletePhrase = RTG_CompletedTask(oPC);
|
|
RTG_RemoveTaskFromObject(GetPCSpeaker());
|
|
PlaySound("gui_quest_done");
|
|
SetCustomToken(3372, newTaskCompletePhrase.sText);
|
|
return TRUE;
|
|
}
|
|
else if(GetLocalInt(oPC, "RTG_TaskType") == RTG_TASK_TYPE_HARVEST && GetLocalInt(oPC, "RTG_ItemNum") == 0)
|
|
{
|
|
struct RTG_TaskCompletePhraseData newTaskCompletePhrase = RTG_CompletedTask(oPC);
|
|
RTG_RemoveTaskFromObject(GetPCSpeaker());
|
|
PlaySound("gui_quest_done");
|
|
SetCustomToken(3372, newTaskCompletePhrase.sText);
|
|
return TRUE;
|
|
DebugMessage("Harvest " + IntToString(GetLocalInt(oPC, "RTG_ItemNum")));
|
|
}
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
|