Skip to content

Instantly share code, notes, and snippets.

package OpenKore::Plugin::ProtectPriest;
use strict;
use Plugins;
use Globals;
use Utils;
use Misc;
use Log qw(message warning error);
use AI;
@allanon
allanon / config.txt
Last active July 4, 2025 22:36
autoRefine example
# Using an NPC to refine armor.
autoRefine Round Buckler [1], Stone Buckler [1], Ribbon [1], Cap [1], Silk Robe [1] {
label refine_safe_a
disabled 1
refineStone Elunium
npc 63 60 prt_in
npcSequence r0 r0
zeny 2000
minRefine 0
maxRefine 4
## Ores #######################################################################
forge Iron {
skill Iron Tempering
useItem Mini Furnace
item_0 Iron Ore 1
}
forge Steel {
skill Steel Tempering
useItem Mini Furnace
@allanon
allanon / autotalk.spl
Created November 4, 2016 21:46
autotalk.spl: Automatically respond to automatic conversations (triggered by walking nearby) from certain NPCs.
# This is a Simple plugin: https://github.com/allanon/openkore-addons/blob/master/plugins/simple.pl
our $name = 'autotalk';
our $desc = 'Automatically respond to automatic conversations (triggered by walking nearby) from certain NPCs.';
=pod Example configuration:
# Turn on the plugin.
autotalk 1
# Automatically cancel Halloween quest NPC conversation.
#!/usr/bin/env perl
use strict;
use warnings;
use Disassemble::X86;
use Getopt::Long;
use Time::Piece;
my $opt = {
#!/usr/bin/env perl
###############################################################################
# Automatically create a pull request containing official server changes,
# extracted from the server's patch files.
#
# WARNING: This script will DELETE all local modifications to the git clone
# it uses. Please use a git directory which is only for this script
# to avoid loss of any changes you might have made.
use strict;
@allanon
allanon / eventMacros.txt
Last active June 20, 2018 13:37
quest_talk and friends
# Some usage examples:
# call quest_talk alberta_in '180 30' "r0 r~/Aldebaran/ r~/3 zeny/ r~/need a cart/ r~/Alberta/ r~/5 O'clock/ r~/Claymore/ r~/Mink Coat/ r~/4/ r~/ANOLIAN/ r~/Money/"
# call quest_talk alberta_in '28 29' 'r0 r3 d3543625 r0'
# call quest_talk_dist $map '$pos' 13 '$pos' "$talk"
# call quest_talk geffen_in '110 169' 'e'
# call quest_talk geffen_in '110 169' 'r0'
# call quest_talk morocc '95 133' "r0 r~/Ask him what he needs/ r~/Alberta/ r~/5 O'clock/ r~/Geffen/ r~/DEX/"
# call quest_talk new_1-4 '100 29' r1 r0 r1 r2 r1 r0 r1 r0 r1 r0 r1 r1 r0 r1 r1 r1 r0 r2 r1 r0 r1 r3 r0 r0'
# call quest_talk new_1-4 '100 29' 'r1 r3 r0 r0 r0 r1 r0 r0 r0 r0 r1 r0 r1 r0 r0 r2 r2 r1 r0 r2 r2 r1 r1 r0'
macro quest_juice {
if (@config(quest_juice) == complete) stop
# Get 1 Meat.
call quest_talk prontera '64 125' 'b b0,1 e'
# => 1x Meat
# Morrison
call quest_talk prt_in '47 173' 'r1 r1 e'
!include eventMacro_quests.txt
macro test_wi {
$i = 0
while ($i < 3) {
log $i
$j = 0
if ($j < 3) {
log $i.$j +
}
#!/usr/bin/env perl
###############################################################################
# Calculate "y = mx + b" form of line equation from two points on the line.
# Use rational numbers instead of decimals.
#
use strict;
use warnings;
usage() if @ARGV != 4;