Elvarg \ OSRSPK
13 topics in this forum
-
I've had to develop this in ~20 hours of total time for a service, with the quality of code not being a matter (by preference of customer). It's external instead of embedded, I didn't want to bother adapting to an already bad system, so I made it cycle based - it's working just fine, beside auto-retaliation (you can force that none the less, figure out on your own) It has: All attacks (Ranged, Prayer deactivation, Poison, Magic, Dragonfire) - as well as the freezing with the small alien pet, the big dragon fire (one-shot) & acid splatters. If you don't use this, at least recognize the approach on how I did the calculation for acid splatters landing AROU…
-
0
Reputation Points
- 14 replies
- 3.2k views
-
-
Wrote this very quickly cause I had to test some core updates I made to my Elvarg base. Keep in mind 90% of the code was taken from the client. Difficulty: 1/10, just copy paste What you're adding: Let's start, create a new package called "flood" or something, add these in it: package com.elvarg.util.flood; import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import com.elvarg.Server; import com.elvarg.game.GameConstants; import com.elvarg.net.NetworkConstants; import com.elvarg.net.login.LoginResponses; import com.elvarg.net.security.IsaacRandom; /** * Represents a client which will attempt * to connect to the server. …
-
0
Reputation Points
- 4 replies
- 2.1k views
-
-
Hi people. I wanted to give you guys this, it took around 2 minuites (not including the time it took to find the string values) but i thought someone might like it, this can be converted to any server for PI just replace getPacketSender() with getPA() and sendString to sendFrame126 and you should be fine. Add this to Player.java right after the interface removal has happened. Then paste this code in getPacketSender().sendInterface(15244) .sendString(15257, "Welcome to SuperScape") .sendString(15258, "You're logged in from " + getHostAddress()) .sendString(15259, "Remember to keep your password safe.\\n And to set a bank pin.") .sendString(15260, "You have 0 me…
-
0
Reputation Points
- 14 replies
- 2.6k views
-
-
Ticket system where a player requests a ticket, a message would then be sent to the staff online and could then be accepted. package com.elvarg.game.content.ticket; import com.elvarg.game.World; import com.elvarg.game.entity.impl.player.Player; import com.elvarg.util.Misc; import java.util.*; import java.util.stream.Collectors; public class TicketManager { private final Queue<TicketEntry> entries = new ArrayDeque<>(); public static final TicketManager INSTANCE = new TicketManager(); public void acceptRequest(Player staff) { if (entries.peek() == null) { staff.getPacketSender().sendMessage("No tickets have been requeste…
-
0
Reputation Points
- 3 replies
- 1.2k views
-
-
Since many players asking for it, so here you go : ItemActionPacketListener.java : case #####: ClanChat clan = player.getCurrentClanChat(); if (clan == null) { player.getPacketSender().sendMessage("You need to be in a clan to do this."); return; } else { player.performAnimation(new Animation(774, Priority.HIGH)); player.getPacketSender().sendMessage("@cr2@ [@red@Dice@bla@][" + clan.getName() +"] <shad=16112652>"+player.getUsername()+"<shad=000000> has just rolled a <shad=16112652>" +Misc.getRandom(100)+ "<shad=000000>/100."); } break; Dice [Clanchatname] Your user name and the rest of the message…
-
0
Reputation Points
- 4 replies
- 1.3k views
-
-
Been working on the base for a while now trying to get skills added. Thought i'd release this to help others do the same as me. I accept any construction criticism as i'm still learning to code. create a new package called thieving, I put mine in com.elvarg.world.content.skills.thieving. In Player.java add: private Thieving thieving = new Thieving(this); public Thieving getThieving() { return thieving; } Stalls.java package com.elvarg.world.content.skills.thieving; import com.elvarg.world.model.Item; /** * This enum stores all our thieving stalls data. * @author Clive/Dinh * */ public enum Stalls { BAKERS_STALL(5, 16, 1, n…
-
0
Reputation Points
- 10 replies
- 1.7k views
-
-
Very simple to do, kind of nice to have an additional currency that many stakers should be familiar with being introduced into the economy. Modify to your needs. Anyways. Add this into your Items.json file. { "id": 13204, "name": "Platinum Tokens", "examine": "Shiny currency, could be useful to some.", "value": 1000, "stackable": true, "noted": false, "noteId": -1, "tradeable": true, "sellable": false, "dropable": true }, In your UseItemPacketListener class, itemOnObject method if (itemId == 995 && gameObject.getDefinition().getName().contains("Bank")) { final int size = player.getInventory().getAmount(995); …
-
0
Reputation Points
- 1 reply
- 1.1k views
-
-
I wanted to release my version of the firemaking skill, it may not be the best but its a script i felt happy enough to release to the public, it has clipped lighting to you can't walk into walls / unwanted places, it has all the log types (Excluding redwood) and has their exp, time to live, and log ids for convenience, the clipping order is West, East, South, North, and the chances that you burn a log was taken from arios' code so if anyone has the mathmatics for that i can add it on. It has checks to make sure the log hasn't been picked up and if it has it will halt all action and reward no experience. ashs on ground also work, and will be there for 60 seconds (should be…
-
0
Reputation Points
- 3 replies
- 1.8k views
-
-
I made a quick item on bank un-noting system that took me 5 minuites but i thought I should share. Just copy and paste the below into the itemOnObject method inside of UseItemPacket class For this to work you need to have defined that the item is noted in items.json if (item.getDefinition().isNoted() && gameObject.getDefinition().getName().toLowerCase().contains("bank")) { int id = item.getDefinition().getNoteId(); int amount = item.getAmount(); if (player.getInventory().getFreeSlots() == 0) { player.getPacketSender().sendMessage("You don't have enough space in your inventory."); return; } if (amount > player.getInventory().getFre…
-
0
Reputation Points
- 4 replies
- 1.4k views
-
-
Noticed that when I redid projectiles on Elvarg, the magic ones were messed up. To fix it, simply replace CombatSpells.java with mine. It's quite a big class so I'll use pastebin. Click here to get it. Now, some people wanted help with adding tridents so I'll give you a proper base below. Let's make it so when we equip a trident, it will update our autocast spell. To do this, open EquipPacketListener.java and find "void resetWeapon(Player player)" At the bottom of this method, you should find: if(player.getCombat().getAutocastSpell() != null) { Autocasting.setAutocast(player, null); player.getPacketSender().sendMessage("Autocast spell cleared."); } …
-
0
Reputation Points
- 2 replies
- 1.4k views
-
-
i know this can be written better feel free todo so, i noticed theres no way to delay how long before the next dialogue popped up, useful if your creating quest, kinda needed anyways here how to add it, again its not perfect it can be better Open Dialogue.java and add this to there public int DialogueDelay() { return -1; } close and save that then Open DialogueManager.java In the Load void add final int delay = reader.has("delay") ? reader.get("delay").getAsInt() : -1; and add this below that public int DialogueDelay() { return delay; } then add int delay = next.Dialog…
-
0
Reputation Points
- 5 replies
- 1.4k views
-
-
Hello everyone! im here to release my 2nd snippet for the elvarg base by professor oak, i have kind of changed my designing of code and spaced things out alot so it doesn't look like a clumped up mess. Anyways here is the code Your gonna start off by defining CookingFood.java as an enum for holding the data of your food such as the raw item the cooked item, the burnt item, the exp, level and burn level all inside for use later package com.elvarg.world.content.skills.cooking; import com.elvarg.world.model.Item; /** * * @author Oscar Morton <S C A P E on RuneServer> * */ public enum CookingFood { /** * Defining the food */ SHRIMP(new Item(317),new I…
-
0
Reputation Points
- 4 replies
- 1.6k views
-
-
Simple ladder system as we dont have one Add This Class LadderActions.java package com.elvarg.game.entity.impl.object; import java.util.HashMap; import java.util.Map; import java.util.Optional; import com.elvarg.game.definition.ObjectDefinition; import com.elvarg.game.entity.impl.player.Player; import com.elvarg.game.model.Animation; import com.elvarg.game.model.Position; import com.elvarg.game.task.Task; import com.elvarg.game.task.TaskManager; /** * Handles player clicking ladders * * @author CodeForLife */ public class LadderActions { /** * checks if we have a ladder to climb * based on the clicked object. * * @param player * @param …
-
0
Reputation Points
- 0 replies
- 869 views
-