Quantcast
Channel: Rune-Server
Viewing all 56156 articles
Browse latest View live

Discord Bot [Kotlin] [RSMod] [Any Base]

$
0
0
Hey I made a new discord bot the other day and i thought ill release my old one.



1 - Getting a token : First you will need to get a discord token you can do this by reading the instructions here


https://github.com/Chikachi/DiscordI...ID-for-Discord



IMPORTANT: Now for the code please remember this is all in kotlin and is made for rsmod but you can edit for java very easy and to any other base



2- next you need to add all these classes:



Spoiler for Bot.kt:
Code:

package gg.rsmod.plugins.service.discord



import gg.rsmod.game.Server

import gg.rsmod.game.model.World

import gg.rsmod.game.service.Service

import gg.rsmod.plugins.service.discord.commands.Registry

import gg.rsmod.plugins.service.discord.managers.ListenerHandler

import gg.rsmod.util.ServerProperties

import net.dv8tion.jda.core.AccountType

import net.dv8tion.jda.core.JDABuilder

import net.dv8tion.jda.core.OnlineStatus

import net.dv8tion.jda.core.entities.Game

import kotlin.system.exitProcess

import javax.security.auth.login.LoginException



class Bot : Service {





    var builder: JDABuilder = JDABuilder(AccountType.BOT)





        /*

        * Starts the Discord bot

        */



    override fun init(server: Server, world: World, serviceProperties: ServerProperties) {

        Registry().loadCommands()

        try {



            builder.setStatus(OnlineStatus.ONLINE)

            builder.addEventListener(ListenerHandler())

            builder.setGame(Game.of(Game.GameType.DEFAULT, "SERVER NAME | ::help"))

            builder.setToken("")

            builder.buildBlocking()



        } catch (ex: LoginException) {

            exitProcess(ExitStatus.INVALID_TOKEN.code)

        }



    }



    override fun postLoad(server: Server, world: World) {

    }



    override fun bindNet(server: Server, world: World) {

    }



    override fun terminate(server: Server, world: World) {

    }







}





Spoiler for ExitStatus.kt:
Code:

package gg.rsmod.plugins.service.discord



enum class ExitStatus(val code: Int) {

    // Non error

    UPDATE(10),

    SHUTDOWN(11),

    RESTART(12),

    NEW_CONFIG(13),



    // Error

    INVALID_TOKEN(20),

    CONFIG_MISSING(21),

    INSUFFICIENT_ARGS(22),



    // SQL

    SQL_ACCESS_DENIED(30),

    SQL_INVALID_PASSWORD(31),

    SQL_UNKNOWN_HOST(32),

    SQL_UNKNOWN_DATABASE(33)

}





Spoiler for discord.plugin.kts:
Code:

package gg.rsmod.plugins.service.discord



load_service(Bot())





3 - make a new package called managers and add in the following:



Spoiler for ConfigManager.kt:
Code:

package gg.rsmod.plugins.service.discord.managers



import net.dv8tion.jda.core.events.message.MessageReceivedEvent



object ConfigManager {



    const val prefix = "::"



    const val icon = ""



    const val name = "SERVER NAME"



    var event : MessageReceivedEvent? = null



}





Spoiler for ListenerHandler.kt:
Code:

package gg.rsmod.plugins.service.discord.managers



import gg.rsmod.game.Server

import gg.rsmod.plugins.service.discord.commands.Registry

import gg.rsmod.plugins.service.discord.managers.ConfigManager.prefix

import gg.rsmod.plugins.service.discord.utils.ChatUtil

import net.dv8tion.jda.client.events.group.GroupUserJoinEvent

import net.dv8tion.jda.core.entities.ChannelType

import net.dv8tion.jda.core.events.ReadyEvent

import net.dv8tion.jda.core.events.guild.GuildJoinEvent

import net.dv8tion.jda.core.events.guild.member.GuildMemberJoinEvent

import net.dv8tion.jda.core.events.message.MessageReceivedEvent

import net.dv8tion.jda.core.hooks.ListenerAdapter

import net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent







class ListenerHandler : ListenerAdapter() {







    override fun onReady(e: ReadyEvent) {

        Server.logger.info { "This bot is running on following servers" + e.jda.guilds }

    }







    override fun onGuildMemberJoin(event: GuildMemberJoinEvent) {

        event.user.openPrivateChannel().queue { channel ->

            channel.sendMessage("Hey ${event.user.asMention}, Welcome to **SERVERNAME** !").queue()

        }

    }



    override fun onMessageReceived(e: MessageReceivedEvent) {



        val content = e.message.contentRaw

        val selfId = e.jda.selfUser.id



        var prefix = prefix

        if (prefix == "%mention%") {

            prefix = e.jda.selfUser.asMention

        }



        if (content.matches("^<@!?$selfId>$".toRegex())) {

            ChatUtil(e).reply("My prefix for this guild is: **$prefix**")

            return

        }



        val isMentionPrefix = content.matches("^<@!?$selfId>\\s.*".toRegex())

        if (!isMentionPrefix && !content.startsWith(prefix, true))

            return



        prefix = if (isMentionPrefix) content.substring(0, content.indexOf('>') + 1) else prefix

        val index = if (isMentionPrefix) prefix.length + 1 else prefix.length



        val allArgs = content.substring(index).split("\\s+".toRegex())

        val command = Registry.getCommandByName(allArgs[0])

        val args = allArgs.drop(1)



        if (e.isFromType(ChannelType.PRIVATE) && command?.allowPrivate?.not() ?: return)

            return



        command?.execute(args, e)



    }



    override fun onGuildMessageReceived(event: GuildMessageReceivedEvent) {

        if (!event.author.isBot) {

            val message = event.message.contentRaw

            if (message.startsWith(prefix)) {

                event.channel.deleteMessageById(event.messageId).queue()

            }

        }

    }





}





4 - make a new package called utils and add in the following:



Spoiler for ChatUtil.kt:
Code:

package gg.rsmod.plugins.service.discord.utils



import net.dv8tion.jda.core.MessageBuilder

import net.dv8tion.jda.core.entities.ChannelType

import net.dv8tion.jda.core.entities.Message

import net.dv8tion.jda.core.entities.MessageEmbed

import net.dv8tion.jda.core.events.message.MessageReceivedEvent

import java.util.function.Consumer



class ChatUtil(val e: MessageReceivedEvent) {



    fun reply(msg: Message, success: Consumer<Message>? = null) {

        if (!e.isFromType(ChannelType.TEXT) || e.textChannel.canTalk()) {

            e.channel.sendMessage(stripEveryoneHere(msg)).queue(success)

        }

    }



    fun reply(embed: MessageEmbed, success: Consumer? = null) {

        reply(build(embed), success)

    }



    fun reply(text: String, success: Consumer<Message>? = null) {

        reply(build(text), success)

    }



    companion object {

        fun edit(msg: Message, newContent: String) {

            if (!msg.isFromType(ChannelType.TEXT) || msg.textChannel.canTalk()) {

                msg.editMessage(newContent).queue()

            }

        }



        fun build(o: Any): Message  = MessageBuilder().append(o).build()



        fun stripEveryoneHere(text: String): String  = text.replace("@here", "@\u180Ehere") .replace("@everyone", "@\u180Eeveryone")



        fun stripEveryoneHere(msg: Message): Message  = build(stripEveryoneHere(msg.contentRaw))



        fun stripFormatting(text: String): String  = text.replace("@", "\\@")

                .replace("~~", "\\~\\~")

                .replace("*", "\\*")

                .replace("`", "\\`")

                .replace("_", "\\_")

    }

}





Spoiler for ChannelData.kt:
Code:

package gg.rsmod.plugins.service.discord.utils





enum class ChannelData(val id : String) {

    LOGS("logs");





}





5 - make a new package called commands and add in the following:





Spoiler for Command.kt:
Code:

package gg.rsmod.plugins.service.discord.commands



import gg.rsmod.plugins.service.discord.utils.ChatUtil

import net.dv8tion.jda.core.MessageBuilder

import net.dv8tion.jda.core.Permission

import net.dv8tion.jda.core.entities.Message

import net.dv8tion.jda.core.entities.MessageEmbed

import net.dv8tion.jda.core.events.message.MessageReceivedEvent

import java.util.*

import java.util.function.Consumer



abstract class Command(val name: String,

                      val description: String,

                      val alias: Array = arrayOf(name),

                      val allowPrivate: Boolean = true,

                      val authorExclusive: Boolean = false,

                      val requiredPermissions: Array = arrayOf(),

                      val userRequiresPermissions: Boolean = true,

                      val botRequiresPermissions: Boolean = true)

    : EventListener {



    init {

        register()

    }



    abstract fun execute(args: List, e: MessageReceivedEvent)



    private fun register() = Registry.registerCommand(this)



    fun String.toMessage(): Message = MessageBuilder().append(this).build()



    fun MessageReceivedEvent.reply(msg: Message, success: Consumer<Message>? = null)

            = ChatUtil(this).reply(msg, success)



    fun MessageReceivedEvent.reply(embed: MessageEmbed, success: Consumer<Message>? = null)

            = ChatUtil(this).reply(embed, success)



    fun MessageReceivedEvent.reply(text: String, success: Consumer<Message>? = null)

            = ChatUtil(this).reply(text, success)

}







Spoiler for Registry.kt:
Code:

package gg.rsmod.plugins.service.discord.commands



import org.reflections.Reflections



class Registry {



    fun loadCommands() {

        Reflections("gg.rsmod.plugins.service.discord.commands.impl").getSubTypesOf(Command::class.java).forEach { it.newInstance() }

    }



    companion object {

        val commands = mutableSetOf<Command>()



        fun registerCommand(cmd: Command): Boolean = commands.add(cmd)



        fun getCommandByName(name: String): Command? = commands.find { name in it.alias }

    }

}





5 - Inside commands make a package called impl and add the following sample classes:





Spoiler for Players.kt:
Code:

package gg.rsmod.plugins.service.discord.commands.impl



import gg.rsmod.plugins.service.discord.commands.Command

import gg.rsmod.plugins.service.discord.managers.ConfigManager

import gg.rsmod.plugins.service.discord.managers.ConfigManager.icon

import gg.rsmod.plugins.service.discord.utils.ChatUtil

import net.dv8tion.jda.core.EmbedBuilder

import net.dv8tion.jda.core.events.message.MessageReceivedEvent

import net.runelite.http.api.worlds.World

import java.awt.Color

import java.util.function.Consumer

import java.text.SimpleDateFormat

import java.time.OffsetDateTime

import java.util.*





class Players : Command(name = "players", description = "Returns Players Online") {



    override fun execute(args: List, e: MessageReceivedEvent) {





        val eb = EmbedBuilder()



        eb.setDescription("```World 1: 1 Player online```")

        eb.setColor(Color.ORANGE)

        eb.setTimestamp(OffsetDateTime.parse("2019-08-01T20:01:22.077Z"))

        eb.setFooter("f", ConfigManager.icon)

        eb.setAuthor(e.author.name, e.author.avatarUrl, e.author.avatarUrl)

        .build()

        e.channel.sendMessage(eb.build()).queue()

    }

}





Spoiler for PingCmd.kt:
Code:

package gg.rsmod.plugins.service.discord.commands.impl



import gg.rsmod.plugins.service.discord.commands.Command

import gg.rsmod.plugins.service.discord.utils.ChatUtil

import net.dv8tion.jda.core.events.message.MessageReceivedEvent

import java.util.function.Consumer





class PingCmd : Command(name = "ping", description = "Ping to Discord's servers") {



    override fun execute(args: List, e: MessageReceivedEvent) {

        var time = System.currentTimeMillis()

        e.reply("Pinging...", Consumer {

            time = (System.currentTimeMillis() - time) / 2

            ChatUtil.edit(it, "**Ping:** ${time}ms")

        })

    }

}





Spoiler for HelpCmd.kt:
Code:

package gg.rsmod.plugins.service.discord.commands.impl



import gg.rsmod.plugins.service.discord.commands.Command

import gg.rsmod.plugins.service.discord.commands.Registry

import gg.rsmod.plugins.service.discord.managers.ConfigManager

import gg.rsmod.plugins.service.discord.utils.ChatUtil

import net.dv8tion.jda.core.EmbedBuilder

import net.dv8tion.jda.core.events.message.MessageReceivedEvent

import java.awt.Color

import java.time.OffsetDateTime

import java.util.function.Consumer





class HelpCmd : Command(name = "help", description = "List of Commands") {



    override fun execute(args: List, e: MessageReceivedEvent) {





        val commandsText = StringBuilder("")



        for (command in Registry.commands) {

            commandsText.append(command.name + " - ${command.description}\n")



        }



        val eb = EmbedBuilder()





        eb.setDescription(commandsText)

        eb.setColor(Color.ORANGE)

        eb.setTimestamp(OffsetDateTime.parse("2019-08-01T20:01:22.077Z"))

        eb.setFooter("Prifddinas", ConfigManager.icon)

        eb.setAuthor(e.author.name, e.author.avatarUrl, e.author.avatarUrl)

                .build()



        e.channel.sendMessage(eb.build()).queue()



    }

}





Remember this is just a base with a few commands here are some things to Improve:

  • I know people will say about me using reflection i just like it so you can reload commands and such without having to add a new call into anything ... Can change if you don't like
  • Expand on the utils class
  • Current files are not well documented since i was not going to release this and it was only me working on it ... if needs be i can do it and release the code again
  • A LOT MORE COMMANDS here is some commands you can add

    - ::lookup (Shows a player high-scores card)

    - ::link (Link your player account to discord bot)

    - ::patches (Tells you how long your patches have left)

    - ::ge (Tells you status of offers)
  • Announcement System

    - Dms you when someone logs into your account

    - Dms you when your patch is done

    - Dms you when a ge offer is done

    - Drops

    - Events

    - Updates

    - Server is online / offline

    - New player counts

    - Hardcore ironman dies




If i get enough requests i will convert to java but its easy enough :)



Thanks.

item name edit via cache

$
0
0
hello i was curious how do i edit an item via cache to change the name? so say mysterybox to vote box? before i would add it to the itemdef in the client but this one i can't. im currently messing around with Mige's Orion's original 06 server.

[Elvarg/OSRSPK] Adding new items (model packing etc)

$
0
0
Does anyone know a good guide for adding items? I specifically need to know how to unpack my current models, add the new ones and repack? I'm using the Elvarg/OSRS PK base

Thanks!

[OSRSPK/Elvarg] Adding new items

$
0
0
I got some .dat model files for osrs theatre of blood items, I dumped my .gz model files out and then added my new .gz files then repacked them. Once I repacked them and ran my client and logged in, I got an index out of range exception, obviously regarding the models but I couldn't identify why...

If someone could either help me identify why or give me a comprehensive guide on how to do this with the Elvarg client that would be amazing!

Thanks

[317] Deaths Server [New Development] ECO/PVP / Open BETA / Boss Point Shop / 24-7 Uptime ✦

$
0
0
Deaths Server Open BETA

Our Discord: https://discord.gg/vMZkgTG

Website coming soon.

Server link: LINK


May not look like much, i am going to add new content within time.

↪ Server Features ↩


We are working on adding new bosses here is what we have so far.

Media:
Spoiler for Bosses:











Spoiler for Minigames:



Spoiler for VOTE SHOP "WILL BE IMPROVED":




Spoiler for familiars:




Spoiler for for the memes:



We will be continuing development as time passes, it may look basic atm but don't worry.


disclosure, this is something me and my mates wanted to play around with, one of us wanted to post it for public eyes so i post here.

[RS3] Woodcutting class question

$
0
0
So the enum for treeDefinitions was giving me the exact layout I needed but for some reason it's not working.

BRANCHING_CRYSTAL(80, 240, 35442, 1, 1, 98535, 8, 0),

If you look here I added the tree, but not understand why it's not recognizing it in game. I've searched through almost every class trying to figure out what is probably an easy solution.
In rs3 there is a quest, "The light within" where you collect these fragments. I've already made the Angof Armour shop, but now I need a way to add the trees. I don't know maybe I am not understand something. I hope someone can help.

Cape Help

$
0
0
Hey everyone! I added some custom cape to my server that I made.

I am not sure if this is a server side, client side, or modeling issue so forgive me if this is in the wrong spot.

Anyways
One side of my cape exposes the player, the other side does not. Any ideas what I can do to fix this?



Anyone who can help, I will rep and also would be more than happy to make models for. I'm good with everything else but capes for some reason gives me problems.

Username Request

$
0
0
Is it possible to change my username to Triumph account was last online 10-12-2013

Thanks,

🌟KronosRSPS 317/PI Services 🌟 | ⚡Quick Response ⚡| ✅Organized Code ✅ |

$
0
0
Open for RSPS Development Services
SERVICE STATUS: OPEN
Hi, I recently graduated from university with a BSc (Hons) in computing. I was always fasinated by Java since young whilst play Runescape thats what encouraged me to start my degree and my profession. I am now available for services FULL-time and Part-Time. As i am new to Rune-server i will be doing the service first for TRUSTED members of this community, if you are not i apologise for the inconvenience. Before any transaction is mmade you MUST message me on Rune-server and wait for my confirmation.


Services I offer are shown below. if the service isnt shown below please contact me on Discord OR Pm ill always be Available.

  • Server Set-up
  • Web & Server sided highscores/Vote/Store
  • Debugging & Dupe Fixing
  • Forum software set-up
  • Server-Sided content, Minigame/Bosses
  • Ripping & Converting content
  • New data (up to #181)
  • 32k Clicking object Support
  • Gradle or Maven integration
  • Boss Scripts



Ready2Go Scripts:


  • Vorkath
  • Hydra/Alch/Wyrms/Drakes
  • Rune & Addy Dragons
  • Lottery Systems
  • Zulrah
  • Kraken




Why Me?

I am reliable, quick and I offer support for every single one of my services if applicable.
Honesty is a guarantee, if I can't do it or if I am very occupied you will know before we even discuss prices etc.

Pricing:

My prices are different for each project, I base my prices on complexity and on the amount of time it will consume.

Terms & Conditions

* If, for whatever reason, I am not able to carry out paid work. Any outstanding amount paid which hasn't been used, I am obligated to work for you until that amount is resolved

* Any content I create, which has been paid for, and in future, bugs appear, these bugs are free to fix and will never be charged for.

* Please understand that an estimation is only an estimation, sometimes, it may take longer than expected. (Due to in real life situations, changes in availability, unsuspected occurrences, unexpected bugs and required time for debug)

* (Services only) I will not redistribute any source code from your source, or any code written by me for you which has been paid for. Unpaid work means it's in my ownership and I'm free to do as I wish. Vice versa, you aren't to release, redistribute, or sell any of my code individually.



Discord: Kronos#2498
DONT TRUST ANYONE WITH A DIFFERENT DISCORD NAME
VERIFY Rune-Server account if you don't trust it

RSPS bases

$
0
0
I checked my old email account and I saw some emails from Rune-Server so out of curiosity I decided to come back on here and browse the forum. It doesn't seem like much has changed since I was last active on here about 4 years ago; same theme but it seems like everyone uses Discord now rather than the shoutbox.

What do most people use these days as a base for their private servers? Is PI still the trend or is there something new that's come around? I'd be pretty disappointed if it's the case most people are still using PI. I mean I remember when Sanity released it in April 2010, I was 12 years old. :) I'm 22 now It's amazing how fast time flies, it only feels like it was a few months ago.

Hello

$
0
0
I used to be active in the RSPS community along time ago.

It's nice to see this community again :)

Buying custom map. High quality

$
0
0
Hi Buying Custom maps best of the best please message me on Discord Kronos#2498. I want something creative simple. Doesn’t block off the wildy (want something that’s going to encourage players to Pk. Also I want attention To detail such a stone detailed pathing instead of the plan grey shit pathing, something orangised where I can put my NPcs and a lil market place / main area / skilling area

[OSRSPK/Elvarg] Adding items (specifically TOB)

$
0
0
Hi,

Looking to pay someone to show me how to correctly add new items to the Elvarg client, including packing models correctly (I've ran into errors after successfully packing the new models), adding correct animations and GFX.
I'm happy to have someone do it for me but I'd also like to know the correct methods for future reference.

My best logo - I am very proud of this.

$
0
0


I think this might just be my best logo, i am very proud of it.

Archive: Combat Formulas

$
0
0
Not mine

Quote:


Welcome,

this comprehensive thread discusses the mechanics of the Old School Runescape combat system.

The posts below contain an elaborate explanation of how combat skills work in Runescape and how the game uses skill stats with equipment and various bonuses to calculate damage output. I recommend the use of a spreadsheet or some sort of advanced calculator to complete the steps. I've made a google spreadsheet myself, the link is publicly available and can be found on my twitter (see signature below).


Credits:

The maximum hit formula below is largely based on the original maximum hit formula thread by Obliv from back in 2007. I've taken the liberty of updating it for Old School Runescape.

Also thanks to the following players for their contributions, corrections and suggestions to this thread:

Woox
Downlifter
ChocolatOgre
Henke18
Meric


Feel free to leave a comment or question, as I'm always looking for feedback and improvements.

Quote:

| 2. | Table of contents

Post 01. 1. Introduction
Post 02. 2. Table of contents
Post 03. 3. Max hit formula
Post 04.
Post 05.
Post 06. 4. Magic max hit formula
Post 07. 5. Accuracy formula
Post 08.
Post 09.
Post 10. 6. Extra information
Post 11.





Key of colours:
Using yellow for chapters: Melee and ranged maximum hit
Using orange for sections: | 3.4 | Special attacks
Using blue for subsections: 3.4B.
Using green for steps: b.

Other info:
~ indicates an approximation.
? indicates an unknown or uncertain bonus.
• indicates a choice in a list where you can only pick one option.

Visible level means the level with any (potion) boost included.

You can check the defence stats of a monster by using the monster examine spell on it.
For NPC rolls, always use the default stance bonus of +9.

Quote:

| 3. | Melee and ranged maximum hit


This formula calculates the maximum melee or ranged hit for a single hitsplat.


| 3.1 | Maximum base hit

a. Max hit = 0.5 + A * (B+64) /640
b. Round down the max hit to the nearest integer. Go to section 3.4 for any special attacks.


To find variables A and B, please look below in section 3.2 and 3.3.


| 3.2 | Effective level (A)

a. Take the visible strength or ranged level from the skills interface.
b. Multiply the level by the prayer adjustment:




c. Round down to the nearest integer.
d. Add the stance bonus from the combat options interface.

Melee:
• Aggressive: +3
• Controlled: +1

Ranged:
* Accurate: +3

e. Add up +8.
f. Multiply by the void bonus:
• Void melee: multiply by 1.10. Round down.
• Void ranged: multiply by 1.10. Round down.
• Elite void ranged: multiply by 1.125. Round down.

g. This is the effective (ranged) strength level. Let this equal 'A' in the formula in 3.1.


| 3.3 | Equipment bonus (B)

Take the melee or ranged strength bonus from the equipment stats interface and let this equal 'B' in the formula in 3.1.

Quote:


| 3.4 | Special attacks


| 3.4a | Make sure you have rounded down your max hit from 3.1.

a. Multiply by the bonus of one of the following items:

Melee:
• Black mask: 7/6
• Salve amulet: 7/6
• Salve amulet (e): 1.20

Ranged:
• Black mask (i): 1.15
• Salve amulet (i): 1.15
• Salve amulet (ei): 1.20

(Note: the black mask bonus is ignored when using a salve amulet)

b. Round down to the nearest integer.
c. Multiply by the bonus of one of the following items:

Melee:
• Abyssal dagger: 0.85
• Abyssal bludgeon: between 1 and 1.495 (0.5% for every lost prayer point)
• Arclight: 1.70 (vs. demons)
* Armadyl godsword: 1.10
• Bandos godsword: 1.10
• Barrelchest anchor: 1.10
• Dragon claws: subtract 1 and see 6.4.
• Dragon dagger: 1.15
• Dragon/crystal halberd: 1.10
• Dragon longsword: 1.25
• Dragon mace: 1.50
• Dragon sword: 1.25
• Dragon warhammer: 1.50
• Leaf-bladed battleaxe: 1.175 (vs. kurask, turoth)
• Obsidian armour: 1.10
• Rune claws: 1.15
• Saradomin godsword: 1.10
• Saradomin sword: 1.10
• Saradomin's blessed sword: 1.25
• Zamorak godsword: 1.10

Ranged:
• Ballista: 1.25
• Dark bow (dragon arrows): 1.50
• Dark bow (other arrows): 1.30
• Diamond bolts: 1.15
• Dragon hunter crossbow: 1.10 (vs. dragons, wyverns, Great Olm)
• Magic longbow, shortbow, composite or seercull: on page 2, see: 6.3.
• Onyx bolts: 1.20
• Rune thrownaxe: on page 2, see: 6.3.
• Toxic blowpipe: 1.50
• Twisted bow: (250 + truncate[(3*magic-14) /100] - truncate[(0.3magic-140)² / 100]) /100


d. Round down to the nearest integer.
e. If a PvP protection prayer is used, it reduces the max hit by 40% at this point. Multiply by 0.6 and round down to the nearest integer. Go to 3.4b.

Quote:


| 3.4b | Make sure you have rounded down your max hit from 3.1 or 3.4a.

a. Apply the bonus of one of the following items:

Melee:
* Armadyl godsword: 1.25
• Bandos godsword: 1.10
• Berserker necklace: 1.20
• Darklight: 1.60 (vs. demons)
• Dharok's set: multiply by: 1+ lost hp/100 * max hp/100
• Gadderhammer: 1.25 or 2.00 (vs. shades), see: 6.2.
* Keris: 4/3 or 3.00 (vs. kalphites and scarabs), see: 6.2.
* Verac's set: add up +1.

Ranged:
• Dragonstone bolts: multiply the visible ranged level by 1/5. Round down and add this up to the max hit. (ex: add up +22 with 112 ranged)
• Opal bolts: multiply the visible ranged level by 1/10. Round down and add this up to the max hit.
• Pearl bolts: multiply the visible ranged level by 1/15 (or 1/20). Round down and add this up to the max hit.

b. Round down to the nearest integer.
c. In Castle Wars, multiply by:
• Castlewar brace: 1.20 (vs. flagholder)

d. Round down to the nearest integer.
e. If the special attack of the Staff of the Dead is used, all melee damage will be reduced by 50% at this point. Multiply by 0.5 and round down to the nearest integer. This is your maximum hit.

Quote:


| 4. | Magic maximum hit


This formula calculates the maximum magic hit for a single hitsplat.


a. Find the base maximum damage a spell can deal.

Spells with fixed max hit:



The maximum hit of these spells depends on your visible magic level:



b. Increase the base damage:
• God spells (level 60) in combination with Charge (level 80): the base max hit is 30.
* Bolt spells in combination with Chaos gauntlets: add up +3.

c. The following bonuses stack by adding up.
Multiply by: (1+...)
• Ancestral equipment: +0.02 per piece
• God cape (imbued): +0.02
• Kodai wand: +0.15
• Occult necklace: +0.10
• Salve amulet (i): 0.15
• Salve amulet (ei): 0.20
• Smoke staff: +0.10 (normal spellbook only)
• Staff of the dead: +0.15
• Tormented bracelet: +0.05
• Elite void magic: +0.025
(ex: Occult + SotD + Torm. bracelet: multiply by 1.30.)

d. Round down to the nearest integer.
e. On a slayer task, multiply by:
• Black mask (i): 1.15

f. Round down to the nearest integer.
g. If a fire spell is used, multiply by:
• Tome of fire: 1.5

h. Round down to the nearest integer.
i. In Castle Wars, multiply by:
• Castlewar brace: 1.20 (vs. flagholder)

j. Round down to the nearest integer. This is your maximum hit.

Quote:


| 5. | Accuracy formula


| 5.1 | Attack and defence roll

The maximum roll is calculated as follows:

a. Max roll = A * (B+64)
b. If you're using special attacks: go to 5.4. To calculate the chance to hit: go to 5.6

To find the variables A and B, please look below in section 5.2 and 5.3.


| 5.2 | Effective level (A)

a. Take the visible attack, ranged, magic or defence level from the skills interface.
b. Multiply the level by the prayer adjustment:




c. Round down to the nearest integer.
d. Add the stance bonus from the combat options interface.

Melee attack:
• Accurate: +3
• Controlled: +1

Ranged attack:
• Accurate: +3

Magic attack:
• Accurate +3 (trident only)
• Long range +1 (trident only)

Defence:
• Defensive: +3
• Controlled: +1
• Long range: +3

e. Add up +8.
f. Multiply by the void bonus:
• Void melee: multiply melee attack by 1.10.
• Void ranged: multiply ranged attack by 1.10.
• Void magic: multiply magic attack by 1.45.

g. Round down to the nearest integer. This is the effective level. Let this equal 'A' in 5.1


| 5.3 | Equipment bonus (B)

Take the corresponding stab, slash, crush, ranged or magic attack bonus from the equipment stats interface and let this equal 'B' in 5.1

Quote:


| 5.4 | Special attacks

a. Multiply by the bonus of one of the following items:

Melee:
• Black mask: 7/6
• Salve amulet: 7/6
• Salve amulet (e): 1.20

Ranged or magic:
• Black mask (i): 1.15
• Salve amulet (i): 1.15
• Salve amulet (ei): 1.20

(Note: the black mask bonus is ignored when using a salve amulet)

b. Round down to the nearest integer.
c. Multiply by the bonus of one of the following items:

Melee:
• Arclight: 1.70 (vs. demons)
• Abyssal dagger: 1.25
• Abyssal whip: 1.25
• Barrelschest anchor: 2.00
• Dinh's Bulwark: 1.20
• Dragon dagger: 1.15
• Dragon mace: 1.25
• Dragon scimitar: 1.25
• Dragon sword: 1.25
• Godsword, any: 2.00
* Rune claws: 1.15
• Saradomin sword: 2.00
• Saradomin's blessed sword: 2.00

Ranged:
• Armadyl crossbow: 2.00
• Ballista: 1.25
• Dragon hunter crossbow: 1.10 (vs. dragons, wyverns, Great Olm)
• Dragon thrownaxe: 1.25
• Twisted bow: (140 + truncate[(3*magic-10) /100] - truncate[(0.3magic-100)² / 100]) /100

Magic attack:
• Smoke staff: 1.10 (normal spellbook only)

Defence:
• Torag's set (with Amulet of the Damned): 1+ lost hp/100 * max hp/100

d. Round down to the nearest integer. This is the max roll after special attacks. Go to 5.6

Quote:


| 5.5 | Magic defence roll

(This only applies to players; NPC magic defence is 100% based on the magic level and bonus)

a. Calculate your effective defence level as described in 5.2, steps a-g.
b. Multiply your effective defence level by 0.30 and round down to the nearest integer.
c. Take your visible magic level from the skills interface.
d. Multiply the magic level by the prayer adjustment.

Magic defence:
• Mystic will: 1.05
• Mystic lore: 1.10
• Mystic might: 1.15
• Augury: 1.25

e. Round down to the nearest integer.
f. Multiply this by 0.70 and round down to the nearest integer.
g. Add up the defence value from step b and let this equal 'A' in the formula in 5.1.
h. Take your magic defence bonus from the equipment stats interface and let this equal 'B' in 5.1


| 5.6 | Hit chance

With the max attack roll and the max defence roll, you can calculate the chance to hit with the next formula:

• If the max attack roll is higher:
Accuracy = 1 - (def+2) / (2*(atk+1))

• Or else:
Accuracy = atk / (2*(def+1))

Note: 'atk ' and 'def ' refer to the max roll value as calculated in 5.1, 5.4 or 5.5).

Quote:


| 6. | Extra info


| 6.1 | Combat experience

Some monsters in Runescape give increased experience (more than 4 exp/damage) in the combat related skills. The normal amount of experience is multiplied by a percentage and the percentage is based on the stats of the NPC, as described below. If a monster has a multiplier, you'll be able to receive bonus exp in the following skills: attack, strength, defence, ranged, magic, hitpoints and slayer.

Multiplier = 1 + floor(average level * (average def bonus + str bonus + atk bonus) /5120) /40

Where:
average level = floor((Attack + Strength + Defence + Hitpoints) /4)
average def bonus = floor((stab def + slash def + crush def) /3)


| 6.2 | Probabilities of special effects

• Bone dagger special: guaranteed hit if you weren't the last to attack the target.
• Diamond bolt (e): guaranteed hit if the special triggers, see below.
• Dorgeshuun crossbow special: guaranteed hit if you weren't the last to attack the target.
• Gadderhammer: 1/20 chance to deal double damage, 19/20 chance to hit 25% higher.
• Keris: 1/51 chance to deal triple damage, 50/51 chance to hit 33.3% higher.
• Magic longbow, comp bow, seercull special: guaranteed hit.
• Poisoning your target: 1/4 for melee, 1/8 for ranged. Damage must be 1 or higher.
• Ruby bolt (e): fixed damage (20% of HP) if the special triggers, see below.
• Verac's set: 1/4 chance on a guaranteed hit with +1 additional damage.
• Bolt activation probability (image by Mod Ash):




Selling front end Web pages

$
0
0
Hi guys!!

I am selling front end Web pages if your after one!
Discord
Ari-ltd#9192

Mystic-PS

Mystery box help

$
0
0
So i have a elvarg base source and client and i am in need of help. i have my itemaction coded the issue is when i try to open the mystery box i logout.

[667] Buying a 667 Custom/pk source

$
0
0
Hey im looking to buy a 667 custom/pk source
Discord iger#6121

[317] Needing a simple titlebox and 2 buttons

$
0
0
If you can help please let me know.
Viewing all 56156 articles
Browse latest View live