Merge pull request #2946 from Owain94/upstream-2502
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
object ProjectVersions {
|
||||
const val launcherVersion = "2.2.0"
|
||||
const val rlVersion = "1.7.0"
|
||||
const val rlVersion = "1.7.1"
|
||||
|
||||
const val openosrsVersion = "4.0.0"
|
||||
|
||||
|
||||
@@ -11620,7 +11620,7 @@ public final class ItemID
|
||||
public static final int RED_ICON_25241 = 25241;
|
||||
public static final int RED_ICON_25242 = 25242;
|
||||
public static final int RED_ICON_25243 = 25243;
|
||||
public static final int OLD_KEY_25244 = 25244;
|
||||
public static final int DARK_KEY = 25244;
|
||||
public static final int RING_OF_SUFFERING_I_25246 = 25246;
|
||||
public static final int RING_OF_SUFFERING_RI_25248 = 25248;
|
||||
public static final int SALVE_AMULETI_25250 = 25250;
|
||||
@@ -11751,5 +11751,24 @@ public final class ItemID
|
||||
public static final int CRYSTAL_HELM_BETA = 25495;
|
||||
public static final int CRYSTAL_BODY_BETA = 25496;
|
||||
public static final int CRYSTAL_LEGS_BETA = 25497;
|
||||
public static final int CLUE_SCROLL_ELITE_25498 = 25498;
|
||||
public static final int CLUE_SCROLL_ELITE_25499 = 25499;
|
||||
public static final int CURSED_BANANA = 25500;
|
||||
public static final int BANANA_CAPE = 25502;
|
||||
public static final int LIST_OF_MONKEY_SIGHTINGS = 25504;
|
||||
public static final int PREMIUM_BANANA = 25505;
|
||||
public static final int BAMBOO = 25506;
|
||||
public static final int MONKEY_CAGE = 25507;
|
||||
public static final int DONIES_CAGED_MONKEY = 25508;
|
||||
public static final int BOBS_CAGED_MONKEY = 25509;
|
||||
public static final int AERECKS_CAGED_MONKEY = 25510;
|
||||
public static final int COWS_CAGED_MONKEY = 25511;
|
||||
public static final int UNICORNS_CAGED_MONKEY = 25512;
|
||||
public static final int SHEEPS_CAGED_MONKEY = 25513;
|
||||
public static final int UNICORN_HORN_25514 = 25514;
|
||||
public static final int DHAROKS_PLATEBODY_25515 = 25515;
|
||||
public static final int DHAROKS_GREATAXE_25516 = 25516;
|
||||
public static final int VOLATILE_NIGHTMARE_STAFF_25517 = 25517;
|
||||
public static final int ANCESTRAL_HAT_25518 = 25518;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
@@ -885,7 +885,6 @@ public final class NpcID
|
||||
public static final int CLAY_GOLEM = 917;
|
||||
public static final int CLAY_GOLEM_918 = 918;
|
||||
public static final int GHOST_920 = 920;
|
||||
public static final int FATHER_AERECK = 921;
|
||||
public static final int RESTLESS_GHOST = 922;
|
||||
public static final int FATHER_URHNEY = 923;
|
||||
public static final int SKELETON_924 = 924;
|
||||
@@ -2638,7 +2637,6 @@ public final class NpcID
|
||||
public static final int PIGLET_2809 = 2809;
|
||||
public static final int PIGLET_2810 = 2810;
|
||||
public static final int PIGLET_2811 = 2811;
|
||||
public static final int BOB_2812 = 2812;
|
||||
public static final int SHOP_KEEPER = 2813;
|
||||
public static final int SHOP_ASSISTANT = 2814;
|
||||
public static final int SHOP_KEEPER_2815 = 2815;
|
||||
@@ -6164,7 +6162,6 @@ public final class NpcID
|
||||
public static final int LAMMY_LANGLE = 6814;
|
||||
public static final int MAN_6815 = 6815;
|
||||
public static final int GEE = 6816;
|
||||
public static final int DONIE = 6817;
|
||||
public static final int MAN_6818 = 6818;
|
||||
public static final int TOWN_CRIER_6823 = 6823;
|
||||
public static final int GIANT_BAT_6824 = 6824;
|
||||
@@ -8922,14 +8919,58 @@ public final class NpcID
|
||||
public static final int DUCK_10546 = 10546;
|
||||
public static final int DUCK_10547 = 10547;
|
||||
public static final int CHICKEN_10556 = 10556;
|
||||
public static final int ANCIENT_GHOST = 10557;
|
||||
public static final int ANCIENT_GHOST_10558 = 10558;
|
||||
public static final int SCRUBFOOT = 10559;
|
||||
public static final int GARL = 10560;
|
||||
public static final int RED_FIREFLIES = 10561;
|
||||
public static final int DONIE = 10562;
|
||||
public static final int DONIE_10563 = 10563;
|
||||
public static final int GREEN_FIREFLIES = 10564;
|
||||
public static final int FATHER_AERECK = 10565;
|
||||
public static final int GOBLIN_10566 = 10566;
|
||||
public static final int GOBLIN_10567 = 10567;
|
||||
public static final int FATHER_AERECK_10568 = 10568;
|
||||
public static final int DUKE_HORACIO_10569 = 10569;
|
||||
public static final int AWOWOGEI_10570 = 10570;
|
||||
public static final int ZEKE_10571 = 10571;
|
||||
public static final int ELUNED_10572 = 10572;
|
||||
public static final int MOFINA_10573 = 10573;
|
||||
public static final int BOB_10574 = 10574;
|
||||
public static final int FATHER_AERECK_10575 = 10575;
|
||||
public static final int DONIE_10576 = 10576;
|
||||
public static final int MONKEY_ON_COW = 10577;
|
||||
public static final int SHEEP_10578 = 10578;
|
||||
public static final int MONKEY_ON_UNICORN = 10579;
|
||||
public static final int BOB_10580 = 10580;
|
||||
public static final int BOB_10581 = 10581;
|
||||
public static final int BOB_10582 = 10582;
|
||||
public static final int DONIE_10583 = 10583;
|
||||
public static final int DONIE_10584 = 10584;
|
||||
public static final int DONIE_10585 = 10585;
|
||||
public static final int DONIE_10586 = 10586;
|
||||
public static final int FATHER_AERECK_10587 = 10587;
|
||||
public static final int FATHER_AERECK_10588 = 10588;
|
||||
public static final int URIUM_SHADE = 10589;
|
||||
public static final int DAMPE = 10590;
|
||||
public static final int UNDEAD_ZEALOT = 10591;
|
||||
public static final int UNDEAD_ZEALOT_10592 = 10592;
|
||||
public static final int FATHER_AERECK_10593 = 10593;
|
||||
public static final int SHEEP_10594 = 10594;
|
||||
public static final int SHEEP_10595 = 10595;
|
||||
public static final int SHEEP_10596 = 10596;
|
||||
public static final int SHEEP_10597 = 10597;
|
||||
public static final int COW_10598 = 10598;
|
||||
public static final int MONKEY_ON_COW_10599 = 10599;
|
||||
public static final int MONKEY_ON_COW_10600 = 10600;
|
||||
public static final int COW_10601 = 10601;
|
||||
public static final int MONKEY_ON_UNICORN_10603 = 10603;
|
||||
public static final int MONKEY_ON_UNICORN_10604 = 10604;
|
||||
public static final int MONKEY_ON_UNICORN_10605 = 10605;
|
||||
public static final int UNICORN_10607 = 10607;
|
||||
public static final int UNICORN_10608 = 10608;
|
||||
public static final int UNICORN1337KILR = 10609;
|
||||
public static final int BOB_10610 = 10610;
|
||||
public static final int BOB_10611 = 10611;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -13536,5 +13536,7 @@ public final class NullItemID
|
||||
public static final int NULL_25480 = 25480;
|
||||
public static final int NULL_25482 = 25482;
|
||||
public static final int NULL_25483 = 25483;
|
||||
public static final int NULL_25501 = 25501;
|
||||
public static final int NULL_25503 = 25503;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public final class NullNpcID
|
||||
public static final int NULL_915 = 915;
|
||||
public static final int NULL_916 = 916;
|
||||
public static final int NULL_919 = 919;
|
||||
public static final int NULL_921 = 921;
|
||||
public static final int NULL_1023 = 1023;
|
||||
public static final int NULL_1033 = 1033;
|
||||
public static final int NULL_1034 = 1034;
|
||||
@@ -173,6 +174,7 @@ public final class NullNpcID
|
||||
public static final int NULL_2779 = 2779;
|
||||
public static final int NULL_2780 = 2780;
|
||||
public static final int NULL_2781 = 2781;
|
||||
public static final int NULL_2812 = 2812;
|
||||
public static final int NULL_2831 = 2831;
|
||||
public static final int NULL_2934 = 2934;
|
||||
public static final int NULL_2935 = 2935;
|
||||
@@ -641,6 +643,7 @@ public final class NullNpcID
|
||||
public static final int NULL_6808 = 6808;
|
||||
public static final int NULL_6809 = 6809;
|
||||
public static final int NULL_6810 = 6810;
|
||||
public static final int NULL_6817 = 6817;
|
||||
public static final int NULL_6819 = 6819;
|
||||
public static final int NULL_6820 = 6820;
|
||||
public static final int NULL_6821 = 6821;
|
||||
@@ -1618,5 +1621,15 @@ public final class NullNpcID
|
||||
public static final int NULL_10553 = 10553;
|
||||
public static final int NULL_10554 = 10554;
|
||||
public static final int NULL_10555 = 10555;
|
||||
public static final int NULL_10602 = 10602;
|
||||
public static final int NULL_10606 = 10606;
|
||||
public static final int NULL_10612 = 10612;
|
||||
public static final int NULL_10613 = 10613;
|
||||
public static final int NULL_10614 = 10614;
|
||||
public static final int NULL_10615 = 10615;
|
||||
public static final int NULL_10616 = 10616;
|
||||
public static final int NULL_10617 = 10617;
|
||||
public static final int NULL_10618 = 10618;
|
||||
public static final int NULL_10619 = 10619;
|
||||
/* This file is automatically generated. Do not edit. */
|
||||
}
|
||||
|
||||
@@ -19970,13 +19970,7 @@ public final class NullObjectID
|
||||
public static final int NULL_40720 = 40720;
|
||||
public static final int NULL_40721 = 40721;
|
||||
public static final int NULL_40722 = 40722;
|
||||
public static final int NULL_40724 = 40724;
|
||||
public static final int NULL_40726 = 40726;
|
||||
public static final int NULL_40727 = 40727;
|
||||
public static final int NULL_40729 = 40729;
|
||||
public static final int NULL_40730 = 40730;
|
||||
public static final int NULL_40740 = 40740;
|
||||
public static final int NULL_40743 = 40743;
|
||||
public static final int NULL_40741 = 40741;
|
||||
public static final int NULL_40747 = 40747;
|
||||
public static final int NULL_40748 = 40748;
|
||||
public static final int NULL_40749 = 40749;
|
||||
@@ -20001,13 +19995,70 @@ public final class NullObjectID
|
||||
public static final int NULL_40898 = 40898;
|
||||
public static final int NULL_40907 = 40907;
|
||||
public static final int NULL_40908 = 40908;
|
||||
public static final int NULL_40918 = 40918;
|
||||
public static final int NULL_40919 = 40919;
|
||||
public static final int NULL_40920 = 40920;
|
||||
public static final int NULL_40921 = 40921;
|
||||
public static final int NULL_40922 = 40922;
|
||||
public static final int NULL_40923 = 40923;
|
||||
public static final int NULL_40924 = 40924;
|
||||
public static final int NULL_40925 = 40925;
|
||||
public static final int NULL_40926 = 40926;
|
||||
public static final int NULL_40927 = 40927;
|
||||
public static final int NULL_40928 = 40928;
|
||||
public static final int NULL_40929 = 40929;
|
||||
public static final int NULL_40930 = 40930;
|
||||
public static final int NULL_40931 = 40931;
|
||||
public static final int NULL_40934 = 40934;
|
||||
public static final int NULL_40935 = 40935;
|
||||
public static final int NULL_40936 = 40936;
|
||||
public static final int NULL_40939 = 40939;
|
||||
public static final int NULL_40940 = 40940;
|
||||
public static final int NULL_40941 = 40941;
|
||||
public static final int NULL_40943 = 40943;
|
||||
public static final int NULL_40958 = 40958;
|
||||
public static final int NULL_40960 = 40960;
|
||||
public static final int NULL_40961 = 40961;
|
||||
public static final int NULL_40962 = 40962;
|
||||
public static final int NULL_40973 = 40973;
|
||||
public static final int NULL_40974 = 40974;
|
||||
public static final int NULL_40975 = 40975;
|
||||
public static final int NULL_40976 = 40976;
|
||||
public static final int NULL_40977 = 40977;
|
||||
public static final int NULL_40978 = 40978;
|
||||
public static final int NULL_40979 = 40979;
|
||||
public static final int NULL_40980 = 40980;
|
||||
public static final int NULL_40981 = 40981;
|
||||
public static final int NULL_40983 = 40983;
|
||||
public static final int NULL_40984 = 40984;
|
||||
public static final int NULL_40985 = 40985;
|
||||
public static final int NULL_40986 = 40986;
|
||||
public static final int NULL_40987 = 40987;
|
||||
public static final int NULL_40988 = 40988;
|
||||
public static final int NULL_40989 = 40989;
|
||||
public static final int NULL_40990 = 40990;
|
||||
public static final int NULL_40991 = 40991;
|
||||
public static final int NULL_40992 = 40992;
|
||||
public static final int NULL_40993 = 40993;
|
||||
public static final int NULL_40994 = 40994;
|
||||
public static final int NULL_40995 = 40995;
|
||||
public static final int NULL_40996 = 40996;
|
||||
public static final int NULL_40997 = 40997;
|
||||
public static final int NULL_40998 = 40998;
|
||||
public static final int NULL_40999 = 40999;
|
||||
public static final int NULL_41000 = 41000;
|
||||
public static final int NULL_41001 = 41001;
|
||||
public static final int NULL_41002 = 41002;
|
||||
public static final int NULL_41003 = 41003;
|
||||
public static final int NULL_41004 = 41004;
|
||||
public static final int NULL_41005 = 41005;
|
||||
public static final int NULL_41006 = 41006;
|
||||
public static final int NULL_41007 = 41007;
|
||||
public static final int NULL_41008 = 41008;
|
||||
public static final int NULL_41009 = 41009;
|
||||
public static final int NULL_41010 = 41010;
|
||||
public static final int NULL_41011 = 41011;
|
||||
public static final int NULL_41012 = 41012;
|
||||
public static final int NULL_41022 = 41022;
|
||||
public static final int NULL_41191 = 41191;
|
||||
public static final int NULL_41192 = 41192;
|
||||
|
||||
@@ -923,11 +923,13 @@ public final class ObjectID
|
||||
public static final int SAILS = 1779;
|
||||
public static final int SAILS_1780 = 1780;
|
||||
public static final int FLOUR_BIN = 1782;
|
||||
public static final int WALL_1796 = 1796;
|
||||
public static final int WATERFALL_ROCKS = 1797;
|
||||
public static final int DOOR_1804 = 1804;
|
||||
public static final int DOOR_1805 = 1805;
|
||||
public static final int WEB_1810 = 1810;
|
||||
public static final int SLICED_WEB = 1811;
|
||||
public static final int CRATE_1812 = 1812;
|
||||
public static final int BANDAGE_TABLE = 1813;
|
||||
public static final int LEVER_1814 = 1814;
|
||||
public static final int LEVER_1816 = 1816;
|
||||
@@ -20737,9 +20739,14 @@ public final class ObjectID
|
||||
public static final int BARREL_40590 = 40590;
|
||||
public static final int TREE_40715 = 40715;
|
||||
public static final int TREE_40716 = 40716;
|
||||
public static final int FENCE_40723 = 40723;
|
||||
public static final int CRATE_40723 = 40723;
|
||||
public static final int CRATES_40724 = 40724;
|
||||
public static final int ANVIL_40725 = 40725;
|
||||
public static final int CRATES_40726 = 40726;
|
||||
public static final int BARREL_40727 = 40727;
|
||||
public static final int FIRE_40728 = 40728;
|
||||
public static final int STOOL_40729 = 40729;
|
||||
public static final int TABLE_40730 = 40730;
|
||||
public static final int TENT_40731 = 40731;
|
||||
public static final int BROKEN_POTTERS_WHEEL = 40732;
|
||||
public static final int POTTERS_WHEEL_40733 = 40733;
|
||||
@@ -20749,8 +20756,9 @@ public final class ObjectID
|
||||
public static final int OPENING_40737 = 40737;
|
||||
public static final int BONES_40738 = 40738;
|
||||
public static final int CHEST_40739 = 40739;
|
||||
public static final int CHEST_40741 = 40741;
|
||||
public static final int LOCKED_CHEST_40742 = 40742;
|
||||
public static final int CHEST_40740 = 40740;
|
||||
public static final int DARK_CHEST = 40742;
|
||||
public static final int DARK_CHEST_40743 = 40743;
|
||||
public static final int BARREL_40744 = 40744;
|
||||
public static final int LADDER_40745 = 40745;
|
||||
public static final int LADDER_40746 = 40746;
|
||||
@@ -20903,6 +20911,35 @@ public final class ObjectID
|
||||
public static final int STATUE_40917 = 40917;
|
||||
public static final int EVERGREEN_40932 = 40932;
|
||||
public static final int EVERGREEN_40933 = 40933;
|
||||
public static final int OLD_STALL_40937 = 40937;
|
||||
public static final int CART_40938 = 40938;
|
||||
public static final int GALLOWS_40942 = 40942;
|
||||
public static final int HEROIC_STATUE_40944 = 40944;
|
||||
public static final int STONE_TABLE_40945 = 40945;
|
||||
public static final int ROCK_40946 = 40946;
|
||||
public static final int SMALL_ROCK_40947 = 40947;
|
||||
public static final int ROCK_40948 = 40948;
|
||||
public static final int FURNACE_40949 = 40949;
|
||||
public static final int DEAD_TREE_40950 = 40950;
|
||||
public static final int DEAD_TREE_40951 = 40951;
|
||||
public static final int ROOTS_40952 = 40952;
|
||||
public static final int ROOTS_40953 = 40953;
|
||||
public static final int ROOTS_40954 = 40954;
|
||||
public static final int UNICORN = 40955;
|
||||
public static final int ROCKS_40956 = 40956;
|
||||
public static final int ROCKS_40957 = 40957;
|
||||
public static final int ROPE_40959 = 40959;
|
||||
public static final int BAMBOO_MONKEY_TRAP = 40963;
|
||||
public static final int BANANA_BARREL = 40964;
|
||||
public static final int BAMBOO_BARREL = 40965;
|
||||
public static final int CAGED_MONKEY_BOB = 40966;
|
||||
public static final int CAGED_MONKEY_DONIE = 40967;
|
||||
public static final int CAGED_MONKEY_AERECK = 40968;
|
||||
public static final int CAGED_MONKEY_UNICORN = 40969;
|
||||
public static final int CAGED_MONKEY_COW = 40970;
|
||||
public static final int CAGED_MONKEY_SHEEP = 40971;
|
||||
public static final int FIREWORKS = 40972;
|
||||
public static final int POST_40982 = 40982;
|
||||
public static final int POTION_OF_POWER_TABLE_41023 = 41023;
|
||||
public static final int PEDESTAL_SPACE = 41024;
|
||||
public static final int PEDESTAL_SPACE_41025 = 41025;
|
||||
|
||||
@@ -362,7 +362,7 @@ public final class ScriptID
|
||||
* <li>int (WidgetID) drag parent</li>
|
||||
* </ul>
|
||||
*/
|
||||
@ScriptArguments(integer = 7)
|
||||
@ScriptArguments(integer = 8, string = 1)
|
||||
public static final int SETTINGS_SLIDER_CHOOSE_ONOP = 3885;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1018,7 +1018,7 @@ public class WidgetID
|
||||
|
||||
static class LmsKDA
|
||||
{
|
||||
static final int INFO = 5;
|
||||
static final int INFO = 6;
|
||||
}
|
||||
|
||||
static class AdventureLog
|
||||
|
||||
@@ -155,15 +155,15 @@ public enum ItemMapping
|
||||
ITEM_ENSOULED_DRAGON_HEAD(ENSOULED_DRAGON_HEAD_13511, ENSOULED_DRAGON_HEAD),
|
||||
|
||||
// Imbued rings
|
||||
ITEM_BERSERKER_RING(BERSERKER_RING, BERSERKER_RING_I),
|
||||
ITEM_SEERS_RING(SEERS_RING, SEERS_RING_I),
|
||||
ITEM_WARRIOR_RING(WARRIOR_RING, WARRIOR_RING_I),
|
||||
ITEM_ARCHERS_RING(ARCHERS_RING, ARCHERS_RING_I),
|
||||
ITEM_TREASONOUS_RING(TREASONOUS_RING, TREASONOUS_RING_I),
|
||||
ITEM_TYRANNICAL_RING(TYRANNICAL_RING, TYRANNICAL_RING_I),
|
||||
ITEM_RING_OF_THE_GODS(RING_OF_THE_GODS, RING_OF_THE_GODS_I),
|
||||
ITEM_RING_OF_SUFFERING(RING_OF_SUFFERING, RING_OF_SUFFERING_I, RING_OF_SUFFERING_R, RING_OF_SUFFERING_RI),
|
||||
ITEM_GRANITE_RING(GRANITE_RING, GRANITE_RING_I),
|
||||
ITEM_BERSERKER_RING(BERSERKER_RING, BERSERKER_RING_I, BERSERKER_RING_I_25264),
|
||||
ITEM_SEERS_RING(SEERS_RING, SEERS_RING_I, SEERS_RING_I_25258),
|
||||
ITEM_WARRIOR_RING(WARRIOR_RING, WARRIOR_RING_I, WARRIOR_RING_I_25262),
|
||||
ITEM_ARCHERS_RING(ARCHERS_RING, ARCHERS_RING_I, ARCHERS_RING_I_25260),
|
||||
ITEM_TREASONOUS_RING(TREASONOUS_RING, TREASONOUS_RING_I, TREASONOUS_RING_I_25256),
|
||||
ITEM_TYRANNICAL_RING(TYRANNICAL_RING, TYRANNICAL_RING_I, TYRANNICAL_RING_I_25254),
|
||||
ITEM_RING_OF_THE_GODS(RING_OF_THE_GODS, RING_OF_THE_GODS_I, RING_OF_THE_GODS_I_25252),
|
||||
ITEM_RING_OF_SUFFERING(RING_OF_SUFFERING, RING_OF_SUFFERING_I, RING_OF_SUFFERING_R, RING_OF_SUFFERING_RI, RING_OF_SUFFERING_I_25246, RING_OF_SUFFERING_RI_25248),
|
||||
ITEM_GRANITE_RING(GRANITE_RING, GRANITE_RING_I, GRANITE_RING_I_25193),
|
||||
|
||||
// Bounty hunter
|
||||
ITEM_GRANITE_MAUL(GRANITE_MAUL, GRANITE_MAUL_12848),
|
||||
@@ -227,7 +227,9 @@ public enum ItemMapping
|
||||
BLACK_MASK, BLACK_MASK_I, BLACK_MASK_1, BLACK_MASK_1_I, BLACK_MASK_2, BLACK_MASK_2_I, BLACK_MASK_3, BLACK_MASK_3_I, BLACK_MASK_4, BLACK_MASK_4_I, BLACK_MASK_5,
|
||||
BLACK_MASK_5_I, BLACK_MASK_6, BLACK_MASK_6_I, BLACK_MASK_7, BLACK_MASK_7_I, BLACK_MASK_8, BLACK_MASK_8_I, BLACK_MASK_9, BLACK_MASK_9_I, BLACK_MASK_10_I,
|
||||
SLAYER_HELMET, SLAYER_HELMET_I, BLACK_SLAYER_HELMET, BLACK_SLAYER_HELMET_I, PURPLE_SLAYER_HELMET, PURPLE_SLAYER_HELMET_I, RED_SLAYER_HELMET, RED_SLAYER_HELMET_I,
|
||||
GREEN_SLAYER_HELMET, GREEN_SLAYER_HELMET_I, TURQUOISE_SLAYER_HELMET, TURQUOISE_SLAYER_HELMET_I, TWISTED_SLAYER_HELMET, TWISTED_SLAYER_HELMET_I, HYDRA_SLAYER_HELMET, HYDRA_SLAYER_HELMET_I),
|
||||
GREEN_SLAYER_HELMET, GREEN_SLAYER_HELMET_I, TURQUOISE_SLAYER_HELMET, TURQUOISE_SLAYER_HELMET_I, TWISTED_SLAYER_HELMET, TWISTED_SLAYER_HELMET_I, HYDRA_SLAYER_HELMET, HYDRA_SLAYER_HELMET_I,
|
||||
SLAYER_HELMET_I_25177, BLACK_SLAYER_HELMET_I_25179, GREEN_SLAYER_HELMET_I_25181, RED_SLAYER_HELMET_I_25183, PURPLE_SLAYER_HELMET_I_25185, TURQUOISE_SLAYER_HELMET_I_25187, HYDRA_SLAYER_HELMET_I_25189, TWISTED_SLAYER_HELMET_I_25191,
|
||||
BLACK_MASK_I_25276, BLACK_MASK_1_I_25275, BLACK_MASK_2_I_25274, BLACK_MASK_3_I_25273, BLACK_MASK_4_I_25272, BLACK_MASK_5_I_25271, BLACK_MASK_6_I_25270, BLACK_MASK_7_I_25269, BLACK_MASK_8_I_25268, BLACK_MASK_9_I_25267, BLACK_MASK_10_I_25266),
|
||||
|
||||
// Pharaoh's Sceptres
|
||||
ITEM_PHARAOHS_SCEPTRE_1(PHARAOHS_SCEPTRE, PHARAOHS_SCEPTRE_1),
|
||||
@@ -245,7 +247,7 @@ public enum ItemMapping
|
||||
ITEM_BOTTOMLESS_COMPOST_BUCKET(BOTTOMLESS_COMPOST_BUCKET, BOTTOMLESS_COMPOST_BUCKET_22997),
|
||||
ITEM_BASILISK_JAW(BASILISK_JAW, NEITIZNOT_FACEGUARD),
|
||||
ITEM_HELM_OF_NEITIZNOT(HELM_OF_NEITIZNOT, NEITIZNOT_FACEGUARD),
|
||||
ITEM_TWISTED_HORNS(TWISTED_HORNS, TWISTED_SLAYER_HELMET, TWISTED_SLAYER_HELMET_I),
|
||||
ITEM_TWISTED_HORNS(TWISTED_HORNS, TWISTED_SLAYER_HELMET, TWISTED_SLAYER_HELMET_I, TWISTED_SLAYER_HELMET_I_25191),
|
||||
ITEM_ELDRITCH_ORB(ELDRITCH_ORB, ELDRITCH_NIGHTMARE_STAFF),
|
||||
ITEM_HARMONISED_ORB(HARMONISED_ORB, HARMONISED_NIGHTMARE_STAFF),
|
||||
ITEM_VOLATILE_ORB(VOLATILE_ORB, VOLATILE_NIGHTMARE_STAFF),
|
||||
|
||||
+2
-2
@@ -140,8 +140,8 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
|
||||
new EmoteClue("Panic by the pilot on White Wolf Mountain. Beware of double agents! Equip mithril platelegs, a ring of life and a rune axe.", "White Wolf Mountain", GNOME_GLIDER_ON_WHITE_WOLF_MOUNTAIN, new WorldPoint(2847, 3499, 0), DOUBLE_AGENT_108, PANIC, item(MITHRIL_PLATELEGS), item(RING_OF_LIFE), item(RUNE_AXE)),
|
||||
new EmoteClue("Panic by the big egg where no one dare goes and the ground is burnt. Beware of double agents! Equip a dragon med helm, a TokTz-Ket-Xil, a brine sabre, rune platebody and an uncharged amulet of glory.", "Lava dragon isle", SOUTHEAST_CORNER_OF_LAVA_DRAGON_ISLE, new WorldPoint(3227, 3831, 0), DOUBLE_AGENT_141, PANIC, item(DRAGON_MED_HELM), item(TOKTZKETXIL), item(BRINE_SABRE), item(RUNE_PLATEBODY), any("Uncharged Amulet of glory", item(AMULET_OF_GLORY))),
|
||||
new EmoteClue("Panic at the area flowers meet snow. Equip Blue D'hide vambraces, a dragon spear and a rune plateskirt.", "Trollweiss mountain", HALFWAY_DOWN_TROLLWEISS_MOUNTAIN, new WorldPoint(2776, 3781, 0), PANIC, item(BLUE_DHIDE_VAMBRACES), item(DRAGON_SPEAR), item(RUNE_PLATESKIRT), item(SLED_4084)),
|
||||
new EmoteClue("Do a push up at the bank of the Warrior's guild. Beware of double agents! Equip a dragon battleaxe, a dragon defender and a slayer helm of any kind.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, PUSH_UP, item(DRAGON_BATTLEAXE), any("Dragon defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I))),
|
||||
new EmoteClue("Blow a raspberry in the bank of the Warriors' Guild. Beware of double agents! Equip a dragon battleaxe, a slayer helm of any kind and a dragon defender or avernic defender.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, RASPBERRY, item(DRAGON_BATTLEAXE), any("Dragon defender or Avernic defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L), item(AVERNIC_DEFENDER), item(AVERNIC_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I))),
|
||||
new EmoteClue("Do a push up at the bank of the Warrior's guild. Beware of double agents! Equip a dragon battleaxe, a dragon defender and a slayer helm of any kind.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, PUSH_UP, item(DRAGON_BATTLEAXE), any("Dragon defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I), item(SLAYER_HELMET_I_25177), item(BLACK_SLAYER_HELMET_I_25179), item(GREEN_SLAYER_HELMET_I_25181), item(RED_SLAYER_HELMET_I_25183), item(PURPLE_SLAYER_HELMET_I_25185), item(TURQUOISE_SLAYER_HELMET_I_25187), item(HYDRA_SLAYER_HELMET_I_25189), item(TWISTED_SLAYER_HELMET_I_25191))),
|
||||
new EmoteClue("Blow a raspberry in the bank of the Warriors' Guild. Beware of double agents! Equip a dragon battleaxe, a slayer helm of any kind and a dragon defender or avernic defender.", "Warriors' guild", WARRIORS_GUILD_BANK_29047, new WorldPoint(2843, 3543, 0), DOUBLE_AGENT_141, RASPBERRY, item(DRAGON_BATTLEAXE), any("Dragon defender or Avernic defender", item(DRAGON_DEFENDER), item(DRAGON_DEFENDER_T), item(DRAGON_DEFENDER_L), item(AVERNIC_DEFENDER), item(AVERNIC_DEFENDER_L)), any("Any slayer helmet", item(SLAYER_HELMET), item(BLACK_SLAYER_HELMET), item(GREEN_SLAYER_HELMET), item(PURPLE_SLAYER_HELMET), item(RED_SLAYER_HELMET), item(TURQUOISE_SLAYER_HELMET), item(SLAYER_HELMET_I), item(BLACK_SLAYER_HELMET_I), item(GREEN_SLAYER_HELMET_I), item(PURPLE_SLAYER_HELMET_I), item(RED_SLAYER_HELMET_I), item(TURQUOISE_SLAYER_HELMET_I), item(HYDRA_SLAYER_HELMET), item(HYDRA_SLAYER_HELMET_I), item(TWISTED_SLAYER_HELMET), item(TWISTED_SLAYER_HELMET_I), item(SLAYER_HELMET_I_25177), item(BLACK_SLAYER_HELMET_I_25179), item(GREEN_SLAYER_HELMET_I_25181), item(RED_SLAYER_HELMET_I_25183), item(PURPLE_SLAYER_HELMET_I_25185), item(TURQUOISE_SLAYER_HELMET_I_25187), item(HYDRA_SLAYER_HELMET_I_25189), item(TWISTED_SLAYER_HELMET_I_25191))),
|
||||
new EmoteClue("Blow a raspberry at the monkey cage in Ardougne Zoo. Equip a studded leather body, bronze platelegs and a normal staff with no orb.", "Ardougne Zoo", NEAR_THE_PARROTS_IN_ARDOUGNE_ZOO, new WorldPoint(2607, 3282, 0), RASPBERRY, item(STUDDED_BODY), item(BRONZE_PLATELEGS), item(STAFF)),
|
||||
new EmoteClue("Blow raspberries outside the entrance to Keep Le Faye. Equip a coif, an iron platebody and leather gloves.", "Keep Le Faye", OUTSIDE_KEEP_LE_FAYE, new WorldPoint(2757, 3401, 0), RASPBERRY, item(COIF), item(IRON_PLATEBODY), item(LEATHER_GLOVES)),
|
||||
new EmoteClue("Blow a raspberry in the Fishing Guild bank. Beware of double agents! Equip an elemental shield, blue dragonhide chaps and a rune warhammer.", "Fishing Guild", FISHING_GUILD_BANK, new WorldPoint(2588, 3419, 0), DOUBLE_AGENT_108, RASPBERRY, item(ELEMENTAL_SHIELD), item(BLUE_DHIDE_CHAPS), item(RUNE_WARHAMMER)),
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ public class SkillChallengeClue extends ClueScroll implements NpcClueScroll, Nam
|
||||
new SkillChallengeClue("Steal from a chest in Ardougne Castle."),
|
||||
new SkillChallengeClue("Craft a green dragonhide body.", xOfItem(ItemID.GREEN_DRAGON_LEATHER, 3), item(ItemID.NEEDLE), item(ItemID.THREAD)),
|
||||
new SkillChallengeClue("String a yew longbow.", item(ItemID.YEW_LONGBOW_U), item(ItemID.BOW_STRING)),
|
||||
new SkillChallengeClue("Kill a Dust Devil.", "slay a dust devil.", true, any("Facemask or Slayer Helmet", item(ItemID.FACEMASK), item(ItemID.SLAYER_HELMET), item(ItemID. SLAYER_HELMET_I), item(ItemID. BLACK_SLAYER_HELMET), item(ItemID. BLACK_SLAYER_HELMET_I), item(ItemID. PURPLE_SLAYER_HELMET), item(ItemID. PURPLE_SLAYER_HELMET_I), item(ItemID. RED_SLAYER_HELMET), item(ItemID. RED_SLAYER_HELMET_I), item(ItemID.GREEN_SLAYER_HELMET), item(ItemID. GREEN_SLAYER_HELMET_I), item(ItemID. TURQUOISE_SLAYER_HELMET), item(ItemID. TURQUOISE_SLAYER_HELMET_I), item(ItemID. HYDRA_SLAYER_HELMET), item(ItemID. HYDRA_SLAYER_HELMET_I), item(ItemID.TWISTED_SLAYER_HELMET), item(ItemID.TWISTED_SLAYER_HELMET_I))),
|
||||
new SkillChallengeClue("Kill a Dust Devil.", "slay a dust devil.", true, any("Facemask or Slayer Helmet", item(ItemID.FACEMASK), item(ItemID.SLAYER_HELMET), item(ItemID. SLAYER_HELMET_I), item(ItemID. BLACK_SLAYER_HELMET), item(ItemID. BLACK_SLAYER_HELMET_I), item(ItemID. PURPLE_SLAYER_HELMET), item(ItemID. PURPLE_SLAYER_HELMET_I), item(ItemID. RED_SLAYER_HELMET), item(ItemID. RED_SLAYER_HELMET_I), item(ItemID.GREEN_SLAYER_HELMET), item(ItemID. GREEN_SLAYER_HELMET_I), item(ItemID. TURQUOISE_SLAYER_HELMET), item(ItemID. TURQUOISE_SLAYER_HELMET_I), item(ItemID. HYDRA_SLAYER_HELMET), item(ItemID. HYDRA_SLAYER_HELMET_I), item(ItemID.TWISTED_SLAYER_HELMET), item(ItemID.TWISTED_SLAYER_HELMET_I), item(ItemID.SLAYER_HELMET_I_25177), item(ItemID.BLACK_SLAYER_HELMET_I_25179), item(ItemID.GREEN_SLAYER_HELMET_I_25181), item(ItemID.RED_SLAYER_HELMET_I_25183), item(ItemID.PURPLE_SLAYER_HELMET_I_25185), item(ItemID.TURQUOISE_SLAYER_HELMET_I_25187), item(ItemID.HYDRA_SLAYER_HELMET_I_25189), item(ItemID.TWISTED_SLAYER_HELMET_I_25191))),
|
||||
new SkillChallengeClue("Catch a black warlock.", item(ItemID.BUTTERFLY_JAR), any("Butterfly Net", item(ItemID.BUTTERFLY_NET), item(ItemID.MAGIC_BUTTERFLY_NET))),
|
||||
new SkillChallengeClue("Catch a red chinchompa.", item(ItemID.BOX_TRAP)),
|
||||
new SkillChallengeClue("Mine a mithril ore.", ANY_PICKAXE),
|
||||
|
||||
@@ -705,7 +705,7 @@ public class MusicPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
int arg = client.getIntStackSize() - 7;
|
||||
int arg = client.getIntStackSize() - 8;
|
||||
int[] is = client.getIntStack();
|
||||
Channel channel;
|
||||
switch (is[arg])
|
||||
|
||||
@@ -52,20 +52,28 @@ class SlayerOverlay extends WidgetItemOverlay
|
||||
private final static Set<Integer> ALL_SLAYER_ITEMS = ImmutableSet.of(
|
||||
ItemID.SLAYER_HELMET,
|
||||
ItemID.SLAYER_HELMET_I,
|
||||
ItemID.SLAYER_HELMET_I_25177,
|
||||
ItemID.BLACK_SLAYER_HELMET,
|
||||
ItemID.BLACK_SLAYER_HELMET_I,
|
||||
ItemID.BLACK_SLAYER_HELMET_I_25179,
|
||||
ItemID.GREEN_SLAYER_HELMET,
|
||||
ItemID.GREEN_SLAYER_HELMET_I,
|
||||
ItemID.GREEN_SLAYER_HELMET_I_25181,
|
||||
ItemID.PURPLE_SLAYER_HELMET,
|
||||
ItemID.PURPLE_SLAYER_HELMET_I,
|
||||
ItemID.PURPLE_SLAYER_HELMET_I_25185,
|
||||
ItemID.RED_SLAYER_HELMET,
|
||||
ItemID.RED_SLAYER_HELMET_I,
|
||||
ItemID.RED_SLAYER_HELMET_I_25183,
|
||||
ItemID.TURQUOISE_SLAYER_HELMET,
|
||||
ItemID.TURQUOISE_SLAYER_HELMET_I,
|
||||
ItemID.TURQUOISE_SLAYER_HELMET_I_25187,
|
||||
ItemID.TWISTED_SLAYER_HELMET,
|
||||
ItemID.TWISTED_SLAYER_HELMET_I,
|
||||
ItemID.TWISTED_SLAYER_HELMET_I_25191,
|
||||
ItemID.HYDRA_SLAYER_HELMET,
|
||||
ItemID.HYDRA_SLAYER_HELMET_I,
|
||||
ItemID.HYDRA_SLAYER_HELMET_I_25189,
|
||||
ItemID.SLAYER_RING_ETERNAL,
|
||||
ItemID.ENCHANTED_GEM,
|
||||
ItemID.ETERNAL_GEM,
|
||||
|
||||
+103
-15
@@ -24,6 +24,8 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.worldhopper.ping;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.primitives.Bytes;
|
||||
import com.sun.jna.Memory;
|
||||
import com.sun.jna.Pointer;
|
||||
import java.io.IOException;
|
||||
@@ -38,21 +40,42 @@ import net.runelite.http.api.worlds.World;
|
||||
@Slf4j
|
||||
public class Ping
|
||||
{
|
||||
private static final String RUNELITE_PING = "RuneLitePing";
|
||||
|
||||
private static final int TIMEOUT = 2000;
|
||||
private static final byte[] RUNELITE_PING = "RuneLitePing".getBytes(Charsets.UTF_8);
|
||||
private static final int TIMEOUT = 2000; // ms
|
||||
private static final int PORT = 43594;
|
||||
|
||||
private static short seq;
|
||||
|
||||
public static int ping(World world)
|
||||
{
|
||||
InetAddress inetAddress;
|
||||
try
|
||||
{
|
||||
inetAddress = InetAddress.getByName(world.getAddress());
|
||||
}
|
||||
catch (UnknownHostException ex)
|
||||
{
|
||||
log.warn("error resolving host for world ping", ex);
|
||||
return -1;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
switch (OSType.getOSType())
|
||||
{
|
||||
case Windows:
|
||||
return windowsPing(world);
|
||||
return windowsPing(inetAddress);
|
||||
case Linux:
|
||||
try
|
||||
{
|
||||
return linuxPing(inetAddress);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return tcpPing(inetAddress);
|
||||
}
|
||||
default:
|
||||
return tcpPing(world);
|
||||
return tcpPing(inetAddress);
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
@@ -62,22 +85,19 @@ public class Ping
|
||||
}
|
||||
}
|
||||
|
||||
private static int windowsPing(World world) throws UnknownHostException
|
||||
private static int windowsPing(InetAddress inetAddress)
|
||||
{
|
||||
IPHlpAPI ipHlpAPI = IPHlpAPI.INSTANCE;
|
||||
Pointer ptr = ipHlpAPI.IcmpCreateFile();
|
||||
try
|
||||
{
|
||||
InetAddress inetAddress = InetAddress.getByName(world.getAddress());
|
||||
byte[] address = inetAddress.getAddress();
|
||||
String dataStr = RUNELITE_PING;
|
||||
int dataLength = dataStr.length() + 1;
|
||||
Pointer data = new Memory(dataLength);
|
||||
data.setString(0L, dataStr);
|
||||
IcmpEchoReply icmpEchoReply = new IcmpEchoReply(new Memory(IcmpEchoReply.SIZE + dataLength));
|
||||
Memory data = new Memory(RUNELITE_PING.length);
|
||||
data.write(0, RUNELITE_PING, 0, RUNELITE_PING.length);
|
||||
IcmpEchoReply icmpEchoReply = new IcmpEchoReply(new Memory(IcmpEchoReply.SIZE + data.size()));
|
||||
assert icmpEchoReply.size() == IcmpEchoReply.SIZE;
|
||||
int packed = (address[0] & 0xff) | ((address[1] & 0xff) << 8) | ((address[2] & 0xff) << 16) | ((address[3] & 0xff) << 24);
|
||||
int ret = ipHlpAPI.IcmpSendEcho(ptr, packed, data, (short) (dataLength), Pointer.NULL, icmpEchoReply, IcmpEchoReply.SIZE + dataLength, TIMEOUT);
|
||||
int ret = ipHlpAPI.IcmpSendEcho(ptr, packed, data, (short) data.size(), Pointer.NULL, icmpEchoReply, IcmpEchoReply.SIZE + (int) data.size(), TIMEOUT);
|
||||
if (ret != 1)
|
||||
{
|
||||
return -1;
|
||||
@@ -91,12 +111,80 @@ public class Ping
|
||||
}
|
||||
}
|
||||
|
||||
private static int tcpPing(World world) throws IOException
|
||||
private static int linuxPing(InetAddress inetAddress) throws IOException
|
||||
{
|
||||
RLLibC libc = RLLibC.INSTANCE;
|
||||
byte[] address = inetAddress.getAddress();
|
||||
|
||||
int sock = libc.socket(libc.AF_INET, libc.SOCK_DGRAM, libc.IPPROTO_ICMP);
|
||||
if (sock < 0)
|
||||
{
|
||||
throw new IOException("failed to open ICMP socket");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Timeval tv = new Timeval();
|
||||
tv.tv_sec = TIMEOUT / 1000;
|
||||
if (libc.setsockopt(sock, libc.SOL_SOCKET, libc.SO_RCVTIMEO, tv.getPointer(), tv.size()) < 0)
|
||||
{
|
||||
throw new IOException("failed to set SO_RCVTIMEO");
|
||||
}
|
||||
|
||||
short seqno = seq++;
|
||||
|
||||
// struct icmphdr
|
||||
byte[] request = {
|
||||
8, // type 8 - ipv4 echo request
|
||||
0, // code
|
||||
0, 0, // checksum (set by kernel)
|
||||
0, 0, // id (set by kernel)
|
||||
(byte) (((seqno >> 8) & 0xff)), (byte) (seqno & 0xff)
|
||||
};
|
||||
// append payload
|
||||
request = Bytes.concat(request, RUNELITE_PING);
|
||||
// struct sockaddr_in
|
||||
byte[] addr = {
|
||||
(byte) libc.AF_INET, 0, // sin_family
|
||||
0, 0, // sin_port
|
||||
address[0], address[1], address[2], address[3], // sin_addr.s_addr
|
||||
0, 0, 0, 0, 0, 0, 0, 0 // padding
|
||||
};
|
||||
|
||||
long start = System.nanoTime();
|
||||
if (libc.sendto(sock, request, request.length, 0, addr, addr.length) != request.length)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int size = 8 + RUNELITE_PING.length; // struct icmphdr + response
|
||||
Memory response = new Memory(size);
|
||||
if (libc.recvfrom(sock, response, size, 0, null, null) != size)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
long end = System.nanoTime();
|
||||
|
||||
short seq = (short) (((response.getByte(6) & 0xff) << 8) | response.getByte(7) & 0xff);
|
||||
if (seqno != seq)
|
||||
{
|
||||
log.warn("sequence number mismatch ({} != {})", seqno, seq);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (int) ((end - start) / 1_000_000);
|
||||
}
|
||||
finally
|
||||
{
|
||||
libc.close(sock);
|
||||
}
|
||||
}
|
||||
|
||||
private static int tcpPing(InetAddress inetAddress) throws IOException
|
||||
{
|
||||
try (Socket socket = new Socket())
|
||||
{
|
||||
socket.setSoTimeout(TIMEOUT);
|
||||
InetAddress inetAddress = InetAddress.getByName(world.getAddress());
|
||||
long start = System.nanoTime();
|
||||
socket.connect(new InetSocketAddress(inetAddress, PORT));
|
||||
long end = System.nanoTime();
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2021, Adam <Adam@sigterm.info>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.worldhopper.ping;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
import com.sun.jna.platform.unix.LibC;
|
||||
|
||||
interface RLLibC extends LibC
|
||||
{
|
||||
RLLibC INSTANCE = Native.loadLibrary(NAME, RLLibC.class);
|
||||
|
||||
int AF_INET = 2;
|
||||
int SOCK_DGRAM = 2;
|
||||
int SOL_SOCKET = 1;
|
||||
int IPPROTO_ICMP = 1;
|
||||
int SO_RCVTIMEO = 20;
|
||||
|
||||
int socket(int domain, int type, int protocol);
|
||||
|
||||
void close(int socket);
|
||||
|
||||
int sendto(int sockfd, byte[] buf, int len, int flags, byte[] dest_addr, int addrlen);
|
||||
|
||||
int recvfrom(int sockfd, Pointer buf, int len, int flags, Pointer src_addr, Pointer addrlen);
|
||||
|
||||
int setsockopt(int sockfd, int level, int optname, Pointer optval, int optlen);
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2021, Adam <Adam@sigterm.info>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client.plugins.worldhopper.ping;
|
||||
|
||||
import com.sun.jna.Structure;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class Timeval extends Structure
|
||||
{
|
||||
public long tv_sec;
|
||||
public long tv_usec;
|
||||
|
||||
@Override
|
||||
protected List<String> getFieldOrder()
|
||||
{
|
||||
return Arrays.asList("tv_sec", "tv_usec");
|
||||
}
|
||||
}
|
||||
@@ -184,7 +184,8 @@
|
||||
],
|
||||
"unicorn horn": [
|
||||
237,
|
||||
1487
|
||||
1487,
|
||||
25514
|
||||
],
|
||||
"wine of zamorak": [
|
||||
245,
|
||||
@@ -1353,7 +1354,9 @@
|
||||
23817,
|
||||
24253,
|
||||
24493,
|
||||
24773
|
||||
24773,
|
||||
25498,
|
||||
25499
|
||||
],
|
||||
"radimus notes": [
|
||||
714,
|
||||
@@ -3939,7 +3942,8 @@
|
||||
4887,
|
||||
4888,
|
||||
4889,
|
||||
4890
|
||||
4890,
|
||||
25516
|
||||
],
|
||||
"dharoks platebody": [
|
||||
4720,
|
||||
@@ -3947,7 +3951,8 @@
|
||||
4893,
|
||||
4894,
|
||||
4895,
|
||||
4896
|
||||
4896,
|
||||
25515
|
||||
],
|
||||
"dharoks platelegs": [
|
||||
4722,
|
||||
@@ -8561,6 +8566,10 @@
|
||||
21009,
|
||||
21206
|
||||
],
|
||||
"ancestral hat": [
|
||||
21018,
|
||||
25518
|
||||
],
|
||||
"dragon harpoon": [
|
||||
21028,
|
||||
25373
|
||||
@@ -8967,10 +8976,6 @@
|
||||
22405,
|
||||
22446
|
||||
],
|
||||
"old key": [
|
||||
22428,
|
||||
25244
|
||||
],
|
||||
"battlemage potion": [
|
||||
22449,
|
||||
22452,
|
||||
@@ -9422,6 +9427,10 @@
|
||||
24418,
|
||||
24524
|
||||
],
|
||||
"volatile nightmare staff": [
|
||||
24424,
|
||||
25517
|
||||
],
|
||||
"iced gingerbread shield": [
|
||||
24438,
|
||||
24439,
|
||||
|
||||
Reference in New Issue
Block a user