forked from 2009Scape/Server
Rebase with upstream
This commit is contained in:
commit
101b8314c9
2889 changed files with 481914 additions and 0 deletions
102
09HDscape-server/src/plugin/ttrail/CoordinateCluePlugin.java
Normal file
102
09HDscape-server/src/plugin/ttrail/CoordinateCluePlugin.java
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
package plugin.ttrail;
|
||||
|
||||
import org.crandor.game.content.global.ttrail.ClueLevel;
|
||||
import org.crandor.game.content.global.ttrail.CoordinateClueScroll;
|
||||
import org.crandor.game.world.map.Location;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Initializes the coordinate clues.
|
||||
* @author Vexia
|
||||
*/
|
||||
public final class CoordinateCluePlugin extends CoordinateClueScroll {
|
||||
|
||||
/**
|
||||
* Constructs a new {@code CoordinateCluePlugin} {@code Object}
|
||||
*/
|
||||
public CoordinateCluePlugin() {
|
||||
this(null, -1, null, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@code CoordinateCluePlugin} {@code Object}
|
||||
* @param name the name.
|
||||
* @param clueId the clue id.
|
||||
* @param level the level.
|
||||
* @param location the location.
|
||||
* @param clue the clue.
|
||||
*/
|
||||
public CoordinateCluePlugin(String name, int clueId, ClueLevel level, Location location, String clue) {
|
||||
super(name, clueId, level, location, clue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
register(new CoordinateCluePlugin("tree-gnome-coord", 2807, ClueLevel.MEDIUM, new Location(2478, 3158, 0), "00 degrees 05 minutes south<br>01 degrees 13 minutes east"));
|
||||
register(new CoordinateCluePlugin("karamja-coord", 2809, ClueLevel.MEDIUM, new Location(2888, 3153, 0), "00 degrees 13 minutes south<br>13 degrees 58 minutes east"));
|
||||
register(new CoordinateCluePlugin("brimhaven-coord", 2811, ClueLevel.MEDIUM, new Location(2743, 3151, 0), "00 degrees 18 minutes south<br>09 degrees 28 minutes east"));
|
||||
register(new CoordinateCluePlugin("lumbridge-swamp-coord", 2813, ClueLevel.MEDIUM, new Location(3183, 3151, 0), "00 degrees 20 minutes south<br>23 degrees 15 minutes east"));
|
||||
register(new CoordinateCluePlugin("zanaris-shed-coord", 2815, ClueLevel.MEDIUM, new Location(3217, 3178, 0), "00 degrees 30 minutes north<br>24 degrees 16 minutes east"));
|
||||
register(new CoordinateCluePlugin("port-sarim-coord", 2817, ClueLevel.MEDIUM, new Location(3007, 3145, 0), "00 degrees 31 minutes south<br>17 degrees 43 minutes east"));
|
||||
register(new CoordinateCluePlugin("musa-point-coord", 2819, ClueLevel.MEDIUM, new Location(2896, 3119, 0), "01 degrees 18 minutes south<br>14 degrees 15 minutes east"));
|
||||
register(new CoordinateCluePlugin("moss-giant-coord", 2821, ClueLevel.MEDIUM, new Location(2696, 3206, 0), "01 degrees 26 minutes north<br>08 degrees 01 minutes east"));
|
||||
register(new CoordinateCluePlugin("hazelmere-coord", 2823, ClueLevel.MEDIUM, new Location(2680, 3111, 0), "01 degrees 35 minutes south<br>07 degrees 28 minutes east"));
|
||||
register(new CoordinateCluePlugin("uzer-coord", 2825, ClueLevel.MEDIUM, new Location(3510, 3075, 0), "02 degrees 43 minutes south<br>33 degrees 26 minutes east"));
|
||||
register(new CoordinateCluePlugin("ham-coord", 2827, ClueLevel.MEDIUM, new Location(3161, 3251, 0), "02 degrees 48 minutes north<br>22 degrees 30 minutes east"));
|
||||
register(new CoordinateCluePlugin("ardy-zoo-coord", 2829, ClueLevel.MEDIUM, new Location(2644, 3251, 0), "02 degrees 50 minutes north<br>06 degrees 20 minutes east"));
|
||||
register(new CoordinateCluePlugin("nature-altar-coord", 2831, ClueLevel.HARD, new Location(2874, 3047, 0), "03 degrees 35 minutes south<br>13 degrees 35 minutes east"));
|
||||
register(new CoordinateCluePlugin("shilo-mine-coord", 2833, ClueLevel.MEDIUM, new Location(2849, 3033, 0), "04 degrees 00 minutes south<br>12 degrees 46 minutes east"));
|
||||
register(new CoordinateCluePlugin("bedapin-camp-coord", 2835, ClueLevel.HARD, new Location(3168, 3041, 0), "03 degrees 45 minutes south<br>22 degrees 45 minutes east"));
|
||||
// register(new CoordinateCluePlugin("gorad-coord", 2837,
|
||||
// ClueLevel.HARD, new Location(2580, 3029, 0),
|
||||
// "04 degrees 05 minutes south<br>04 degrees 24 minutes east"));
|
||||
register(new CoordinateCluePlugin("crandor-coord", 2839, ClueLevel.MEDIUM, new Location(2848, 3297, 0), "04 degrees 13 minutes north<br>12 degrees 45 minutes east"));
|
||||
register(new CoordinateCluePlugin("champions-guild-coord", 2841, ClueLevel.MEDIUM, new Location(3179, 3343, 0), "05 degrees 43 minutes north<br>23 degrees 05 minutes east"));
|
||||
register(new CoordinateCluePlugin("cairn-island-coord", 2843, ClueLevel.HARD, new Location(2764, 2974, 0), "05 degrees 50 minutes south<br>10 degrees 05 minutes east"));
|
||||
register(new CoordinateCluePlugin("bandit-camp-coord", 2845, ClueLevel.HARD, new Location(3139, 2969, 0), "06 degrees 00 minutes south<br>21 degrees 48 minutes east"));
|
||||
// register(new CoordinateCluePlugin("east-karamja-coord", 2847,
|
||||
// ClueLevel.HARD, new Location(2924, 2963, 0),
|
||||
// "06 degrees 11 minutes south<br>15 degrees 07 minutes east"));
|
||||
register(new CoordinateCluePlugin("three-ponds-coord", 2849, ClueLevel.MEDIUM, new Location(2383, 3369, 0), "06 degrees 31 minutes north<br>01 degrees 46 minutes west"));
|
||||
register(new CoordinateCluePlugin("draynor-manor-coord", 2851, ClueLevel.MEDIUM, new Location(3120, 3384, 0), "06 degrees 58 minutes north<br>21 degrees 16 minutes east"));
|
||||
register(new CoordinateCluePlugin("nature-spirit-coord", 2853, ClueLevel.MEDIUM, new Location(3430, 3388, 0), "07 degrees 05 minutes north<br>30 degrees 56 minutes east"));
|
||||
register(new CoordinateCluePlugin("southeast-taverly-coord", 2855, ClueLevel.MEDIUM, new Location(2920, 3404, 0), "07 degrees 33 minutes north<br>15 degrees 00 minutes east"));
|
||||
register(new CoordinateCluePlugin("swamp-coord", 2856, ClueLevel.HARD, new Location(3441, 3419, 0), "08 degrees 03 minutes north<br>31 degrees 16 minutes east"));
|
||||
register(new CoordinateCluePlugin("feldip-coord", 2857, ClueLevel.MEDIUM, new Location(2593, 2899, 0), "08 degrees 11 minutes south<br>4 degrees 48 minutes east"));
|
||||
register(new CoordinateCluePlugin("gnome-terribirds-coord", 2858, ClueLevel.MEDIUM, new Location(2387, 3435, 0), "08 degrees 33 minutes north<br>01 degrees 39 minutes west"));
|
||||
register(new CoordinateCluePlugin("north-gnome-terribirds-coord", 3490, ClueLevel.MEDIUM, new Location(2382, 3467, 0), "09 degrees 35 minutes north<br>01 degrees 50 minutes west"));
|
||||
register(new CoordinateCluePlugin("ice-mountain-coord", 3491, ClueLevel.MEDIUM, new Location(3006, 3475, 0), "09 degrees 48 minutes north<br>17 degrees 39 minutes east"));
|
||||
register(new CoordinateCluePlugin("coal-line-coord", 3492, ClueLevel.MEDIUM, new Location(2585, 3505, 0), "10 degrees 45 minutes north<br>04 degrees 31 minutes east"));
|
||||
register(new CoordinateCluePlugin("slayer-tower-coord", 3493, ClueLevel.MEDIUM, new Location(3442, 3515, 0), "11 degrees 03 minutes north<br>31 degrees 20 minutes east"));
|
||||
register(new CoordinateCluePlugin("gnome-stronghold-coord", 3494, ClueLevel.MEDIUM, new Location(2416, 3515, 0), "11 degrees 05 minutes north<br>00 degrees 45 minutes west"));
|
||||
register(new CoordinateCluePlugin("eagles-peak-coord", 3495, ClueLevel.MEDIUM, new Location(2362, 3531, 0), "11 degrees 33 minutes north<br>02 degrees 24 minutes west"));
|
||||
register(new CoordinateCluePlugin("burthorpe-coord", 3496, ClueLevel.MEDIUM, new Location(2920, 3534, 0), "11 degrees 41 minutes north<br>14 degrees 58 minutes east"));
|
||||
register(new CoordinateCluePlugin("fenkenstrain-castle-coord", 3497, ClueLevel.MEDIUM, new Location(3548, 3559, 0), "12 degrees 28 minutes north<br>34 degrees 37 minutes east"));
|
||||
register(new CoordinateCluePlugin("lvl-11-wildy-coord", 3498, ClueLevel.HARD, new Location(3113, 3602, 0), "13 degrees 46 minutes north<br>21 degrees 01 minutes east"));
|
||||
register(new CoordinateCluePlugin("swaying-tree-coord", 3499, ClueLevel.MEDIUM, new Location(2735, 3639, 0), "14 degrees 54 minutes north<br>9 degrees 13 minutes east"));
|
||||
register(new CoordinateCluePlugin("rellekka-coord", 3500, ClueLevel.MEDIUM, new Location(2680, 3652, 0), "15 degrees 22 minutes north<br>07 degrees 31 minutes east"));
|
||||
register(new CoordinateCluePlugin("trollheim-coord", 3501, ClueLevel.HARD, new Location(2892, 3674, 0), "16 degrees 03 minutes north<br>14 degrees 07 minutes east"));
|
||||
register(new CoordinateCluePlugin("graveyard-wildy-coord", 3502, ClueLevel.HARD, new Location(3229, 3687, 0), "16 degrees 07 minutes north<br>22 degrees 45 minutes east"));
|
||||
// not sure if this is accessible
|
||||
register(new CoordinateCluePlugin("troll-stronghold-coord", 3503, ClueLevel.HARD, new Location(2853, 3689, 0), "16 degrees 31 minutes north<br>12 degrees 54 minutes east"));
|
||||
register(new CoordinateCluePlugin("level-22-wildy-coord", 3504, ClueLevel.HARD, new Location(3304, 3692, 0), "16 degrees 35 minutes north<br>27 degrees 01 minutes east"));
|
||||
register(new CoordinateCluePlugin("bandit-camp-coord", 3505, ClueLevel.HARD, new Location(3055, 3696, 0), "16 degrees 43 minutes north<br>19 degrees 13 minutes east"));
|
||||
register(new CoordinateCluePlugin("level-23-wildy-coord", 3506, ClueLevel.HARD, new Location(3302, 3696, 0), "16 degrees 43 minutes north<br>26 degrees 56 minutes east"));
|
||||
register(new CoordinateCluePlugin("northeast-rellekka-coord", 3507, ClueLevel.HARD, new Location(2711, 3732, 0), "17 degrees 50 minutes north<br>08 degrees 30 minutes east"));
|
||||
register(new CoordinateCluePlugin("level-29-wildy-coord", 3508, ClueLevel.HARD, new Location(2970, 3749, 0), "18 degrees 22 minutes north<br>16 degrees 33 minutes east"));
|
||||
register(new CoordinateCluePlugin("level-31-wildy-coord", 3509, ClueLevel.HARD, new Location(3034, 3804, 0), "18 degrees 50 minutes north<br>20 degrees 26 minutes east"));
|
||||
register(new CoordinateCluePlugin("level-35-wildy-coord", 3510, ClueLevel.HARD, new Location(3244, 3792, 0), "19 degrees 43 minutes north<br>25 degrees 07 minutes east"));
|
||||
register(new CoordinateCluePlugin("level-36-wildy-coord", 3512, ClueLevel.HARD, new Location(3139, 3803, 0), "20 degrees 05 minutes north<br>21 degrees 52 minutes east"));
|
||||
register(new CoordinateCluePlugin("kbd-wildy-coord", 3513, ClueLevel.HARD, new Location(3014, 3847, 0), "21 degrees 24 minutes north<br>17 degrees 54 minutes east"));
|
||||
register(new CoordinateCluePlugin("chaos-temple-wildy-coord", 3514, ClueLevel.HARD, new Location(2946, 3818, 0), "20 degrees 33 minutes north<br>15 degrees 48 minutes east"));
|
||||
register(new CoordinateCluePlugin("rune-rocks-wildy-coord", 3515, ClueLevel.HARD, new Location(3059, 3884, 0), "22 degrees 35 minutes north<br>19 degrees 18 minutes east"));
|
||||
register(new CoordinateCluePlugin("demonic-ruins-wildy-coord", 3516, ClueLevel.HARD, new Location(3290, 3889, 0), "22 degrees 45 minutes north<br>26 degrees 33 minutes east"));
|
||||
register(new CoordinateCluePlugin("rogues-castle-coord", 3518, ClueLevel.HARD, new Location(3285, 3943, 0), "24 degrees 24 minutes north<br>26 degrees 24 minutes east"));
|
||||
register(new CoordinateCluePlugin("wildy-lever-coord", 3520, ClueLevel.HARD, new Location(3158, 3958, 0), "24 degrees 56 minutes north<br>22 degrees 28 minutes east"));
|
||||
register(new CoordinateCluePlugin("pirates-hideout-coord", 3522, ClueLevel.HARD, new Location(3040, 3961, 0), "24 degrees 58 minutes north<br>18 degrees 43 minutes east"));
|
||||
register(new CoordinateCluePlugin("agility-wildy-coord", 3524, ClueLevel.HARD, new Location(2987, 3964, 0), "25 degrees 03 minutes north<br>17 degrees 05 minutes east"));
|
||||
register(new CoordinateCluePlugin("axe-hut-coord", 3525, ClueLevel.HARD, new Location(3190, 3963, 0), "25 degrees 03 minutes north<br>23 degrees 24 minutes east"));
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
146
09HDscape-server/src/plugin/ttrail/EmoteCluePlugin.java
Normal file
146
09HDscape-server/src/plugin/ttrail/EmoteCluePlugin.java
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
package plugin.ttrail;
|
||||
|
||||
import org.crandor.game.content.global.ttrail.ClueLevel;
|
||||
import org.crandor.game.content.global.ttrail.EmoteClueScroll;
|
||||
import org.crandor.game.node.entity.player.link.emote.Emotes;
|
||||
import org.crandor.game.world.map.zone.ZoneBorders;
|
||||
import org.crandor.plugin.Plugin;
|
||||
import org.crandor.plugin.PluginManager;
|
||||
|
||||
/**
|
||||
* Initializes the emote clue plugins.
|
||||
* @author Vexia
|
||||
*/
|
||||
public final class EmoteCluePlugin extends EmoteClueScroll {
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code EmoteCluePlugin} {@Code Object}
|
||||
*/
|
||||
public EmoteCluePlugin() {
|
||||
super(null, -1, null, null, null, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code EmoteCluePlugin} {@Code Object}
|
||||
* @param name the name.
|
||||
* @param clueId the clue id.
|
||||
* @param level the level.
|
||||
* @param emote the Emotes.
|
||||
* @param commenceEmote the commence Emotes.
|
||||
* @param equipment the equipment.
|
||||
* @param clue the clue.
|
||||
* @param borders the borders.
|
||||
*/
|
||||
public EmoteCluePlugin(String name, int clueId, ClueLevel level, Emotes emote, Emotes commenceEmote, int[][] equipment, String clue, ZoneBorders... borders) {
|
||||
super(name, clueId, level, emote, commenceEmote, equipment, clue, borders);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code EmoteCluePlugin} {@Code Object}
|
||||
* @param name the name.
|
||||
* @param clueId the clue id.
|
||||
* @param level the level.
|
||||
* @param emote the Emotes.
|
||||
* @param equipment the equipment.
|
||||
* @param clue the clue.
|
||||
* @param borders the borders.
|
||||
*/
|
||||
public EmoteCluePlugin(String name, int clueId, ClueLevel level, Emotes emote, int[][] equipment, String clue, ZoneBorders... borders) {
|
||||
super(name, clueId, level, emote, null, equipment, clue, borders);
|
||||
}
|
||||
|
||||
// register(new EmoteCluePlugin(clue, clueId, level, commenceEmote,
|
||||
// commenceEmote, equipment, clue, borders));
|
||||
// register(new EmoteCluePlugin(clue, clueId, level, commenceEmote,
|
||||
// equipment, clue, borders));
|
||||
// register(new EmoteCluePlugin());
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
Emotes emote = Emotes.BECKON;
|
||||
register(new EmoteCluePlugin("digsite-beckon", 2677, ClueLevel.MEDIUM, emote, Emotes.BOW, new int[][] { { 6328 }, { 1267 }, { 658 } }, "Beckon in the Digsite, near the<br>eastern winch. Bow or curtsy<br>before you talk to me.<br>Equip a green gnome hat,<br>snakeskin boots and an<br>iron pickaxe.", new ZoneBorders(3368, 3425, 3371, 3429)));
|
||||
register(new EmoteCluePlugin("tai-bwo-beckon", 2678, ClueLevel.MEDIUM, emote, Emotes.CLAP, new int[][] { { 1099 }, { 2552, 2554, 2556, 2558, 2560, 2562, 2564, 2568 }, { 1143 } }, "Beckon in Tai Bwo<br>Wannai. Clap before<br>you talk to me.<br>Equip green<br>dragonhide chaps, a<br>ring of dueling and a<br>mithril medium helmet.", new ZoneBorders(2771, 3053, 2814, 3074)));
|
||||
emote = Emotes.BLOW_KISS;
|
||||
register(new EmoteCluePlugin("shilo-kiss", 2681, ClueLevel.HARD, emote, new int[][] { { 4089 }, { 5016 }, { 1127 } }, "Blow a kiss between<br>the tables in Shilo<br>Village bank. Beware<br>of double agents!<br>Equip a blue mystic<br>hat, bone spear and<br>rune plate body.", new ZoneBorders(2849, 2950, 2855, 2957)));
|
||||
emote = Emotes.BOW;
|
||||
register(new EmoteCluePlugin("legends-guild", 2682, ClueLevel.EASY, emote, new int[][] { { 1067 }, { 1696 }, { 845 } }, "Bow outside the entrance<br>to the Legends' Guild.<br>Equip iron platelegs, an<br>emerald amulet and an oak<br>longbow.", new ZoneBorders(2726, 3346, 2731, 3349)));
|
||||
emote = Emotes.RASPBERRY;
|
||||
register(new EmoteCluePlugin("monkey-cage", 2679, ClueLevel.EASY, emote, new int[][] { { 1133 }, { 1075 }, { 1379 } }, "Blow a raspberry at the<br>monkey cage in<br>Ardougne Zoo.<br>Equip a studded<br>leather body, bronze<br>platelegs and a normal<br>staff with no orb.", new ZoneBorders(2597, 3274, 2609, 3284)));
|
||||
register(new EmoteCluePlugin("keep-le-faye", 2680, ClueLevel.EASY, emote, new int[][] { { 1169 }, { 1115 }, { 1059 } }, "Blow raspberries out<br>the entrance to Keep Le<br>Faye.<br>Equip a coif, an iron<br>platebody and leather<br>gloves.", new ZoneBorders(2759, 3401, 2762, 3403)));
|
||||
// register(new EmoteCluePlugin("fishing-guild-blow", 2683,
|
||||
// ClueLevel.HARD, emote, new int[][] {{2890}, {2493}, {1347}},
|
||||
// "Blow a raspberry in the<br>Fighing Guild bank. Beware<br>of double agents!<br>Equip and elemental shield<br>,blue dragonhide chaps<br>and a rune warhammer.",
|
||||
// new ZoneBorders(2586, 3418, 2590, 3422)));
|
||||
emote = Emotes.CHEER;
|
||||
register(new EmoteCluePlugin("druid-circle-cheer", 2684, ClueLevel.EASY, emote, new int[][] { { 4310 }, { 579 }, { 1307 } }, "Cheer at the Druids'<br>Circle.<br>Equip a blue wizard<br>hat, a bronze<br>two-handed sword and<br>HAM boots.", new ZoneBorders(2920, 3478, 2930, 3940)));
|
||||
register(new EmoteCluePlugin("games-room-cheer", 2685, ClueLevel.EASY, emote, new int[][] {}, "Cheer at the games<br>room.<br>Have nothing equipped<br>at all when you do.", new ZoneBorders(2194, 4946, 2221, 4973)));
|
||||
register(new EmoteCluePlugin("barb-agility-cheer", 2686, ClueLevel.MEDIUM, emote, new int[][] { { 1119 }, { 853 }, { 4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 10638 } }, "Cheer in the Barbarian<br>Agility Arena.<br>Headbang before you<br>talk to me.<br>Equip a steel plate<br>body, maple shortbow, and a wilderness<br>cape.", new ZoneBorders(2550, 3556, 2553, 3559), new ZoneBorders(2529, 3542, 2553, 3559)));
|
||||
register(new EmoteCluePlugin("edge-gen-cheer", 2687, ClueLevel.MEDIUM, emote, Emotes.DANCE, new int[][] { { 1757 }, { 1061 }, { 1059 } }, "Cheer in the Edgeville general<br>store. Dance<br>before you talk to me.<br>Equip a brown apron,<br>leather boots and<br>leather gloves.", new ZoneBorders(3076, 3507, 3084, 3513)));
|
||||
register(new EmoteCluePlugin("ogre-pen-cheer", 2688, ClueLevel.MEDIUM, emote, Emotes.ANGRY, new int[][] { { 1135 }, { 1099 }, { 1177 } }, "Cheer in the Ogre Pen<br>in the Training Camp.<br>Show you are angry<br>before you talk to me.<br>Equip a green<br>dragonhide body and<br>chaps and a steel<br>square shield.", new ZoneBorders(2523, 3373, 2533, 3377)));
|
||||
emote = Emotes.CLAP;
|
||||
register(new EmoteCluePlugin("exam-room-clap", 2689, ClueLevel.EASY, emote, new int[][] { { 1005 }, { 628 }, { 1059 } }, "Clap in the main exam room<br>in the Exam Centre.<br>Equip a white apron, green<br>gnome boots and leather<br>gloves.", new ZoneBorders(3357, 3332, 3367, 3348)));
|
||||
register(new EmoteCluePlugin("wizard-tower-clap", 2690, ClueLevel.EASY, emote, new int[][] { { 1137 }, { 1639 }, { 1005 } }, "Clap on the causeway to the<br>Wizards' Tower.<br>Equip an iron medium<br>helmet, emerald ring and a<br>white apron.", new ZoneBorders(3112, 3173, 3115, 3206)));
|
||||
// 2nd plane for ardy mill
|
||||
register(new EmoteCluePlugin("ardgoune-mill-clap", 2691, ClueLevel.EASY, emote, new int[][] { { 640 }, { 4300 }, { 5525 } }, "Clap on the top level of the<br>mill, north of East Ardougne.<br>Equip a blue gnome robe top,<br>HAM robe bottom and an<br>unenchanted tiara.", new ZoneBorders(2628, 3382, 2636, 3390, 2)));
|
||||
register(new EmoteCluePlugin("seers-court-clap", 2692, ClueLevel.MEDIUM, emote, Emotes.SPIN, new int[][] { { 3200 }, { 4093 }, { 1643 } }, "Clap in Seers court house.<br>Spin before you talk to me.<br>Equip an adamant halberd,<br>blue mystic robe bottom and<br>a diamond ring.", new ZoneBorders(2732, 3467, 2739, 3471)));
|
||||
emote = Emotes.CRY;
|
||||
register(new EmoteCluePlugin("catherby-range-cry", 2693, ClueLevel.MEDIUM, emote, Emotes.BOW, new int[][] { { 630 }, { 1131 }, { 2961 } }, "Cry in the Catherby<br>Ranging shop. Bow before you talk to me.<br>Equip blue gnome<br>boots, a hard leather<br>body and an<br>unblessed silver<br>sickle.", new ZoneBorders(2821, 3441, 2825, 3445)));
|
||||
register(new EmoteCluePlugin("catherby-shore-cry", 2694, ClueLevel.MEDIUM, emote, Emotes.LAUGH, new int[][] { { 1183 }, { 8872 }, { 1121 } }, "Cry on the shore of<br>Catherby beach.<br>Laugh before you talk to me.<br>Equip an adamant sq<br>shield, a bone dagger<br>and mithril platebody.", new ZoneBorders(2849, 3423, 2857, 3430), new ZoneBorders(2845, 3428, 2852, 3430)));
|
||||
emote = Emotes.DANCE;
|
||||
register(new EmoteCluePlugin("draynor-cross-dance", 2695, ClueLevel.EASY, emote, new int[][] { { 1101 }, { 1637 }, { 839 } }, "Dance at the<br>crossroads north of<br>Draynor.<br>Equip an iron chain<br>body, a sapphire ring<br>and a longbow.", new ZoneBorders(3109, 3293, 3110, 3296), new ZoneBorders(3108, 3294, 3111, 3295)));
|
||||
register(new EmoteCluePlugin("fally-party-dance", 2696, ClueLevel.EASY, emote, new int[][] { { 1157 }, { 1119 }, { 1081 } }, "Dance in the Party<br>Room.<br>Equip a steel full<br>helmet, steel<br>platebody and an iron<br>plateskirt.", new ZoneBorders(3041, 3372, 3050, 3384), new ZoneBorders(3051, 3371, 3054, 3385), new ZoneBorders(3073, 3371, 3040, 3385)));
|
||||
register(new EmoteCluePlugin("fish-guild-jig", 2697, ClueLevel.EASY, Emotes.JIG, new int[][] { { 1639 }, { 1694 }, { 1103 } }, "Dance a jig by the<br>entrance to the<br>Fishing Guild.<br>Equip an emerald ring,<br>a sapphire amulet,<br>and a bronze chain<br>body.", new ZoneBorders(2610, 3392, 2612, 3393)));
|
||||
register(new EmoteCluePlugin("lumb-shack-dance", 2698, ClueLevel.EASY, emote, new int[][] { { 1205 }, { 1153 }, { 1635 } }, "Dance in<br>the shack in Lumbridge Swamp.<br>Equip a bronze<br>dagger, iron full helmet<br>and a gold ring.", new ZoneBorders(3202, 3167, 3205, 3170)));
|
||||
register(new EmoteCluePlugin("lumb-cave-dance", 2699, ClueLevel.MEDIUM, emote, Emotes.BLOW_KISS, new int[][] { { 1381 }, { 1155 }, { 1731 } }, "Dance in the dark<br>cave beneath<br>Lumbridge Swamp.<br>Blow a kiss before<br>you talk to me.<br>Equip an air staff,<br>bronze full helm and<br>an amulet of power.", new ZoneBorders(3139, 9534, 3260, 9587)));
|
||||
register(new EmoteCluePlugin("shantay-guild-jig", 2700, ClueLevel.MEDIUM, Emotes.JIG, Emotes.BOW, new int[][] { { 3343 }, { 1381 }, { 1173 } }, "Dance a jig under<br>Shantay's Awning.<br>Bow before you talk to<br>me.<br>Equip a pointed blue<br>snail helmet, an air<br>staff and a bronze<br>square shield.", new ZoneBorders(3302, 3122, 3305, 3125)));
|
||||
register(new EmoteCluePlugin("cat-entrance-dance", 2701, ClueLevel.HARD, emote, new int[][] { { 2570 }, { 1704 }, { 1317 } }, "Dance at the<br>cat-doored pyramid in<br>Sophanem. Beware of double agents!<br>Equip a ring of life,<br>an uncharged amulet<br>of glory and an adamant two-handed<br>sword.", new ZoneBorders(3293, 2781, 3296, 2782)));
|
||||
emote = Emotes.HEADBANG;
|
||||
register(new EmoteCluePlugin("al-kharid-headbang", 2702, ClueLevel.EASY, emote, new int[][] { { 1833 }, { 1059 }, { 1061 } }, "Headbang in the mine north of Al<br>Kharid.<br>Equip a desert shirt, leather gloves and<br>leather boots.", new ZoneBorders(3297, 3286, 3301, 3316)));
|
||||
emote = Emotes.JUMP_FOR_JOY;
|
||||
register(new EmoteCluePlugin("beehive-jump", 2703, ClueLevel.EASY, emote, new int[][] { { 1833 }, { 648 }, { 1353 } }, "Jump for joy at the beehives.<br>Equip a desert shirt, green<br>gnome robe bottoms and a<br>steel axe.", new ZoneBorders(2752, 3437, 2766, 3449)));
|
||||
register(new EmoteCluePlugin("yanille-jump", 2704, ClueLevel.MEDIUM, emote, Emotes.JIG, new int[][] { { 1757 }, { 1145 }, { 6324 } }, "Jump for joy in Yanille<br>bank. Dance a jig before you<br>talk to me.<br>Equip a brown apron,<br>adamantite medium helmet<br>and snakeskin chaps.", new ZoneBorders(2609, 3088, 2614, 3097)));
|
||||
register(new EmoteCluePlugin("tzhaar-jump", 2705, ClueLevel.MEDIUM, emote, Emotes.SHRUG, new int[][] { { 1295 }, { 2499 }, { 4095 } }, "Jump for joy in the TzHaar<br>sword shop. Shrug before you<br>talk to me.<br>Equip a Steel longsword,<br>Blue D'hide body and blue<br>mystic gloves.", new ZoneBorders(2477, 5144, 2480, 5147)));
|
||||
emote = Emotes.LAUGH;
|
||||
register(new EmoteCluePlugin("jokul-tent-laugh", 2706, ClueLevel.HARD, emote, new int[][] { { 1163 }, { 2493 }, { 1393 } }, "Laugh in the Jokul's tent in the<br>Mountain Camp.<br>Beware of double agents! Equip a<br>rune full helmet, blue dragonhide<br>chaps and a fire battlestaff.", new ZoneBorders(2811, 3678, 2813, 3682)));
|
||||
emote = Emotes.PANIC;
|
||||
register(new EmoteCluePlugin("limestone-mine-panic", 2707, ClueLevel.EASY, emote, new int[][] { { 1075 }, { 1269 }, { 1141 } }, "Panic in the<br>Limestone Mine.<br>Equip bronze<br>platelegs, a steel<br>pickaxe and a steel<br>medium helmet.", new ZoneBorders(3368, 3496, 3374, 3505)));
|
||||
register(new EmoteCluePlugin("fish-trawler-panic", 2708, ClueLevel.EASY, emote, new int[][] {}, "Panic on the pier<br>where you catch the<br>Fishing trawler.<br>Have nothing equipped<br>at all when you do.", new ZoneBorders(2675, 3162, 2677, 3175)));
|
||||
emote = Emotes.SALUTE;
|
||||
// vexia make banana saulte so it won't work if u are wearing anything
|
||||
// on chest or legs
|
||||
register(new EmoteCluePlugin("banana-salute", 2710, ClueLevel.HARD, emote, new int[][] { { 1643 }, { 1731 } }, "Salute in the banana<br>plantation. Beware of<br>double agents!<br>Equip a diamond ring,<br>amulet of power, and nothing on<br>your chest and legs.", new ZoneBorders(2911, 3156, 2935, 3175)));
|
||||
emote = Emotes.SHRUG;
|
||||
register(new EmoteCluePlugin("rimmington-shrug", 2711, ClueLevel.EASY, emote, new int[][] { { 1654 }, { 1635 }, { 1237 } }, "Shrug in the mine near<br>Rimmington.<br>Equip a gold<br>necklace, a gold ring<br>and a bronze spear.", new ZoneBorders(2970, 3230, 2987, 3251)));
|
||||
register(new EmoteCluePlugin("catherby-shrug", 2712, ClueLevel.MEDIUM, emote, Emotes.YAWN, new int[][] { { 851 }, { 1099 }, { 1137 } }, "Shrug in Catherby<br>bank. Yawn before<br>you talk to me.<br>Equip a maple<br>longbow, green d'hide<br>chaps and an iron<br>med helm.", new ZoneBorders(2806, 3438, 2812, 3442)));
|
||||
register(new EmoteCluePlugin("zammy-altar-shrug", 2713, ClueLevel.HARD, emote, new int[][] { { 1079 }, { 1115 }, { 2487 } }, "Shrug in the Zamorak<br>temple found in the<br>Eastern Wilderness.<br>Beware of double<br>agents!<br>Equip rune plate legs,<br>an iron plate body and<br>blue dragonhide<br>vambraces.", new ZoneBorders(3233, 3603, 3246, 3614)));
|
||||
emote = Emotes.SPIN;
|
||||
register(new EmoteCluePlugin("rimmington-cross-spin", 2716, ClueLevel.EASY, emote, new int[][] { { 658 }, { 642 }, { 1095 } }, "Spin at the crossroads<br>north of Rimmington.<br>Equip a green gnome<br>hat, cream gnome top<br>and leather chaps.", new ZoneBorders(2979, 3275, 2985, 3279)));
|
||||
register(new EmoteCluePlugin("draynor-manor-spin", 2719, ClueLevel.EASY, emote, new int[][] { { 1115 }, { 1097 }, { 1155 } }, "Spin in the Draynor<br>Manor by the fountain.<br>Equip an iron<br>platebody, studded<br>leather chaps and a<br>bronze full helmet.", new ZoneBorders(3085, 3332, 3090, 3337)));
|
||||
register(new EmoteCluePlugin("varrock-court-spin", 2722, ClueLevel.EASY, emote, new int[][] { { 1361 }, { 1169 }, { 1641 } }, "Spin in the Varrock<br>Castle courtyard.<br>Equip a black axe, a<br>coif and a ruby ring.", new ZoneBorders(3202, 3459, 3223, 3468)));
|
||||
register(new EmoteCluePlugin("barb-bridge-spin", 2723, ClueLevel.MEDIUM, emote, Emotes.SALUTE, new int[][] { { 2942 }, { 1193 }, { 1159 } }, "Spin on the bridge by<br>the Barbarian Village.<br>Salute before you talk<br>to me.<br>Equip purple gloves, a<br>steel kiteshield and a<br>mithril full helmet.", new ZoneBorders(3102, 3419, 3108, 3422)));
|
||||
emote = Emotes.THINK;
|
||||
register(new EmoteCluePlugin("lumb-wheat-think", 2725, ClueLevel.EASY, emote, new int[][] { { 640 }, { 654 }, { 843 } }, "Think in middle of the<br>wheat field by the<br>lumbridge mill.<br>Equip a blue gnome<br> robetop, a turquoise<br> gnome robe bottom<br>and an oak shortbow.", new ZoneBorders(3157, 3298, 3159, 3300)));
|
||||
// register(new EmoteCluePlugin("observatory-think", 2727,
|
||||
// ClueLevel.MEDIUM, emote, Emotes.SPIN, new int[][] {{1109}, {1099},
|
||||
// {1698}},
|
||||
// "Think in the centre of<br>the Observatory. Spin<br>before you talk to me.<br>Equip a mithril chain<br>body, green<br>dragonhide chaps and<br>a ruby amulet.",
|
||||
// new ZoneBorders(2439, 3160, 2442, 3163)));
|
||||
emote = Emotes.WAVE;
|
||||
register(new EmoteCluePlugin("lumber-wave", 2729, ClueLevel.EASY, emote, new int[][] { { 1131 }, { 1095 }, { 1351 } }, "Wave along the south fence of<br>the Lumber Yard.<br>Equip a hard leather body,<br>leather chaps and a<br>bronze axe.", new ZoneBorders(3306, 3490, 3309, 3492)));
|
||||
register(new EmoteCluePlugin("fally-gem-wave", 2731, ClueLevel.EASY, emote, new int[][] { { 1273 }, { 1125 }, { 1191 } }, "Wave in the Falador<br>gem store.<br>Equip a Mithril pickaxe,<br>Black platebody and<br>an Iron Kiteshield.", new ZoneBorders(2944, 3332, 2946, 3337)));
|
||||
register(new EmoteCluePlugin("mudskipper-wave", 2733, ClueLevel.EASY, emote, new int[][] { { 1019 }, { 1095 }, { 1424 } }, "Wave on Mudskipper Point.<br>Equip a black cape, leather<br>chaps and a steel mace.", new ZoneBorders(2979, 3105, 3008, 3115)));
|
||||
emote = Emotes.YAWN;
|
||||
register(new EmoteCluePlugin("varrock-library-yawn", 2735, ClueLevel.EASY, emote, new int[][] { { 638 }, { 4300 }, { 1335 } }, "Yawn in the Varrock<br>library.<br>Equip a green gnome<br>robe top, HAM robe<br>bottom and an iron<br>warhammer.", new ZoneBorders(3207, 3490, 3214, 3497), new ZoneBorders(3214, 3494, 3217, 3497)));
|
||||
register(new EmoteCluePlugin("draynor-market-yawn", 2737, ClueLevel.EASY, emote, new int[][] { { 1097 }, { 1191 }, { 1295 } }, "Yawn in Draynor<br>Marketplace.<br>Equip studded leather<br>chaps, an iron<br>kiteshield and a steel<br>longsword.", new ZoneBorders(3075, 3245, 3086, 3255)));
|
||||
register(new EmoteCluePlugin("castle-wars-yawn", 2739, ClueLevel.MEDIUM, emote, Emotes.SHRUG, new int[][] { { 1698 }, { 1329 }, WILDY_CAPES }, "Yawn in the Castle<br>Wars lobby. Shrug<br>before you talk to me.<br>Equip ruby amulet, a<br>mithril scimitar and a<br>Wilderness cape.", new ZoneBorders(2434, 3061, 2464, 3102)));
|
||||
register(new EmoteCluePlugin("rogue-gen-yawn", 2741, ClueLevel.HARD, emote, new int[][] { { 1183 }, { 2487 }, { 1275 } }, "Yawn in the rogues'<br>general store. Beware<br>of double agents!<br>Equip an adamant<br>square shield, blue<br>dragon vambraces<br>and a rune pickaxe.", new ZoneBorders(3024, 3699, 3027, 3704)));
|
||||
PluginManager.definePlugin(new UriNPC());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object fireEvent(String identifier, Object... args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
76
09HDscape-server/src/plugin/ttrail/MapCluePlugin.java
Normal file
76
09HDscape-server/src/plugin/ttrail/MapCluePlugin.java
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
package plugin.ttrail;
|
||||
|
||||
import org.crandor.game.content.global.ttrail.ClueLevel;
|
||||
import org.crandor.game.content.global.ttrail.MapClueScroll;
|
||||
import org.crandor.game.world.map.Location;
|
||||
import org.crandor.game.world.map.zone.ZoneBorders;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Initializes the map clues.
|
||||
* @author Vexia
|
||||
*/
|
||||
public final class MapCluePlugin extends MapClueScroll {
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code MapCluePlugin} {@Code Object}
|
||||
*/
|
||||
public MapCluePlugin() {
|
||||
this(null, -1, null, -1, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code MapCluePlugin} {@Code Object}
|
||||
* @param name the name.
|
||||
* @param clueId the clue id.
|
||||
* @param level the level.
|
||||
* @param interfaceId the interface id.
|
||||
* @param location the location.
|
||||
*/
|
||||
public MapCluePlugin(String name, int clueId, ClueLevel level, int interfaceId, Location location) {
|
||||
super(name, clueId, level, interfaceId, location);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code MapCluePlugin} {@Code Object}
|
||||
* @param name the name.
|
||||
* @param clueId the clue id.
|
||||
* @param level the level.
|
||||
* @param interfaceId the interface id.
|
||||
* @param location the location.
|
||||
* @param object the object.
|
||||
* @param borders the borders.
|
||||
*/
|
||||
public MapCluePlugin(String name, int clueId, ClueLevel level, int interfaceId, Location location, int object, ZoneBorders... borders) {
|
||||
super(name, clueId, level, interfaceId, location, object, borders);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
register(new MapCluePlugin("mc-grubber-crate", 2743, ClueLevel.MEDIUM, 355, Location.create(2658, 3488, 0), 357, new ZoneBorders(2657, 3487, 2660, 3489)));
|
||||
register(new MapCluePlugin("ardy-crate", 2747, ClueLevel.MEDIUM, 361, Location.create(2565, 3248, 0), 354, new ZoneBorders(2564, 3247, 2566, 3249)));
|
||||
register(new MapCluePlugin("wildy-crate", 2773, ClueLevel.HARD, 359, Location.create(3026, 3628, 0), 354, new ZoneBorders(3025, 3627, 3027, 3629)));
|
||||
register(new MapCluePlugin("goblin-crate", 2774, ClueLevel.HARD, 358, Location.create(2457, 3182, 0), 18506, new ZoneBorders(2456, 3181, 2458, 3183)));
|
||||
register(new MapCluePlugin("miscellania-dig", 2776, ClueLevel.MEDIUM, 340, Location.create(2536, 3865, 0)));
|
||||
register(new MapCluePlugin("crafting-guild-dig", 2778, ClueLevel.MEDIUM, 352, Location.create(2906, 3294, 0)));
|
||||
register(new MapCluePlugin("wizard-tower-dig", 2745, ClueLevel.EASY, 356, Location.create(3110, 3152, 0)));
|
||||
register(new MapCluePlugin("east-dig", 2805, ClueLevel.EASY, 360, Location.create(2651, 3231, 0)));
|
||||
register(new MapCluePlugin("rimmington", 2780, ClueLevel.MEDIUM, 362, Location.create(2924, 3209, 0)));
|
||||
register(new MapCluePlugin("west-ardy", 2782, ClueLevel.HARD, 357, Location.create(2488, 3308, 0)));
|
||||
register(new MapCluePlugin("yanille", 2783, ClueLevel.HARD, 353, Location.create(2616, 3077, 0)));
|
||||
register(new MapCluePlugin("mcgrubber", 2785, ClueLevel.EASY, 354, Location.create(2611, 3481, 0)));
|
||||
register(new MapCluePlugin("falador-stone", 2786, ClueLevel.EASY, 351, Location.create(3043, 3399, 0)));
|
||||
register(new MapCluePlugin("champion's-guild", 2788, ClueLevel.EASY, 346, Location.create(3166, 3360, 0)));
|
||||
register(new MapCluePlugin("falador-statue", 2790, ClueLevel.EASY, 337, Location.create(2970, 3415, 0)));
|
||||
register(new MapCluePlugin("varrock-mine", 2792, ClueLevel.EASY, 347, Location.create(3289, 3373, 0)));
|
||||
register(new MapCluePlugin("khazard-altar", 2793, ClueLevel.MEDIUM, 342, Location.create(2455, 3230, 0)));
|
||||
register(new MapCluePlugin("light-house", 2794, ClueLevel.MEDIUM, 343, Location.create(2578, 3597, 0)));
|
||||
register(new MapCluePlugin("north-seers", 2796, ClueLevel.MEDIUM, 344, Location.create(2666, 3562, 0)));
|
||||
register(new MapCluePlugin("legends-guild", 2797, ClueLevel.HARD, 339, Location.create(2723, 3338, 0)));
|
||||
register(new MapCluePlugin("wilderness", 2799, ClueLevel.HARD, 338, Location.create(3021, 3911, 0)));
|
||||
register(new MapCluePlugin("draynor", 2801, ClueLevel.MEDIUM, 348, Location.create(3092, 3227, 0)));
|
||||
register(new MapCluePlugin("abandoned-mine", 2803, ClueLevel.MEDIUM, 341, Location.create(3434, 3266, 0)));
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
179
09HDscape-server/src/plugin/ttrail/SaradominWizardNPC.java
Normal file
179
09HDscape-server/src/plugin/ttrail/SaradominWizardNPC.java
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
package plugin.ttrail;
|
||||
|
||||
import org.crandor.game.content.global.ttrail.ClueScrollPlugin;
|
||||
import org.crandor.game.node.entity.Entity;
|
||||
import org.crandor.game.node.entity.combat.CombatSpell;
|
||||
import org.crandor.game.node.entity.combat.CombatStyle;
|
||||
import org.crandor.game.node.entity.combat.CombatSwingHandler;
|
||||
import org.crandor.game.node.entity.combat.equipment.SwitchAttack;
|
||||
import org.crandor.game.node.entity.combat.handlers.MultiSwingHandler;
|
||||
import org.crandor.game.node.entity.npc.AbstractNPC;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||
import org.crandor.game.world.map.Location;
|
||||
import org.crandor.game.world.map.RegionManager;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Handles saradomin npc.
|
||||
* @author Vexia
|
||||
*/
|
||||
public final class SaradominWizardNPC extends AbstractNPC {
|
||||
|
||||
/**
|
||||
* The combat handler to use.
|
||||
*/
|
||||
private static final MultiSwingHandler COMBAT_HANDLER = new MultiSwingHandler(new SwitchAttack(CombatStyle.MELEE).setUseHandler(true), new SwitchAttack(CombatStyle.MAGIC).setUseHandler(true));
|
||||
|
||||
/**
|
||||
* The npc ids.
|
||||
*/
|
||||
private static final int[] IDS = new int[] { 1264 };
|
||||
|
||||
/**
|
||||
* The clue scroll.
|
||||
*/
|
||||
private ClueScrollPlugin clueScroll;
|
||||
|
||||
/**
|
||||
* The player.
|
||||
*/
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code SaradominWizardNPC} {@code Object}
|
||||
*/
|
||||
public SaradominWizardNPC() {
|
||||
super(0, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code SaradominWizardNPC} {@Code Object}
|
||||
* @param id the id.
|
||||
* @param location the location.
|
||||
*/
|
||||
public SaradominWizardNPC(int id, Location location) {
|
||||
super(id, location, false);
|
||||
this.setRespawn(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractNPC construct(int id, Location location, Object... objects) {
|
||||
return new SaradominWizardNPC(id, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
Player player = getAttribute("player", null);
|
||||
ClueScrollPlugin clueScroll = getAttribute("clue", null);
|
||||
if (player != null) {
|
||||
this.player = player;
|
||||
}
|
||||
if (clueScroll != null) {
|
||||
this.clueScroll = clueScroll;
|
||||
}
|
||||
if (player != null) {
|
||||
location = RegionManager.getSpawnLocation(player, this);
|
||||
if (location == null) {
|
||||
location = player.getLocation();
|
||||
}
|
||||
}
|
||||
super.init();
|
||||
getProperties().setSpell((CombatSpell) SpellBook.MODERN.getSpell(41));
|
||||
getProperties().setAutocastSpell((CombatSpell) SpellBook.MODERN.getSpell(41));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finalizeDeath(Entity killer) {
|
||||
if (killer instanceof Player) {
|
||||
Player p = killer.asPlayer();
|
||||
if (p == player) {
|
||||
p.setAttribute("killed-wizard", clueScroll.getClueId());
|
||||
}
|
||||
}
|
||||
super.finalizeDeath(killer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTickActions() {
|
||||
super.handleTickActions();
|
||||
if (player != null) {
|
||||
if (player.getLocation().getDistance(getLocation()) > 10 || !player.isActive()) {
|
||||
clear();
|
||||
}
|
||||
if (!getProperties().getCombatPulse().isAttacking()) {
|
||||
getProperties().getCombatPulse().attack(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CombatSwingHandler getSwingHandler(boolean swing) {
|
||||
return COMBAT_HANDLER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttack(Entity entity) {
|
||||
if (!(entity instanceof Player)) {
|
||||
return false;
|
||||
}
|
||||
if (player != null) {
|
||||
Player p = entity.asPlayer();
|
||||
return p == player;
|
||||
}
|
||||
return super.canAttack(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAttackable(Entity entity, CombatStyle style) {
|
||||
if (!(entity instanceof Player)) {
|
||||
return false;
|
||||
}
|
||||
if (player != null) {
|
||||
Player p = entity.asPlayer();
|
||||
return p == player;
|
||||
}
|
||||
return super.isAttackable(entity, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSelectTarget(Entity target) {
|
||||
return target == player;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
return super.newInstance(arg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return IDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bplayer.
|
||||
* @return the player
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the baplayer.
|
||||
* @param player the player to set.
|
||||
*/
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bclueScroll.
|
||||
* @return the clueScroll
|
||||
*/
|
||||
public ClueScrollPlugin getClueScroll() {
|
||||
return clueScroll;
|
||||
}
|
||||
|
||||
}
|
||||
207
09HDscape-server/src/plugin/ttrail/TreasureTrailPlugin.java
Normal file
207
09HDscape-server/src/plugin/ttrail/TreasureTrailPlugin.java
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
package plugin.ttrail;
|
||||
|
||||
import org.crandor.cache.def.impl.ItemDefinition;
|
||||
import org.crandor.cache.def.impl.ObjectDefinition;
|
||||
import org.crandor.game.component.Component;
|
||||
import org.crandor.game.component.ComponentDefinition;
|
||||
import org.crandor.game.component.ComponentPlugin;
|
||||
import org.crandor.game.content.global.ttrail.ClueLevel;
|
||||
import org.crandor.game.content.global.ttrail.ClueScrollPlugin;
|
||||
import org.crandor.game.content.global.ttrail.CoordinateClueScroll;
|
||||
import org.crandor.game.content.skill.member.agility.AgilityHandler;
|
||||
import org.crandor.game.interaction.OptionHandler;
|
||||
import org.crandor.game.node.Node;
|
||||
import org.crandor.game.node.entity.npc.NPC;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.game.node.entity.player.info.portal.Perks;
|
||||
import org.crandor.game.node.item.GroundItem;
|
||||
import org.crandor.game.node.item.Item;
|
||||
import org.crandor.game.node.item.ItemPlugin;
|
||||
import org.crandor.game.system.mysql.impl.NPCConfigSQLHandler;
|
||||
import org.crandor.game.world.GameWorld;
|
||||
import org.crandor.game.world.map.Location;
|
||||
import org.crandor.game.world.update.flag.context.Animation;
|
||||
import org.crandor.plugin.Plugin;
|
||||
import org.crandor.plugin.PluginManager;
|
||||
import org.crandor.plugin.InitializablePlugin;
|
||||
import org.crandor.tools.RandomFunction;
|
||||
|
||||
/**
|
||||
* Handles the clue scroll options.
|
||||
* @author Vexia
|
||||
*/
|
||||
@InitializablePlugin
|
||||
public final class TreasureTrailPlugin extends OptionHandler {
|
||||
|
||||
/**
|
||||
* The ids of the clues.
|
||||
*/
|
||||
private static final int[] IDS = new int[] { 2677, 2678, 2679, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2716, 2719, 2722, 2723, 2725, 2727, 2729, 2731, 2733, 2735, 2737, 2739, 2741, 2743, 2745, 2747, 2773, 2774, 2776, 2778, 2780, 2782, 2783, 2785, 2786, 2788, 2790, 2792, 2793, 2794, 2796, 2797, 2799, 2801, 2803, 2805, 2807, 2809, 2811, 2813, 2815, 2817, 2819, 2821, 2823, 2825, 2827, 2829, 2831, 2833, 2835, 2837, 2839, 2841, 2843, 2845, 2847, 2848, 2849, 2851, 2853, 2855, 2856, 2857, 2858, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 3510, 3512, 3513, 3514, 3515, 3516, 3518, 3520, 3522, 3524, 3525, 3526, 3528, 3530, 3532, 3534, 3536, 3538, 3540, 3542, 3544, 3546, 3548, 3550, 3552, 3554, 3556, 3558, 3560, 3562, 3564, 3566, 3568, 3570, 3572, 3573, 3574, 3575, 3577, 3579, 3580, 3582, 3584, 3586, 3588, 3590, 3592, 3594, 3596, 3598, 3599, 3601, 3602, 3604, 3605, 3607, 3609, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 7236, 7238, 7239, 7241, 7243, 7245, 7247, 7248, 7249, 7250, 7251, 7252, 7253, 7254, 7255, 7256, 7258, 7260, 7262, 7264, 7266, 7268, 7270, 7272, 7274, 7276, 7278, 7280, 7282, 7284, 7286, 7288, 7290, 7292, 7294, 7296, 7298, 7300, 7301, 7303, 7304, 7305, 7307, 7309, 7311, 7313, 7315, 7317, 10180, 10182, 10184, 10186, 10188, 10190, 10192, 10194, 10196, 10198, 10200, 10202, 10204, 10206, 10208, 10210, 10212, 10214, 10216, 10218, 10220, 10222, 10224, 10226, 10228, 10230, 10232, 10234, 10236, 10238, 10240, 10242, 10244, 10246, 10248, 10250, 10252, 10254, 10256, 10258, 10260, 10262, 10264, 10266, 10268, 10270, 10272, 10274, 10276, 10278, 13010, 13012, 13014, 13016, 13018, 13020, 13022, 13024, 13026, 13028, 13030, 13032, 13034, 13036, 13038, 13040, 13041, 13042, 13044, 13046, 13048, 13049, 13050, 13051, 13053, 13055, 13056, 13058, 13060, 13061, 13063, 13065, 13067, 13068, 13069, 13070, 13071, 13072, 13074, 13075, 13076, 13078, 13079, 13080 };
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
for (int id : IDS) {
|
||||
ItemDefinition.forId(id).getConfigurations().put("option:read", this);
|
||||
}
|
||||
for (ClueLevel level : ClueLevel.values()) {
|
||||
ItemDefinition.forId(level.getCasket().getId()).getConfigurations().put("option:open", this);
|
||||
}
|
||||
ItemDefinition.forId(CoordinateClueScroll.SEXTANT.getId()).getConfigurations().put("option:look through", this);
|
||||
PluginManager.definePlugin(new MapCluePlugin());
|
||||
PluginManager.definePlugin(new ClueItemPlugin());
|
||||
PluginManager.definePlugin(new EmoteCluePlugin());
|
||||
PluginManager.definePlugin(new TTrailOptionHandler());
|
||||
PluginManager.definePlugin(new SextantComponentPlugin());
|
||||
PluginManager.definePlugin(new CoordinateCluePlugin());
|
||||
PluginManager.definePlugin(new SaradominWizardNPC());
|
||||
PluginManager.definePlugin(new ZamorakWizardNPC());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
player.lock(1);
|
||||
switch (option) {
|
||||
case "read":
|
||||
final ClueScrollPlugin plugin = ClueScrollPlugin.getClueScrolls().get(node.getId());
|
||||
if (plugin == null) {
|
||||
player.sendMessage("Unused clue scroll item! Removed.");
|
||||
player.getInventory().remove((Item) node);
|
||||
return false;
|
||||
}
|
||||
plugin.read(player);
|
||||
break;
|
||||
case "open":
|
||||
if (GameWorld.getSettings().isDevMode() && !player.isAdmin() && !player.getName().equals("iron")) {
|
||||
player.sendMessage("<col=FF0000>Fuck right off ~ Vexia");
|
||||
return true;
|
||||
}
|
||||
if (!player.getInventory().containsItem(node.asItem())) {
|
||||
return true;
|
||||
}
|
||||
ClueLevel.forCasket((Item) node).open(player, (Item) node);
|
||||
break;
|
||||
case "look through":
|
||||
player.getInterfaceManager().open(new Component(365));
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWalk() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles options related to treasure trails.
|
||||
* @author Vexia
|
||||
*/
|
||||
public static final class TTrailOptionHandler extends OptionHandler {
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
ObjectDefinition.forId(19171).getConfigurations().put("option:squeeze-through", this);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
switch (node.getId()) {
|
||||
case 19171:
|
||||
Location start = player.getLocation().getX() <= 2522 ? node.getLocation() : node.getLocation().transform(1, 0, 0);
|
||||
player.lock(1);
|
||||
AgilityHandler.forceWalk(player, -1, start, start.transform(player.getLocation().getX() <= 2522 ? 1 : -1, 0, 0), Animation.create(2240), 5, 1, null, 0);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a clue scroll item.
|
||||
* @author Vexia
|
||||
*/
|
||||
public final class ClueItemPlugin extends ItemPlugin {
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
register(IDS);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPickUp(Player player, GroundItem item, int type) {
|
||||
if (hasClue(player)) {
|
||||
player.sendMessage("A magical force prevents you from picking the clue scroll up.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean createDrop(Item item, Player player, NPC npc, Location l) {
|
||||
if ((npc.getId() == 49 || npc.getId() == 3586)) {
|
||||
return true;
|
||||
}
|
||||
if (npc.getDefinition().getDropTables().getMainTable().size() < 3 && RandomFunction.random(player.hasPerk(Perks.DETECTIVE) ? 50 : 100) != 6) {
|
||||
return false;
|
||||
}
|
||||
if (!hasClue(player)) {
|
||||
if (player.hasPerk(Perks.DETECTIVE)) {
|
||||
player.sendMessage("<col=FF0000>A clue scroll was dropped.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItem(Item item, NPC npc) {
|
||||
return ClueScrollPlugin.getClue(npc.getDefinition().getConfiguration(NPCConfigSQLHandler.CLUE_LEVEL, ClueLevel.EASY)).copy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the player has a clue.
|
||||
* @param player the player.
|
||||
* @return {@code True} if so.
|
||||
*/
|
||||
private boolean hasClue(Player player) {
|
||||
return player.getTreasureTrailManager().hasClue();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the sextant interface.
|
||||
* @author Vexia
|
||||
*/
|
||||
public class SextantComponentPlugin extends ComponentPlugin {
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
ComponentDefinition.forId(365).setPlugin(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Component component, int opcode, int button, int slot, int itemId) {
|
||||
switch (button) {
|
||||
case 5:// horizon up
|
||||
break;
|
||||
case 4:// horizon down
|
||||
break;
|
||||
case 6:// sun down
|
||||
break;
|
||||
case 7:// sun up
|
||||
break;
|
||||
case 11:
|
||||
player.sendMessage("You need to get the horizon in the middle of the eye piece.");
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
268
09HDscape-server/src/plugin/ttrail/UriNPC.java
Normal file
268
09HDscape-server/src/plugin/ttrail/UriNPC.java
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
package plugin.ttrail;
|
||||
|
||||
import org.crandor.game.content.dialogue.DialoguePlugin;
|
||||
import org.crandor.game.content.global.ttrail.ClueScrollPlugin;
|
||||
import org.crandor.game.content.global.ttrail.EmoteClueScroll;
|
||||
import org.crandor.game.node.entity.Entity;
|
||||
import org.crandor.game.node.entity.combat.CombatStyle;
|
||||
import org.crandor.game.node.entity.npc.AbstractNPC;
|
||||
import org.crandor.game.node.entity.npc.NPC;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.game.world.map.Location;
|
||||
import org.crandor.game.world.map.RegionManager;
|
||||
import org.crandor.plugin.Plugin;
|
||||
import org.crandor.plugin.PluginManager;
|
||||
import org.crandor.tools.RandomFunction;
|
||||
|
||||
/**
|
||||
* Handles the uri npc.
|
||||
* @author Vexia
|
||||
*/
|
||||
public final class UriNPC extends AbstractNPC {
|
||||
|
||||
/**
|
||||
* The npc ids.
|
||||
*/
|
||||
private static final int[] IDS = new int[] { 5141, 5142, 5143, 5144, 5145 };
|
||||
|
||||
/**
|
||||
* The clue scroll.
|
||||
*/
|
||||
private ClueScrollPlugin clueScroll;
|
||||
|
||||
/**
|
||||
* The player.
|
||||
*/
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code UriNPC} {@Code Object}
|
||||
*/
|
||||
public UriNPC() {
|
||||
super(0, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code UriNPC} {@Code Object}
|
||||
* @param id the id.
|
||||
* @param location the location.
|
||||
*/
|
||||
public UriNPC(int id, Location location) {
|
||||
super(id, location, false);
|
||||
this.setRespawn(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractNPC construct(int id, Location location, Object... objects) {
|
||||
return new UriNPC(id, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
Player player = getAttribute("player", null);
|
||||
ClueScrollPlugin clueScroll = getAttribute("clue", null);
|
||||
if (player != null) {
|
||||
this.player = player;
|
||||
}
|
||||
if (clueScroll != null) {
|
||||
this.clueScroll = clueScroll;
|
||||
}
|
||||
if (player != null) {
|
||||
location = RegionManager.getSpawnLocation(player, this);
|
||||
if (location == null) {
|
||||
location = player.getLocation();
|
||||
}
|
||||
}
|
||||
super.init();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finalizeDeath(Entity killer) {
|
||||
if (killer instanceof Player) {
|
||||
Player p = killer.asPlayer();
|
||||
if (p == player && isDoubleAgent()) {
|
||||
p.setAttribute("killed-agent", clueScroll.getClueId());
|
||||
}
|
||||
}
|
||||
super.finalizeDeath(killer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTickActions() {
|
||||
super.handleTickActions();
|
||||
if (player != null) {
|
||||
if (player.getLocation().getDistance(getLocation()) > 10 || !player.isActive()) {
|
||||
clear();
|
||||
}
|
||||
if (isDoubleAgent()) {
|
||||
if (!getProperties().getCombatPulse().isAttacking()) {
|
||||
getProperties().getCombatPulse().attack(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAttackable(Entity entity, CombatStyle style) {
|
||||
if (!(entity instanceof Player)) {
|
||||
return false;
|
||||
}
|
||||
if (player != null) {
|
||||
Player p = entity.asPlayer();
|
||||
return p == player;
|
||||
}
|
||||
return super.isAttackable(entity, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSelectTarget(Entity target) {
|
||||
return target == player;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
PluginManager.definePlugin(new UriDialogue());
|
||||
return super.newInstance(arg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return IDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if uri is a double agent.
|
||||
* @return {@code True} if so.
|
||||
*/
|
||||
public boolean isDoubleAgent() {
|
||||
return getAttribute("double-agent", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bplayer.
|
||||
* @return the player
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the baplayer.
|
||||
* @param player the player to set.
|
||||
*/
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bclueScroll.
|
||||
* @return the clueScroll
|
||||
*/
|
||||
public ClueScrollPlugin getClueScroll() {
|
||||
return clueScroll;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the uri dialogue.
|
||||
* @author Vexia
|
||||
*/
|
||||
public static final class UriDialogue extends DialoguePlugin {
|
||||
|
||||
/**
|
||||
* The quotes uri says.
|
||||
*/
|
||||
private static final String[] QUOTES = new String[] { "Once, I was a poor man, but then I found a party hat.", "There were three goblins in a bar, which one left first?", "Would you like to buy a pewter spoon?", "In the end, only the three-legged survive.", "I heard that the tall man fears only strong winds.", "In Canifis the men are known for eating much spam.", "I am the egg man, are you one of the egg men?", "I believe that it is very rainy in Varrock.", "The slowest of fishermen catch the swiftest of fish.", "It is quite easy being green.", "Don't forget to find the jade monkey.", "Don't forget to find the jade monkey.", "Do you want ants? Because that's how you get ants.", "I once named a duck after a girl. Big mistake.", "Loser says what.", "I'm looking for a girl named Molly. I can't find her.", "Guys, let's lake dive!", "I gave you what you needed; not what you think you needed.", "Want to see me bend a spoon?", "Is that Deziree?", "This is the last night you'll spend alone.", "(Breathing intensifies)", "Init doe. Lyk, I hope yer reward iz goodd aye?" };
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code UriDialogue} {@Code Object}
|
||||
*/
|
||||
public UriDialogue() {
|
||||
/**
|
||||
* empty.
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code UriDialogue} {@Code Object}
|
||||
* @param player
|
||||
*/
|
||||
public UriDialogue(Player player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DialoguePlugin newInstance(Player player) {
|
||||
return new UriDialogue(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean open(Object... args) {
|
||||
npc = (NPC) args[0];
|
||||
if (!canSpeak()) {
|
||||
npc("I do not believe we have any business, Comrade.");
|
||||
stage = -1;
|
||||
return true;
|
||||
}
|
||||
npc(RandomFunction.getRandomElement(QUOTES));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(int interfaceId, int buttonId) {
|
||||
switch (stage) {
|
||||
case -1:
|
||||
end();
|
||||
break;
|
||||
case 0:
|
||||
player("What?");
|
||||
asUri().getClueScroll().reward(player);
|
||||
stage++;
|
||||
break;
|
||||
case 1:
|
||||
interpreter.sendItemMessage(405, "You've been given a casket!");
|
||||
stage++;
|
||||
break;
|
||||
case 2:
|
||||
end();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean close() {
|
||||
if (stage >= 1) {
|
||||
npc.clear();
|
||||
player.removeAttribute("killed-agent");
|
||||
}
|
||||
return super.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the player can speak to the npc.
|
||||
* @return {@code True} if so.
|
||||
*/
|
||||
public boolean canSpeak() {
|
||||
EmoteClueScroll scroll = (EmoteClueScroll) asUri().getClueScroll();
|
||||
if (asUri().getPlayer() != player || !player.getAttribute("commence-emote", !scroll.hasCommencEmote())) {
|
||||
return false;
|
||||
}
|
||||
return scroll.hasEquipment(player, scroll.getEquipment());
|
||||
}
|
||||
|
||||
/**
|
||||
* Casts to the uri npc.
|
||||
* @return the npc.
|
||||
*/
|
||||
public UriNPC asUri() {
|
||||
return (UriNPC) npc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return IDS;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
166
09HDscape-server/src/plugin/ttrail/ZamorakWizardNPC.java
Normal file
166
09HDscape-server/src/plugin/ttrail/ZamorakWizardNPC.java
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
package plugin.ttrail;
|
||||
|
||||
import org.crandor.game.content.global.ttrail.ClueScrollPlugin;
|
||||
import org.crandor.game.node.entity.Entity;
|
||||
import org.crandor.game.node.entity.combat.CombatSpell;
|
||||
import org.crandor.game.node.entity.combat.CombatStyle;
|
||||
import org.crandor.game.node.entity.npc.AbstractNPC;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.game.node.entity.player.link.SpellBookManager.SpellBook;
|
||||
import org.crandor.game.world.map.Location;
|
||||
import org.crandor.game.world.map.RegionManager;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Handles saradomin npc.
|
||||
* @author Vexia
|
||||
*/
|
||||
public final class ZamorakWizardNPC extends AbstractNPC {
|
||||
|
||||
/**
|
||||
* The npc ids.
|
||||
*/
|
||||
private static final int[] IDS = new int[] { 1007 };
|
||||
|
||||
/**
|
||||
* The clue scroll.
|
||||
*/
|
||||
private ClueScrollPlugin clueScroll;
|
||||
|
||||
/**
|
||||
* The player.
|
||||
*/
|
||||
private Player player;
|
||||
|
||||
/**
|
||||
* Constructs a new {@code SaradominWizardNPC} {@code Object}
|
||||
*/
|
||||
public ZamorakWizardNPC() {
|
||||
super(0, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new {@Code SaradominWizardNPC} {@Code Object}
|
||||
* @param id the id.
|
||||
* @param location the location.
|
||||
*/
|
||||
public ZamorakWizardNPC(int id, Location location) {
|
||||
super(id, location, false);
|
||||
this.setRespawn(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractNPC construct(int id, Location location, Object... objects) {
|
||||
return new ZamorakWizardNPC(id, location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
Player player = getAttribute("player", null);
|
||||
ClueScrollPlugin clueScroll = getAttribute("clue", null);
|
||||
if (player != null) {
|
||||
this.player = player;
|
||||
}
|
||||
if (clueScroll != null) {
|
||||
this.clueScroll = clueScroll;
|
||||
}
|
||||
if (player != null) {
|
||||
location = RegionManager.getSpawnLocation(player, this);
|
||||
if (location == null) {
|
||||
location = player.getLocation();
|
||||
}
|
||||
}
|
||||
super.init();
|
||||
getProperties().setSpell((CombatSpell) SpellBook.MODERN.getSpell(43));
|
||||
getProperties().setAutocastSpell((CombatSpell) SpellBook.MODERN.getSpell(43));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finalizeDeath(Entity killer) {
|
||||
if (killer instanceof Player) {
|
||||
Player p = killer.asPlayer();
|
||||
if (p == player) {
|
||||
p.setAttribute("killed-wizard", clueScroll.getClueId());
|
||||
}
|
||||
}
|
||||
super.finalizeDeath(killer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTickActions() {
|
||||
super.handleTickActions();
|
||||
if (player != null) {
|
||||
if (player.getLocation().getDistance(getLocation()) > 10 || !player.isActive()) {
|
||||
clear();
|
||||
}
|
||||
if (!getProperties().getCombatPulse().isAttacking()) {
|
||||
getProperties().getCombatPulse().attack(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAttackable(Entity entity, CombatStyle style) {
|
||||
if (!(entity instanceof Player)) {
|
||||
return false;
|
||||
}
|
||||
if (player != null) {
|
||||
Player p = entity.asPlayer();
|
||||
return p == player;
|
||||
}
|
||||
return super.isAttackable(entity, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttack(Entity entity) {
|
||||
if (!(entity instanceof Player)) {
|
||||
return false;
|
||||
}
|
||||
if (player != null) {
|
||||
Player p = entity.asPlayer();
|
||||
return p == player;
|
||||
}
|
||||
return super.canAttack(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSelectTarget(Entity target) {
|
||||
return target == player;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
return super.newInstance(arg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return IDS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bplayer.
|
||||
* @return the player
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the baplayer.
|
||||
* @param player the player to set.
|
||||
*/
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bclueScroll.
|
||||
* @return the clueScroll
|
||||
*/
|
||||
public ClueScrollPlugin getClueScroll() {
|
||||
return clueScroll;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue