PostSpider Den Behavior [States]

Posts 1–9 of 9 · Page 1 of 1
Spider Den Behavior [States]
After being gone for a while, I wanted to release a behavior as for me coming back.
Simple as that.

This uses the State system for newer sources or whatever.



Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using wServer.logic.behaviors;
using wServer.logic.transitions;
using wServer.logic.loot;

namespace wServer.logic
{
    partial class BehaviorDb
    {
        private _ SpiderDen = () => Behav()
            .Init("Arachna the Spider Queen",
                new State(
                    new State("default",
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new PlayerWithinTransition(10, "1")
                        ),
                        new State("1",
                        new TossObject("Arachna Web Spoke 7", angle: 0, range: 7, coolDown: 100000),
                        new TossObject("Arachna Web Spoke 8", angle: 120, range: 7, coolDown: 100000),
                        new TossObject("Arachna Web Spoke 9", angle: 240, range: 7, coolDown: 100000),
                        new TossObject("Arachna Web Spoke 1", angle: 0, range: 11, coolDown: 100000),
                        new TossObject("Arachna Web Spoke 2", angle: 60, range: 11, coolDown: 100000),
                        new TossObject("Arachna Web Spoke 3", angle: 120, range: 11, coolDown: 100000),
                        new TossObject("Arachna Web Spoke 4", angle: 180, range: 11, coolDown: 100000),
                        new TossObject("Arachna Web Spoke 5", angle: 240, range: 11, coolDown: 100000),
                        new TossObject("Arachna Web Spoke 6", angle: 300, range: 11, coolDown: 100000),
                        new TimedTransition(1400, "2")
                        ),
                    new State("2",
                        new Wander(0.15),
                        new Shoot(8, 12, coolDown: 3000, projectileIndex: 0),
                        new Shoot(10, projectileIndex: 0, coolDown: 1000),
                        new Shoot(10, projectileIndex: 1, coolDown: 2000)
                        )),
                new ItemLoot("Poison Fang Dagger", 0.085),
                new ItemLoot("Spider's Eye Ring", 0.05),
                new ItemLoot("Healing Ichor", 0.9),
                new ItemLoot("Golden Dagger", 0.9)
            )
             .Init("Arachna Web Spoke 1",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 180, coolDown: 75),
                        new Shoot(10, fixedAngle: 120, coolDown: 75),
                        new Shoot(10, fixedAngle: 240, coolDown: 75),
                        new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Arachna Web Spoke 2",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 240, coolDown: 75),
                        new Shoot(10, fixedAngle: 300, coolDown: 75),
                        new Shoot(10, fixedAngle: 180, coolDown: 75),
                        new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Arachna Web Spoke 3",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 300, coolDown: 75),
                        new Shoot(10, fixedAngle: 0, coolDown: 75),
                        new Shoot(10, fixedAngle: 240, coolDown: 75),
                        new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Arachna Web Spoke 4",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 0, coolDown: 75),
                        new Shoot(10, fixedAngle: 60, coolDown: 75),
                        new Shoot(10, fixedAngle: 300, coolDown: 75),
                        new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Arachna Web Spoke 5",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 60, coolDown: 75),
                        new Shoot(10, fixedAngle: 0, coolDown: 75),
                        new Shoot(10, fixedAngle: 120, coolDown: 75),
                        new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Arachna Web Spoke 6",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 60, coolDown: 75),
                        new Shoot(10, fixedAngle: 180, coolDown: 75),
                        new Shoot(10, fixedAngle: 120, coolDown: 75),
                       new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Arachna Web Spoke 7",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 180, coolDown: 75),
                        new Shoot(10, fixedAngle: 240, coolDown: 75),
                        new Shoot(10, fixedAngle: 120, coolDown: 75),
                        new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Arachna Web Spoke 8",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 360, coolDown: 75),
                        new Shoot(10, fixedAngle: 240, coolDown: 75),
                        new Shoot(10, fixedAngle: 300, coolDown: 75),
                        new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Arachna Web Spoke 9",
                new State(
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(10, fixedAngle: 60, coolDown: 75),
                        new Shoot(10, fixedAngle: 0, coolDown: 75),
                        new Shoot(10, fixedAngle: 120, coolDown: 75),
                        new EntityNotExistsTransition("Arachna The Spider Queen", 100, "death")
                            ),
                            new State("death",
                                new Suicide()
                            )
                        ))

                    .Init("Green Den Spider Hatchling",
                new State(
                        new Wander(0.12),
                        new Shoot(10, coolDown: 1000)
                        )
                    )
                    .Init("Black Den Spider",
                new State(
                        new Wander(0.18),
                        new Shoot(10, coolDown: 1000)
                        )
                    )
                    .Init("Red Spotted Den Spider",
                new State(
                        new Wander(0.18),
                        new Shoot(10, coolDown: 1000)
                        ),
                           new ItemLoot("Healing Ichor", 0.2)
                           )

                   .Init("Black Spotted Den Spider",
                new State(
                        new Wander(0.18),
                        new Shoot(10, coolDown: 1000)
                       ),
                           new ItemLoot("Healing Ichor", 0.2)
                           )

                    .Init("Brown Den Spider",
                new State(
                        new Wander(0.18),
                        new Shoot(10, coolDown: 1000, count: 3, shootAngle: 20)
                        ),
                           new ItemLoot("Healing Ichor", 0.4)
                           )

                    .Init("Spider Egg Sac",
                new State(
                    new SpawnOnDeath("Green Den Spider Hatchling", 100, amount: 4)
                        )
                    );
                }   
            };
Err i got an error
here is a screenshot



Quote Originally Posted by K13RZ3 View Post
Err i got an error
here is a screenshot



10/10 error log. would eat again
Quote Originally Posted by K13RZ3 View Post
Err i got an error
here is a screenshot




Oh, delete the line that says:
Code:
new Gelatin()
Quote Originally Posted by sacredmike View Post
Oh, delete the line that says:
Code:
new Gelatin()
sir, that line indeed does not produce an error, your abilities are what the kids nowadays call "wack". i see no error in the code new Gelatin(), i put this in my mmoe source with SharpDevelop and it worked fine. maybe you should get better and learn how to use sharpdevelop.
Quote Originally Posted by sacredmike View Post
Oh, delete the line that says:
Code:
new Gelatin()
oh shit it works now thanks
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?