Hey i had an issue with a saved file that i posted in another thread, but i was looking through the toolset to see if i could fix it and came across one of the effects that were causing me problems. Would someone be able to take a look at this script and tell me if it is the correct one for the Poison Spit effect, because to me (keeping in mind that i dont really know that much about programming) it doesnt seem like there is a line to end the effect in this code.
If this isnt the correct code can someone give me the correct one and explain how i would enter the correct one in, since this one was showing as read only in the toolset.
//------------------------------------------------------------------------------
// monster_talent_web
//------------------------------------------------------------------------------
/*
Spider Web Attack
*/
//------------------------------------------------------------------------------
// georg@bioware.com
//==============================================================================
#include "log_h"
#include "ability_h"
#include "combat_h"
#include "2da_data_h"
void main()
{
event evEvent = GetCurrentEvent();
int nEventType = GetEventType(evEvent); // CAST (directly from engine) or COMMAND_PENDING
// (re-directed by rules_core)
switch( nEventType )
{
//----------------------------------------------------------------------
// This event fires out of ability_core.nss as a reaction to a
// EVENT_TYPE_COMMAND_PENDING Event.
//
// It is used to
// - Handle Toggling of Modal Abilities
// - Handle Success or failure of reaction (anim) based abilities
//----------------------------------------------------------------------
case EVENT_TYPE_SPELLSCRIPT_PENDING:
{
//------------------------------------------------------------------
// Get a structure with the event parameters
//------------------------------------------------------------------
struct EventSpellScriptPendingStruct stEvent = Events_GetEventSpellScriptPendingParameters(evEvent);
//------------------------------------------------------------------
// Setting Return Value
//------------------------------------------------------------------
Ability_SetSpellscriptPendingEventResult(COMMAND_RESULT_SUCCESS);
break;
}
//----------------------------------------------------------------------
// This event fires out of ability_core.nss as a reaction to a
// EVENT_TYPE_CAST_START Event.
//
// It is used to
// - Calculate and set damage for animation based abilities
// - Fire specific effects (such as shield bash knockdown)
// - Toggle On Modal Abilities
//----------------------------------------------------------------------
case EVENT_TYPE_SPELLSCRIPT_CAST:
{
//------------------------------------------------------------------
// Get a structure with the event parameters
//------------------------------------------------------------------
struct EventSpellScriptCastStruct stEvent = Events_GetEventSpellScriptCastParameters(evEvent);
// -----------------------------------------------------------------
// Message the Attack result back to the engine
// -----------------------------------------------------------------
SetAbilityResult(stEvent.oCaster, stEvent.nResistanceCheckResult);
break;
}
//----------------------------------------------------------------------
// This event fires out of ability_core.nss as a reaction to a
// EVENT_TYPE_CAST_IMPACT Event.
//
// It is used to
// - Apply damage
// - Apply Visual Effects
// - Resolve other spell effects
//----------------------------------------------------------------------
case EVENT_TYPE_SPELLSCRIPT_IMPACT:
{
//------------------------------------------------------------------
// Get a structure with the event parameters
//------------------------------------------------------------------
struct EventSpellScriptImpactStruct stEvent = Events_GetEventSpellScriptImpactParameters(evEvent);
//------------------------------------------------------------------
// Tell the targeted creature that it has been cast at
//------------------------------------------------------------------
Ability_ApplyObjectImpactVFX(stEvent.nAbility, stEvent.oTarget);
ApplyEffectDamageOverTime(stEvent.oTarget, stEvent.oCaster, stEvent.nAbility,20.0f, 15.0, DAMAGE_TYPE_NATURE, 1504);
SendEventOnCastAt(stEvent.oTarget,stEvent.oCaster, stEvent.nAbility, TRUE);
break;
}
}
}
Poison Spit Effect
Débuté par
Damien Nightwind
, sept. 01 2010 07:54





Retour en haut






