i have code here for Shackle can you help me

06/06/2011 12:47 marlyandedsel#1
i don't know whats wrong on this i cant see the effect can you help me please someone here....

here is the code
Quote:
case 10405:
{
if (!attacked.ContainsFlag2((ushort)Enums.SkillIDs.So ulShackle))
{
PrepareSpell(spell, attacker.Owner);
if (attacked == null) return;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = SpellID;
suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
suse.X = X;
suse.Y = Y;
suse.Targets.Add(attacked.UID, 1);
attacked.AddFlag(Update.Flags.SoulShackle);
if (attacked.EntityFlag == EntityFlag.Player)
attacked.Owner.SendScreen(suse, true);
else
attacked.MonsterInfo.SendScreen(suse);
}
else
{
attacker.Owner.Send(new Message("You can't use on that target, it is already with soul shackle!", System.Drawing.Color.Red, Message.TopLeft));
return;
}

break;
}
06/06/2011 16:46 12tails#2
first:
Code:
else
attacked.MonsterInfo.SendScreen(suse);
you can't use soulshackle at monsters...

second, change:
Code:
attacked.AddFlag(Update.Flags.SoulShackle);
to:
Code:
attacked.AddFlag2(Update.Flags.SoulShackle);
maybe that works...
06/07/2011 01:35 marlyandedsel#3
i will try

edit:

here is what i've done but still doesnt work

case 10405:
{
if (!attacked.ContainsFlag2((ushort)Enums.SkillIDs.So ulShackle))
{
PrepareSpell(spell, attacker.Owner);
if (attacked == null) return;
SpellUse suse = new SpellUse(true);
suse.Attacker = attacker.UID;
suse.SpellID = SpellID;
suse.SpellLevel = attacker.Owner.Spells[SpellID].Level;
suse.X = X;
suse.Y = Y;
suse.Targets.Add(attacked.UID, 1);
attacked.ShackleTime = 0;
//attacked.AddFlag2(Update.Flags.SoulShackle);
attacked.AddFlag2((ushort)Enums.SkillIDs.SoulShack le);
attacked.AddFlag2(Update.Flags2.Shackled);
attacked.ShackleTime = (byte)spell.Duration;
if (attacked.EntityFlag == EntityFlag.Player)
attacked.Owner.SendScreen(suse, true);
else
{
attacker.Owner.Send(new Message("You can't use SoulShackle on Monster", System.Drawing.Color.Red, Message.TopLeft));
return;
}
}
else
{
attacker.Owner.Send(new Message("You can't use on that target, it is already with soul shackle!", System.Drawing.Color.Red, Message.TopLeft));
return;
}

break;
}
07/02/2011 04:08 mido elord#4
Where this code placed ؟
07/02/2011 07:04 thesamuraivega#5
Quote:
Originally Posted by mido elord View Post
Where this code placed ؟
"here is what i've done but still doesnt work"

:facepalm:
07/03/2011 03:11 marlyandedsel#6
Problem solve thanks