Random fixes 2 (#294)

* Make ::update automatically restart server as well

* Added toggeable snow(only activable in december), added walking queue reset when using objects changing Z, made it so the wildy warning interface is appearing when entering in wildy

For some reason the resetWalkingQueue added to the execute method wasnt doing anything so I manually added it to every interaction possible... LOL

Wildy warning interface was appearing when clicking with player in wildy. I made it so it appears straight when walking 1 tile in wildy zone. Wont appears if player logs in wildy as he already knows this shit.
This commit is contained in:
Gptaqbc
2019-12-15 19:33:03 -05:00
committed by Daniel Ginovker
parent 87eaaed36f
commit 9ed0acfb04
6 changed files with 173 additions and 13 deletions
@@ -14,6 +14,8 @@ import com.rebotted.game.players.*;
import com.rebotted.net.packets.PacketType;
import com.rebotted.util.Misc;
import com.rebotted.world.clip.Region;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class Commands implements PacketType {
@@ -129,6 +131,22 @@ public class Commands implements PacketType {
case "shop":
BotHandler.playerShop(player);
break;
case "snow":
Calendar date = new GregorianCalendar();
if ((date.get(Calendar.MONTH) + 1) == 12 && !player.inWild())
{
if (player.isSnowy)
{
player.isSnowy = false;
player.getPacketSender().walkableInterface(-1);
}
else {
player.isSnowy = true;
player.getPacketSender().walkableInterface(11877);
}
player.getPacketSender().sendMessage("Happy Holidays! Type ::snow to disable/enable! (Auto-disabling in certain area)");
}
break;
case "withdrawshop":
player.getPacketSender().sendMessage("Shorter version: ::wshop");
case "wshop":