HelpHow to Create behavior Help

Posts 1–5 of 5 · Page 1 of 1
How to Create behavior Help
Hello guys i need tutorial how to create behaviors in fabiano source thanks for help
Quote Originally Posted by Suki91 View Post
Hello guys i need tutorial how to create behaviors in fabiano source thanks for help

.Init("NoobHereo",
new State(
new State("Quote",
new tellplayer( "Suki91", "Hey, all you gotta do is read.")
)));
}
}
go to wServer->logic->db
create here file "BehaviorDb.NAME example. BehaviorDb.WineCellar
Code:
/**
 * Created by GhostMaree.
 */
#region

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

#endregion

namespace wServer.logic
{
    partial class BehaviorDb
    {
        private _ WineCellar = () => Behav() //because BehaviorDb.WineCellar
            .Init("Oryx the Mad God 2", //Monster Name
                new State(
                    new RealmPortalDrop(), //After Death Oryx drop Realm Portal
                    new State("Attack", 
                        new HpLessTransition(.3, "prepareRage"), //30% hp = next state
                        new Wander(.05), 
                        new Shoot(25, projectileIndex: 0, count: 8, shootAngle: 45, coolDown: 1500),
                        new Shoot(25, projectileIndex: 2, count: 3, shootAngle: 10, coolDown: 1000),
                        new Taunt(1, 6000, "Puny mortals! My {HP} HP will annihilate you!"),
                        new Spawn("Henchman of Oryx", 1, 0, 7000),
                        new Spawn("Henchman of Oryx", 1, 0, 14000),
                        new Spawn("Henchman of Oryx", 1, 0, 21000),
                        new Spawn("Henchman of Oryx", 1, 0, 28000),
                        new State("Attack 2",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2000, "Attack 3")
                            ),
                        new State("Attack 3",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2500, "Attack 2")
                            )
                    ),
                    new State("prepareRage",
                        new Follow(.1, 15, 3),
                        new Taunt("Can't... keep... henchmen... alive... anymore! ARGHHH!!!"),
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(25, 30, fixedAngle: 0, projectileIndex: 7, coolDown: 4000, coolDownOffset: 4000),
                        new Shoot(25, 30, fixedAngle: 30, projectileIndex: 8, coolDown: 4000, coolDownOffset: 5000),
                        new Shoot(25, projectileIndex: 0, count: 8, shootAngle: 45, coolDown: 1500),
                        new Shoot(25, projectileIndex: 2, count: 3, shootAngle: 10, coolDown: 1000),
                        new TimedTransition(10000, "rage"),
                        new State("Attack 4",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2000, "Attack 5")
                            ),
                        new State("Attack 5",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2500, "Attack 4")
                            )
                    ),
                    new State("rage",
                        new Follow(.1, 15, 3),
                        new Shoot(25, 30, projectileIndex: 7, coolDown: 90000001, coolDownOffset: 8000),
                        new Shoot(25, 30, projectileIndex: 8, coolDown: 90000001, coolDownOffset: 8500),
                        new Shoot(25, projectileIndex: 0, count: 8, shootAngle: 45, coolDown: 1500),
                        new Shoot(25, projectileIndex: 2, count: 3, shootAngle: 10, coolDown: 1000),
                        new TossObject("Monstrosity Scarab", 7, 0, coolDown: 5000, randomToss: true),
                        new TossObject("Monstrosity Scarab", 7, 0, coolDown: 5000, randomToss: true),
                        new TossObject("Monstrosity Scarab", 7, 0, coolDown: 5000, randomToss: true),
                        new TossObject("Monstrosity Scarab", 7, 0, coolDown: 5000, randomToss: true),
                        new Taunt(1, 6000, "Puny mortals! My {HP} HP will annihilate you!"),
                        new State("Attack 6",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2000, "Attack 7")
                            ),
                        new State("Attack 7",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2500, "Attack 6")
                            )
                    )
                ),
                new MostDamagers(3,
                    new ItemLoot("Potion of Vitality", 1)
                ),
                new Threshold(0.05,
                    new ItemLoot("Potion of Attack", 0.3),
                    new ItemLoot("Potion of Defense", 0.3),
                    new ItemLoot("Potion of Wisdom", 0.3)
                ),
                new Threshold(0.01,
                    new TierLoot(10, ItemType.Weapon, 0.2),
                    new TierLoot(11, ItemType.Weapon, 0.1),
                    new TierLoot(12, ItemType.Weapon, 0.05),
                    new TierLoot(5, ItemType.Ability, 0.15),
                    new TierLoot(6, ItemType.Ability, 0.05),
                    new TierLoot(11, ItemType.Armor, 0.2),
                    new TierLoot(12, ItemType.Armor, 0.1),
                    new TierLoot(13, ItemType.Armor, 0.05),
                    new TierLoot(4, ItemType.Ring, 0.2),
                    new TierLoot(5, ItemType.Ring, 0.1)
                )
            )
            .Init("Henchman of Oryx",
                new State(
                    new Prioritize(
                        new Protect(0.4, "Oryx the Mad God 2", 10, 10, 1),
                        new Wander(.2),
                        new Follow(.2, 8, 3, coolDown: 0)
                        ),
                    new Spawn("Abomination of Oryx", 1, 0),
                    new Spawn("Aberrant of Oryx", 1, 0),
                    new Spawn("Monstrosity of Oryx", 1, 0),
                    new Spawn("Vintner of Oryx", 1, 0),
                    new Spawn("Bile of Oryx", 1, 0),
                    new Shoot(8, projectileIndex: 0, predictive: 1, coolDown: 1500),
                    new Shoot(8, projectileIndex: 1, count: 3, shootAngle: 20, coolDown: 1500, coolDownOffset: 500)
                    )
            )
            .Init("Monstrosity Scarab",
                new State(
                    new State("searching",
                        new Prioritize(
                            new Follow(2, range: 0)
                            ),
                        new PlayerWithinTransition(2, "creeping"),
                        new TimedTransition(5000, "creeping")
                        ),
                    new State("creeping",
                        new Shoot(2, 10, 36, fixedAngle: 0),
                        new Decay(0)
                        )
                    )
            )
            .Init("Bile of Oryx",
                new State(
                    new Wander(.1),
                    new Protect(.7, "Henchman of Oryx", 15, 5)
                    )
            )
            .Init("Monstrosity of Oryx",
                new State(
                    new Wander(.4),
                    new TossObject("Monstrosity Scarab", 8, coolDown: 1500)
                    )
            )
            .Init("Abomination of Oryx",
                new State(
                    new Wander(.3),
                    new Charge(.9, 6, 2000),
                    new Shoot(8, 5, 5, 0, coolDown: 2000),
                    new Shoot(8, 5, 5, 1, coolDown: 2000),
                    new Shoot(8, 5, 5, 2, coolDown: 2000),
                    new Shoot(8, 5, 5, 3, coolDown: 2000),
                    new Shoot(8, 5, 5, 4, coolDown: 2000)
                    )
            )
            .Init("Aberrant of Oryx",
                new State(
                    new Wander(.3),
                    new Protect(.7, "Henchman of Oryx", 15, 5),
                    new TossObject("Aberrant Blaster", 8, coolDown: 1500)
                    )
            )
            .Init("Aberrant Blaster",
                new State(
                    new State("Search_Player",
                        new PlayerWithinTransition(5, "HeSeeYou")
                        ),
                    new State("HeSeeYou",
                        new Shoot(10, 5, 10, 0),
                        new Suicide()
                        )
                    )
            )
            .Init("Vintner of Oryx",
                new State(
                    new StayBack(0.6, 4),
                    new Wander(.3),
                    new Shoot(8, 1, projectileIndex: 0, coolDown: 1000)
                    )
            );
        }
}
Quote Originally Posted by HGAEHaeheadhetdhtertherh View Post
go to wServer->logic->db
create here file "BehaviorDb.NAME example. BehaviorDb.WineCellar
Code:
/**
 * Created by GhostMaree.
 */
#region

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

#endregion

namespace wServer.logic
{
    partial class BehaviorDb
    {
        private _ WineCellar = () => Behav() //because BehaviorDb.WineCellar
            .Init("Oryx the Mad God 2", //Monster Name
                new State(
                    new RealmPortalDrop(), //After Death Oryx drop Realm Portal
                    new State("Attack", 
                        new HpLessTransition(.3, "prepareRage"), //30% hp = next state
                        new Wander(.05), 
                        new Shoot(25, projectileIndex: 0, count: 8, shootAngle: 45, coolDown: 1500),
                        new Shoot(25, projectileIndex: 2, count: 3, shootAngle: 10, coolDown: 1000),
                        new Taunt(1, 6000, "Puny mortals! My {HP} HP will annihilate you!"),
                        new Spawn("Henchman of Oryx", 1, 0, 7000),
                        new Spawn("Henchman of Oryx", 1, 0, 14000),
                        new Spawn("Henchman of Oryx", 1, 0, 21000),
                        new Spawn("Henchman of Oryx", 1, 0, 28000),
                        new State("Attack 2",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2000, "Attack 3")
                            ),
                        new State("Attack 3",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2500, "Attack 2")
                            )
                    ),
                    new State("prepareRage",
                        new Follow(.1, 15, 3),
                        new Taunt("Can't... keep... henchmen... alive... anymore! ARGHHH!!!"),
                        new ConditionalEffect(ConditionEffectIndex.Invulnerable),
                        new Shoot(25, 30, fixedAngle: 0, projectileIndex: 7, coolDown: 4000, coolDownOffset: 4000),
                        new Shoot(25, 30, fixedAngle: 30, projectileIndex: 8, coolDown: 4000, coolDownOffset: 5000),
                        new Shoot(25, projectileIndex: 0, count: 8, shootAngle: 45, coolDown: 1500),
                        new Shoot(25, projectileIndex: 2, count: 3, shootAngle: 10, coolDown: 1000),
                        new TimedTransition(10000, "rage"),
                        new State("Attack 4",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2000, "Attack 5")
                            ),
                        new State("Attack 5",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2500, "Attack 4")
                            )
                    ),
                    new State("rage",
                        new Follow(.1, 15, 3),
                        new Shoot(25, 30, projectileIndex: 7, coolDown: 90000001, coolDownOffset: 8000),
                        new Shoot(25, 30, projectileIndex: 8, coolDown: 90000001, coolDownOffset: 8500),
                        new Shoot(25, projectileIndex: 0, count: 8, shootAngle: 45, coolDown: 1500),
                        new Shoot(25, projectileIndex: 2, count: 3, shootAngle: 10, coolDown: 1000),
                        new TossObject("Monstrosity Scarab", 7, 0, coolDown: 5000, randomToss: true),
                        new TossObject("Monstrosity Scarab", 7, 0, coolDown: 5000, randomToss: true),
                        new TossObject("Monstrosity Scarab", 7, 0, coolDown: 5000, randomToss: true),
                        new TossObject("Monstrosity Scarab", 7, 0, coolDown: 5000, randomToss: true),
                        new Taunt(1, 6000, "Puny mortals! My {HP} HP will annihilate you!"),
                        new State("Attack 6",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2000, "Attack 7")
                            ),
                        new State("Attack 7",
                            new Shoot(25, projectileIndex: 1, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 400),
                            new Shoot(25, projectileIndex: 3, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 800),
                            new Shoot(25, projectileIndex: 4, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1200),
                            new Shoot(25, projectileIndex: 5, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 1600),
                            new Shoot(25, projectileIndex: 6, count: 3, shootAngle: 10, coolDown: 999999, coolDownOffset: 2000),
                            new TimedTransition(2500, "Attack 6")
                            )
                    )
                ),
                new MostDamagers(3,
                    new ItemLoot("Potion of Vitality", 1)
                ),
                new Threshold(0.05,
                    new ItemLoot("Potion of Attack", 0.3),
                    new ItemLoot("Potion of Defense", 0.3),
                    new ItemLoot("Potion of Wisdom", 0.3)
                ),
                new Threshold(0.01,
                    new TierLoot(10, ItemType.Weapon, 0.2),
                    new TierLoot(11, ItemType.Weapon, 0.1),
                    new TierLoot(12, ItemType.Weapon, 0.05),
                    new TierLoot(5, ItemType.Ability, 0.15),
                    new TierLoot(6, ItemType.Ability, 0.05),
                    new TierLoot(11, ItemType.Armor, 0.2),
                    new TierLoot(12, ItemType.Armor, 0.1),
                    new TierLoot(13, ItemType.Armor, 0.05),
                    new TierLoot(4, ItemType.Ring, 0.2),
                    new TierLoot(5, ItemType.Ring, 0.1)
                )
            )
            .Init("Henchman of Oryx",
                new State(
                    new Prioritize(
                        new Protect(0.4, "Oryx the Mad God 2", 10, 10, 1),
                        new Wander(.2),
                        new Follow(.2, 8, 3, coolDown: 0)
                        ),
                    new Spawn("Abomination of Oryx", 1, 0),
                    new Spawn("Aberrant of Oryx", 1, 0),
                    new Spawn("Monstrosity of Oryx", 1, 0),
                    new Spawn("Vintner of Oryx", 1, 0),
                    new Spawn("Bile of Oryx", 1, 0),
                    new Shoot(8, projectileIndex: 0, predictive: 1, coolDown: 1500),
                    new Shoot(8, projectileIndex: 1, count: 3, shootAngle: 20, coolDown: 1500, coolDownOffset: 500)
                    )
            )
            .Init("Monstrosity Scarab",
                new State(
                    new State("searching",
                        new Prioritize(
                            new Follow(2, range: 0)
                            ),
                        new PlayerWithinTransition(2, "creeping"),
                        new TimedTransition(5000, "creeping")
                        ),
                    new State("creeping",
                        new Shoot(2, 10, 36, fixedAngle: 0),
                        new Decay(0)
                        )
                    )
            )
            .Init("Bile of Oryx",
                new State(
                    new Wander(.1),
                    new Protect(.7, "Henchman of Oryx", 15, 5)
                    )
            )
            .Init("Monstrosity of Oryx",
                new State(
                    new Wander(.4),
                    new TossObject("Monstrosity Scarab", 8, coolDown: 1500)
                    )
            )
            .Init("Abomination of Oryx",
                new State(
                    new Wander(.3),
                    new Charge(.9, 6, 2000),
                    new Shoot(8, 5, 5, 0, coolDown: 2000),
                    new Shoot(8, 5, 5, 1, coolDown: 2000),
                    new Shoot(8, 5, 5, 2, coolDown: 2000),
                    new Shoot(8, 5, 5, 3, coolDown: 2000),
                    new Shoot(8, 5, 5, 4, coolDown: 2000)
                    )
            )
            .Init("Aberrant of Oryx",
                new State(
                    new Wander(.3),
                    new Protect(.7, "Henchman of Oryx", 15, 5),
                    new TossObject("Aberrant Blaster", 8, coolDown: 1500)
                    )
            )
            .Init("Aberrant Blaster",
                new State(
                    new State("Search_Player",
                        new PlayerWithinTransition(5, "HeSeeYou")
                        ),
                    new State("HeSeeYou",
                        new Shoot(10, 5, 10, 0),
                        new Suicide()
                        )
                    )
            )
            .Init("Vintner of Oryx",
                new State(
                    new StayBack(0.6, 4),
                    new Wander(.3),
                    new Shoot(8, 1, projectileIndex: 0, coolDown: 1000)
                    )
            );
        }
}
"/**
* Created by GhostMaree.
*/
"

Such lies. >.> Plz stop it now ghostmaree.
Me and @HGAEHaeheadhetdhtertherh were working on a project using Fabiano swagger of doom source...but then he quit and after a while I quit. And it's just remade and fixed by GhostMaree
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us