Marble Seal

Posts 1–6 of 6 · Page 1 of 1
Eye of Marble Behavior[FSOD]
Is Worked in FSOD. i not test in other sources

in wServer.logic.behaviors Create File AoeEffect.cs and paste this
 
AoeEffect.cs
using System.Linq;
using wServer.realm;
using wServer.realm.entities.player;

namespace wServer.logic.behaviors
{
public class AoeEffect : Behavior
{
//State storage: nothing

private readonly float radius;
private readonly int duration;
private readonly ConditionEffectIndex effect;

public AoeEffect(double radius, int duration, ConditionEffectIndex effect)
{
this.radius = (float)radius;
this.effect = effect;
this.duration = duration;
}

protected override void TickCore(Entity host, RealmTime time, ref object state)
{
foreach (Player i in host.Owner.PlayersCollision.HitTest(host.X, host.Y, radius).OfType<Player>())
{
i.ApplyConditionEffect(new ConditionEffect
{
Effect = effect,
DurationMS = duration
});
}
}
}
}


in Wserver.logic.db Create File BehaviorDb.EyeofMarble.cs and paste this
 
BehaviorDb.EyeofMarble.cs
#region

using wServer.logic.behaviors;

#endregion

namespace wServer.logic
{
partial class BehaviorDb
{
private _ EyeofMarble = () => Behav()
.Init("Eye of Marble",
new State(
new State("Idle",
new AoeEffect(3, 1, ConditionEffectIndex.Armored),
new AoeEffect(3, 1, ConditionEffectIndex.Damaging),
new TimedTransition(4500, "die")
),
new State("die",
new Decoy(0)
)
)
);
}
}


if you get an error. I will not help you.
Did you knew that there were a error HAHAHA
Me too i have a problem
I said I was not going to help but I was wrong in the behavior.
Fix:
 
BehaviorDb.EyeofMarble.cs
add: using wServer.logic.transitions;
above
using wServer.logic.behaviors;

Change Decoy(0) to Decay(0)

now it will work.
Gj bro!

It works really good!

Good Work!
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us