james1bow Professional

  • Male
  • 42
  • from United States
  • Member since May 24th 2020
  • Last Activity:
Posts
609
Reactions Received
200
Points
3,351
Profile Hits
5,693
  • Hi James, Did you remove all your plugins from the site? Also, did you post your NPC interaction plugin?

    • yes i removed them. i did not release npc stuff. not sure if im going to be working on plugins anymore.

    • Why not? Your plugins are awesome! They make a ton of servers fun and I was really hoping to play your RPG server with all the characters.

    • I actually just sold all of the source for my plugins.

    • How much would it cost me to hire you to make a couple of plugins?


      1) your NPC interaction of just buying/selling. Maybe if the cross hair is pointed to a NPC that has "Trader" in the name, he/she will automatically say something like "Hello!" (I would make the audio files and voices.mp3 to insert in the settings) So "Trader Joe" would only say something and not every NPC the crosshairs hit. And also the currency option would need to be added. Is it possible to add the currency box when you hit "Inventory" key like you did with portals?


      2) Area Sound. A box you can place anywhere to play a specific sound. Like entering the tree line of a forest, you would hear a fade in of like spooky sounds then when you get to the center of the sound box, it is the loudest. And when you leave the box it fades out. Or for my Wild West theme, when you enter the sound box, you hear people chattering and it gets louder the closer you get to the middle of the box (where the source sound is at) and fades out as you leave the area.


      I used ChatGPT to make a sound plugin and this is what it created:



      What This Plugin Does


      Defines a 3D rectangular zone (like an invisible box)


      Detects when a player enters that area


      Plays a custom sound for that player


      Only triggers once per entry (won’t spam repeatedly)


      📁 Folder Structure


      Your plugin folder should look like this:


      AreaSoundPlugin/

      ├── plugin.yml

      └── AreaSoundPlugin.java

      🧾 plugin.yml

      name: AreaSoundPlugin

      main: AreaSoundPlugin

      version: 1.0

      author: YourName

      ☕ AreaSoundPlugin.java

      import net.risingworld.api.Plugin;

      import net.risingworld.api.Server;

      import net.risingworld.api.objects.Player;

      import net.risingworld.api.events.player.PlayerMoveEvent;

      import net.risingworld.api.utils.Vector3f;


      import java.util.HashSet;

      import java.util.Set;


      public class AreaSoundPlugin extends Plugin {


      // Define area corners

      private final Vector3f corner1 = new Vector3f(100, 0, 100);

      private final Vector3f corner2 = new Vector3f(120, 50, 120);


      // Track players currently inside the area

      private final Set<Player> playersInside = new HashSet<>();


      @Override

      public void onEnable() {

      getServer().getEventManager().registerListener(this);

      getLogger().info("AreaSoundPlugin enabled!");

      }


      @EventMethod

      public void onPlayerMove(PlayerMoveEvent event) {

      Player player = event.getPlayer();

      Vector3f position = player.getPosition();


      boolean inside = isInsideArea(position);


      if (inside && !playersInside.contains(player)) {

      playersInside.add(player);


      // Play sound (replace with your custom sound path)

      player.playSound("sounds/mysound.mp3", 1.0f, 1.0f);


      } else if (!inside && playersInside.contains(player)) {

      playersInside.remove(player);

      }

      }


      private boolean isInsideArea(Vector3f pos) {

      float minX = Math.min(corner1.x, corner2.x);

      float maxX = Math.max(corner1.x, corner2.x);


      float minY = Math.min(corner1.y, corner2.y);

      float maxY = Math.max(corner1.y, corner2.y);


      float minZ = Math.min(corner1.z, corner2.z);

      float maxZ = Math.max(corner1.z, corner2.z);


      return pos.x >= minX && pos.x <= maxX &&

      pos.y >= minY && pos.y <= maxY &&

      pos.z >= minZ && pos.z <= maxZ;

      }

      }

      🎵 Adding Your Sound File


      Place your custom sound file here:


      plugins/AreaSoundPlugin/sounds/mysound.mp3


      Make sure:


      Format is .mp3


      File name matches exactly


      Path matches the code


      🛠 How to Compile


      You’ll need:


      Java JDK 17+


      Rising World Unity server files (for API reference)


      IntelliJ IDEA or Eclipse


      Steps:


      Create a new Java project


      Add Rising World server JAR as a library


      Paste the Java code


      Export as .jar


      Put the .jar inside:


      RisingWorld/plugins/


      Restart server


      📍 Customizing the Area


      Change this:


      private final Vector3f corner1 = new Vector3f(100, 0, 100);

      private final Vector3f corner2 = new Vector3f(120, 50, 120);


      To match your desired coordinates.


      🚀 Want Advanced Features?


      I can upgrade this plugin to:


      ✅ Multiple sound zones


      ✅ Different sounds per zone


      ✅ Looping ambient sound


      ✅ Fade-in / fade-out


      ✅ Admin commands to set area in-game


      ✅ Config file support


      ✅ Per-player cooldown timers


      Just tell me how advanced you want it 😎

    • Here is what ChatGPT created for the NPC store:


      https://chatgpt.com/share/69b0…50-8013-a935-2ceec449e028

  • where do i get file for portals plugin?

  • Hi James sorry to bother you but i got a rw java version server and am stumped as to how to add the plugins i wonder if you can help me out its for a public server

    • in the dedicated server folder there should be a folder named plugins, each plugin will go in its own folder inside the plugins folder.

    • Aww that makes sense thanks soo much