#include "log_h"
#include "abi_templates"
#include "sys_traps_h"
#include "spell_constants_h"
const int NRING = 777777;
void _HandleImpact(struct EventSpellScriptImpactStruct stEvent)
{
// -------------------------------------------------------------------------
// VAR BLOCK
// -------------------------------------------------------------------------
int nScalingVector = SCALING_VECTOR_DURATION;
int nAttackingValue = PROPERTY_ATTRIBUTE_SPELLPOWER;
int nResistance = RESISTANCE_INVALID;
float fDuration = 0.0f;
float fScaledValue = 0.0f;
int nEffect = 0;
int nHandler = SPELL_HANDLER_CUSTOM;
effect eDamage; effect eEffect;
effect[] eEffects;
int bHostile = FALSE;
object oClothing = OBJECT_INVALID;
object oStuff = OBJECT_INVALID;
object oBckpck = OBJECT_INVALID;
int nInvSlot; int nGetStuffOptions;
// make sure there is a location, just in case
if (IsObjectValid(stEvent.oTarget) == TRUE)
{
stEvent.lTarget = GetLocation(stEvent.oTarget);
}
// -------------------------------------------------------------------------
// Handle Spells
// -------------------------------------------------------------------------
switch (stEvent.nAbility)
{
case NRING:
{
oClothing = GetItemInEquipSlot(INVENTORY_SLOT_CHEST, stEvent.oTarget);
if (oClothing != OBJECT_INVALID)
{
UnequipItem(stEvent.oTarget, oClothing);
}
else
{
oBckpck = GetItemsInInventory(stEvent.oTarget, int nGetStuffOptions =
GET_ITEMS_OPTION_BACKPACK, int nBaseItemType = 4, string sTagFilter = "");
EquipItem(stEvent.oTarget, oBckpck, nInvSlot = 4);
}
eEffect = SetEffectEngineInteger(eEffect, EFFECT_INTEGER_VFX,
Ability_GetImpactObjectVfxId(stEvent.nAbility));
ApplyEffectOnObject(EFFECT_DURATION_TYPE_INSTANT, eEffect,
stEvent.oTarget, 0.0f, stEvent.oCaster, stEvent.nAbility);
break;
}
}
Error is in this line:
oBckpck = GetItemsInInventory(stEvent.oTarget, int nGetStuffOptions = GET_ITEMS_OPTION_BACKPACK, int nBaseItemType = 4, string sTagFilter = "");
(52): Unknown state in compiler.
As far as I can tell I'm following the tutorials and the help definitions.
Also I just found in the script.ldf where it says that the UnequipItem command wasn't implemented in the game. Can anyone verify this?
Modifié par thendavesaid, 09 janvier 2011 - 06:18 .





Retour en haut






