mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-02 16:49:03 +00:00
New stuff 4 (#319)
* Added some sound, refactored fletching and arrowmaking a bit... I've maybe fixed the issue with fletching.. idk Added some sound, refactored fletching and arrowmaking a bit... I've maybe fixed the issue with fletching.. idk * Commented clipping server side check so we can work on it Commented and brought back the old code so gates works while we work in the clipping check server side. * Added Canifis bank to the bank boolean * Fixed the drops problem * Added cannonball making, fixed some typos, added some command for admin to get 999k hp and prayer points(usefull for debugging) New feature: - Cannonball making New Commands: - ::hp - ::pray * Update DwarfCannon.java
This commit is contained in:
@@ -5,6 +5,8 @@ import com.rebotted.event.CycleEvent;
|
||||
import com.rebotted.event.CycleEventContainer;
|
||||
import com.rebotted.event.CycleEventHandler;
|
||||
import com.rebotted.game.content.combat.CombatConstants;
|
||||
import com.rebotted.game.content.skills.fletching.LogCuttingInterface;
|
||||
import com.rebotted.game.items.ItemAssistant;
|
||||
import com.rebotted.game.npcs.Npc;
|
||||
import com.rebotted.game.npcs.NpcHandler;
|
||||
import com.rebotted.game.objects.Objects;
|
||||
@@ -33,6 +35,10 @@ public class DwarfCannon {
|
||||
|
||||
private final int ballsID = 2;
|
||||
|
||||
public final int steelBarID = 2353;
|
||||
|
||||
private final int ammoMouldID = 4;
|
||||
|
||||
public boolean settingUp = false;
|
||||
|
||||
private int setUpStage = 0;
|
||||
@@ -53,6 +59,44 @@ public class DwarfCannon {
|
||||
|
||||
private boolean justClicked = false;
|
||||
|
||||
public static void makeBall(Player player)
|
||||
{
|
||||
//An interface could be added instead of making all.
|
||||
if (!player.getItemAssistant().playerHasItem(2353) || !player.getItemAssistant().playerHasItem(4))
|
||||
{
|
||||
player.getPacketSender().sendMessage("You need an ammo mould and steel bars to make cannonballs.");
|
||||
return;
|
||||
}
|
||||
if (!player.isSmithing)
|
||||
{
|
||||
player.isSmithing = true;
|
||||
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
|
||||
@Override
|
||||
public void execute(CycleEventContainer container) {
|
||||
if (player.isWoodcutting || player.isCrafting || player.isFletching || player.isMoving || player.isMining || player.isBusy || player.isShopping || player.isFiremaking || player.isSpinning || player.isPotionMaking || player.playerIsFishing || player.isBanking || player.isSmelting || player.isTeleporting || player.isHarvesting || player.playerIsCooking || player.isPotCrafting ||!player.isSmithing || !player.getItemAssistant().playerHasItem(2353) || !player.getItemAssistant().playerHasItem(4))
|
||||
{
|
||||
container.stop();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.startAnimation(899);
|
||||
player.getItemAssistant().deleteItem(2353, 1);
|
||||
player.getItemAssistant().addItem(2, 4);
|
||||
player.getPacketSender().sendMessage("You make some cannonballs.");
|
||||
player.getPlayerAssistant().addSkillXP(26, player.playerSmithing);
|
||||
player.getPacketSender().sendSound(352, 100, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
player.isSmithing = false;
|
||||
}
|
||||
}, 3);
|
||||
}
|
||||
|
||||
}
|
||||
public void placeCannon() {
|
||||
if (settingUp == true) {
|
||||
return;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class RestlessGhost {
|
||||
client.getPacketSender().sendFrame126("Restless Ghost", 8144);
|
||||
client.getPacketSender().sendFrame126(
|
||||
"@str@I've talked Father Urhey", 8147);
|
||||
client.getPacketSender().sendFrame126("@str@He gave me a amulet",
|
||||
client.getPacketSender().sendFrame126("@str@He gave me an amulet",
|
||||
8148);
|
||||
client.getPacketSender().sendFrame126(
|
||||
"I should speak to the ghost", 8149);
|
||||
|
||||
@@ -76,7 +76,7 @@ public class JewelryMaking {
|
||||
} else {
|
||||
c.getPacketSender().sendFrame246(4241, 120, 1595);
|
||||
c.getPacketSender().sendFrame126(
|
||||
"You need a amulet mould to craft necklaces", 4242);
|
||||
"You need an amulet mould to craft necklaces", 4242);
|
||||
for (int i = 0; i < MOULD_INTERFACE_IDS[2].length; i++) {
|
||||
c.getPacketSender().sendFrame34(-1, i, 4245, 1);
|
||||
}
|
||||
|
||||
@@ -39,20 +39,26 @@ public class LogCutting {
|
||||
container.stop();
|
||||
return;
|
||||
}
|
||||
player.startAnimation(1248);
|
||||
player.getItemAssistant().deleteItem(LogCuttingInterface.log, 1);
|
||||
if (product == 52)
|
||||
{
|
||||
player.getItemAssistant().addItem(product, 15);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getItemAssistant().addItem(product, 1);
|
||||
player.startAnimation(1248);
|
||||
player.getItemAssistant().deleteItem(LogCuttingInterface.log, 1);
|
||||
if (product == 52)
|
||||
{
|
||||
player.getItemAssistant().addItem(product, 15);
|
||||
player.getPacketSender().sendMessage("You carefully cut the " + ItemAssistant.getItemName(LogCuttingInterface.log) + " into 15 " + ItemAssistant.getItemName(product) + "s.");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getItemAssistant().addItem(product, 1);
|
||||
player.getPacketSender().sendMessage("You carefully cut the " + ItemAssistant.getItemName(LogCuttingInterface.log) + " into a " + ItemAssistant.getItemName(product) + ".");
|
||||
|
||||
}
|
||||
player.getPlayerAssistant().addSkillXP(xp, player.playerFletching);
|
||||
player.doAmount--;
|
||||
player.getPacketSender().sendSound(CUT_SOUND, 100, 0);
|
||||
}
|
||||
player.getPacketSender().sendMessage("You carefully cut the " + ItemAssistant.getItemName(LogCuttingInterface.log) + " into an " + ItemAssistant.getItemName(product) + ".");
|
||||
player.getPlayerAssistant().addSkillXP(xp, player.playerFletching);
|
||||
player.doAmount--;
|
||||
player.getPacketSender().sendSound(CUT_SOUND, 100, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -559,7 +559,7 @@ public class Slayer {
|
||||
}
|
||||
c.buySlayerTimer = System.currentTimeMillis();
|
||||
c.slayerPoints -= 25;
|
||||
c.getPacketSender().sendMessage("You spend 25 slayer points and aquire a useful Slayer's respite.");
|
||||
c.getPacketSender().sendMessage("You spend 25 slayer points and aquire an useful Slayer's respite.");
|
||||
c.getItemAssistant().addItem(5841, 1);
|
||||
updatePoints();
|
||||
}
|
||||
|
||||
@@ -2639,7 +2639,7 @@ public class DialogueHandler {
|
||||
player.nextChat = 522;
|
||||
break;
|
||||
case 522:
|
||||
sendNpcChat1("You are a eager one.", player.talkingNpc,
|
||||
sendNpcChat1("You are an eager one.", player.talkingNpc,
|
||||
"Doctor Harlow");
|
||||
player.nextChat = 523;
|
||||
break;
|
||||
|
||||
@@ -544,6 +544,7 @@ public class Commands implements PacketType {
|
||||
player.getDialogueHandler().sendDialogues(dialogueID, npcType);
|
||||
break;
|
||||
case "interface":
|
||||
case "int":
|
||||
if (arguments.length == 0) {
|
||||
player.getPacketSender().sendMessage("You must specify an id: ::interface id");
|
||||
return;
|
||||
@@ -641,6 +642,14 @@ public class Commands implements PacketType {
|
||||
case "spec":
|
||||
player.specAmount = 100.0;
|
||||
break;
|
||||
case "hp":
|
||||
player.getPacketSender().sendMessage("You attributed yourself 999 999 hitpoints.");
|
||||
player.playerLevel[3] = 999999;
|
||||
break;
|
||||
case "pray":
|
||||
player.getPacketSender().sendMessage("You attributed yourself 999 999 prayer points.");
|
||||
player.playerLevel[5] = 999999;
|
||||
break;
|
||||
case "setlevel":
|
||||
case "level":
|
||||
case "skill":
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.rebotted.net.packets.impl;
|
||||
|
||||
import com.rebotted.game.content.combat.range.DwarfCannon;
|
||||
import com.rebotted.game.content.skills.cooking.Cooking;
|
||||
import com.rebotted.game.content.skills.cooking.CookingTutorialIsland;
|
||||
import com.rebotted.game.content.skills.crafting.JewelryMaking;
|
||||
@@ -108,6 +109,9 @@ public class ItemOnObject implements PacketType {
|
||||
/*} else if (itemId == SilverCrafting.SILVER_BAR) {
|
||||
Menus.sendSkillMenu(c, "silverCrafting");*/
|
||||
}
|
||||
if (itemId == 2353 || itemId == 4) {
|
||||
DwarfCannon.makeBall(player);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2452:
|
||||
|
||||
Reference in New Issue
Block a user