Thumbs upLimon the Sprite God Behavior

Posts 17 of 7 · Page 1 of 1
Limon the Sprite God Behavior
Yep, I have nothing better to do in the vacation, so I created behavior for limon. And seeing as I'm not a selfish douche, and lots of people have asked for it, I'm posting it.

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using wServer.realm;
using wServer.logic.attack;
using wServer.logic.movement;
using wServer.logic.loot;
using wServer.logic.taunt;
using wServer.logic.cond;

namespace wServer.logic
{
    partial class BehaviorDb
    {
        static _ Spriteworld = Behav()
            .Init(0x0d06, Behaves("Limon the Sprite God",
                    new RunBehaviors(
                    
                    Once.Instance(new SetKey (-1, 1)),

                    IfEqual.Instance(-1, 1,
                    new RunBehaviors(
                        UnsetConditionEffect.Instance(ConditionEffectIndex.Armored),
                        Flashing.Instance(500, 0xff00ff00),
                        SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Cooldown.Instance(2000, If.Instance(IsEntityPresent.Instance(11, null),
                        new SetKey (-1, 2))
                        ))),
                    IfEqual.Instance(-1, 2,
                    new RunBehaviors(
                        Flashing.Instance(500, 0xff00ff00),
                        SimpleWandering.Instance(3, 1f),
                    
                    
                    new QueuedBehavior(
                        Cooldown.Instance(5000),
                        new SetKey (-1, 3)
                    ))),
                    IfEqual.Instance(-1, 3,   
                    new RunBehaviors(
                        Cooldown.Instance(1000, RingAttack.Instance(2, 0, 90 * (float)Math.PI / 180, 0)),
                        If.Instance(IsEntityPresent.Instance(10, null),
                        Cooldown.Instance(1000, MultiAttack.Instance(10, 10 * (float)Math.PI / 180, 2, 0, 0)),
                        Cooldown.Instance(1000, RingAttack.Instance(20, 0, 0, 0))),
                        If.Instance(IsEntityPresent.Instance(10, null), Cooldown.Instance(1000, RingAttack.Instance(2, 0, 90 * (float)Math.PI / 180, 0))), 
                    new QueuedBehavior(
                        CooldownExact.Instance(10000, new SetKey (-1, 4))),
                    new QueuedBehavior(
                        Charge.Instance(40, 10, null),
                        Timed.Instance(1000, SimpleWandering.Instance(2, 2f))),
                    new QueuedBehavior(
                        UnsetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Cooldown.Instance(3000),
                        SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Cooldown.Instance(3000),
                        UnsetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Cooldown.Instance(3000),
                        SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Cooldown.Instance(4000)
                        ))),
                    IfEqual.Instance(-1, 4,
                            new RunBehaviors(
                            new QueuedBehavior(
                            TossEnemy.Instance(315 * (float)Math.PI / 180, 9, 0x0d08),
                            TossEnemy.Instance(45 * (float)Math.PI / 180, 9, 0x0d07),
                            TossEnemy.Instance(135 * (float)Math.PI / 180, 9, 0x0d09),
                            TossEnemy.Instance(225 * (float)Math.PI / 180, 9, 0x0d0a),
                            TossEnemy.Instance(315 * (float)Math.PI / 180, 14, 0x0d08),
                            TossEnemy.Instance(45 * (float)Math.PI / 180, 14, 0x0d07),
                            TossEnemy.Instance(135 * (float)Math.PI / 180, 14, 0x0d09),
                            TossEnemy.Instance(225 * (float)Math.PI / 180, 14, 0x0d0a),
                            new SetKey (-1, 5)
                        ))),
                    IfEqual.Instance(-1, 5,
                            new RunBehaviors(
                            

                            new QueuedBehavior(

                            CooldownExact.Instance(10000),
                            OrderGroup.Instance(30, "AttackType", new SetKey(-1, 2)),
                            CooldownExact.Instance(8000),
                            OrderGroup.Instance(30, "AttackType", new SetKey(-1, 1))
                            ),
                        

                        new QueuedBehavior(
                            
                            UnsetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                            Cooldown.Instance(375, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(375, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(375, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(375, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(375, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(375, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(375, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(375, RingAttack.Instance(3, 7, 0, 0)),
                            
                            SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                            Cooldown.Instance(500, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(500, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(500, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(500, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(500, RingAttack.Instance(3, 7, 0, 0)),
                            Cooldown.Instance(500, RingAttack.Instance(3, 7, 0, 0))
                            
                            
                        ),
                        
                        
                        new QueuedBehavior(
                            CooldownExact.Instance(20000),
                            new SetKey (-1, 6)
                        )
                       
                        )),
                    
                    IfEqual.Instance(-1, 6,
                    new RunBehaviors(
                    
                        UnsetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        SetConditionEffect.Instance(ConditionEffectIndex.Armored),
                        
                        SimpleWandering.Instance(4, 2f),
                        Flashing.Instance(500, 0xff00ff00),
 
                    
                    new QueuedBehavior(
                        SpawnMinionImmediate.Instance(0x625, 1, 1, 2),
                        SpawnMinionImmediate.Instance(0x626, 1, 1, 2),
                        CooldownExact.Instance(3000),
                        
                        HpLesserPercent.Instance(0.5f, new SetKey (-1, 1), new SetKey (-1, 7))),
                    
                    new QueuedBehavior(
                        CooldownExact.Instance(2000),
                        OrderGroup.Instance(30, "AttackType", Despawn.Instance)
                        ))),
                    
                    IfEqual.Instance(-1, 7,
                    new RunBehaviors(
                        SimpleWandering.Instance(4, 1f),
                        Cooldown.Instance(1000, MultiAttack.Instance(10, 10 * (float)Math.PI / 180, 3, 0, 0)),

                    new QueuedBehavior(
                        CooldownExact.Instance(10000, new SetKey (-1, 1)))
                    ))
                    ),

                    loot: new LootBehavior(LootDef.Empty,
                    Tuple.Create(100, new LootDef(0, 1, 0, 1,
                    
                    Tuple.Create(0.01, (ILoot)new ItemLoot("Staff of Extreme Prejudice")),
                    Tuple.Create(0.1, (ILoot)new ItemLoot("Sprite Wand")),
                    Tuple.Create(0.01, (ILoot)new ItemLoot("Cloak of the Planewalker")),
                    Tuple.Create(0.005, (ILoot)new ItemLoot("Wine Cellar Incantation")),

                    Tuple.Create(0.3, (ILoot)new TierLoot(3, ItemType.Ring)),
                    Tuple.Create(0.3, (ILoot)new TierLoot(6, ItemType.Armor)),
                    Tuple.Create(0.3, (ILoot)new TierLoot(3, ItemType.Ability)),
                    Tuple.Create(0.2, (ILoot)new TierLoot(4, ItemType.Ability)),
                    Tuple.Create(0.1, (ILoot)new TierLoot(5, ItemType.Ability))
                    )),
                    Tuple.Create(100, new LootDef(1, 1, 1, 2,
                    Tuple.Create(0.8, (ILoot)new StatPotionLoot(StatPotion.Dex)),
                    Tuple.Create(0.05, (ILoot)new StatPotionLoot(StatPotion.Def))

            )))))
                    .Init(0x0d07, Behaves("Limon Element 1",
                    new RunBehaviors(
                        If.Instance(IsEntityNotPresent.Instance(30, 0x0d06), Despawn.Instance),
                        SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Once.Instance(new SetKey (-1, 1)),
                    IfEqual.Instance(-1, 1,
                    new RunBehaviors(
                    new QueuedBehavior(
                    AngleAttack.Instance(270 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(270 * (float)Math.PI / 180, 0),
                    
                    new QueuedBehavior(
                    AngleAttack.Instance(180 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(180 * (float)Math.PI / 180, 0)
                    )))),

                    IfEqual.Instance(-1, 2,
                    new RunBehaviors(
                    new QueuedBehavior(
                    AngleAttack.Instance(270 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(270 * (float)Math.PI / 180, 0)),
                    
                    new QueuedBehavior(
                    AngleAttack.Instance(180 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(180 * (float)Math.PI / 180, 0)),
                    
                    new QueuedBehavior(
                    AngleAttack.Instance(225 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(225 * (float)Math.PI / 180, 0)
                        ))
                    
            ))))

                    .Init(0x0d08, Behaves("Limon Element 2",
                    new RunBehaviors(
                        If.Instance(IsEntityNotPresent.Instance(30, 0x0d06), Despawn.Instance),
                        SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Once.Instance(new SetKey(-1, 1)),
                    IfEqual.Instance(-1, 1,
                    new RunBehaviors(
                    new QueuedBehavior(
                    AngleAttack.Instance(90 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(90 * (float)Math.PI / 180, 0)
                    ),
                    new QueuedBehavior(
                    AngleAttack.Instance(180 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(180 * (float)Math.PI / 180, 0)
                    ))),
                    IfEqual.Instance(-1, 2,
                    new RunBehaviors(
                    new QueuedBehavior(
                    AngleAttack.Instance(90 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(90 * (float)Math.PI / 180, 0)),

                    new QueuedBehavior(
                    AngleAttack.Instance(180 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(180 * (float)Math.PI / 180, 0)
                    ),
                    new QueuedBehavior(
                    AngleAttack.Instance(135 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(135 * (float)Math.PI / 180, 0)
                        ))
            ))))

                .Init(0x0d09, Behaves("Limon Element 3",
                    new RunBehaviors(
                        If.Instance(IsEntityNotPresent.Instance(30, 0x0d06), Despawn.Instance),
                        SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Once.Instance(new SetKey(-1, 1)),
                    IfEqual.Instance(-1, 1,
                    new RunBehaviors(
                    new QueuedBehavior(
                    AngleAttack.Instance(0 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(0 * (float)Math.PI / 180, 0)
                    ),
                    new QueuedBehavior(
                    AngleAttack.Instance(270 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(270 * (float)Math.PI / 180, 0)
                    ))),
                    IfEqual.Instance(-1, 2,
                    new RunBehaviors(
                    new QueuedBehavior(
                    AngleAttack.Instance(0 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(0 * (float)Math.PI / 180, 0)),

                    new QueuedBehavior(
                    AngleAttack.Instance(270 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(270 * (float)Math.PI / 180, 0)
                    ),
                    new QueuedBehavior(
                    AngleAttack.Instance(315 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(315 * (float)Math.PI / 180, 0)
                        ))
            ))))
                    .Init(0x0d0a, Behaves("Limon Element 4",
                    new RunBehaviors(
                        If.Instance(IsEntityNotPresent.Instance(30, 0x0d06), Despawn.Instance),
                        SetConditionEffect.Instance(ConditionEffectIndex.Invulnerable),
                        Once.Instance(new SetKey(-1, 1)),
                    IfEqual.Instance(-1, 1,
                    new RunBehaviors(
                    new QueuedBehavior(
                    AngleAttack.Instance(0 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(0 * (float)Math.PI / 180, 0)
                    ),
                    new QueuedBehavior(
                    AngleAttack.Instance(90 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(90 * (float)Math.PI / 180, 0)
                    ))),
                    IfEqual.Instance(-1, 2,
                    new RunBehaviors(
                    new QueuedBehavior(
                    AngleAttack.Instance(0 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(0 * (float)Math.PI / 180, 0)),

                    new QueuedBehavior(
                    AngleAttack.Instance(90 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(90 * (float)Math.PI / 180, 0)
                    ),
                    new QueuedBehavior(
                    AngleAttack.Instance(45 * (float)Math.PI / 180, 0),
                    Cooldown.Instance(250),
                    AngleAttack.Instance(45 * (float)Math.PI / 180, 0)
                        ))
            ))))
            
        ;
    }
}
This code includes limon's turrets, so don't worry about that.

Also, Septavius' lootbehavior on trapped's server has a mistake that causes him to only drop wis pots. So here's a fix:

Code:
loot: new LootBehavior(LootDef.Empty,
                Tuple.Create(100, new LootDef(0, 1, 0, 1,
                    
                    Tuple.Create(0.009, (ILoot)new ItemLoot("Doom Bow")),
                    Tuple.Create(0.005, (ILoot)new ItemLoot("Wine Cellar Incantation")),

                    Tuple.Create(0.3, (ILoot)new TierLoot(3, ItemType.Ring)),
                    Tuple.Create(0.2, (ILoot)new TierLoot(4, ItemType.Ring)),
                    Tuple.Create(0.3, (ILoot)new TierLoot(7, ItemType.Weapon)),
                    Tuple.Create(0.2, (ILoot)new TierLoot(8, ItemType.Weapon)),
                    Tuple.Create(0.3, (ILoot)new TierLoot(3, ItemType.Ability)),
                    Tuple.Create(0.2, (ILoot)new TierLoot(4, ItemType.Ability)),
                    Tuple.Create(0.1, (ILoot)new TierLoot(5, ItemType.Ability))
                    )),
                Tuple.Create(100, new LootDef(0, 1, 0, 1,
                    Tuple.Create(1.0, (ILoot)new StatPotionLoot(StatPotion.Wis))
                    )))
Basically, the problem was that the person who originally wrote it made the pot's part of the regular drops, but it has a 100% drop chance, and therefore, canceled out all other drops.

Leave a thanks or something if this actually helped out
Wow you finished it before me ....
When I spawn Limon, it says Success! and nothing appears. :L
Same with my Tomb bosses, and they worked before.
Where do i place this? I have my .swf disassembled.


Edit:
Is this for pserver or for .swf? i am new to this.
Thanks for this man.

@dg97k These are behaviors. Go in Visual, wServer>logic>db, and copy one of the behaviors. Rename your copy something like, "BehaviorDb.Limon.cs", or if you plan on making a working sprite realm, name is something like "BehaviorDb.Sprite.cs". In that copy remove everything and paste in the code that Lunati has so kindly given you.
@Fightera100
Are her bullets showing?
Also, what server are you using? That's probably what's causing the problem.
Posts 17 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?