SolvedAdding Custom Dungeons (Spawning Arena)

Posts 1–9 of 9 · Page 1 of 1
Adding Custom Dungeons (Spawning Arena)
Anyone know how to add "spawning arena" to pserver?
Reply
skype:aistis.augustinas
Quote Originally Posted by WeirdNerds View Post
Anyone know how to add "spawning arena" to pserver?
Reply
skype:aistis.augustinas
Wrong section
Do you mean like the one I have?
Quote Originally Posted by ZeusAlmighty View Post
Wrong section
Do you mean like the one I have?
@ @059 @Ahlwong
Moved to correct section
1. Put your map in wServer\realm\worlds\maps, in properties (bottom right corner) change Build Action to embedded resource, if you don't have a map, here is the one I use:
Code:
{"data":"eNq9mImSgyAMQAVZRa22//+1W7UuR06zWjLTWgfyTAgxadNswxVyZmhXOiDr8IW01W/PrNQQVvGEhOz6mPvzFo6y3++2efncUnOP8hJhlY6klPNqOyJpzwAYaT3PoOwYP98TY8dZBu5/3FtahkMIj0pfRJmYD3T7kWuZVXZw8YvHn2M9VMeufEZKzc4g/sQp5J/OsadVyiZaH2jygY5gYQwCRcNYCuFjw8ZYgFgY8ZMvJsBYCIGM0WhH0knNOeergK4/CM9MPJKfg3o/ImAcV8/m9Zb90zP70ZKMIMSVlhH+EbuSr6YLzofE0O15v+3FwDAOHRgjZG8BbLQqO5J+b7QjiPmKegpLLglkTuQZ/V/kc4xZyLu4nVflxFofvDdextDVrFD/d96D33if31+X7LUV9XTzJfUVVr9BLz+Q+KEpdC2q7wtwSqpJKTswCiU9SZAZWFWdMtnE9mpSb0AzRsSKaGJ0Kjvovag7wjv6Wlv3jOex1tyf3/4/wy+mLw/z","dict":[{},{"ground":"Light Cobblestone Speedy"},{"ground":"Snow"},{"objs":[{"id":"ic Loot Balloon"}],"ground":"Snow"},{"objs":[{"id":"Tree Leafless"}],"ground":"Snow"},{"regions":[{"id":"Spawn"}],"ground":"Light Cobblestone Speedy"},{"objs":[{"id":"Nexus Portal"}],"ground":"Light Cobblestone Speedy"},{"objs":[{"id":"Winter Tree Big"}],"ground":"Snow"},{"objs":[{"id":"Tree Stump"}],"ground":"Snow"},{"objs":[{"id":"Winter Snowman Small"}],"ground":"Snow"},{"objs":[{"id":"Winter Tree Small"}],"ground":"Snow"},{"objs":[{"id":"Tree Dead"}],"ground":"Snow"},{"objs":[{"id":"Winter Snowman Big"}],"ground":"Snow"},{"objs":[{"id":"Winter Drift"}],"ground":"Snow"},{"ground":"Roman Rug"},{"ground":"Retro Dirt"},{"ground":"shtrs Maze Floor 2"}],"width":50,"height":43}
2. In wServer\realm\worlds, make a .cs file that will be used for the WorldClass of your map, you can copy paste from maps like UDL or ocean trench, or you can use this:
Code:
#region

using System.Threading;
using System.Threading.Tasks;
using DungeonGenerator;
using wServer.networking;

#endregion

namespace wServer.realm.worlds
{
    public class Arena2 : World
    {
        public Arena2()
        {
            Name = "Arena2";
            ClientWorldName = "{Arena2}";
            Dungeon = false;
            Background = 0;
            AllowTeleport = true;
        }

        public override bool NeedsPortalKey => true;

        protected override void Init()
        {
            LoadMap("wServer.realm.worlds.maps.arena.jm", MapType.Json); //change .maps.x to your map's name (the one you pasted from step 1), if it's a .wmap change .jm to .wmap and MapType to MapType.Wmap
        }

        public override World GetInstance(Client psr) => Manager.AddWorld(new Arena2());
    }
}
3. Add your portal xml, here's an example:
Code:
  <Object type="0xd69" id="Arena2 Portal">
    <Class>Portal</Class>
    <IntergamePortal/>
    <DungeonName>Arena2</DungeonName>
    <Texture>
      <File>lofiEnvironment2</File>
      <Index>0x97</Index>
    </Texture>
  </Object>
It's important that when you are editing this you put the name in <DungeonName>x</DungeonName> as the one you put in the code I gave you (so if I had Arena2 in that code, I would put Arena2 in <DungeonName>x</DungeonName>) obviously you have to edit the object type and also the texture if you don't like UDL's one :P
4. Add the key to open your portal, here's an example that works as an arena key:
Code:
    <Object type="0x2a1b" id="Arena Key">
      <Class>Equipment</Class>
      <Item/>
      <Texture>
         <File>lofiObj3</File>
         <Index>0xf4</Index>
      </Texture>
      <SlotType>10</SlotType>
      <Description>{equip.A_key_which_opens_an_entrance_to_an_Undead_Lair.}</Description>
      <Sound>use_key</Sound>
      <Consumable/>
      <Soulbound/>
      <Activate id="Arena2 Portal">Create</Activate>
      <feedPower>200</feedPower>
      <DisplayId>{Arena Key}</DisplayId>
   </Object>
Obviously you can just use all this since it's all for a spawn arena, but you can change name if you want, these XMLs go into db\data\dat1.xml and also into client (open the .swf with JPEXS, go into binaryData, export ghostship (the first one), add code in same way as in dat1.xml (after any </Object> tag or before the </Objects> tag at the end of the file) and then replace once you finish)

btw this is an arena that doesn't actually spawn anything, it requires an admin to spawn inside it, I don't know if this is what you wanted but there you go
Quote Originally Posted by LegumI View Post
1. Put your map in wServer\realm\worlds\maps, in properties (bottom right corner) change Build Action to embedded resource, if you don't have a map, here is the one I use:
Code:
{"data":"eNq9mImSgyAMQAVZRa22//+1W7UuR06zWjLTWgfyTAgxadNswxVyZmhXOiDr8IW01W/PrNQQVvGEhOz6mPvzFo6y3++2efncUnOP8hJhlY6klPNqOyJpzwAYaT3PoOwYP98TY8dZBu5/3FtahkMIj0pfRJmYD3T7kWuZVXZw8YvHn2M9VMeufEZKzc4g/sQp5J/OsadVyiZaH2jygY5gYQwCRcNYCuFjw8ZYgFgY8ZMvJsBYCIGM0WhH0knNOeergK4/CM9MPJKfg3o/ImAcV8/m9Zb90zP70ZKMIMSVlhH+EbuSr6YLzofE0O15v+3FwDAOHRgjZG8BbLQqO5J+b7QjiPmKegpLLglkTuQZ/V/kc4xZyLu4nVflxFofvDdextDVrFD/d96D33if31+X7LUV9XTzJfUVVr9BLz+Q+KEpdC2q7wtwSqpJKTswCiU9SZAZWFWdMtnE9mpSb0AzRsSKaGJ0Kjvovag7wjv6Wlv3jOex1tyf3/4/wy+mLw/z","dict":[{},{"ground":"Light Cobblestone Speedy"},{"ground":"Snow"},{"objs":[{"id":"ic Loot Balloon"}],"ground":"Snow"},{"objs":[{"id":"Tree Leafless"}],"ground":"Snow"},{"regions":[{"id":"Spawn"}],"ground":"Light Cobblestone Speedy"},{"objs":[{"id":"Nexus Portal"}],"ground":"Light Cobblestone Speedy"},{"objs":[{"id":"Winter Tree Big"}],"ground":"Snow"},{"objs":[{"id":"Tree Stump"}],"ground":"Snow"},{"objs":[{"id":"Winter Snowman Small"}],"ground":"Snow"},{"objs":[{"id":"Winter Tree Small"}],"ground":"Snow"},{"objs":[{"id":"Tree Dead"}],"ground":"Snow"},{"objs":[{"id":"Winter Snowman Big"}],"ground":"Snow"},{"objs":[{"id":"Winter Drift"}],"ground":"Snow"},{"ground":"Roman Rug"},{"ground":"Retro Dirt"},{"ground":"shtrs Maze Floor 2"}],"width":50,"height":43}
2. In wServer\realm\worlds, make a .cs file that will be used for the WorldClass of your map, you can copy paste from maps like UDL or ocean trench, or you can use this:
Code:
#region

using System.Threading;
using System.Threading.Tasks;
using DungeonGenerator;
using wServer.networking;

#endregion

namespace wServer.realm.worlds
{
    public class Arena2 : World
    {
        public Arena2()
        {
            Name = "Arena2";
            ClientWorldName = "{Arena2}";
            Dungeon = false;
            Background = 0;
            AllowTeleport = true;
        }

        public override bool NeedsPortalKey => true;

        protected override void Init()
        {
            LoadMap("wServer.realm.worlds.maps.arena.jm", MapType.Json); //change .maps.x to your map's name (the one you pasted from step 1), if it's a .wmap change .jm to .wmap and MapType to MapType.Wmap
        }

        public override World GetInstance(Client psr) => Manager.AddWorld(new Arena2());
    }
}
3. Add your portal xml, here's an example:
Code:
  <Object type="0xd69" id="Arena2 Portal">
    <Class>Portal</Class>
    <IntergamePortal/>
    <DungeonName>Arena2</DungeonName>
    <Texture>
      <File>lofiEnvironment2</File>
      <Index>0x97</Index>
    </Texture>
  </Object>
It's important that when you are editing this you put the name in <DungeonName>x</DungeonName> as the one you put in the code I gave you (so if I had Arena2 in that code, I would put Arena2 in <DungeonName>x</DungeonName>) obviously you have to edit the object type and also the texture if you don't like UDL's one :P
4. Add the key to open your portal, here's an example that works as an arena key:
Code:
  <Object type="0x2a1b" id="Arena Key">
      <Class>Equipment</Class>
      <Item/>
      <Texture>
         <File>lofiObj3</File>
         <Index>0xf4</Index>
      </Texture>
      <SlotType>10</SlotType>
      <Description>{equip.A_key_which_opens_an_entrance_to_an_Undead_Lair.}</Description>
      <Sound>use_key</Sound>
      <Consumable/>
      <Soulbound/>
Obviously you can just use all this since it's all for a spawn arena, but you can change name if you want, these XMLs go into db\data\dat1.xml and also into client (open the .swf with JPEXS, go into binaryData, export ghostship (the first one), add code in same way as in dat1.xml (after any </Object> tag or before the </Objects> tag at the end of the file) and then replace once you finish)

btw this is an arena that doesn't actually spawn anything, it requires an admin to spawn inside it, I don't know if this is what you wanted but there you go
All good and all but you sent him the code without asking which source hes using xD for all you know he might be on creepylava base
Quote Originally Posted by ZeusAlmighty View Post
All good and all but you sent him the code without asking which source hes using xD for all you know he might be on creepylava base
I'm pretty sure it's all similar except maybe the worldclass coding, he could still copy paste from other maps
Quote Originally Posted by LegumI View Post
I'm pretty sure it's all similar except maybe the worldclass coding, he could still copy paste from other maps
Pretty true, well said.
May you add me on skype if i have any questions? Merry Christmas by the way!
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us