The RuneLocus forum has been archived and does not accept new registrations.
Click here for more information, and click here to join the community on Discord.
Search the Community
Showing results for tags 'events'.
The search index is currently processing. Current results may not be complete.
-
Battle614 is an innovative and unique PvP server that offers a variety of content never seen before. Built on our own custom framework, Battle614 will take the 614 scene by storm with its perfected combat system and fluid gameplay. The development team of Battle614 is committed to providing quality and well-balanced content that will surpass any expectations. We pride ourselves on good user experience and we listen to all feedback and suggestions that our community provides. Yoko - Owner & Game Developer Exabyte - Game Developer Bladex- Client Developer Project - Website Developer Marksman - Game Manager
-
What makes a good server? What are the key prerogatives that make a server long lasting, successful, and lush with content and ideas? But most importantly, what do the players want? These were the questions we asked ourselves when we started our project. And we have come a long way. Introducing Ascend, a humble but impressive product that has undergone hundreds of hours of work and is still being worked on to this day. Our inspiration is to create an experience unlike any other currently provided. In the past few years we've all seen countless servers come and go. It's time to change that. Ascend is an OSRS content packed server, made with capable hands, includes many different customization options to meet any players desires, and all new content will be added consistently. Meet Our Team Owner/Development Goon Owner/Community/Staff Ascend Head Manager Spudpickles Take A Gander At What We've Been Working On Raids Inferno Vorkath Every OSRS Boss PK Tournaments Blood Keys (Wildy Content) Working on Theatre of Blood Interfaces A Tonne of QoL Fixes Donation Zones Credits Source/base was compiled from OSPS, EXOTIC, and OSV Credit to Goon, our incredibly talented developer. Credit to anyone else that helped on this project including community and staff members involved. https://ascend-ps.com/forums/ https://discord.gg/n2RSGuY
-
Hi rune-Locus!! website link: http://everythingps.com "MMORPG" Crown-Rsps: With content to please most, our environment is user friendly to ensure satisfaction in game=play! With 200+ achievements, Scam-proof gambling, duel arena, Many Bosses, Wilderness pvp, Many Minigames and a flawless economy structure, weekly updates. we keep our players occupied and satisfied all year around. Media: Just try us out! you won't be disappointed
-
- 317
- scam-proof gambling
-
(and 6 more)
Tagged with:
-
"MMORPG" Crown-Rsps: Play Now: Click Here! Click here for media! With content to please most, our environment is user friendly to ensure satisfaction in game=play! With 200+ achievements, Scam-proof gambling, duel arena, Many Bosses, Wilderness pvp, Many Minigames and a flawless economy structure, weekly updates. we keep our players occupied and satisfied all year around. Join Today!
-
- 200+ achievements
- minigames
- (and 7 more)
-
Hello everyone, First off I'd like to say Merry Christmas to everyone of RuneLocus. I will be releasing one of the features I added to some of my servers' over the years. I figured there wasn't a better time to release this than today on Christmas so enjoy and please comment if you intend to use. While I am basically giving you this code and expecting you to add it like a snippet I will be breaking it down so that you can understand it and use to it build onto for more locations, etc. So let us begin.. Base: PI Difficulty: 1/10 Classes Edited: PlayerAssistant.java, NPCHandler.java, ActionHandler.java [B]NOTE: This will require newer NPCs as the Penguins were not released until a higher revision. Also, if you don't have some of the the methods uses please post and I will put them up for use.[/B] [B][U][SIZE=3]Step One:[/SIZE][/U][/B] Open up PlayerAssistant.java. [code] public int[][] penguinRewards = { //Item ID, Amount {995,5000}, // COINS (5K) {995,10000}, // COINS (10K) {1514,15}, // Magic Logs 15 {1514,25}, // Magic Logs 25 {1632,2}, // D STONE (2) {565,50}, // BLOODS (250) {560,50}, // DEATHS (250) {561,50}, // NATURES (250) {1516,200}, // Yew Logs 200 {1516,300}, // Yew Logs 300 {392,25}, // Manta {892,50}, // Rune Arrow {386,60}, // Shark {5295,3}, // Ranaar Seed {1514,30}, // Magic Log {2364,15} // Rune bar }; public int[][] penguinLocations = { //X Coord, Y Coord HEIGHT {3224,3211,0}, // Lumbridge Spawn {3261,3432,0}, // Varrock Spawn {2947,3391,0}, // Falador Spawn {2707,3477,0}, // Camelot Spawn {2678,3318,0}, // Ardy Spawn {2596,3077,0}, // Yanille Spawn {3551,3280,0} // Barrows Spawn }; public String[][] penguinLocationsName = { //Using the following sentence: You can find him "insertthistexthere". {"wandering Lumbridge."}, // Lumbridge Spawn {"wandering Varrock."}, // Varrock Spawn {"wandering Falador."}, // Falador Spawn {"wandering Camelot."}, // Camelot Spawn {"wandering Ardougne."}, // Ardy Spawn {"wandering Yanille."}, // Yanille Spawn {"wandering Barrows' hills."} // Barrows Spawn }; private int[] penguinSpawn = {8104,8105,8107,8108,8109}; private int penguinSpawn() { return penguinSpawn[(int) (Math.random() * penguinSpawn.length)]; } public void handlePenguins() { int penguinSpawn = (int) (Math.random() * (penguinLocations.length - 1)); int Penguin = penguinSpawn(); for (int j = 0; j < Server.playerHandler.players.length; j++) { if (Server.playerHandler.players[j] != null) { Client c2 = (Client)Server.playerHandler.players[j]; Server.npcHandler.spawnNpc2(Penguin, penguinLocations[penguinSpawn][0], penguinLocations[penguinSpawn][1], penguinLocations[penguinSpawn][2], 1, 1, 1, 1, 1); c2.sendMessage("@[email protected]: A penguin has been spawned."); c2.sendMessage("@[email protected] can be found "+penguinLocationsName[penguinSpawn][0]+""); } } } public void givePengItem() { int addItem = (int) (Math.random() * (penguinRewards.length - 1)); int ITEM = penguinRewards[addItem][0]; int AMOUNT = penguinRewards[addItem][1]; c.getItems().addItem(ITEM, AMOUNT); c.sendMessage("You've obtained: "+c.getItems().getItemName(ITEM)+"."); } [/code] Search for: [code] public void startTeleport(int x, int y, int height, String teleportType) { [/code] Underneath: [code] removeAllWindows();[/code] Add: [code] if (Misc.random(7000) >= 6990) { handlePenguins(); } [/code] [SPOILER=Code Breakdown] Breaking down the above code: [code] public int[][] penguinRewards = { //Item ID, Amount {995,5000}, // COINS (5K) {995,10000}, // COINS (10K) {1514,15}, // Magic Logs 15 {1514,25}, // Magic Logs 25 {1632,2}, // D STONE (2) {565,50}, // BLOODS (250) {560,50}, // DEATHS (250) {561,50}, // NATURES (250) {1516,200}, // Yew Logs 200 {1516,300}, // Yew Logs 300 {392,25}, // Manta {892,50}, // Rune Arrow {386,60}, // Shark {5295,3}, // Ranaar Seed {1514,30}, // Magic Log {2364,15} // Rune bar };[/code] This code is of course used for the different types of rewards you could obtain upon the finding of the Penguins. Pretty self-explanitory, the server grabs a random one of these and gives you the item and the amount, this can be added on to very easily by simply adding another: {4151,1}, // Whip. [code]public int[][] penguinLocations = { //X Coord, Y Coord HEIGHT {3224,3211,0}, // Lumbridge Spawn {3261,3432,0}, // Varrock Spawn {2947,3391,0}, // Falador Spawn {2707,3477,0}, // Camelot Spawn {2678,3318,0}, // Ardy Spawn {2596,3077,0}, // Yanille Spawn {3551,3280,0} // Barrows Spawn };[/code] An important chunk of the tutorial, this code contains the X Coord, Y Coord, and Height of where the NPC will spawn when it is spawned. You can add onto this by adding a comma {3551,3280,0} <-----HERE // Barrows Spawn and then adding a new {XXXX,YYYY,HEIGHTLEVEL} // WHEREISTHIS. [B]NOTE: IT IS IMPORTANT NOT TO MESS UP THE ORDER OF THE CODE OR THE COORDINATES AND THE LOCATION NAME WILL BE MESSED UP. ADD ONTO IT NOT INTO THE MIDDLE/TOP OF IT.[/B] [code] public String[][] penguinLocationsName = { //Using the following sentence: You can find him "insertthistexthere". {"wandering Lumbridge."}, // Lumbridge Spawn {"wandering Varrock."}, // Varrock Spawn {"wandering Falador."}, // Falador Spawn {"wandering Camelot."}, // Camelot Spawn {"wandering Ardougne."}, // Ardy Spawn {"wandering Yanille."} // Yanille Spawn {"wandering Barrows' hills."} // Barrows Spawn[/code] The other important chunk of code which contains a small string indicating where the penguin is for the player to find him. Much like above you can add onto it using the very same pricinpal. [B]NOTE: IT IS IMPORTANT NOT TO MESS UP THE ORDER OF THE CODE OR THE COORDINATES AND THE LOCATION NAME WILL BE MESSED UP. ADD ONTO IT NOT INTO THE MIDDLE/TOP OF IT.[/B] [code]private int[] penguinSpawn = {8104,8105,8107,8108,8109}; private int penguinSpawn() { return penguinSpawn[(int) (Math.random() * penguinSpawn.length)]; }[/code] Simply put, this code takes all the different penguins that are hidden in objects, and picks one randomly. [code] public void handlePenguins() { int penguinSpawn = (int) (Math.random() * (penguinLocations.length - 1)); int Penguin = penguinSpawn(); for (int j = 0; j < Server.playerHandler.players.length; j++) { if (Server.playerHandler.players[j] != null) { Client c2 = (Client)Server.playerHandler.players[j]; Server.npcHandler.spawnNpc2(Penguin, penguinLocations[penguinSpawn][0], penguinLocations[penguinSpawn][1], penguinLocations[penguinSpawn][2], 1, 1, 1, 1, 1); c2.sendMessage("@[email protected]: A penguin has been spawned."); c2.sendMessage("@[email protected] can be found "+penguinLocationsName[penguinSpawn][0]+""); } } }[/code] This is the core of the code which generates the random penguin ID, and his location. Once selected it will spawn the NPC globally and globally annouce to all online players the whereabouts of the penguin. [code] public void givePengItem() { int addItem = (int) (Math.random() * (penguinRewards.length - 1)); int ITEM = penguinRewards[addItem][0]; int AMOUNT = penguinRewards[addItem][1]; c.getItems().addItem(ITEM, AMOUNT); c.sendMessage("You've obtained: "+c.getItems().getItemName(ITEM)+"."); }[/code] Finally we have the code which randomly picks and item from the penguin table and gives you the item and the amount shown. Pretty simple stuff. [/SPOILER] Save and Close PlayerAssitant.java [B][U][SIZE=3]Step Two: [/SIZE][/U][/B] Open up NPCHandler.java. [code]public void DeleteNPC(int npc, int emote, String message) { for (int i = 0; i < maxNPCs; i++) { if (npcs[i] != null) { if (npcs[i].npcType == npc) { startAnimation(emote, i); npcs[i].animUpdateRequired = true; npcs[i].updateRequired = true; npcs[i].forceChat(""+message+""); npcs[i].isDead = true; } } } }[/code] Copy the above code into an appropriate section. Find: [code]public int getRespawnTime(int i) {[/code] Place: [code] case 8104: case 8105: case 8107: case 8108: case 8109: return -1; [/code] [SPOILER=Code Breakdown] [code]public void DeleteNPC(int npc, int emote, String message) { for (int i = 0; i < maxNPCs; i++) { if (npcs[i] != null) { if (npcs[i].npcType == npc) { startAnimation(emote, i); npcs[i].gfx100(gfx); npcs[i].animUpdateRequired = true; npcs[i].updateRequired = true; npcs[i].forceChat(""+message+""); npcs[i].isDead = true; } } } }[/code] This code, when called upon will do a few things, it will make the NPC selected do an emote, say a string (message), and die. This helps as we need to kill the Penguin once other players have found him successfully. [code] case 8104: case 8105: case 8107: case 8108: case 8109: return -1; [/code] This is to make sure that the penguins do not respawn after the players have found them, the only way the SHOULD respawn is when the event is called again. [/SPOILER] Save and Close NPCHandler.java. [B][U][SIZE=3]Step Three:[/SIZE][/U][/B] Open ActionHandler.java. Find your First Click NPC Packet, inside place this: [code] case 8104: case 8105: case 8107: case 8108: case 8109: Server.npcHandler.DeleteNPC(npcType, -1, -1, "Oh dear "+c.playerName+"! You've found me!"); c.getPA().givePengItem(); break;[/code] [SPOILER=Code Breakdown] [code] case 8104: case 8105: case 8107: case 8108: case 8109: Server.npcHandler.DeleteNPC(npcType, -1, -1, "Oh dear "+c.playerName+"! You've found me!"); c.getPA().givePengItem(); break;[/code] This is calling that new code we put in earlier in Step Two, when found the NPC is killed and deleted from the game, the reward is also given. [/SPOILER] Save and Close ActionHandler.java [img]http://puu.sh/7UZYg.jpg[/img] That should be everything, well I hope anyway, a lot of text just typed up and I hope I didn't miss anything. :)
-
The usage of this file? -Starts a random event once the max limit of experience has been gained. (based on the way how jagex did it) I've seen some terrible systems done e.g timer task that is a terrible way of doing it. [CODE]package server.model.players.plugin; import java.util.Random; import server.model.players.Client; import server.util.Tile; /** * * @author FUZENSETH * [MENTION=98951]infor[/MENTION]mation RS2 Random events coordinator. */ public class RandomEventCoordinator { /** Instance */ private static RandomEventCoordinator singleton = null; private static Tile oldTile = null; /** Constants */ private int experienceTreshold = 0; public static final int MAX_EXPERIENCE = 8_000; public static final boolean ENABLED = false; /** * If the player has the maxinum experience, we would create the new event by returning true. * [MENTION=184045]return[/MENTION] */ public boolean hasMaxinumExperience() { if (getEarnedExperience() > MAX_EXPERIENCE) { reset(); return true; } else return false; } /** * The areas where random events cannot be created. * [MENTION=184045]return[/MENTION] */ public static final boolean restrictedAreas(Client c) { if (c.absX > 2100 && c.absX < 2390 && c.absY > 4500 && c.absY < 4700 || //nightmare zone c.absX >= 2360 && c.absX <= 2445 && c.absY >= 5045 &&c. absY <= 5125 || //fight caves c.absX >= 2065 && c.absX <= 2111 && c.absY >= 4415 && c.absY <= 4455 || //jail c.absX >= 2300 && c.absX <= 2600 && c.absY >= 4780 && c.absY <= 4500 //recipefordisaster ) return true; return false; } /** * Processes the file. * [MENTION=75098]Para[/MENTION]m player */ public void coordinate(Client player) { if (restrictedAreas(player) && !(ENABLED)) return; if (hasMaxinumExperience() && !player.inWild() && !player.inDuel) { oldTile = new Tile(player.absX, player.absY, player.heightLevel); RandomEventPlugin.create(player); } } /** * Increases total experience treshold. * [MENTION=75098]Para[/MENTION]m amount */ public void incrementCounter(int amount) { experienceTreshold += amount; } /** * Gets the total of earned experience, * [MENTION=184045]return[/MENTION] */ public int getEarnedExperience() { return experienceTreshold; } /** * Resets the counter. */ public void reset() { experienceTreshold = 0; } /** Gets the old world tile before the random event starts. */ public Tile getWorldTile() { return oldTile; } /** Coordinator's singleton, if the singleton isn't loaded * then it will be. */ public static RandomEventCoordinator getSingleton() { if (singleton == null) singleton = new RandomEventCoordinator(); return singleton; } } [/CODE] Edit: Tile class [code]package server.util; /** * @author Fuzen Seth * [MENTION=98951]infor[/MENTION]mation Represents the RS2 game tile. * * */ public class Tile { /** constants */ private int x = 3087; private int y = 3503; private int plane = 0; /** Constructs a new tile */ public Tile(int x, int y, int plane) { this.x = x; this.y = y; this.plane = plane; } public Tile(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public int getY() { return y; } public int getPlane() { return plane; } } [/code]
- 5 replies
-
- coordinator
- events
-
(and 1 more)
Tagged with: