This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Polar.MapleFunctions | |
{ | |
using System; | |
using System.Runtime.InteropServices; | |
using Polar.Util; | |
public class COutPacket | |
{ | |
public static readonly FunctionInfo[] FunctionInfo = new[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------------------------------------------- | |
// <copyright file="Hooks.cs" company="Home"> | |
// TODO: Update copyright text. | |
// </copyright> | |
// ----------------------------------------------------------------------- | |
namespace PacketLogger | |
{ | |
using System; | |
using System.Runtime.InteropServices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Syringe | |
open System.Diagnostics | |
printfn "Trying to inject dll into MapleStory.exe" | |
try | |
let syringe = new Injector(Process.GetProcessesByName("MapleStory").[0]) | |
syringe.InjectLibrary("PacketLogger.dll") | |
printfn "PacketLogger.dll injected into MapleStory, trying to call Start() with no parameters" | |
ignore (syringe.CallExport("PacketLogger.dll", "Start")) | |
with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------------------------------------------- | |
// <copyright file="COutPacket.cs" company="Home"> | |
// TODO: Update copyright text. | |
// </copyright> | |
// ----------------------------------------------------------------------- | |
namespace PacketSender | |
{ | |
using System; | |
using System.Runtime.InteropServices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ProblemA | |
new File('new.txt').withWriter { file -> | |
new File('orig.txt').withReader { reader -> | |
def lines = Integer.parseInt(reader.readLine()) | |
for (int i = 1; i <= lines; i++) | |
file.writeLine("Case #" + i + ": " + translate(reader.readLine())) | |
} | |
} | |
String translate(String str) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bankItemWidgets = Widgets.get(762).getChild(95).getChildren() | |
def getBankWidgetChild(id: Int): WidgetChild = { | |
bankItemWidgets.foreach(itemWidget => | |
if (itemWidget.getChildId == itemIdVial) { return itemWidget }) | |
null | |
} | |
val itemIdVial = 229 | |
lazy val itemBankWidgetVial: WidgetChild = getBankWidgetChild(itemIdVial) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Waits while a condition is true, with a specified timeout. | |
* | |
* @param condition the method to be evaluated in order to discover if the condition | |
* still holds true | |
* @param timeout the time in milliseconds until the wait times out | |
* @return whether the true if the condition was falisified within the time limit, | |
* otherwise returns false. | |
*/ | |
def waitWhile(condition: () => Boolean, timeout: Int): Boolean = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* )............( / | |
/ / ___/| \ / | |
/ | /o \/| | / | |
/ | \_____/\| | / | |
/ \ -xcvd- / / | |
/ ')__________(' */ | |
import java.awt._ | |
import java.net.URL | |
import javax.imageio.ImageIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* )............( / | |
/ / ___/| \ / | |
/ | /o \/| | / | |
/ | \_____/\| | / | |
/ \ -xcvd- / / | |
/ ')__________(' */ | |
import org.powerbot.concurrent.Task; | |
import org.powerbot.concurrent.strategy.Strategy; | |
import org.powerbot.game.api.ActiveScript; |
NewerOlder