Merge pull request #9 from dginovker/master

update
This commit is contained in:
The Celery Man 2020-03-30 13:15:22 -05:00 committed by GitHub
commit af116fa495
25 changed files with 16306 additions and 1738 deletions

View file

@ -213,6 +213,7 @@ public abstract class GameShell extends Applet implements Runnable, FocusListene
Class3_Sub13_Sub6.aBoolean3078 = true;
Class3_Sub28_Sub5.aBoolean3593 = false;
AnimationDefinition.aLong1847 = Class5.method830((byte)-55);
Class3_Sub26.aBoolean2558 = true;
}
} catch (RuntimeException var4) {
throw Class44.method1067(var4, "rc.BA(" + var1 + ')');

View file

@ -2,10 +2,10 @@
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 28, 2020 at 01:54 PM
-- Host: 127.0.0.1
-- Generation Time: Mar 29, 2020 at 07:36 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
-- PHP Version: 7.4.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
@ -882,7 +882,7 @@ INSERT INTO `ground_spawns` (`item_id`, `loc_data`) VALUES
(983, '{1,3131,9862,0,7209050}'),
(995, '{3,3195,9834,0,11141270}-{4,3195,9820,0,11141270}-{66,3191,9821,0,11141270}-{56,3190,9819,0,11141270}-{26,3188,9819,0,11141270}-{26,3188,9820,0,11141270}-{35,3189,9819,0,11141270}-{384,3224,3830,0,6553650}-{384,3220,3824,0,6553650}-{2,3106,3547,0,13107300}-{1,3104,3558,0,13107300}-{1,3106,3534,0,13107300}-{2,3101,3564,0,13107300}-{4,3103,3579,0,13107300}-{2,3234,3560,0,13107300}'),
(1005, '{1,3014,3227,0,3276830}-{1,3009,3204,0,3276830}'),
(1059, '{1,3242,3385,1,7209050}-{1,3097,3486,0,7864410}'),
(1059, '{1,3242,3385,1,7209050}-{1,3097,3486,0,7864410}-{1,3148,3177,0,5898270}'),
(1061, '{1,3244,3386,1,13762750}-{1,3208,9620,0,13762750}-{1,3210,9615,0,13762750}-{1,3111,3159,0,13762750}-{1,3112,3155,0,7864420}-{1,3302,3190,0,5898270}'),
(1119, '{1,3084,3859,0,6553660}'),
(1137, '{1,3242,3688,0,13107350}'),
@ -19676,6 +19676,7 @@ INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(47, '{3097,3364,0,1,3}-{3102,3363,0,1,5}-{3341,3267,0,1,5}-{3235,3224,0,1,3}-{3229,3220,0,1,4}-{3211,3211,0,1,3}-{3225,3220,0,1,1}-{3237,3215,0,1,5}-{3211,3210,0,1,7}-{3227,3220,0,1,7}-{3233,3227,0,1,5}-{3227,3210,0,1,6}-{3228,3222,0,1,4}-{3229,3226,0,1,0}-{3127,3487,0,1,4}-{3125,3486,0,1,6}-{3127,3486,0,1,4}-{3019,3292,0,1,7}-{3018,3295,0,1,7}-{3001,3202,0,1,5}-{3021,3205,0,1,6}-{3026,3174,0,1,5}-{3019,3176,0,1,7}-{3076,3282,0,1,5}-{3089,3266,0,1,4}-{3091,3266,0,1,4}-{3243,3687,0,1,5}-{3249,3669,0,1,3}-{3252,3675,0,1,4}-{3252,3680,0,1,3}-{3259,3683,0,1,0}-{3276,9871,0,1,1}-{3277,9871,0,1,3}-{3225,9862,0,1,4}-{3222,9861,0,1,6}-{3220,9860,0,1,6}-{3219,9865,0,1,6}-{3237,9862,0,1,4}-{3236,3217,0,1,4}-{3259,3230,0,1,4}-{3158,3226,0,1,5}-{3160,3202,0,1,4}-{3233,3237,0,1,7}-{2821,3170,0,1,1}-{2801,3158,0,1,2}-{2852,9642,0,1,6}-{2858,9632,0,1,3}-{2536,2982,0,1,3}-{2531,2980,0,1,0}-{2522,2981,0,1,4}-{2545,2989,0,1,4}-{2523,2970,0,1,2}-{2603,9480,0,1,1}-{2600,9477,0,1,0}-{2579,9496,0,1,4}-{2580,9508,0,1,0}-{2571,9522,0,1,4}-{2654,9640,0,1,6}-{2655,9637,0,1,4}-{2656,9639,0,1,7}-{2651,9636,0,1,5}-{2648,9637,0,1,4}-{2651,9642,0,1,1}-{2654,9640,0,1,0}-{2654,9635,0,1,6}-{2655,9635,0,1,3}-{2664,9626,0,1,6}-{2664,9624,0,1,1}-{2661,9623,0,1,1}-{2663,9623,0,1,3}-{2664,9626,0,1,6}-{2592,9831,0,1,3}-{2588,9825,0,1,6}-{2583,9829,0,1,4}-{2581,9841,0,1,0}-{2597,9823,0,1,2}-{2579,9805,0,1,3}-{2576,9804,0,1,0}-{2573,9805,0,1,5}-{2571,9808,0,1,3}-{2576,9810,0,1,2}-{2587,9802,0,1,2}-{2592,9800,0,1,4}-{2596,9805,0,1,6}-{2601,9802,0,1,5}-{2585,9801,0,1,7}-{2594,9803,0,1,0}-{2590,9806,0,1,3}-{2612,9808,0,1,6}-{2604,9810,0,1,6}-{2579,9821,0,1,2}-{2576,9812,0,1,6}-{2580,9813,0,1,6}-{2600,9813,0,1,4}-{2599,9809,0,1,4}-{2514,3193,0,1,6}-{2518,3192,0,1,3}-{2507,3181,0,1,3}-{2508,3178,0,1,6}-{2511,3183,0,1,3}-{2515,3182,0,1,1}-{2565,9505,0,1,1}-{2566,9510,0,1,6}-{2594,9497,0,1,4}-{3475,9840,0,1,6}-{3481,9842,0,1,1}-{3486,9843,0,1,7}-{3483,9824,0,1,4}-{3496,9808,0,0,5}-{3490,9815,0,1,1}-{3478,9834,0,0,3}-{3490,9824,0,1,4}'),
(48, '{2775,2929,0,1,2}-{2789,2926,0,1,5}-{2795,2932,0,1,6}-{2775,2933,0,1,0}-{2769,2928,0,1,3}-{2817,2921,0,1,2}'),
(49, '{2861,9838,0,1,3}-{2858,9842,0,1,4}-{2854,9847,0,1,5}-{2857,9850,0,1,7}-{2865,9849,0,1,6}-{2869,9838,0,1,6}-{3104,3680,0,1,3}-{3114,3688,0,1,1}-{3121,3675,0,1,1}-{3127,3695,0,1,3}-{3129,3678,0,1,2}-{3130,3689,0,1,2}-{3128,3665,0,1,3}-{3135,3701,0,1,6}-{3085,10134,0,1,0}-{3090,10123,0,1,0}-{3094,10133,0,1,0}-{3095,10120,0,1,0}-{3095,10128,0,1,0}-{3098,10122,0,1,0}-{3104,10127,0,1,0}-{3105,10125,0,1,0}-{3177,3905,0,1,4}-{3180,3908,0,1,2}-{3189,3914,0,1,6}-{3193,3906,0,1,2}-{2402,9785,0,1,1}-{2403,9782,0,1,1}-{2408,9782,0,1,1}-{2408,9785,0,1,1}-{2413,9776,0,1,1}-{2417,9777,0,1,1}-{2412,9773,0,1,1}-{2416,9773,0,1,1}'),
(50, '{2273,4698,0,0,0}'),
(52, '{2899,9765,0,1,1}-{2893,9768,0,1,1}-{2895,9771,0,1,6}-{2894,9781,0,1,6}-{2891,9787,0,1,2}-{2904,9798,0,1,0}-{2910,9799,0,1,4}'),
(53, '{2694,9508,0,0,3}-{2703,9505,0,0,6}-{2710,9499,0,0,1}-{2704,9520,0,0,5}-{2714,9523,0,0,3}-{2722,9520,0,0,7}'),
(54, '{2831,9825,0,1,0}-{2838,9824,0,1,1}-{2344,9763,0,1,1}'),
@ -19762,7 +19763,7 @@ INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(170, '{2890,3175,0,1,4}'),
(172, '{3225,3369,0,1,3}-{3226,3371,0,1,7}-{3230,3372,0,1,0}-{3230,3370,0,1,3}-{3229,3368,0,1,1}-{3227,3367,0,1,1}'),
(174, '{3095,3232,0,1,6}-{3095,3231,0,1,0}-{3225,3370,0,1,4}-{3230,3370,0,1,3}'),
(175, '{3084,3495,0,1,4}-{2994,9549,0,1,6}-{2993,9551,0,1,6}-{2995,9555,0,1,6}-{2999,9548,0,1,0}'),
(175, '{3084,3495,0,1,4}-{2994,9549,0,1,6}-{2993,9551,0,1,6}-{2995,9555,0,1,6}-{2999,9548,0,1,0}-{3182,3365,0,1,6}'),
(178, '{2892,9709,0,1,6}-{2915,9708,0,1,7}-{2899,9702,0,1,1}-{2907,9711,0,1,4}-{2938,9811,0,1,6}-{3096,3220,0,1,1}-{3273,3507,0,1,6}'),
(179, '{3025,3511,1,1,3}-{3038,3505,0,1,4}-{3026,3494,0,1,6}-{3026,3505,0,1,4}-{3026,3512,0,1,6}-{3025,3512,0,1,4}-{3027,3512,0,1,6}-{3030,3511,0,1,6}-{3028,3511,0,1,1}-{3039,3855,0,1,4}-{3031,3852,0,1,1}-{3032,3849,0,1,3}-{3023,3849,0,1,6}-{3022,3847,0,1,3}-{3023,3514,1,1,3}-{3014,3516,2,1,1}'),
(180, '{2744,3519,0,0,0}-{2957,3238,0,1,4}-{2988,3423,0,1,7}-{2953,3240,0,1,3}-{3011,3277,0,1,1}-{3009,3280,0,1,1}-{3110,3295,0,1,4}'),
@ -19858,6 +19859,8 @@ INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(340, '{2929,3217,0,1,6}'),
(342, '{3281,3382,0,0,0}'),
(343, '{3284,3382,0,0,0}'),
(344, '{3016,3187,1,1,0}-{3015,3183,1,1,0}-{3014,3181,1,1,0}-{3011,3185,1,1,0}'),
(345, '{3018,3185,2,1,0}'),
(347, '{2523,3292,0,0,0}-{2536,3294,0,0,0}-{2538,3321,0,0,0}'),
(348, '{2501,3315,0,0,0}-{2513,3325,0,0,0}-{2526,3279,0,0,0}-{2528,3297,0,0,0}-{2535,3288,0,0,0}-{2548,3287,0,0,0}'),
(349, '{2556,3266,0,0,0}'),
@ -20053,13 +20056,13 @@ INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(636, '{2395,3494,0,0,6}-{2396,3494,0,0,6}-{2397,3494,0,0,6}-{2396,3493,0,0,6}'),
(637, '{3158,3425,1,1,5}'),
(638, '{3195,3404,0,0,0}'),
(639, '{3211,3425,0,1,7}'),
(639, '{3211,3425,0,1,7}');
INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(640, '{3253,3487,0,1,6}'),
(641, '{3207,3392,0,1,6}'),
(642, '{3185,3385,0,1,6}'),
(643, '{3246,3383,1,1,5}'),
(644, '{3247,9781,0,1,6}');
INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(644, '{3247,9781,0,1,6}'),
(645, '{3223,3401,0,1,2}'),
(646, '{3257,3447,0,0,0}'),
(648, '{3220,3471,0,0,6}'),
@ -20714,12 +20717,12 @@ INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(2324, '{2807,3464,0,1,3}'),
(2325, '{2664,3374,0,1,1}'),
(2326, '{3600,3527,0,1,1}'),
(2327, '{2814,3337,0,1,6}'),
(2327, '{2814,3337,0,1,6}');
INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(2329, '{1702,4823,0,0,6}'),
(2330, '{2766,3211,0,0,0}'),
(2331, '{2860,3430,0,1,4}'),
(2332, '{2573,3102,0,1,4}');
INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(2332, '{2573,3102,0,1,4}'),
(2333, '{3226,3311,0,0,0}'),
(2334, '{2662,3525,0,1,1}'),
(2335, '{3181,3359,0,0,0}'),
@ -21169,6 +21172,7 @@ INSERT INTO `npc_spawns` (`npc_id`, `loc_data`) VALUES
(4357, '{3771,9450,0,1,4}-{3730,9443,0,1,4}-{3808,9423,0,1,7}-{3797,9427,0,1,4}-{3833,9438,0,1,6}-{3834,9458,0,1,6}-{3797,9440,0,1,1}-{3793,9441,0,1,4}-{3829,9425,0,1,7}'),
(4358, '{3751,2977,0,1,2}'),
(4359, '{3669,2977,0,1,3}'),
(4375, '{3012,3192,1,0,2}'),
(4376, '{3081,3421,0,1,3}'),
(4381, '{3024,10152,0,0,0}-{3020,10148,0,0,0}-{3023,10145,0,0,0}-{3018,10140,0,0,0}-{3033,10139,0,0,0}-{3028,10137,0,0,0}-{2361,5241,0,0,1}-{2358,5240,0,0,1}-{2362,5239,0,0,1}-{2364,5240,0,0,1}-{2364,5242,0,0,1}-{2372,9743,0,1,1}-{2373,9745,0,1,1}-{2374,9742,0,1,1}-{2377,9750,0,1,1}-{2378,9752,0,1,1}-{2377,9754,0,1,1}'),
(4382, '{3162,3716,0,0,0}-{3175,3717,0,0,0}-{3161,3727,0,0,0}-{2304,5160,0,0,2}-{2324,5210,0,0,2}-{2322,5201,0,0,7}-{2324,5210,0,0,2}-{2322,5201,0,0,7}-{2327,5205,0,0,7}-{2328,5200,0,0,7}-{2326,5198,0,0,7}-{2331,5198,0,0,4}-{2333,5201,0,0,4}-{2333,5199,0,0,2}'),

View file

@ -54,6 +54,7 @@ public final class FirePotteryPulse extends SkillPulse<Item> {
return false;
}
if (!player.getInventory().containsItem(pottery.getUnfinished())) {
player.getPacketDispatch().sendMessage("You need a " + pottery.name().toLowerCase() + "in order to do this.");
return false;
}
return true;

View file

@ -130,7 +130,7 @@ public final class FireMakingPulse extends SkillPulse<Item> {
if (!groundItem.isActive()) {
return;
}
if (fire == Log.YEW && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(2, 2) && player.getLocation().withinDistance(new Location(3256, 3487, 2))) {
if (fire == Log.YEW && !player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).isComplete(2, 2) && player.getLocation().withinDistance(new Location(3256, 3487, 3))) {
player.getAchievementDiaryManager().getDiary(DiaryType.VARROCK).updateTask(player, 2, 2, true);
}
// GameObject originalOnSpot =

View file

@ -11,24 +11,17 @@ import org.crandor.game.node.entity.npc.agg.AggressiveBehavior;
import org.crandor.game.node.entity.npc.agg.AggressiveHandler;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.node.entity.player.info.Rights;
import org.crandor.game.node.item.GroundItemManager;
import org.crandor.game.node.item.Item;
import org.crandor.game.world.map.Location;
import org.crandor.game.world.map.zone.MapZone;
import org.crandor.game.world.map.zone.RegionZone;
import org.crandor.game.world.map.zone.ZoneBorders;
import org.crandor.game.world.repository.Repository;
import org.crandor.tools.RandomFunction;
/**
* Handles the wilderness zone.
* @author Emperor
*/
public final class WildernessZone extends MapZone {
/**
* The PvP gear items
*/
private static int[] PVP_GEAR = { 13887, 13893, 13899, 13905, 13870, 13873, 13876, 13879, 13883, 13884, 13890, 13896, 13902, 13858, 13861, 13864, 13867};
/**
* The wilderness zone.
@ -55,70 +48,6 @@ public final class WildernessZone extends MapZone {
}
}
/**
* calculate drop rate for rev items based on combat level
* @author ceik
* @param combatLevel
* @return
*/
public int getNewDropRate(int combatLevel){
double x = combatLevel;
double A = 44044.5491;
double B = -7360.19548;
return (int) (A + (B * Math.log(x)));
}
/**
* Handles rev drops
* @author ceik
* @param e The entity dying.
* @param killer The killer.
* @return true
*/
@Override
public boolean death(Entity e, Entity killer) {
if(e instanceof NPC && killer instanceof Player && (e.asNpc().getName().contains("Revenant") || e.asNpc().getName().equals("Chaos elemental"))){
int combatLevel = e.asNpc().getDefinition().getCombatLevel();
int dropRate = getNewDropRate(combatLevel);
for(int i = 0; i < PVP_GEAR.length; i++){
boolean chance = RandomFunction.random(dropRate) == dropRate / 2;
if(chance){
Item reward;
if(PVP_GEAR[i] == 13879 || PVP_GEAR[i] == 13883){ // checks if it's a javelin or throwing axe
reward = new Item(PVP_GEAR[i],RandomFunction.random(15,50));
} else {
reward = new Item(PVP_GEAR[i]);
}
Repository.sendNews(killer.asPlayer().getUsername() + " has received a " + reward.getName() + " from a " + e.asNpc().getName() + "!");
GroundItemManager.create(reward,((NPC) e).getDropLocation(),killer.asPlayer());
return true;
}
}
e.asNpc().getDefinition().getDropTables().drop(e.asNpc(),killer);
}
return true;
}
/**
* Fixes attack options for the revs
* @param e The entity.
* @param target The target to interact with.
* @param option The option.
* @return true
*/
@Override
public boolean interact(Entity e, Node target, Option option) {
if(target instanceof NPC){
if(target.asNpc().getName().contains("Revenant")){
e.asPlayer().getProperties().getCombatPulse().attack(target);
return true;
}
}
return super.interact(e, target, option);
}
@Override
public boolean enter(Entity e) {
if (e instanceof Player) {

View file

@ -30,7 +30,7 @@ public class SlotSwitchPacket implements IncomingPacket {
if (withInterfaceId == 762) {
if (withChildId == 73) {
container = player.getBank();
switchItem(slot, secondSlot, container, player.getBank().isInsertItems());
switchItem(slot, secondSlot, container, player.getBank().isInsertItems(), player);
player.debug("Switching item [" + slot + ", " + interfaceId + ", " + childId + "] with [" + secondSlot + ", " + withInterfaceId + ", " + withChildId + "]!");
}
else {
@ -54,7 +54,7 @@ public class SlotSwitchPacket implements IncomingPacket {
break;
default:
player.debug("Switching item slot [from=" + slot + ", to=" + secondSlot + ", child=" + childId + ", to child=" + withChildId + "].");
switchItem(slot, secondSlot, container, false);
switchItem(slot, secondSlot, container, false, player);
break;
}
return;
@ -65,7 +65,7 @@ public class SlotSwitchPacket implements IncomingPacket {
boolean insert = buffer.get() == 1;
int interfaceId = interfaceHash >> 16;
Container container = interfaceId == 762 ? player.getBank() : (interfaceId == 15 || interfaceId == 149 || interfaceId == 763) ? player.getInventory() : null;
switchItem(slot, secondSlot, container, insert);
switchItem(slot, secondSlot, container, insert, player);
}
/**
@ -75,12 +75,19 @@ public class SlotSwitchPacket implements IncomingPacket {
* @param container The container.
* @param insert If inserting should happen.
*/
public void switchItem(int slot, int secondSlot, Container container, boolean insert) {
public void switchItem(int slot, int secondSlot, Container container, boolean insert, Player player) {
if (container == null || slot < 0 || slot >= container.toArray().length || secondSlot < 0 || secondSlot >= container.toArray().length) {
return;
}
final Item item = container.get(slot);
final Item second = container.get(secondSlot);
if (player.getInterfaceManager().hasChatbox()) {
player.getInterfaceManager().closeChatbox();
switchItem(secondSlot,slot,container,insert,player);
container.refresh();
return;
}
if (item == null) {
return;
}

File diff suppressed because it is too large Load diff

View file

@ -174,6 +174,11 @@ public final class VisualCommand extends CommandPlugin {
ObjectBuilder.add(object);
SystemLogger.log("object = " + object);
return true;
case "objwithanim":
GameObject go = new GameObject(toInteger(args[1]), player.getLocation(), 0);
ObjectBuilder.add(go);
player.getPacketDispatch().sendObjectAnimation(go, Animation.create(toInteger(args[2])));
return true;
case "oa":
case "object_anim":
case "obj_anim":

View file

@ -0,0 +1,144 @@
package plugin.dialogue;
import org.crandor.game.content.dialogue.DialoguePlugin;
import org.crandor.game.content.dialogue.FacialExpression;
import org.crandor.game.node.entity.npc.NPC;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.node.item.Item;
import org.crandor.game.world.map.RegionManager;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.tools.RandomFunction;
/**
* Represents the dialogue plugin used for the anja npc.
* @author jamix77
*/
@InitializablePlugin
public final class AnjaDialoguePlugin extends DialoguePlugin {
/**
*
* Constructs a new @{Code AnjaDialoguePlugin} object.
*/
public AnjaDialoguePlugin() {
/**
* empty.
*/
}
/**
* Constructs a new {@code AjjatDialoguePlugin} {@code Object}.
* @param player the player.
*/
public AnjaDialoguePlugin(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new AnjaDialoguePlugin(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
player("Hello.");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
npc("Hello sir. What are you doing in my house?");
stage = 1;
break;
case 1:
interpreter.sendOptions("Select an Option", "I'm just wandering around.", "I was hoping you'd give me some free stuff.", "I've come to kill you.");
stage = 2;
break;
case 2:
if (buttonId == 1) {
player("I'm just wondering around.");
stage = 3;
} else if (buttonId == 2) {
player("I was hoping you'd give me some free stuff.");
stage = 10;
} else if (buttonId == 3) {
player("I've come to kill you.");
stage = 13;
}
break;
case 3:
npc("Oh dear are you lost?");
stage++;
break;
case 4:
interpreter.sendOptions("Select an Option.", "Yes, I'm lost.", "No, I know where I am.");
stage++;
break;
case 5:
switch (buttonId) {
case 1:
player("Yes, I'm lost.");
stage =6;
break;
case 2:
player("No I know where I am.");
stage = 8;
break;
}
break;
case 6:
npc("Okay, just walk north-east when you leave this house,","and soon you'll reach the big city of Falador.");
stage++;
break;
case 7:
player("Thanks a lot.");
stage = 605;
break;
case 8:
npc("Oh? Well, would you mind wandering somewhere else?", "This is my house.");
stage++;
break;
case 9:
player("Meh!");
stage = 605;
break;
case 10:
String[] dialogues = {"Do you REALLY need it","I don't have much on me...", "I don't know..."};
npc(dialogues[RandomFunction.random(0, 2)]);
stage++;
break;
case 11:
interpreter.sendDialogues(player, FacialExpression.ASKING, "I promise I'll stop bothering you!", "Pleeease!","Pwetty pleathe wiv thugar on top!");
stage++;
break;
case 12:
npc("Oh, alright. Here you go.");
player.getInventory().add(new Item(995,RandomFunction.random(1, 3)));
stage = 605;
break;
case 13:
npc.sendChat("Eeeek!");
for (NPC npc1 : RegionManager.getLocalNpcs(player)) {
if (npc1.getName().equalsIgnoreCase("Hengel")) {
npc1.sendChat("Aaaaarrgh!");
break;
}
}
end();
break;
case 605:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 2684 };
}
}

View file

@ -136,7 +136,7 @@ public final class CandleSellerPlugin extends DialoguePlugin {
stage = 231;
break;
case 231:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Firstly you can make a simple candle lantern out of", "glass. It's just like a candle, bu thte flame isn't exposed,", "so it's safer.");
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Firstly you can make a simple candle lantern out of", "glass. It's just like a candle, but the flame isn't exposed,", "so it's safer.");
stage = 232;
break;
case 232:
@ -144,7 +144,7 @@ public final class CandleSellerPlugin extends DialoguePlugin {
stage = 233;
break;
case 233:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Finally there's a ullseye lantern. You'll need to", "make a frame out of steel and add a glass lens.");
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Finally there's a Bullseye lantern. You'll need to", "make a frame out of steel and add a glass lens.");
stage = 234;
break;
case 234:

View file

@ -0,0 +1,77 @@
package plugin.dialogue;
import org.crandor.game.content.dialogue.DialoguePlugin;
import org.crandor.game.node.entity.npc.NPC;
import org.crandor.game.node.entity.player.Player;
import org.crandor.plugin.InitializablePlugin;
/**
* Represents the dialogue plugin used for the goblin village guard npc.
* @author jamix77
*/
@InitializablePlugin
public final class GoblinVillageGuardDialogue extends DialoguePlugin {
/**
*
* Constructs a new @{Code HengelDialoguePlugin} object.
*/
public GoblinVillageGuardDialogue() {
/**
* empty.
*/
}
/**
*
* Constructs a new @{Code GoblinVillageGuardDialogue} object.
* @param player
*/
public GoblinVillageGuardDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new GoblinVillageGuardDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
player("You're a long way out from the city.");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
npc("I know. We guards uaully stay by banks and shops,", "but I got sent all the way out here to keep an eye on","the brigands loitering just south of here.");
stage = 1;
break;
case 1:
player("Sounds more exciting than standing", "around guarding banks and shops.");
stage = 2;
break;
case 2:
npc("It's not too bad. At least I don't get attacked so often", "out here. Guards in the cities get killed all the time.");
stage++;
break;
case 3:
player("Honestly people these days just don't know how to behave!");
stage++;
break;
case 4:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 3241 };
}
}

View file

@ -0,0 +1,115 @@
package plugin.dialogue;
import org.crandor.game.content.dialogue.DialoguePlugin;
import org.crandor.game.node.entity.npc.NPC;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.world.map.RegionManager;
import org.crandor.plugin.InitializablePlugin;
/**
* Represents the dialogue plugin used for the hengel npc.
* @author jamix77
*/
@InitializablePlugin
public final class HengelDialoguePlugin extends DialoguePlugin {
/**
*
* Constructs a new @{Code HengelDialoguePlugin} object.
*/
public HengelDialoguePlugin() {
/**
* empty.
*/
}
/**
* Constructs a new {@code AjjatDialoguePlugin} {@code Object}.
* @param player the player.
*/
public HengelDialoguePlugin(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HengelDialoguePlugin(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
player("Hello.");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
npc("What are you doing here?");
stage = 1;
break;
case 1:
interpreter.sendOptions("Select an Option", "I'm just wandering around.", "I was hoping you'd give me some free stuff.", "I've come to kill you.");
stage = 2;
break;
case 2:
if (buttonId == 1) {
player("I'm just wondering around.");
stage = 3;
} else if (buttonId == 2) {
player("I was hoping you'd give me some free stuff.");
stage = 7;
} else if (buttonId == 3) {
player("I've come to kill you.");
stage = 9;
}
break;
case 3:
npc("You do realise you're wandering around in my house?");
stage++;
break;
case 4:
player("Yep.");
stage++;
break;
case 5:
npc("Well please get out!");
stage++;
break;
case 6:
player("Sheesh, keep your wig on!");
stage = 605;
break;
case 7:
npc("No, I jolly well wouldn't!","Get out of my house");
stage++;
break;
case 8:
player("Meanie!");
stage = 605;
break;
case 9:
npc.sendChat("Aaaaarrgh!");
for (NPC npc1 : RegionManager.getLocalNpcs(player)) {
if (npc1.getName().equalsIgnoreCase("anja")) {
npc1.sendChat("Eeeek!");
break;
}
}
end();
break;
case 605:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 2683 };
}
}

View file

@ -305,7 +305,7 @@ public final class LeelaDialogue extends DialoguePlugin {
stage = 21;
break;
case 21:
interpreter.sendDialogues(npc, null, "Get some soft clay and get her to sho you the key", "somehow. Then take the print, with bronze, to my", "father.");
interpreter.sendDialogues(npc, null, "Get some soft clay and get her to show you the key", "somehow. Then take the print, with bronze, to my", "father.");
stage = 22;
break;
case 22:

View file

@ -58,7 +58,7 @@ public class NarfsDialogue extends DialoguePlugin {
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "That's a funny name you've got.");
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "That's a funny name you've got.");
stage = 1;
return true;
}

View file

@ -0,0 +1,44 @@
package plugin.interaction.city;
import org.crandor.cache.def.impl.ObjectDefinition;
import org.crandor.game.content.global.action.ClimbActionHandler;
import org.crandor.game.interaction.OptionHandler;
import org.crandor.game.node.Node;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.node.item.Item;
import org.crandor.game.node.object.GameObject;
import org.crandor.game.world.map.Location;
import org.crandor.game.world.update.flag.context.Animation;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.plugin.Plugin;
/**
* The plugin for handling stuff in Sophanem.
* @author jamix77
*
*/
@InitializablePlugin
public class SophanemPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(20277).getConfigurations().put("option:climb-up", this);
ObjectDefinition.forId(20275).getConfigurations().put("option:climb-down", this);
return this;
}
@Override
public boolean handle(Player player, Node node, String option) {
final int id = node instanceof GameObject ? ((GameObject) node).getId() : ((Item) node).getId();
switch (id) {
case 20275:
ClimbActionHandler.climb(player, new Animation(827), Location.create(2799, 5160, 0));
break;
case 20277:
ClimbActionHandler.climb(player, new Animation(828), Location.create(3315,2796,0));
break;
}
return true;
}
}

View file

@ -0,0 +1,66 @@
package plugin.interaction.npc;
import org.crandor.game.content.dialogue.DialoguePlugin;
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.item.Item;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.plugin.Plugin;
import org.crandor.plugin.PluginManager;
import org.crandor.tools.ItemNames;
@InitializablePlugin
public final class SecurityGuardPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new SecurityGuardDialogue());
return this;
}
@Override
public boolean handle(Player player, Node node, String option) {
if (option.equals("talk-to")) {
player.getDialogueInterpreter().open(4375);
}
return true;
}
public final class SecurityGuardDialogue extends DialoguePlugin {
public SecurityGuardDialogue() {}
public SecurityGuardDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new SecurityGuardDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
if (player.getInventory().hasSpaceFor(new Item(ItemNames.SECURITY_BOOK_9003))) {
npc("Here's a Security book for you.", "Have a nice day.");
player.getInventory().add(new Item(ItemNames.SECURITY_BOOK_9003));
} else {
npc("Have a nice day.");
}
return false;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
return false;
}
@Override
public int[] getIds() {
return new int[] { 4375 };
}
}
}

View file

@ -0,0 +1,36 @@
package plugin.interaction.object;
import java.util.List;
import org.crandor.cache.def.impl.ObjectDefinition;
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.world.map.RegionManager;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.plugin.Plugin;
@InitializablePlugin
public class GoblinVillagePopulationPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(31301).getConfigurations().put("option:read", this);
return this;
}
@Override
public boolean handle(Player player, Node node, String option) {
int population = 2;
final List<NPC> npcs = RegionManager.getLocalNpcs(player);
for (NPC n : npcs) {
if (n.getName().equals("Goblin")) {
population++;
player.getDialogueInterpreter().sendPlainMessage(false, "Welcome to Goblin Village.", "Current population: " + population);
}
}
return true;
}
}

View file

@ -0,0 +1,27 @@
package plugin.interaction.object;
import org.crandor.cache.def.impl.ObjectDefinition;
import org.crandor.game.interaction.OptionHandler;
import org.crandor.game.node.Node;
import org.crandor.game.node.entity.player.Player;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.plugin.Plugin;
@InitializablePlugin
public class LookAtOptionPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
for (int i = 18877; i <= 18900; i++)
{
ObjectDefinition.forId(i).getConfigurations().put("option:look at", this);
}
return this;
}
@Override
public boolean handle(Player player, Node node, String option) {
player.getPacketDispatch().sendMessage("The " + node.getName().toLowerCase() + " seem to be going south-west.");
return true;
}
}

View file

@ -25,7 +25,7 @@ public class ReadSignPostPlugin extends OptionHandler {
* @author 'Vexia
*/
public enum Signs {
NEAR_LUMBRIDGE(18493, "North to farms and<br> Varrock.", "The River Lum lies to<br> the south.", "West to<br>Lumbridge.", "East to Al<br>Kharid - toll<br>gate; bring some<br>money."), NEAR_VARROCK(24263, "Varrock", "Lumbridge", "Draynor Manor", "Dig Site");
NEAR_LUMBRIDGE(18493, "North to farms and<br> Varrock.", "The River Lum lies to<br> the south.", "West to<br>Lumbridge.", "East to Al<br>Kharid - toll<br>gate; bring some<br>money."), NEAR_VARROCK(24263, "Sheep lay this way.", "South through farms<br> to Al Kharid and<br> Lumbridge", "West to Champion's Guild<br> and Varrock south<br> gate.", "East to Al Kharid mine and<br> follow the path north to<br> Varrock east gate.");
public static Signs forId(int id) {
for (Signs sign : Signs.values()) {
@ -76,10 +76,17 @@ public class ReadSignPostPlugin extends OptionHandler {
if (sign == null) {
return false;
}
player.getPacketDispatch().sendString(sign.directions[0], 135, 3); // North
player.getPacketDispatch().sendString(sign.directions[1], 135, 9); // South
player.getPacketDispatch().sendString(sign.directions[2], 135, 12); // West
player.getPacketDispatch().sendString(sign.directions[3], 135, 8); // East
String[] dirs = sign.directions;
if (object.getLocation().getX() == 3107 && object.getLocation().getY() == 3296) {
dirs[0] = "North to Draynor<br> Manor";
dirs[1] = "South to Draynor<br> Village";
dirs[2] = "West to Port<br> Sarim";
dirs[3] = "East to<br> Lumbridge";
}
player.getPacketDispatch().sendString(dirs[0], 135, 3); // North
player.getPacketDispatch().sendString(dirs[1], 135, 9); // South
player.getPacketDispatch().sendString(dirs[2], 135, 12); // West
player.getPacketDispatch().sendString(dirs[3], 135, 8); // East
return true;
}
@ -108,7 +115,7 @@ public class ReadSignPostPlugin extends OptionHandler {
ObjectDefinition.forId(31298).getConfigurations().put("option:read", this);
ObjectDefinition.forId(31299).getConfigurations().put("option:read", this);
ObjectDefinition.forId(31300).getConfigurations().put("option:read", this);
ObjectDefinition.forId(31301).getConfigurations().put("option:read", this);
// ObjectDefinition.forId(31301).getConfigurations().put("option:read", this);//goblin village
return this;
}
}

View file

@ -9,10 +9,8 @@ import org.crandor.game.content.skill.Skills;
import org.crandor.game.content.skill.free.gather.SkillingTool;
import org.crandor.game.interaction.OptionHandler;
import org.crandor.game.node.Node;
import org.crandor.game.node.entity.impl.PulseManager;
import org.crandor.game.node.entity.npc.NPC;
import org.crandor.game.node.entity.player.Player;
import org.crandor.game.node.entity.state.StatePulse;
import org.crandor.game.node.entity.state.impl.DoubleOrePulse;
import org.crandor.game.node.item.Item;
import org.crandor.game.node.object.GameObject;
@ -23,11 +21,11 @@ import org.crandor.game.system.task.Pulse;
import org.crandor.game.world.GameWorld;
import org.crandor.game.world.map.Location;
import org.crandor.game.world.repository.Repository;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.plugin.Plugin;
import org.crandor.plugin.PluginManager;
import org.crandor.plugin.PluginManifest;
import org.crandor.plugin.PluginType;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.tools.RandomFunction;
/**
@ -46,7 +44,7 @@ public class ShootingStarPlugin extends OptionHandler {
{"Crafting Guild", Location.create(2940, 3280, 0)},
{"Falador East Bank", Location.create(3030, 3349, 0)},
{"Rimmington mining site", Location.create(2975, 3237, 0)},
{"Falador mining site", Location.create(2975, 3240, 0)},
{"Rimmington mine", Location.create(2975, 3240, 0)},
{"Karamja mining site", Location.create(2737, 3223, 0)},
{"Brimhaven mining site", Location.create(2743, 3143, 0)},
{"South Crandor mining site", Location.create(2822, 3239, 0)},
@ -60,14 +58,14 @@ public class ShootingStarPlugin extends OptionHandler {
{"Duel Arena bank chest", Location.create(3342, 3267, 0)},
{"Nardah mining site", Location.create(3320, 2872, 0)},
{"Nardah bank", Location.create(3434, 2888, 0)},
{"South-east Varrock mining site", Location.create(3292, 3353, 0)},
{"South-west Varrock mining site", Location.create(3176, 3362, 0)},
{"South-east Varrock mine", Location.create(3292, 3353, 0)},
{"South-west Varrock mine", Location.create(3176, 3362, 0)},
{"Varrock east bank", Location.create(3259, 3407, 0)},
{"Lumbridge Swamp mining site", Location.create(3227, 3150, 0)},
{"Lumbridge Swamp mine", Location.create(3227, 3150, 0)},
{"Gnome stronghold Bank", Location.create(2460, 3432, 0)},
{"North Edgeville mining site", Location.create(3101, 3569, 0)},
{"Southern wilderness mining site", Location.create(3025, 3591, 0)},
{"Pirates' Hideout mining site", Location.create(3059, 3940, 0)},
{"Southern wilderness mine", Location.create(3025, 3591, 0)},
{"Pirates' Hideout mine", Location.create(3059, 3940, 0)},
{"Lava Maze mining site", Location.create(3062, 3885, 0)},
{"Mage Arena bank", Location.create(3093, 3962, 0)}
};

View file

@ -0,0 +1,26 @@
package plugin.interaction.object;
import org.crandor.cache.def.impl.ObjectDefinition;
import org.crandor.game.interaction.OptionHandler;
import org.crandor.game.node.Node;
import org.crandor.game.node.entity.player.Player;
import org.crandor.plugin.InitializablePlugin;
import org.crandor.plugin.Plugin;
@InitializablePlugin
public class WantedPoster extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(40992).getConfigurations().put("option:look-at", this);
return this;
}
@Override
public boolean handle(Player player, Node node, String option) {
//Can do fun stuff related to a player being wanted or something.
player.getDialogueInterpreter().sendPlainMessage(false, "Looks like a generic wanted poster.");
return true;
}
}

View file

@ -38,11 +38,9 @@ public final class KingBlackDragonNPC extends AbstractNPC {
*/
private CombatSwingHandler combatHandler = new KBDCombatSwingHandler();
/**
* Constructs a new {@code KingBlackDragonNPC} {@Code Object}.
*/
public KingBlackDragonNPC() {
super(50, DEFAULT_SPAWN);
super(-1,null);
}
@Override
@ -88,7 +86,6 @@ public final class KingBlackDragonNPC extends AbstractNPC {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
init();
return super.newInstance(arg);
}

View file

@ -22,6 +22,7 @@ public final class GuardNPC extends AbstractNPC {
*/
public GuardNPC() {
super(0, null, true);
this.setAggressive(false);
}
/**
@ -31,6 +32,7 @@ public final class GuardNPC extends AbstractNPC {
*/
private GuardNPC(int id, Location location) {
super(id, location, true);
this.setAggressive(false);
}
@Override

View file

@ -112,6 +112,13 @@ public class RevenantNPC extends AbstractNPC {
if (killer instanceof Player) {
killer.asPlayer().getAudioManager().send(4063, true);
}
int chance = RandomFunction.getRandom(120);
if (chance == 1) {
int item = RandomFunction.getRandom(PVP_DROPS.length - 1);
Item i = new Item(PVP_DROPS[item]);
GroundItemManager.create(i, itemLoc, killer.asPlayer());
Repository.sendNews(killer.getUsername() + " has just received a " + i.getName() + " from a " + getName() + ".");
}
}
@Override

View file

@ -40,6 +40,7 @@ import plugin.quest.touristrap.TouristTrapPlugin.BedabinAnvilHandler.AnnaWinchHa
/**
* Represents the plugin used to handle interactions for tourist trap.
*
* @author 'Vexia
* @version 1.0
*/
@ -396,10 +397,20 @@ public final class TouristTrapPlugin extends OptionHandler {
case 18959:
player.getDialogueInterpreter().sendDialogue("A sturdy looking cart for carrying barrels of rocks out of ", "the mining camp.");
break;
case 18900:
case 18899:
case 18898:
case 18878:
case 18887:
case 18886:
case 18885:
case 18884:
case 18883:
case 18882:
case 18881:
case 18880:
case 18879:
case 18878:
case 18877:
player.getDialogueInterpreter().sendDialogue("This looks like some disturbed sand. Footseps seem to be heading off", "towards the South.");
break;
}
@ -505,6 +516,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Checks if the player contains an item.
*
* @param player the player.
* @param item the item.
* @return the item.
@ -515,6 +527,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The winch dialogue plugin.
*
* @author 'Vexia
* @version 1.0
*/
@ -531,6 +544,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code WinchDialogue} {@code Object}.
*
* @param player the player.
*/
public WinchDialogue(final Player player) {
@ -662,13 +676,14 @@ public final class TouristTrapPlugin extends OptionHandler {
@Override
public int[] getIds() {
return new int[] { DialogueInterpreter.getDialogueKey("winch dialogue") };
return new int[]{DialogueInterpreter.getDialogueKey("winch dialogue")};
}
}
/**
* The use with handler for anna on the cart.
*
* @author 'Vexia
* @version 1.0
*/
@ -724,6 +739,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The ana cart cutscene plugin.
*
* @author 'Vexia
* @version 1.0
*/
@ -732,7 +748,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The paths.
*/
private static final Location[][] PATHS = new Location[][] { { Location.create(3315, 9417, 0), Location.create(3317, 9417, 0), Location.create(3318, 9418, 0), Location.create(3318, 9428, 0) }, { Location.create(3318, 9430, 0), Location.create(3318, 9418, 0), Location.create(3317, 9417, 0), Location.create(3316, 9417, 0), Location.create(3314, 9417, 0), Location.create(3303, 9417, 0) } };
private static final Location[][] PATHS = new Location[][]{{Location.create(3315, 9417, 0), Location.create(3317, 9417, 0), Location.create(3318, 9418, 0), Location.create(3318, 9428, 0)}, {Location.create(3318, 9430, 0), Location.create(3318, 9418, 0), Location.create(3317, 9417, 0), Location.create(3316, 9417, 0), Location.create(3314, 9417, 0), Location.create(3303, 9417, 0)}};
/**
* Constructs a new {@code AnnaCartCutscene} {@code Object}.
@ -743,6 +759,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code AnnaCartCutscene} {@code Object}.
*
* @param player the player.
*/
public AnnaCartCutscene(final Player player) {
@ -827,6 +844,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The cart dialogue plugin.
*
* @author 'Vexia
* @version 1.0
*/
@ -834,6 +852,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code CartDialogue} {@code Object}.
*
* @param player the player.
*/
public CartDialogue(final Player player) {
@ -913,13 +932,14 @@ public final class TouristTrapPlugin extends OptionHandler {
@Override
public int[] getIds() {
return new int[] { DialogueInterpreter.getDialogueKey("ana cart dialogue") };
return new int[]{DialogueInterpreter.getDialogueKey("ana cart dialogue")};
}
}
/**
* The minecart dialogue plugin.
*
* @author 'Vexia
* @version 1.0
*/
@ -951,6 +971,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code MineCartDialogue} {@code Object}.
*
* @param player the player.
*/
public MineCartDialogue(final Player player) {
@ -1011,6 +1032,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Method used to enter the cart.
*
* @param player the player.
*/
public void enterCart(final Player player) {
@ -1033,6 +1055,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The mining cart cutscene plugin.
*
* @author 'Vexia
* @version 1.0
*/
@ -1041,7 +1064,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The paths.
*/
private static final Location[][] PATHS = new Location[][] { { Location.create(3303, 9417, 0), Location.create(3316, 9417, 0), Location.create(3317, 9417, 0), Location.create(3318, 9418, 0), Location.create(3318, 9430, 0) }, { Location.create(3318, 9430, 0), Location.create(3318, 9418, 0), Location.create(3317, 9417, 0), Location.create(3303, 9417, 0) } };
private static final Location[][] PATHS = new Location[][]{{Location.create(3303, 9417, 0), Location.create(3316, 9417, 0), Location.create(3317, 9417, 0), Location.create(3318, 9418, 0), Location.create(3318, 9430, 0)}, {Location.create(3318, 9430, 0), Location.create(3318, 9418, 0), Location.create(3317, 9417, 0), Location.create(3303, 9417, 0)}};
/**
* The path index.
@ -1057,6 +1080,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code MiningCartCutscene} {@code Object}.
*
* @param player the player.
*/
public MiningCartCutscene(final Player player) {
@ -1134,6 +1158,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Gets the path index.
*
* @return the location.
*/
public Location[] getPath() {
@ -1143,13 +1168,14 @@ public final class TouristTrapPlugin extends OptionHandler {
@Override
public int[] getIds() {
return new int[] { DialogueInterpreter.getDialogueKey("cart dialogue") };
return new int[]{DialogueInterpreter.getDialogueKey("cart dialogue")};
}
}
/**
* The winch cutscene plugin.
*
* @author 'Vexia
* @version 1.0
*/
@ -1164,6 +1190,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code WinchCutscene} {@code Object}.
*
* @param player the player.
*/
public WinchCutscene(final Player player) {
@ -1214,6 +1241,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The use with handler on the chest.
*
* @author 'Vexia
* @version 1.0
*/
@ -1243,6 +1271,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The barrel dialogue plugin.
*
* @author 'Vexia
* @version 1.0
*/
@ -1269,6 +1298,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code BarrelDialogue} {@code Object}.
*
* @param player the player.
*/
public BarrelDialogue(final Player player) {
@ -1351,13 +1381,14 @@ public final class TouristTrapPlugin extends OptionHandler {
@Override
public int[] getIds() {
return new int[] { DialogueInterpreter.getDialogueKey("barrel dialogue") };
return new int[]{DialogueInterpreter.getDialogueKey("barrel dialogue")};
}
}
/**
* The use with handler for the bedabin anvil.
*
* @author 'Vexia
* @version 1.0
*/
@ -1393,6 +1424,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The handler used to handle the anna barrel on the winch.
*
* @author 'Vexia
* @version 1.0
*/
@ -1429,6 +1461,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The prototype dart creation handler.
*
* @author 'Vexia
* @version 1.0
*/
@ -1457,6 +1490,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The prototype dialogue plugin.
*
* @author 'Vexia
* @version 1.0
*/
@ -1469,6 +1503,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code ProtoTypeDialogue} {@code Object}.
*
* @param player the player.
*/
public ProtoTypeDialogue(final Player player) {
@ -1526,7 +1561,7 @@ public final class TouristTrapPlugin extends OptionHandler {
@Override
public int[] getIds() {
return new int[] { DialogueInterpreter.getDialogueKey("prototype dart") };
return new int[]{DialogueInterpreter.getDialogueKey("prototype dart")};
}
}
@ -1534,6 +1569,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The bedabin dialogue plugin handler.
*
* @author 'Vexia
* @version 1.0
*/
@ -1550,6 +1586,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code BedabinAnvilDialogue} {@code Object}.
*
* @param player the player.
*/
public BedabinAnvilDialogue(final Player player) {
@ -1595,6 +1632,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* The skill pulse used to make a prototype dart.
*
* @author 'Vexia
* @version 1.0
*/
@ -1612,6 +1650,7 @@ public final class TouristTrapPlugin extends OptionHandler {
/**
* Constructs a new {@code ProtoTypePulse} {@code Object}.
*
* @param player the player.
*/
public ProtoTypePulse(Player player) {
@ -1666,7 +1705,7 @@ public final class TouristTrapPlugin extends OptionHandler {
@Override
public int[] getIds() {
return new int[] { DialogueInterpreter.getDialogueKey("bedabin-anvil") };
return new int[]{DialogueInterpreter.getDialogueKey("bedabin-anvil")};
}
}