Skip to content

Instantly share code, notes, and snippets.

macro weight {
$weight = @eval ( $::config{autoWeight} = $::config{autoWeight} ? 0 : 1 )
if ($weight == 1) goto weight
log No longer automatically going back to town when overweight
goto done
:weight
log Going back to town when overweight
goto done
:done
}
@allanon
allanon / test_ftp.pl
Last active August 29, 2015 14:27
test kaltura ftp uploads
use strict;
use warnings;
use Disney::Util;
# Force dev environment. We don't want to accidentally run tests on production!
$ENV{DOLX_ENVIRONMENT} = 'development';
my $opt = Disney::Util::get_dolx_options( {}, {} );
my $conf = Disney::Util::load_and_merge_conf( $opt );
fisce009@GL-FISCE009-ML1:~/git/video_platform/bin$ perl /tmp/ftp.pl
Net::FTP>>> Net::FTP(2.77)
Net::FTP>>> Exporter(5.68)
Net::FTP>>> Net::Cmd(2.29)
Net::FTP>>> IO::Socket::INET(1.33)
Net::FTP>>> IO::Socket(1.36)
Net::FTP>>> IO::Handle(1.34)
Net::FTP=GLOB(0x7f8232228d48)>>> USER drpftp4
Net::FTP=GLOB(0x7f8232228d48)<<< 331 Password required for drpftp4
Net::FTP=GLOB(0x7f8232228d48)>>> PASS ....
@allanon
allanon / monsterDB.txt
Created June 12, 2016 07:08
iRO Renewal-compatible table for monsterDB.pl
# id hp size race element range def mdef sec_per_tile
# Champion Monsters
# Solid: 10x HP
# Elusive: 5x HP
# Furious: 5x HP
# Swift: 8.15?x HP
2606 1170 1 1 29 1 20 3 0.4
2624 23850 1 0 25 1 104 65 0.35
2645 1825 0 4 24 1 22 25 0.2
@allanon
allanon / macro_inventory.txt
Created June 13, 2016 03:47
example of using @inventory to loop over inventory items
$items = @Inventory(Damascus [2]),-1
$item = [$items]
while ($item != -1) as loop
log Do something useful with item $item!
$item = [$items]
end loop
# max line width is 132 cols
-l=132
# indent level is 4 cols
-i=4
# entab at 4 cols
-et=4
# continuation indent is 4 cols
@allanon
allanon / archer_skills.txt
Created June 14, 2016 21:26
Ragnarok Online archer skills config.
###############################################################################
# MVP Mode
# Use Camouflage. (Not anymore. It got nerfed.)
# Keep Improve Concentration running.
# Kill everything with Arrow Storm.
attackSkillSlot Arrow Storm {
label mvpstorm
conf mvpMode 1
timeout 1
@allanon
allanon / thief_skills.txt
Created June 12, 2016 01:07
Ragnarok Online thief skills config
# Unequip Sky Deleter card when sitting.
doCommand uneq Pantie [Sky Deleter] [1] {
timeout 30
whenStatusActive Sitting
whenEquipped Pantie [Sky Deleter] [1]
hp < 90%
}
monsterEquip {
equip_armor Pantie [Sky Deleter] [1]
}
@allanon
allanon / macro_ib_delay.txt
Created June 1, 2016 23:59
Watch for Ignition Break and log the skill delay.
# Watch for Ignition Break and log the skill delay.
# This should be much safer (and better performance!) than watching for console logs.
# The macro plugin complains if any of the saved hook arguments are undefined,
# and "tick" is undefined when the status change isn't timed. Which results in
# lots of annoying "[macro] $args->{tick} does not exist" messages on the
# console. Sigh.
automacro ib_delay {
hook Actor::setStatus::change
save actor_type
save handle
@allanon
allanon / items_control_upgrade.md
Last active September 20, 2016 17:01
A new items_control.txt format, a new plugin for parsing the data in it, and an upgrade path for the old file.

items_control_upgrade.pl plugin

Manage the upgrade path from the old items_control.txt to items_control_new.txt.

  1. On load, check whether a control/items_control.txt file exists and has uncommented lines in it. If so:
  2. If a control/items_control_new.txt file already exists, display a warning, then go to step 2.
  3. If a control/items_control_old.txt file already exists, display a warning, then go to step 2.
  4. Display a message to the user, offering to upgrade the control/items_control.txt file to control/items_control_new.txt. If the user DOES NOT accept, go to step 2.
  5. Rename control/items_control.txt to control/items_control.txt.old.
  6. Load control/items_control.txt.old and convert the contents to the correct format for control/items_control_new.txt.
  7. Save control/items_control_new.txt.