* Revised shop re-stocking interval.

* Revised shop re-stocking interval.

* Updated character save directory.

* Renamed new player save directory from accounts to characters.

* Added inverse for random toggle, since it's the first thing I type every time.

* Added god capes.

* Re-implemented experiments.

* Yell now looks a little cleaner.

* Fixed outside of bounds exception on High scores, when player count doesn't meet threshold.

* Cleaned up Magic Teleports class and added level requirements.

* Fixed exit portal from ancient chamber.

* Added check to ensure axe id isn't outside the bounds of expected axes.

* Added yet another check to ensure that the player has the required item before chopping a tree. NOTE this fix may not work as the issue is not reproducible locally.

* Changed allowed connections from 3 to 250!

* Sheep shearing just got easier!
This commit is contained in:
Ben Maher
2019-10-07 01:14:04 +01:00
committed by Daniel Ginovker
parent 84dbe2e879
commit ffc3e02f59
2 changed files with 15 additions and 10 deletions
@@ -64,19 +64,16 @@ public class Npc {
updateRequired = true;
}
public void requestTransformTime(Client player, int itemId, int animation, final int currentId, final int newId, int transformTime) {
public boolean requestTransformTime(Client player, int itemId, int animation, final int currentId, final int newId, int transformTime, int npcId) {
if (!player.getItemAssistant().playerHasItem(itemId)) {
player.getActionSender().sendMessage("You need " + ItemAssistant.getItemName(itemId).toLowerCase() + " to do that.");
return;
return false;
}
if (NpcHandler.npcs[currentId].isTransformed == true) {
player.getActionSender().sendMessage("This npc is already transformed.");
return;
}
if (animation > 0) {
if (NpcHandler.npcs[npcId].isTransformed == true)
return false;
if (animation > 0)
player.startAnimation(animation);
}
NpcHandler.npcs[currentId].isTransformed = true;
NpcHandler.npcs[npcId].isTransformed = true;
requestTransform(newId);
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
@@ -91,6 +88,7 @@ public class Npc {
NpcHandler.npcs[currentId].isTransformed = false;
}
}, transformTime);
return true;
}
public void appendTransformUpdate(Stream str) {
@@ -28,7 +28,14 @@ public class ItemOnNpc implements PacketType {
player.faceNpc(i);
switch(npcId) {
case 43:
NpcHandler.npcs[i].requestTransformTime(player, 1735, 893, 43, 42, 50);
if (NpcHandler.npcs[i].requestTransformTime(player, 1735, 893, 43, 42, 50, i))
{
player.getItemAssistant().addItem(1737, 1);
}
else
{
player.getActionSender().sendMessage("You need to wait for this sheep's wool to regrow!");
}
break;
}
if (player.getItemAssistant().playerHasItem(995, 1) && npcId == 736) {