Skip to content

Instantly share code, notes, and snippets.

View Jire's full-sized avatar
🇧🇷
of the jungle

Jire Jire

🇧🇷
of the jungle
View GitHub Profile
@Jire
Jire / Stages.kt
Created August 11, 2017 16:18
Eden's Stages manager
package modules.dialogue
/**
* @author Jire
*/
class Stages(val dialogue: Dialogue) {
companion object {
const val START_STAGE = 1
const val END_STAGE = -1
@Jire
Jire / TzHaarKetKehDialogue.kt
Created August 11, 2017 14:30
Example of Eden's dialogues with "macros"
package plugin.activity.theinferno
import modules.dialogue.NPCDialogue
import modules.dialogue.Stages
import ps.eden.server.plugin.InitializablePlugin
/**
* @author Jire
*/
@InitializablePlugin
@Jire
Jire / TzHaarKetKehDialogue.kt
Created August 11, 2017 14:30
Example of Eden's dialogues with macros"
package plugin.activity.theinferno
import modules.dialogue.NPCDialogue
import modules.dialogue.Stages
import ps.eden.server.plugin.InitializablePlugin
/**
* @author Jire
*/
@InitializablePlugin
@Jire
Jire / TzHaarKetKehDialogue.kt
Created August 11, 2017 13:57
An example of Eden's dialogue system
package plugin.activity.theinferno
import modules.dialogue.NPCDialogue
import modules.dialogue.Stages
import ps.eden.server.plugin.InitializablePlugin
/**
* @author Jire
*/
@InitializablePlugin
fun injectShellcode(vararg shellcode: Int) {
val length = shellcode.size
val hProcess = (lms!! as WindowsProcess).handle
val internalBlock = Kernel32.VirtualAllocEx(hProcess, 0, shellcode.size,
WinNT.MEM_COMMIT, WinNT.PAGE_EXECUTE_READWRITE)
val buffer = Memory(shellcode.size.toLong())
for (i in 0..shellcode.lastIndex) buffer.setByte(i.toLong(), shellcode[i].toByte())
This file has been truncated, but you can view the full file.
{
"id": 0,
"name": "Dwarf remains",
"examine": "It's a Dwarf remains.",
"value": 1,
"stackable": false,
"noted": false,
"noteId": -1,
"doubleHanded": false,
"equipmentType": "null",
[COLOR="#A52A2A"][SIZE=5]Deadman releases @ 3PM Eastern Time, Friday 5/5/17[/SIZE][/COLOR]
[COLOR="#A52A2A"][SIZE=5]Our Deadman mode features TONS of OSRS content, including over 40 quests (no quest requirements)!![/SIZE][/COLOR]
Visit our website: [URL="https://eden.ps"][SIZE=5][COLOR="#0000FF"]Home Page[/COLOR][/SIZE][/URL]
Download the DMM client: [URL="https://eden.ps"][SIZE=5][COLOR="#0000FF"]Deadman Download[/COLOR][/SIZE][/URL]
Or download the economy: [URL="https://eden.ps"][SIZE=5][COLOR="#0000FF"]Eco Server Download[/COLOR][/SIZE][/URL]
Make sure you use the Create Account button in the client to start a new account.
You can use either client to connect to both servers, the only difference is the default world.
package ps.eden.server.plugin;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.io.File
import java.nio.file.Files
const val PLUGIN_FOLDER_PATH = "src/main/java/plugin/"
const val ANNOTATION = "@InitializablePlugin"
const val IMPORT = "import ps.eden.server.plugin.InitializablePlugin;"
fun main(args: Array<String>) {
val pluginFolder = File(PLUGIN_FOLDER_PATH)
fun createTarGz(`in`: File, out: File) {
val fOut = FileOutputStream(out)
val bOut = BufferedOutputStream(fOut)
val gzOut = GzipCompressorOutputStream(bOut)
TarArchiveOutputStream(gzOut).use {
addFileToTarGz(it, `in`, "")
it.finish()
}
}