Here's the plot code...
#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "plot_h"
#include "core_h"
#include "effect_constants_h"
#include "blessed_constants"
#include "plt_BLESSEDPLOT"
int StartingConditional()
{
event eParms = GetCurrentEvent(); // Contains all input parameters
int nType = GetEventType(eParms); // GET or SET call
string strPlot = GetEventString(eParms, 0); // Plot GUID
int nFlag = GetEventInteger(eParms, 1); // The bit flag # being affected
object oParty = GetEventCreator(eParms); // The owner of the plot table for this script
object oConversationOwner = GetEventObject(eParms, 0); // Owner on the conversation, if any
int nResult = FALSE; // used to return value for DEFINED GET events
object oPC = GetHero();
object oGregorin = UT_GetNearestCreatureByTag(oPC, GREGORIN);
object oFallon = UT_GetNearestCreatureByTag(oPC, FALLON);
plot_GlobalPlotHandler(eParms); // any global plot operations, including debug info
if(nType == EVENT_TYPE_SET_PLOT) // actions -> normal flags only
{
int nValue = GetEventInteger(eParms, 2); // On SET call, the value about to be written (on a normal SET that should be '1', and on a 'clear' it should be '0')
int nOldValue = GetEventInteger(eParms, 3); // On SET call, the current flag value (can be either 1 or 0 regardless if it's a set or clear event)
// IMPORTANT: The flag value on a SET event is set only AFTER this script finishes running!
switch(nFlag)
{
case GREGORIN_PETRIFIED:
{
effect eEffect = Effect(EFFECT_TYPE_PETRIFY);
eEffect = SetEffectInteger(eEffect, 0, 0);
ApplyEffectOnObject(EFFECT_DURATION_TYPE_PERMANENT, eEffect, oGregorin, 0.0f, oFallon, 0);
UT_Talk(oFallon, oPC);
}
break;
}
}
else // EVENT_TYPE_GET_PLOT -> defined conditions only
{
switch(nFlag)
{
}
}
plot_OutputDefinedFlag(eParms, nResult);
return nResult;
}





Retour en haut






