Results 1 to 9 of 9
  1. #1
    TJRAE%TJAJAZetjtjtjjt's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    166
    Reputation
    10
    Thanks
    106

    Ocean Trench Behavior (fab src)

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using wServer.realm;
    using wServer.logic.behaviors;
    using wServer.logic.loot;
    using wServer.logic.transitions;
    
    namespace wServer.logic
    {
        partial class BehaviorDb
        {
            _ OceanTrench = () => Behav()
                .Init("Coral Gift",  //credits to GhostMaree, ???
                    new State(
                        new State("Texture1",
                            new SetAltTexture(1),
                            new TimedTransition(500, "Texture2")
                            ),
                        new State("Texture2",
                            new SetAltTexture(2),
                            new TimedTransition(500, "Texture0")
                            ),
                        new State("Texture0",
                            new SetAltTexture(0),
                            new TimedTransition(500, "Texture1")
                            )
                            ),
                            new Threshold(0.01,
                                new ItemLoot("Coral Juice", 0.3),
                                new ItemLoot("Sea Slurp Egg", 0.25),
                                new ItemLoot("Golden Cockle", 0.05),
                                new ItemLoot("Golden Conch", 0.05),
                                new ItemLoot("Golden Horn Conch", 0.05),
                                new ItemLoot("The Moon Tarot Card", 0.04),
                                new ItemLoot("Potion of Mana", 0.04),
                                new ItemLoot("Coral Bow", 0.01),
                                new ItemLoot("Coral Venom Trap", 0.03),
                                new ItemLoot("Wine Cellar Incantation", 0.02),
                                new ItemLoot("Coral Silk Armor", 0.04),
                                new ItemLoot("Coral Ring", 0.04)
                                )
                    )
    
                .Init("Coral Bomb Big",
                    new State(
                        new State("Spawning",
                            new TossObject("Coral Bomb Small", 1, angle: 30, coolDown: 500),
                            new TossObject("Coral Bomb Small", 1, angle: 90, coolDown: 500),
                            new TossObject("Coral Bomb Small", 1, angle: 150, coolDown: 500),
                            new TossObject("Coral Bomb Small", 1, angle: 210, coolDown: 500),
                            new TossObject("Coral Bomb Small", 1, angle: 270, coolDown: 500),
                            new TossObject("Coral Bomb Small", 1, angle: 330, coolDown: 500),
                            new TimedTransition(500, "Attack")
                            ),
                        new State("Attack",
                            new Shoot(4.4, count: 5, fixedAngle: 0, shootAngle: 70),
                            new Suicide()
                            )
                            )
                            )
                .Init("Coral Bomb Small",
                    new State(
                            new Shoot(3.8, count: 5, fixedAngle: 0, shootAngle: 70),
                            new Suicide()
                            )
                            )
                .Init("Deep Sea Beast",
                    new State(
                        new ChangeSize(11, 100),
                        new Prioritize(
                            new StayCloseToSpawn(0.2, 2),
                            new Follow(0.2, acquireRange: 4, range: 1)
                                ),
                            new Shoot(1.8, count: 1, projectileIndex: 0, coolDown: 1000),
                            new Shoot(2.5, count: 1, projectileIndex: 1, coolDown: 1000),
                            new Shoot(3.3, count: 1, projectileIndex: 2, coolDown: 1000),
                            new Shoot(4.2, count: 1, projectileIndex: 3, coolDown: 1000)
                                    )
                                    )
                .Init("Thessal the Mermaid Goddess",
                    new State(
                        new TransformOnDeath("Thessal the Mermaid Goddess Wounded", probability: 0.1),
                        new TransformOnDeath("Thessal Dropper"),
                        new State("Start",
                            new Prioritize(
                                new Wander(0.3),
                                new Follow(0.3, acquireRange: 10, range: 2)
                            ),
                            new EntityNotExistsTransition("Deep Sea Beast", 20, "Spawning Deep"),
                            new HpLessTransition(1, "Attack1")
                            ),
                     new State("Main",
                            new Prioritize(
                                new Wander(0.3),
                                new Follow(0.3, acquireRange: 10, range: 2)
                            ),
                            new TimedTransition(0, "Attack1")
                            ),
                    new State("Main 2",
                            new Prioritize(
                                new Wander(0.3),
                                new Follow(0.3, acquireRange: 10, range: 2)
                            ),
                            new TimedTransition(0, "Attack2")
                            ),
                        new State("Spawning Bomb",
                            new TossObject("Coral Bomb Big", angle: 45),
                            new TossObject("Coral Bomb Big", angle: 135),
                            new TossObject("Coral Bomb Big", angle: 225),
                            new TossObject("Coral Bomb Big", angle: 315),
                            new TimedTransition(1000, "Main")
                            ),
                       new State("Spawning Bomb Attack2",
                            new TossObject("Coral Bomb Big", angle: 45),
                            new TossObject("Coral Bomb Big", angle: 135),
                            new TossObject("Coral Bomb Big", angle: 225),
                            new TossObject("Coral Bomb Big", angle: 315),
                            new TimedTransition(1000, "Attack2")
                            ),
                        new State("Spawning Deep",
                            new TossObject("Deep Sea Beast", 14, angle: 0, coolDownOffset: 0),
                            new TossObject("Deep Sea Beast", 14, angle: 90, coolDownOffset: 0),
                            new TossObject("Deep Sea Beast", 14, angle: 180, coolDownOffset: 0),
                            new TossObject("Deep Sea Beast", 14, angle: 270, coolDownOffset: 0),
                            new TimedTransition(1000, "Start")
                            ),
                        new State("Attack1",
                            new HpLessTransition(0.5, "Attack2"),
                            //new TimedTransition(3000, "Trident", randomized: true),
                            new TimedTransition(3000, "Yellow Wall", randomized: true),
                            new TimedTransition(3000, "Super Trident", randomized: true),
                            new TimedTransition(3000, "Thunder Swirl", randomized: true),
                            new TimedTransition(3000, "Spawning Bomb", randomized: true)
                        ),
                        new State("Thunder Swirl",
                            new Shoot(8.8, count: 8, shootAngle: 360 / 8, projectileIndex: 0),
                            new TimedTransition(500, "Thunder Swirl 2")
                        ),
                        new State("Thunder Swirl 2",
                            new Shoot(8.8, count: 8, shootAngle: 360 / 8, projectileIndex: 0),
                            new TossObject("Coral Bomb Big"),
                            new TimedTransition(500, "Thunder Swirl 3")
                        ),
                        new State("Thunder Swirl 3",
                            new Shoot(8.8, count: 8, shootAngle: 360 / 8, projectileIndex: 0),
                            new TimedTransition(100, "Main")
                        ),
                        new State("Thunder Swirl Attack2",
                            new Shoot(8.8, count: 16, shootAngle: 360 / 16, projectileIndex: 0),
                            new TimedTransition(500, "Thunder Swirl 2 Attack2")
                        ),
                        new State("Thunder Swirl 2 Attack2",
                            new Shoot(8.8, count: 16, shootAngle: 360 / 16, projectileIndex: 0),
                            new TossObject("Coral Bomb Big"),
                            new TimedTransition(500, "Thunder Swirl 3 Attack2")
                        ),
                        new State("Thunder Swirl 3 Attack2",
                            new Shoot(8.8, count: 16, shootAngle: 360 / 16, projectileIndex: 0),
                            new TimedTransition(100, "Main 2")
                        ),
                        //new State("Trident",
                        //new Shoot(21, count: 8, shootAngle: 360 / 4, projectileIndex: 1),
                        //new TimedTransition(100, "Start")
                        //),
                        new State("Super Trident",
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 0),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 90),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 180),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 270),
                            new TossObject("Coral Bomb Big"),
                            new TimedTransition(250, "Super Trident 2")
                        ),
                        new State("Super Trident 2",
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 45),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 135),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 225),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 315),
                            new TossObject("Coral Bomb Big"),
                            new TimedTransition(100, "Main")
                        ),
                        new State("Super Trident Attack2",
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 0),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 90),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 180),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 270),
                            new TossObject("Coral Bomb Big"),
                            new TimedTransition(250, "Super Trident 2 Attack2")
                        ),
                        new State("Super Trident 2 Attack2",
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 45),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 135),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 225),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 315),
                            new TimedTransition(250, "Super Trident 3 Attack2")
                        ),
                        new State("Super Trident 3 Attack2",
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 0),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 90),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 180),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 270),
                            new TossObject("Coral Bomb Big"),
                            new TimedTransition(250, "Super Trident 4 Attack2")
                        ),
                        new State("Super Trident 4 Attack2",
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 45),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 135),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 225),
                            new Shoot(21, count: 2, shootAngle: 25, projectileIndex: 2, angleOffset: 315),
                            new TimedTransition(100, "Main 2")
                        ),
                        new State("Yellow Wall",
                            new Flash(0xFFFF00, .1, 15),
                            new Prioritize(
                                new StayCloseToSpawn(0.3, 1)
                            ),
                            new Shoot(18, count: 30, fixedAngle: 6, projectileIndex: 3),
                            new TimedTransition(500, "Yellow Wall 2")
                        ),
                        new State("Yellow Wall 2",
                            new Flash(0xFFFF00, .1, 15),
                            new Shoot(18, count: 30, fixedAngle: 6, projectileIndex: 3),
                            new TimedTransition(500, "Yellow Wall 3")
                        ),
                        new State("Yellow Wall 3",
                            new Flash(0xFFFF00, .1, 15),
                            new Shoot(18, count: 30, fixedAngle: 6, projectileIndex: 3),
                            new TimedTransition(100, "Main")
                        ),
                        new State("Yellow Wall Attack2",
                            new Flash(0xFFFF00, .1, 15),
                            new Prioritize(
                                new StayCloseToSpawn(0.3, 1)
                            ),
                            new Shoot(18, count: 30, fixedAngle: 6, projectileIndex: 3),
                            new TimedTransition(500, "Yellow Wall 2 Attack2")
                        ),
                        new State("Yellow Wall 2 Attack2",
                            new Flash(0xFFFF00, .1, 15),
                            new Shoot(18, count: 30, fixedAngle: 6, projectileIndex: 3),
                            new TimedTransition(500, "Yellow Wall 3 Attack2")
                        ),
                        new State("Yellow Wall 3 Attack2",
                            new Flash(0xFFFF00, .1, 15),
                            new Shoot(18, count: 30, fixedAngle: 6, projectileIndex: 3),
                            new TimedTransition(100, "Main 2")
                        ),
                        new State("Attack2",
                            //new TimedTransition(500, "Trident", randomized: true),
                            new TimedTransition(500, "Yellow Wall Attack2", randomized: true),
                            new TimedTransition(500, "Super Trident Attack2", randomized: true),
                            new TimedTransition(500, "Thunder Swirl Attack2", randomized: true),
                            new TimedTransition(500, "Spawning Bomb", randomized: true)
                        )
                        ),
                            new Threshold(0.32,
                                new ItemLoot("Potion of Mana", 1)
                                ),
                            new Threshold(0.1,
                                new ItemLoot("Coral Juice", 0.3),
                                new ItemLoot("Sea Slurp Egg", 0.25),
                                new ItemLoot("Golden Cockle", 0.05),
                                new ItemLoot("Golden Conch", 0.05),
                                new ItemLoot("Golden Horn Conch", 0.05),
                                new ItemLoot("The Moon Tarot Card", 0.04),
                                new ItemLoot("Coral Bow", 0.01),
                                new ItemLoot("Coral Venom Trap", 0.03),
                                new ItemLoot("Wine Cellar Incantation", 0.02),
                                new ItemLoot("Coral Silk Armor", 0.04),
                                new ItemLoot("Coral Ring", 0.04)
                                )
                )
                .Init("Thessal Dropper",
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invincible),
                        new TransformOnDeath("Ocean Vent"),
                        new RealmPortalDrop(),
                        new State("Idle",
                            new EntityNotExistsTransition("Thessal the Mermaid Goddess", 100, "Suicide")
                            ),
                        new State("Suicide",
                            new Suicide()
                            ))
                )
                .Init("Thessal the Mermaid Goddess Wounded",
                    new State(
                        new ConditionalEffect(ConditionEffectIndex.Invincible),
                        new Taunt("Is King Alexander alive?"),
                        new TimedTransition(12000, "Fail"),
                        new State("Texture1",
                            new ChatTransition("Prize", "He lives and reigns and conquers the world"),
                            new SetAltTexture(1),
                            new TimedTransition(250, "Texture2")
                            ),
                        new State("Texture2",
                            new ChatTransition("Prize", "He lives and reigns and conquers the world"),
                            new SetAltTexture(0),
                            new TimedTransition(250, "Texture1")
                            ),
                        new State("Prize",
                            new Taunt("Thank you kind sailor."),
                            new TossObject("Coral Gift", range: 5, angle: 45),
                            new TossObject("Coral Gift", range: 5, angle: 135),
                            new TossObject("Coral Gift", range: 5, angle: 235),
                            new TimedTransition(0, "Suicide")
                            ),
                        new State("Fail",
                            new Taunt("You speak LIES!!"),
                            new TimedTransition(0, "Suicide")
                            ),
                        new State("Suicide",
                            new Suicide()
                            )
                        )
                    )
                .Init("Fishman Warrior",
                    new State(
                        new State("Start",
                        new Prioritize(
                            new Follow(0.6, acquireRange: 9, range: 2)
                                ),
                       new Orbit(0.6, 5, 9, target: null),
                       new Shoot(9, 3, projectileIndex: 0, shootAngle: 10, coolDown: 500),
                       new Shoot(9, count: 6, fixedAngle: 0, projectileIndex: 2, coolDown: 2000),
                       new NoPlayerWithinTransition(9, "Range Shoot")
                            ),
                        new State("Range Shoot",
                            new Prioritize(
                                new StayCloseToSpawn(0.2, 3),
                                new Wander(0.3)
                                ),
                            new Shoot(12, 1, projectileIndex: 1, coolDownOffset: 250),
                            new PlayerWithinTransition(9, "Start")
                            ))
                )
                .Init("Fishman",
                    new State(
                        new Prioritize(
                            new Follow(0.7, acquireRange: 9, range: 1)
                                ),
                       new Shoot(9, count: 1, projectileIndex: 1, coolDown: 2000),
                       new Shoot(9, 1, projectileIndex: 0, coolDownOffset: 250),
                       new Shoot(9, 3, projectileIndex: 0, shootAngle: 10, coolDownOffset: 500)
                        )
                )
                .Init("Sea Mare",
                    new State(
                        new Charge(2.0, 8, 4000),
                        new Wander(0.4),
                        new State("Shoot 1",
                            new Shoot(9, count: 3, projectileIndex: 1, coolDown: 500),
                            new TimedTransition(5000, "Shoot 2")
                            ),
                        new State("Shoot 2",
                            new Shoot(10, count: 8, shootAngle: 10, projectileIndex: 0, coolDownOffset: 500),
                            new Shoot(10, count: 8, shootAngle: 10, angleOffset: 45, projectileIndex: 0, coolDownOffset: 1000),
                            new Shoot(10, count: 8, shootAngle: 10, angleOffset: 135, projectileIndex: 0, coolDownOffset: 1500),
                            new TimedTransition(3000, "Shoot 1")
                        )
                        )
                )
                .Init("Sea Horse",
                    new State(
                        new Orbit(0.2, 2, acquireRange: 10, target: "Sea Mare"),
                        new Wander(0.2),
                        new State("Shoot 1",
                            new Shoot(9, count: 1, projectileIndex: 0, coolDownOffset: 250),
                            new Shoot(9, count: 2, shootAngle: 5, projectileIndex: 0, coolDownOffset: 500),
                            new Shoot(9, count: 3, shootAngle: 5, projectileIndex: 0, coolDownOffset: 750)
                            )
                        )
                )
                .Init("Giant Squid",
                    new State(
                        new Shoot(10, 1, projectileIndex: 0, coolDown: 100),
                        new Follow(0.8, acquireRange: 12, range: 1),
                        new State("Toss",
                            new TossObject("Ink Bubble"),
                            new TimedTransition(100, "Toss 2")
                            ),
                        new State("Toss 2",
                            new TossObject("Ink Bubble"),
                            new TimedTransition(100, "Attack 1")
                            ),
                        new State("Attack 1",
                            new Shoot(10, 4, shootAngle: 15, projectileIndex: 1, coolDown: 250),
                            new TimedTransition(20000, "Toss")
                            )
                            )
                )
                .Init("Ink Bubble",
                    new State(
                        new Shoot(10, 1, projectileIndex: 0, coolDown: 100)
                            )
                )
                .Init("Sea Slurp Home",
                    new State(
                        new Spawn("Grey Sea Slurp", maxChildren: 8, initialSpawn: 0.5),
                        new Reproduce("Grey Sea Slurp", 10, 10, 2, coolDown: 1500)
                            )
                )
                .Init("Grey Sea Slurp",
                    new State(
                        new StayCloseToSpawn(0.5, 10),
                        new State("Shoot and Move",
                            new Prioritize(
                                new Follow(0.3, acquireRange: 10, range: 4),
                                new Wander(0.2)
                                ),
                            new Shoot(8, 1, projectileIndex: 0, coolDown: 300),
                            new TimedTransition(900, "Wall Shoot")
                            ),
                        new State("Wall Shoot",
                            new Shoot(8, 6, projectileIndex: 1, fixedAngle: 2, coolDown: 750),
                            new TimedTransition(1500, "Shoot and Move")
                            )
                        )
                );
    
        }
    }
    Credits to GhostMaree, ???
    Last edited by TJRAE%TJAJAZetjtjtjjt; 10-13-2015 at 12:31 PM.

  2. The Following 10 Users Say Thank You to TJRAE%TJAJAZetjtjtjjt For This Useful Post:

    CrunchyCookie (10-13-2015),Daemonmann (11-24-2015),JENYOK777 (02-06-2016),MrMilegit (02-14-2016),patrick323 (10-13-2015),RotMGUbiq (10-27-2015),staro (03-23-2016),Tjeerdo (10-13-2015),Xandahhh (11-22-2015),Yul0627 (01-11-2017)

  3. #2
    patrick323's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    Brazil
    Posts
    29
    Reputation
    10
    Thanks
    0
    My Mood
    Confused
    tk u man, i really need this.

  4. #3
    Transferred's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    766
    Reputation
    31
    Thanks
    447
    My Mood
    Buzzed
    vid plis m9

  5. #4
    Lunatic's Sheep's Avatar
    Join Date
    Oct 2013
    Gender
    male
    Location
    www.mpgh.net
    Posts
    2,105
    Reputation
    142
    Thanks
    403
    My Mood
    Stressed
    Quote Originally Posted by Transferred View Post
    vid plis m9
    Hahah this bimmbo is banned

  6. #5
    MrchickenWingz's Avatar
    Join Date
    Sep 2014
    Gender
    male
    Posts
    174
    Reputation
    10
    Thanks
    152
    pls more behaviors

  7. #6
    rotmgsell's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    2
    Thank you for sharing

  8. #7
    GraysenPVG's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    0
    My Mood
    Amazed
    where do you put this?

  9. #8
    Xandahhh's Avatar
    Join Date
    Apr 2013
    Gender
    male
    Location
    UK
    Posts
    42
    Reputation
    10
    Thanks
    3
    My Mood
    Confused
    GhostMareeX, what is the maximum number of States that you can add under one Behavior?

    I'm just learning coding in general and trying to make a Behavior for Davy Jones (the boss) - not even sure that the above makes sense.

    So far I've got very close to completing, but once I add a 6th State (Davy has lots of different states, hence me adding it) I get an error in the wServer.exe saying:

    The given key was not present in the dictionary - dictionary'2.get_Item<Tkey key>

    <Edited>

    I have a feeling it's to do with the - new EntityNotExistsTransition("Ghost Lanturn Off", 10, "Vulnerable")
    Can you explain to me how that actually works?

    When the lanterns are on does Davy go into his Vulnerable state?

    - - - Updated - - -

    Nevermind, fixed it
    Last edited by Xandahhh; 11-24-2015 at 11:13 AM.

  10. #9
    Daemonmann's Avatar
    Join Date
    May 2015
    Gender
    male
    Location
    Santo André - SP
    Posts
    236
    Reputation
    10
    Thanks
    14
    My Mood
    Bored
    GG and Have another One ?


    | Welcome to My Signature |

    |Thanks Friends|



     


    !Thanks Skilly!



    !Thanks Skilly!



    !Thanks Skilly!




     



     









    | !Daemon Realms Resurrected! |




Similar Threads

  1. Is there any way to remove drowning in the Ocean Trench?
    By furbo in forum Realm of the Mad God Help & Requests
    Replies: 1
    Last Post: 05-09-2015, 05:39 PM
  2. New ocean trench pack! or is it?
    By pletter in forum Realm of the Mad God Discussions
    Replies: 7
    Last Post: 01-16-2014, 10:49 AM
  3. Ocean Trench Map (Just the boss room.)
    By HamSammich45 in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 5
    Last Post: 06-04-2013, 12:13 AM
  4. What happens when you go in my ocean trenches
    By Trollaux in forum Realm of the Mad God Discussions
    Replies: 8
    Last Post: 05-24-2013, 07:29 PM
  5. [Solved] Ocean Trench
    By TrueDream in forum Realm of the Mad God Help & Requests
    Replies: 4
    Last Post: 04-11-2013, 12:49 AM