El_Vara

01/05/2014 01:04:22

Buenas pues vengo a preguntar si alguien conoce alguna variante que ponga estos conjuros algo capados, porque de quitar toda la vida y sanarla toda...

Yo tengo este bajado pero por algo el sanar me dice que tiene demasiadas instrucciones y me lo chafa y mucho.

[code:1:b9fcc55441]http://nwvault.ign.com/View.php?view=Scripts.Detail&id=2777[/code:1:b9fcc55441]

¿Alguno conoce una variante o sabe como arreglar ésto?

AlthorDeMalavir

01/05/2014 01:10:11

Los scripts que tienes que trastear son nw_s0_heal, nw_s0_masheal y nw_s0_harm

El_Vara

01/05/2014 02:44:17

Lo se, pero no se crear desde cero y el que me falla es el sanar, pero no se el porqué :S

AlthorDeMalavir

01/05/2014 12:53:53

Pega aquí el código del sanar si los otros dos te van.

El_Vara

01/05/2014 15:55:07

Aquí está, lo único que quiero que haga es, que cada nivel sane 10 puntos de vida y su límite sea 250, no quiero ni más ni menos. Y gracias de antemano.

[code:1:f1fe580238]
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
object oCaster = OBJECT_SELF;
int nCasterLvl = GetCasterLevel(oCaster);
object oTarget = GetSpellTargetObject();
effect eKill, eHeal;
int nDamage, nHeal, nModify, nMetaMagic, nTouch;
effect eSun = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_X);
//Check to see if the target is an undead
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
if(!GetIsReactionTypeFriendly(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL));
//Make a touch attack
if (TouchAttackMelee(oTarget))
{
//Make SR check
if (!MyResistSpell(OBJECT_SELF, oTarget))
{
//Roll damage
nDamage = 10 * nCasterLvl;
if (nDamage > 250){nDamage = 250;}
//Will save for half damage
if (MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()))
{
nDamage = nDamage/2;
}
if (nDamage > (GetCurrentHitPoints(oTarget) - 1))
{
nDamage = GetCurrentHitPoints(oTarget) - 1;
}
//Set damage
eKill = EffectDamage(nDamage, DAMAGE_TYPE_POSITIVE);
//Apply damage effect and VFX impact
ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSun, oTarget);
}
}
}
}
else
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL, FALSE));
//Figure out how much to heal
nHeal = 10 * nCasterLvl;
if (nHeal > 250){nHeal = 250;}
//Set the heal effect
eHeal = EffectHeal(nHeal);
//Remove negative mind effects and poisons/diseases
int bValid = FALSE;
effect eParal = GetFirstEffect(oTarget);
effect eVis3 = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
//Get the first effect on the target
while(GetIsEffectValid(eParal))
{
//Check if the current effect is of correct type
int nEffectType = GetEffectType(eParal);
if (nEffectType == EFFECT_TYPE_DISEASE)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_BLINDNESS)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_POISON)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_CONFUSED)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_DAZED)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_DEAF)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_STUNNED)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_ABILITY_DECREASE
&& GetEffectDurationType(eParal) != DURATION_TYPE_PERMANENT)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
//Get the next effect on the target
GetNextEffect(oTarget);
}
if (bValid)
{
//Apply VFX Impact
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis3, oTarget);
}
//Apply the heal effect and the VFX impact
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHealVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
}
}[/code:1:f1fe580238]

AlthorDeMalavir

03/05/2014 13:22:11

Tenia un error el script por eso te daba el error de demasiadas instrucciones.

En vez de poner

eParal = GetNextEffect(oTarget);

solo puso

GetNextEffect(oTarget);

Aquí lo tienes corregido

[code:1:43f2f4b75d]
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
object oCaster = OBJECT_SELF;
int nCasterLvl = GetCasterLevel(oCaster);
object oTarget = GetSpellTargetObject();
effect eKill, eHeal;
int nDamage, nHeal, nModify, nMetaMagic, nTouch;
effect eSun = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
effect eHealVis = EffectVisualEffect(VFX_IMP_HEALING_X);
//Check to see if the target is an undead
if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
if(!GetIsReactionTypeFriendly(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL));
//Make a touch attack
if (TouchAttackMelee(oTarget))
{
//Make SR check
if (!MyResistSpell(OBJECT_SELF, oTarget))
{
//Roll damage
nDamage = 10 * nCasterLvl;
if (nDamage > 250){nDamage = 250;}
//Will save for half damage
if (MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()))
{
nDamage = nDamage/2;
}
if (nDamage > (GetCurrentHitPoints(oTarget) - 1))
{
nDamage = GetCurrentHitPoints(oTarget) - 1;
}
//Set damage
eKill = EffectDamage(nDamage, DAMAGE_TYPE_POSITIVE);
//Apply damage effect and VFX impact
ApplyEffectToObject(DURATION_TYPE_INSTANT, eKill, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eSun, oTarget);
}
}
}
}
else
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_HEAL, FALSE));
//Figure out how much to heal
nHeal = 10 * nCasterLvl;
if (nHeal > 250){nHeal = 250;}
//Set the heal effect
eHeal = EffectHeal(nHeal);
//Remove negative mind effects and poisons/diseases
int bValid = FALSE;
effect eParal = GetFirstEffect(oTarget);
effect eVis3 = EffectVisualEffect(VFX_IMP_REMOVE_CONDITION);
//Get the first effect on the target
while(GetIsEffectValid(eParal))
{
//Check if the current effect is of correct type
int nEffectType = GetEffectType(eParal);
if (nEffectType == EFFECT_TYPE_DISEASE)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_BLINDNESS)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_POISON)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_CONFUSED)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_DAZED)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_DEAF)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_STUNNED)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
if (nEffectType == EFFECT_TYPE_ABILITY_DECREASE
&& GetEffectDurationType(eParal) != DURATION_TYPE_PERMANENT)
{
//Remove the effect
RemoveEffect(oTarget, eParal);
bValid = TRUE;
}
//Get the next effect on the target
eParal = GetNextEffect(oTarget);
}
if (bValid)
{
//Apply VFX Impact
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis3, oTarget);
}
//Apply the heal effect and the VFX impact
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHealVis, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
}
}
[/code:1:43f2f4b75d]

El_Vara

03/05/2014 17:26:13

Gracias Althor eres una máquina :)