Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ceikry
2021-04-08 12:47:29 -05:00
9 changed files with 265 additions and 237 deletions
@@ -3,6 +3,7 @@ package core.game.content.quest.members.lostcity;
import core.game.interaction.NodeUsageEvent;
import core.game.interaction.UseWithHandler;
import core.game.node.entity.player.Player;
import core.game.node.entity.skill.Skills;
import core.game.node.item.Item;
import core.plugin.Plugin;
@@ -38,9 +39,13 @@ public final class DramenStaffPlugin extends UseWithHandler {
@Override
public boolean handle(NodeUsageEvent event) {
final Player player = event.getPlayer();
if (player.getInventory().remove(DRAMEN_BRANCH)) {
if (player.getInventory().containsItem(DRAMEN_BRANCH) && player.getSkills().hasLevel(Skills.CRAFTING,31)) {
player.getInventory().remove(DRAMEN_BRANCH);
player.getInventory().add(DRAMEN_STAFF);
player.getPacketDispatch().sendMessage("You carve the branch into a staff.");
player.getDialogueInterpreter().sendDialogue("You carve the branch into a staff.");
}else{
player.getDialogueInterpreter().sendDialogue("You need a crafting level of 31 to do this.");
return false;
}
player.lock(1);
return true;
@@ -4,6 +4,7 @@ import core.cache.def.impl.ObjectDefinition;
import core.game.component.Component;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.content.activity.ActivityManager;
import core.game.node.entity.skill.Skills;
import core.game.node.entity.skill.gather.SkillingTool;
import core.game.node.entity.skill.runecrafting.Altar;
import core.game.interaction.NodeUsageEvent;
@@ -194,14 +195,19 @@ public class WLBelowPlugin extends OptionHandler {
return true;
}*/
Item chaosItem = player.getInventory().containsItem(CHAOS_TALISMAN) ? CHAOS_TALISMAN : CHAOS_TIARA;
if (chaosItem != null && player.getInventory().remove(CHAOS_RUNES)) {
player.lock(5);
player.getInventory().remove(WhatLiesBelow.WAND);
player.getInventory().add(WhatLiesBelow.INFUSED_WAND);
player.animate(Animation.create(6104));
player.getDialogueInterpreter().sendDialogue("The metal wand bursts into life and crackles with arcane", "power. This is a powerful instrument indeed!");
if (player.getSkills().hasLevel(Skills.RUNECRAFTING,35)){
if (chaosItem != null && player.getInventory().remove(CHAOS_RUNES)) {
player.lock(5);
player.getInventory().remove(WhatLiesBelow.WAND);
player.getInventory().add(WhatLiesBelow.INFUSED_WAND);
player.animate(Animation.create(6104));
player.getDialogueInterpreter().sendDialogue("The metal wand bursts into life and crackles with arcane", "power. This is a powerful instrument indeed!");
}
return true;
}else {
player.getDialogueInterpreter().sendDialogue("You need a Runecrafting level of 35 to make the infused wand.");
return false;
}
return true;
}
}
@@ -10,7 +10,7 @@ import rs09.game.content.global.WeightedItem
import java.util.stream.IntStream
enum class Pickpockets(val ids: IntArray, val requiredLevel: Int, val low: Double, val high: Double, val experience: Double, val stunDamageMin: Int, val stunDamageMax: Int, val stunTime: Int, val table: WeightBasedTable) {
MAN(intArrayOf(1, 2, 3, 4, 5, 6, 16, 24, 170, 3915), 1, 180.0, 240.0, 8.0, 1, 1,5, WeightBasedTable.create(
MAN(intArrayOf(1, 2, 3, 4, 5, 6, 16, 24, 170, 3915, 3226, 5924, 5923), 1, 180.0, 240.0, 8.0, 1, 1,5, WeightBasedTable.create(
WeightedItem(Items.COINS_995,3,3,1.0,true)
)),
FARMER(intArrayOf(7, 1757, 1758), 10, 180.0, 240.0, 14.5, 1,1,5,WeightBasedTable.create(
@@ -98,7 +98,7 @@ class MiscCommandSet : CommandSet(Command.Privilege.ADMIN){
/**
* Lists the players currently online
*/
define("players", Command.Privilege.STANDARD){ player, _ ->
define("players", Command.Privilege.MODERATOR){ player, _ ->
val rights = player.rights.ordinal
if (player!!.interfaceManager.isOpened && player.interfaceManager.opened.id != Components.QUESTJOURNAL_SCROLL_275 || player.locks.isMovementLocked || player.locks.isTeleportLocked) {
reject(player, "Please finish what you're doing first.")