HelpXP Spawner Behavior Help

Posts 1–7 of 7 · Page 1 of 1
XP Spawner Behavior Help
Code:
using wServer.logic.behaviors;
using wServer.logic.transitions;
using wServer.logic.loot;

namespace wServer.logic
{
    partial class BehaviorDb
    {
        private _ XPGiftSpawner = () => Behav()
        .Init("XP Gift Spawner",
            new State(
                new ConditionalEffect(ConditionEffectIndex.Invincible),
                new State("Idle",
                    new PlayerWithinTransition(10, "spawn")
                    ),
                new State("spawn",
                    new Spawn("XP Gift C", 20, coolDown: 5000),
                    new TimedTransition(5000, "spawn2")
                    ),
                new State("spawn2",
                    new Spawn("XP Gift C", 20, coolDown: 5000),
                    new TimedTransition(2000, "spawn")
            )
         )
    );
    }
}
How do I make it so that it will spawn more chickens once old ones die? Paying helper up to 5 USD.
onDeathTransform() i believe
Hey, I have my code you can use . You have to edit the loot so that it fits your source. make "xp gift h" to Xp gift A - G.
Also CHANGE THE "ChickenSpawner" to the spawners name.

Code:
using wServer.logic.behaviors;
using wServer.logic.loot;
using wServer.logic.transitions;

namespace wServer.logic
{
    partial class BehaviorDb
    {
        private _ ChickenSpawner = () => Behav()
            .Init("Chicken Spawner",
                new State(
                    new State("State1",
                    new ConditionalEffect(ConditionEffectIndex.Invincible),


                    new Reproduce("XP Gift H", densityMax: 20, coolDown: 600),
                new State(

                        new TimedTransition(2000, "State2")
                        ),

                    new State("State2",
                        new EntityNotExistsTransition("XP Gift H", 200, "State1")
                        )
                      )
                    ),
            
                new Threshold(0.1,
                new TierLoot(10, ItemType.Weapon, 0.002),
                new TierLoot(11, ItemType.Weapon, 0.001),
                new TierLoot(12, ItemType.Weapon, 0.0009),
                new TierLoot(6, ItemType.Ability, 0.002),
                new TierLoot(11, ItemType.Armor, 0.004),
                new TierLoot(12, ItemType.Armor, 0.003),
                new TierLoot(13, ItemType.Armor, 0.002),
                new TierLoot(5, ItemType.Ring, 0.005),
                new TierLoot(6, ItemType.Ring, 0.0008),
                new TierLoot(3, ItemType.Ring, 0.009),
                new TierLoot(7, ItemType.Armor, 0.002),
                new TierLoot(8, ItemType.Weapon, 0.002),
                new TierLoot(4, ItemType.Ability, 0.004),
                new TierLoot(8, ItemType.Armor, 0.006),
                new TierLoot(4, ItemType.Ring, 0.006),
                new TierLoot(9, ItemType.Armor, 0.004),
                new TierLoot(5, ItemType.Ability, 0.004),
                new TierLoot(9, ItemType.Weapon, 0.004),
                new TierLoot(10, ItemType.Armor, 0.004),
                new ItemLoot("What's This?", 0.0002),
                new ItemLoot("Bracer of the Guardian", 0.0001),
                new ItemLoot("The Twilight Gemstone", 0.0001),
                new ItemLoot("The Forgotten Crown", 0.0001),
                new ItemLoot("Potion of Life", 0.01),
                new ItemLoot("Potion of Mana", 0.01),
                new ItemLoot("Potion of Vitality", 0.01),
                new ItemLoot("Potion of Wisdom", 0.01),
                new ItemLoot("Potion of Defense", 0.01),
                new ItemLoot("Potion of Speed", 0.01),
                new ItemLoot("Potion of Dexterity", 0.01),
                new ItemLoot("Potion of Attack", 0.01),
                new ItemLoot("Common Farm Egg", 0.05),
                new ItemLoot("Uncommon Farm Egg", 0.01),
                new ItemLoot("Legendary Farm Egg", 0.001)

            )
            )
        ;

                      
        


    }
}
Lol. This was fixed, and I also released a tutorial. Wouldn't be surprised if you used it
Quote Originally Posted by Breezattak View Post
i didn't but okay
Nah, was just joking. What is your Discrd?
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us