[FSoD] Deadwater docks

Posts 115 of 25 · Page 1 of 2
[FSoD] Deadwater docks
THIS BEHAVIOR IS FROM REALMS RESOLTION SOURCE, I SIMPLY ADDED IT HERE SO PEOPLE WHO DON'T KNOW WHERE TO LOOK CAN USE IT TOO
REMEMBER TO SAVE .JM MAPS AS EMBEDDED RESOURCE IN PROPERTIES (BOTTOM RIGHT CORNER)
Behavior: (Call it BehaviorDb.DeadWaterDocks.cs)
Code:
 
Behavior
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 _ DeadwaterDocks = () => Behav() .Init("Deadwater Docks Parrot", new State( new EntityNotExistsTransition("Jon Bilgewater the Pirate King", 90000, "rip"), new State("CircleOrWander", new Prioritize( new Orbit(0.55, 2, 5, "Parrot Cage"), new Wander(0.12) ) ), new State("Orbit&HealJon", new Orbit(0.55, 2, 20, "Jon Bilgewater the Pirate King"), new SpecificHeal(2, 1000, "JonBilgewater", coolDown: 2850) ), new State("rip", new Suicide() ) ) ) .Init("Parrot Cage", new State( new ConditionalEffect(ConditionEffectIndex.Invincible), new State("NoSpawn" ), new State("SpawnParrots", new Reproduce("Deadwater Docks Parrot", 5, densityMax: 5, coolDown: 2500) ) ) ) .Init("Bottled Evil Water", new State( new State("water", new ConditionalEffect(ConditionEffectIndex.Invincible), new TimedTransition(2000, "drop") ), new State("drop", new ApplySetpiece("BottledEvil"), new Suicide() ))) .Init("Deadwater Docks Lieutenant", new State( new Follow(1, 8, 1), new Shoot(8, 1, 10, coolDown: 1000), new TossObject("Bottled Evil Water", angle: null, coolDown: 6750) ), new ItemLoot("Health Potion", 0.1), new ItemLoot("Magic Potion", 0.1) ) .Init("Deadwater Docks Veteran", new State( new Follow(0.8, 8, 1), new Shoot(8, 1, 10, coolDown: 500) ), new TierLoot(10, ItemType.Weapon, 0.05), new ItemLoot("Health Potion", 0.1), new ItemLoot("Magic Potion", 0.1) ) .Init("Deadwater Docks Admiral", new State( new Follow(0.6, 8, 1), new Shoot(8, 3, 10, coolDown: 1325) ), new ItemLoot("Health Potion", 0.1), new ItemLoot("Magic Potion", 0.1) ) .Init("Deadwater Docks Brawler", new State( new Follow(1.12, 8, 1), new Shoot(8, 1, 10, coolDown: 350) ), new ItemLoot("Health Potion", 0.1), new ItemLoot("Magic Potion", 0.1) ) .Init("Deadwater Docks Sailor", new State( new Follow(0.9, 8, 1), new Shoot(8, 1, 10, coolDown: 525) ), new ItemLoot("Health Potion", 0.1), new ItemLoot("Magic Potion", 0.1) ) .Init("Deadwater Docks Commander", new State( new Follow(0.90, 8, 1), new Shoot(8, 1, 10, coolDown: 900), new TossObject("Bottled Evil Water", angle: null, coolDown: 8750) ), new ItemLoot("Health Potion", 0.1), new ItemLoot("Magic Potion", 0.1) ) .Init("Deadwater Docks Captain", new State( new Follow(0.47, 8, 1), new Shoot(8, 1, 10, coolDown: 3500) ), new ItemLoot("Health Potion", 0.1), new ItemLoot("Magic Potion", 0.1) ) .Init("Jon Bilgewater the Pirate King", new State( new RealmPortalDrop(), new State("default", new PlayerWithinTransition(8, "coinphase") ), new State( new Order(90, "Parrot Cage", "SpawnParrots"), new DamageTakenTransition(32500, "gotoSpawn"), new State("coinphase", new Wander(0.11), new Shoot(10, count: 1, projectileIndex: 0, coolDown: 2000), new TimedTransition(4500, "cannonballs") ), new State("cannonballs", new Follow(0.32, 8, coolDown: 1000), new Shoot(10, count: 7, shootAngle: 30, projectileIndex: 1, coolDown: 2150), new TimedTransition(5000, "coinphase") ) ), new State("gotoSpawn", new ReturnToSpawn(once: true, speed: 0.52), new ConditionalEffect(ConditionEffectIndex.Invincible), new ConditionalEffect(ConditionEffectIndex.StunImmune), new TimedTransition(3500, "blastcannonballs") ), new State("blastcannonballs", new ConditionalEffect(ConditionEffectIndex.StunImmune), new Order(90, "Deadwater Docks Parrot", "CircleOrWander"), new Shoot(10, count: 7, shootAngle: 30, projectileIndex: 1, coolDown: 1750), new TimedTransition(6000, "parrotcircle") ), new State("parrotcircle", new ConditionalEffect(ConditionEffectIndex.StunImmune), new Order(90, "Deadwater Docks Parrot", "Orbit&HealJon"), new TimedTransition(6000, "blastcannonballs") ) ), new MostDamagers(3, new ItemLoot("Potion of Speed", 1.0) ), new MostDamagers(1, new ItemLoot("Potion of Dexterity", 1.0) ), new Threshold(0.025, new TierLoot(12, ItemType.Weapon, 0.1), new TierLoot(5, ItemType.Ability, 0.1), new TierLoot(11, ItemType.Armor, 0.05), new TierLoot(11, ItemType.Weapon, 0.05), new TierLoot(4, ItemType.Ring, 0.025), new ItemLoot("Pirate King's Cutlass", 0.024) ) ) ; } }

Map: (Call if ddocks.jm, if you know how to load map files you can call it what you want, it goes in wServer\realm\worlds\maps)
Code:
 
map
{"dict":[{},{"ground":"Composite","objs":[{"name":"","id":"Cave Wall"}]},{"ground":"Evil Water"},{"ground":"Brown Lines"},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Sailor"}]},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Brawler"}]},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Commander"}]},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Captain"}]},{"objs":[{"name":"","id":"Brown Wall"}]},{"ground":"Light Sand"},{"ground":"Light Sand","objs":[{"name":"","id":"Palm Tree"}]},{"ground":"Light Sand","objs":[{"name":"","id":"Treasure Pile"}]},{"ground":"Light Sand","objs":[{"name":"","id":"Treasure Chests"}]},{"ground":"Light Sand","objs":[{"name":"","id":"Bilgewater's Grotto Portal"}]},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Lieutenant"}]},{"ground":"Bridge"},{"ground":"Evil Water","objs":[{"name":"","id":"Brown Wall"}]},{"ground":"Evil Water","objs":[{"id":"Deadwater Docks Brawler"}]},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Veteran"}]},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Parrot"}]},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Admiral"}]},{"ground":"Evil Water","objs":[{"id":"Deadwater Docks Commander"}]},{"ground":"Evil Water","objs":[{"id":"Deadwater Docks Sailor"}]},{"ground":"Evil Water","objs":[{"id":"Deadwater Docks Parrot"}]},{"ground":"Evil Water","objs":[{"id":"Deadwater Docks Veteran"}]},{"ground":"Brown Lines","objs":[{"id":"Deadwater Docks Macaw"}]},{"ground":"Evil Water","objs":[{"id":"Deadwater Docks Lieutenant"}]},{"ground":"Evil Water","objs":[{"id":"Deadwater Docks Captain"}]},{"ground":"Light Sand","objs":[{"name":"","id":"Brown Wall"}]},{"ground":"Light Sand","regions":[{"id":"Spawn"}]},{"ground":"Light Sand","objs":[{"name":"","id":"Portal of Cowardice"}],"regions":[{"id":"Spawn"}]}],"width":125,"data":"eNrlXIt2mzgQZQYwzmNdG7tp0232/z+ztXlpnhKYeC0HnZMmKcFc3dHozgOK4kscEIyvhRYKDL7Cw+NGYzw6cixKMaqHRw4j8pphf3zkqHJefiHOqx7x5otx3nxBzkNrr4OveNe7GhRbdcACa5ec3y/yM+4ndaRiB8b5JvDw92vtHe5nBfdzMvZBw+TEOeX75S/alwW8Q6DgSqHf7pNxivs8XvvvQ+zFLN5xVOv3rNm3vV1PSP+5fH3tf/M8AzkQ5Pd+bEe2nwT7L7M4n/w7ZhGdbXuGNc/+moR8sumO8zoT5WL59afg99sEGwdi7flw7o9tgl+bRl7r/Drk5117R+LTx0dONWs1qvYcclBnJfPNHZ6SsaLy2+SgptldNs9n7OE6/UZ+2rtXHJBXamQKn44aWb5zrnYaIrX939Eh3/c/xZTr+VMOJDLd3ShKsbOduIj9ebsSqFH5LZGfP6tdIQ8yaTBcHKEdew/3+ch5PsC3Nn8VAIs40jmvbh6ZSt/aEg8TKkuI1jxCznGWvcvo9BZ+HYvTJe+3E9Y+fIVAYyKZFaq86TqHWT52+Du8UWzq76fd+O74QF4DW6I+u797u8leZvlWrqXkOKmz82P87rAg4vjsSEWzoImlxuEcW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jutwjntHsBIlcfuk4llot6VTPebqIG2V2Ql1okh26AyASTTpWcTMeJFluZb9FxU28/RtRUtMLSupkutrO6SbHtMI5QsY6R3BMBVUQBe7LZNsKXuHo6sNhHrQ4oPe435fveaWl4448eR8SpStcOE3XJp/I7qd6h0g1xv6yieqi2dSu3PT+3806oBc6OF5XkefY8Govhu29k8L0Kc1+3TupzTjqqyuH1Xt9bDASt0qNj1DeqD/lXzQLH6+P+Tv1rWZ6ZVEVtDO65vibe0IauzrlXi09aNpAZNcP/I03SGpub5/54uv2+CPHhx99hte6VR4mlGniaHZ3qsnW03q9ZZk26kXJDD2CkhY9Mpntoo0ZbkvM0IeWFGBNpojLxBnaG1D36uEtZrr+RK7e9pyN/mxPlRrHPeK7ZT93MtN5cT51ZEYKkdZF3G+T2pWrjdMUVhvVtB0/SQHXKZA6xFHQRZrhJMVZAb51p3JSi7vt3Nnh/nBVNrlVnX0nvLQfTg5PEsvqyzlWYPtYbKegtBXodXpUQTeVjnyx85qJV9VJ+wQLXbPSfUMWuVyHONznkmCVkXID+24v1KoDwf12YTnaOqwTTfvBXvoeARbJ3FO+I0DUNZm5jdX8bvHvnv4G1ystLWZLGfp/QWwuWdDGi8TU5/rgWzsHcMKkryOa3hbXJovk0O1GgmR85rUkkd1jaqb57p3kWCztNWea3zibUJN6q4secdM3k7HkdeRZCHtv5BkD+T1a4/P3f/nDdKbL4fWexQd+OJrICt0AWQGXI6Dj3noZV/kEGR53YMUWlrVM22jO2P4r+R9eeskfudoiHnH8LWnzJHXhjvoOpW6t7YzR4DeYifH/vAv4V7GT4QcuvYChWD/QqfdvNHPTjvGPD+yLit934nvE3uD4ccRXQ=","height":104}

File to load map: (Goes in wServer\realm\worlds\, call it DeadwaterDocks.cs)
Code:
 
file to load map
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace wServer.realm.worlds { public class DeadwaterDocks : World { public DeadwaterDocks() { Name = "Deadwater Docks"; ClientWorldName = "Deadwater Docks"; Background = 0; Difficulty = 5; AllowTeleport = true; } public override bool NeedsPortalKey => true; protected override void Init() { LoadMap("wServer.realm.worlds.maps.ddocks.jm", MapType.Json); } } }

Bilge's grotto map: (Call it bgrotto.jm, goes in same place as ddocks.jm file)
Code:
 
grotto map
{"dict":[{},{"objs":[{"name":"","id":"Cave Wall"}]},{"ground":"Evil Water"},{"ground":"Brown Lines"},{"ground":"Brown Lines","objs":[{"name":"","id":"Parrot Cage"}]},{"ground":"Brown Lines","objs":[{"id":"Parrot Cage"}]},{"ground":"Brown Lines","objs":[{"name":"","id":"Jon Bilgewater the Pirate King"}]},{"ground":"Brown Lines","objs":[{"name":"","id":"Portal of Cowardice"}],"regions":[{"id":"Spawn"}]},{"ground":"Evil Water","objs":[{"name":"","id":"Cave Wall"}]}],"width":25,"data":"eNqtlFEOgDAIQ6eIev8TG/0wuLV1I6M/S+gbyQaUEmIhYnHnVihMcT9mtL9lar+9wgz3Y0b7EcP8m2DU/S0TCZNqCfvVHMJDfg9nn1hjjBh/q8x/cKavTzzdi/39fgh/ZgYzc57ZJd99dT6CG+sCeR4Eyg==","height":25}

File to load grotto map: (Call it BilgewatersGrotto.cs, goes in same place as DeadwaterDocks.cs)
Code:
 
file to load grotto
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace wServer.realm.worlds { public class BilgewatersGrotto : World { public BilgewatersGrotto() { Name = "Bilgewater's Grotto"; ClientWorldName = "Bilgewater's Grotto"; Background = 0; Difficulty = 5; AllowTeleport = true; } public override bool NeedsPortalKey => true; protected override void Init() { LoadMap("wServer.realm.worlds.maps.bgrotto.jm", MapType.Json); } } }


Goes in wServer\realm\setpieces, call it BottledEvil.cs:
Code:
 
Bottled Evil setpiece
using db.data; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace wServer.realm.setpieces { internal class BottledEvil : ISetPiece { public int Size { get { return 1; } } private byte[,] SetPiece { get { return new byte[,] { {1}, }; } } public void RenderSetPiece(World world, IntPoint pos) { XmlData dat = world.Manager.GameData; IntPoint p = new IntPoint { X = pos.X - (Size / 2), Y = pos.Y - (Size / 2) }; for (int x = 0; x < Size; x++) { for (int y = 0; y < Size; y++) { if (SetPiece[y, x] == 1) { WmapTile tile = world.Map[x + p.X, y + p.Y].Clone(); tile.TileId = dat.IdToTileType["Evil Water"]; tile.ObjType = 0; world.Map[x + p.X, y + p.Y] = tile; } } } } } }

You also want to change "Suicide" to "Decay" in the Bottled Water behavior
AND to fix parrot cages not spawning parrots, change reproduce to Spawn and remove maxdensity in parrot cage behavior

~Used spoilers to make it more clean, didn't attach to not wait for approval
The evil water bottles aren't working tho
u have the evil water setpiece?
Quote Originally Posted by xantu999 View Post
yes obv



Weird, works for me , for me Parrot Cage doesn't work
It's because you forgot that different sources have different source scripts most of the time meaning that you can't just ctrl c ctrl v a behaviour without knowing what's missing and what's not
Quote Originally Posted by LollyBumBum View Post
It's because you forgot that different sources have different source scripts most of the time meaning that you can't just ctrl c ctrl v a behaviour without knowing what's missing and what's not
Well, he has FSoD judging by his screenshot and the fact that he was able to rebuild correctly
i use fsod but with 27.7.X2 client
Quote Originally Posted by xantu999 View Post
i use fsod but with 27.7.X2 client
Yeah, you're right, I didn't provide the setpiece at all. Here it is: (Goes in wServer\realm\setpieces, call it BottledEvil.cs) @Ahl @059 pin to main post if possible thanks.
Code:
 
Bottled Evil setpiece
using db.data; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace wServer.realm.setpieces { internal class BottledEvil : ISetPiece { public int Size { get { return 1; } } private byte[,] SetPiece { get { return new byte[,] { {1}, }; } } public void RenderSetPiece(World world, IntPoint pos) { XmlData dat = world.Manager.GameData; IntPoint p = new IntPoint { X = pos.X - (Size / 2), Y = pos.Y - (Size / 2) }; for (int x = 0; x < Size; x++) { for (int y = 0; y < Size; y++) { if (SetPiece[y, x] == 1) { WmapTile tile = world.Map[x + p.X, y + p.Y].Clone(); tile.TileId = dat.IdToTileType["Evil Water"]; tile.ObjType = 0; world.Map[x + p.X, y + p.Y] = tile; } } } } } }

You also want to change "Suicide" to "Decay" in the Bottled Water behavior
AND to fix parrot cages not spawning parrots, change reproduce to Spawn and remove maxdensity in parrot cage behavior
Quote Originally Posted by LegumI View Post
Yeah, you're right, I didn't provide the setpiece at all. Here it is: (Goes in wServer\realm\setpieces, call it BottledEvil.cs) @Ahl @059 pin to main post if possible thanks.
Code:
 
Bottled Evil setpiece
using db.data; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace wServer.realm.setpieces { internal class BottledEvil : ISetPiece { public int Size { get { return 1; } } private byte[,] SetPiece { get { return new byte[,] { {1}, }; } } public void RenderSetPiece(World world, IntPoint pos) { XmlData dat = world.Manager.GameData; IntPoint p = new IntPoint { X = pos.X - (Size / 2), Y = pos.Y - (Size / 2) }; for (int x = 0; x < Size; x++) { for (int y = 0; y < Size; y++) { if (SetPiece[y, x] == 1) { WmapTile tile = world.Map[x + p.X, y + p.Y].Clone(); tile.TileId = dat.IdToTileType["Evil Water"]; tile.ObjType = 0; world.Map[x + p.X, y + p.Y] = tile; } } } } } }

You also want to change "Suicide" to "Decay" in the Bottled Water behavior
AND to fix parrot cages not spawning parrots, change reproduce to Spawn and remove maxdensity in parrot cage behavior
Done /tenchar
Everything works fine rn but Bilgewater shoots like an old man and he doesn't talk
Quote Originally Posted by xantu999 View Post
Everything works fine rn but Bilgewater shoots like an old man and he doesn't talk
Yep, that's the only behavior I managed to find, so looks like it'll have to do
Hey, what I need to do to the parrots cage spawns parrots? Help please ;-;
Quote Originally Posted by RichardBrz View Post
Hey, what I need to do to the parrots cage spawns parrots? Help please ;-;
"You also want to change "Suicide" to "Decay" in the Bottled Water behavior
AND to fix parrot cages not spawning parrots, change reproduce to Spawn and remove maxdensity in parrot cage behavior"
Quote Originally Posted by LegumI View Post
"You also want to change "Suicide" to "Decay" in the Bottled Water behavior
AND to fix parrot cages not spawning parrots, change reproduce to Spawn and remove maxdensity in parrot cage behavior"
fixed, thanks a lot <3
Posts 115 of 25 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?