mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-04 16:49:04 +00:00
Fix conflicts
This commit is contained in:
@@ -328,10 +328,11 @@ public class Specials {
|
||||
|
||||
case 29063:
|
||||
if (player2.playerEquipment[player2.playerWeapon] == 1377) {
|
||||
if (player2.getCombatAssistant().checkSpecAmount(1377)) {
|
||||
if (player2.specAmount >= 5) {
|
||||
player2.gfx0(246);
|
||||
player2.forcedChat("Raarrrrrgggggghhhhhhh!");
|
||||
player2.startAnimation(1056);
|
||||
player2.specAmount -= 5;
|
||||
player2.playerLevel[2] = player2.getLevelForXP(player2.playerXP[2]) + player2.getLevelForXP(player2.playerXP[2]) * 15 / 100;
|
||||
player2.getPlayerAssistant().refreshSkill(2);
|
||||
player2.getItemAssistant().updateSpecialBar();
|
||||
|
||||
+18
-10
@@ -213,20 +213,27 @@ public class Pickpocket extends SkillHandler {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void attemptPickpocket(final Player player, final int npcId) {
|
||||
|
||||
private static boolean canSteal(Player player, int npcId) {
|
||||
if (System.currentTimeMillis() - player.lastThieve < 2000 || player.playerStun) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (player.underAttackBy > 0 || player.underAttackBy2 > 0) {
|
||||
player.getPacketSender().sendMessage("You can't pickpocket while in combat!");
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (System.currentTimeMillis() - player.logoutDelay < 4000) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (!THIEVING) {
|
||||
player.getPacketSender().sendMessage("This skill is currently disabled.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void attemptPickpocket(final Player player, final int npcId) {
|
||||
if (!canSteal(player, npcId)) {
|
||||
return;
|
||||
}
|
||||
for (final npcData n : npcData.values()) {
|
||||
@@ -258,12 +265,12 @@ public class Pickpocket extends SkillHandler {
|
||||
if (NpcHandler.npcs[i] != null) {
|
||||
if (NpcHandler.npcs[i].npcType == npcId) {
|
||||
if (player.goodDistance(player.absX, player.absY, NpcHandler.npcs[i].absX, NpcHandler.npcs[i].absY, 1) && player.heightLevel == NpcHandler.npcs[i].heightLevel) {
|
||||
if (!NpcHandler.npcs[i].underAttack) {
|
||||
NpcHandler.npcs[i].forceChat("What do you think you're doing?");
|
||||
NpcHandler.npcs[i].facePlayer(player.playerId);
|
||||
}
|
||||
if (!NpcHandler.npcs[i].underAttack) {
|
||||
NpcHandler.npcs[i].forceChat("What do you think you're doing?");
|
||||
NpcHandler.npcs[i].facePlayer(player.playerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
player.lastThieve = System.currentTimeMillis() + 5000;
|
||||
@@ -314,4 +321,5 @@ public class Pickpocket extends SkillHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7085,6 +7085,21 @@ public class DialogueHandler {
|
||||
player.getDialogueHandler().sendPlayerChat(ChatEmotes.DEFAULT, "No thanks.");
|
||||
player.getDialogueHandler().endDialogue();
|
||||
break;
|
||||
case 3574:
|
||||
player.getDialogueHandler().sendNpcChat(player.talkingNpc, ChatEmotes.DEFAULT, "Hello there, would you like me to enchant a battlestaff", "for 40k coins for you?");
|
||||
break;
|
||||
case 3575:
|
||||
player.getDialogueHandler().sendOption("Yes.", "No thanks.");
|
||||
player.dialogueAction = 3575;
|
||||
break;
|
||||
case 3576:
|
||||
player.getDialogueHandler().endDialogue();
|
||||
player.getPacketSender().showInterface(205);
|
||||
break;
|
||||
case 3577:
|
||||
player.getDialogueHandler().sendPlayerChat(ChatEmotes.HAPPY_JOYFUL, "No thanks.");
|
||||
player.getDialogueHandler().endDialogue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -478,6 +478,10 @@ public class DialogueOptions {
|
||||
} else if (player.dialogueAction == 3111) {
|
||||
player.getDialogueHandler().sendDialogues(3112, 946);
|
||||
return;
|
||||
} else if (player.dialogueAction == 161) {// rod
|
||||
player.getPlayerAssistant().startTeleport(3313, 3234, 0, "modern");
|
||||
Teles.necklaces(player);
|
||||
return;
|
||||
} else if (player.dialogueAction == 162) {
|
||||
player.getDialogueHandler().sendDialogues(3170, player.npcType);
|
||||
return;
|
||||
@@ -548,13 +552,12 @@ public class DialogueOptions {
|
||||
} else if (player.dialogueAction == 189) {
|
||||
player.getDialogueHandler().sendDialogues(3210, player.npcType);
|
||||
return;
|
||||
} else if (player.dialogueAction == 161) {// rod
|
||||
player.getPlayerAssistant().startTeleport(3313, 3234, 0, "modern");
|
||||
Teles.necklaces(player);
|
||||
return;
|
||||
} else if (player.dialogueAction == 703) {
|
||||
player.getDialogueHandler().sendDialogues(3572, player.npcType);
|
||||
return;
|
||||
} else if (player.dialogueAction == 3575) {
|
||||
player.getDialogueHandler().sendDialogues(3577, player.npcType);
|
||||
return;
|
||||
}
|
||||
player.dialogueAction = 0;
|
||||
player.getPacketSender().closeAllWindows();
|
||||
@@ -765,6 +768,9 @@ public class DialogueOptions {
|
||||
} else if (player.dialogueAction == 703) {
|
||||
player.getDialogueHandler().sendDialogues(3573, player.npcType);
|
||||
return;
|
||||
} else if (player.dialogueAction == 3575) {
|
||||
player.getDialogueHandler().sendDialogues(3576, player.npcType);
|
||||
return;
|
||||
}
|
||||
player.dialogueAction = 0;
|
||||
player.getPacketSender().closeAllWindows();
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.rebotted.game.items.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.rebotted.game.items.Item;
|
||||
import com.rebotted.game.players.Player;
|
||||
|
||||
public class EnchantStaff {
|
||||
|
||||
public static boolean staffButtons(Player player, int button) {
|
||||
final staffData staff = staffData.forId(button);
|
||||
if (staff != null) {
|
||||
if(!player.getInventory().playerHasItem(staff.getBattlestaff())){
|
||||
player.getPacketSender().sendMessage("You need a battlestaff to do this!");
|
||||
return true;
|
||||
}
|
||||
if(!player.getItemAssistant().playerHasItem(995, 40000)) {
|
||||
player.getPacketSender().sendMessage("You don't have enough coins with you!");
|
||||
return true;
|
||||
}
|
||||
player.getInventory().removeItem(new Item(staff.getBattlestaff(), 1));
|
||||
player.getInventory().removeItem(new Item(995, 40000));
|
||||
player.getInventory().addItem(new Item(staff.getMysticstaff(), 1));
|
||||
player.getPacketSender().sendMessage("Thormac enchants your staff into a mystic staff.");
|
||||
player.getPacketSender().closeAllWindows();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static enum staffData {// button, battlestaff, mystic staff
|
||||
AIR(1734, 1397, 1405), WATER(1735, 1395, 1403), EARTH(1736, 1399, 1407), FIRE(1737, 1393, 1401), LAVA(1738, 3053, 3054), MUD(15348, 6562, 6563);
|
||||
|
||||
private int button;
|
||||
private int battlestaff;
|
||||
private int mysticstaff;
|
||||
|
||||
public static HashMap<Integer, staffData> craftingStaff = new HashMap<Integer, staffData>();
|
||||
|
||||
public static staffData forId(int id) {
|
||||
return craftingStaff.get(id);
|
||||
}
|
||||
|
||||
static {
|
||||
for (staffData c : staffData.values()) {
|
||||
craftingStaff.put(c.getButton(), c);
|
||||
}
|
||||
}
|
||||
|
||||
private staffData(int button, int battlestaff, int mysticstaff) {
|
||||
this.button = button;
|
||||
this.battlestaff = battlestaff;
|
||||
this.mysticstaff = mysticstaff;
|
||||
}
|
||||
|
||||
public int getButton() {
|
||||
return button;
|
||||
}
|
||||
|
||||
public int getBattlestaff() {
|
||||
return battlestaff;
|
||||
}
|
||||
|
||||
public int getMysticstaff() {
|
||||
return mysticstaff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1515,8 +1515,6 @@ public class ObjectsActions {
|
||||
|
||||
case 3030:
|
||||
if (player.tutorialProgress == 26) {
|
||||
// client.getPacketDispatcher().tutorialIslandInterface(55,
|
||||
// 12);
|
||||
player.getDialogueHandler().sendDialogues(3078, -1);
|
||||
player.getPlayerAssistant().movePlayer(3111, 3125, 0);
|
||||
player.startAnimation(828);
|
||||
@@ -1644,7 +1642,7 @@ public class ObjectsActions {
|
||||
break;
|
||||
|
||||
case 9358:
|
||||
player.getPlayerAssistant().movePlayer(2444, 5171, 0);
|
||||
player.getPlayerAssistant().movePlayer(2480, 5175, 0);
|
||||
break;
|
||||
|
||||
case 9359:
|
||||
|
||||
@@ -1641,7 +1641,7 @@ public class PlayerAssistant {
|
||||
|
||||
int x = NpcHandler.npcs[player.followId2].getX();
|
||||
int y = NpcHandler.npcs[player.followId2].getY();
|
||||
if (!player.goodDistance(x, y, player.getX(), player.getY(),25)) {
|
||||
if (!player.goodDistance(x, y, player.getX(), player.getY(), 25)) {
|
||||
player.followId2 = 0;
|
||||
resetFollow();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user