mirror of
https://github.com/moparisthebest/MoparClassic
synced 2024-12-22 23:48:48 -05:00
imthenull: remove the @ran@ message upon login, and add a MOTD
xEnt: new characters - all current stats start at 0. xEnt: make dueling p2p xEnt: add restriction for npcs dropping member items xEnt: removed random npc talking text. Rodgerwilco: change fletching and other messages to 'This feature is only available on a members server' Rov: disable dart, arrow head & throwing knife smithing. xEnt: telegrab block in certain areas needs to be removed Rov: disallow alching of member items (if you happen to get one) xEnt: disable lv 5 enchant Rov: disable camelot teleport and other p2p magic spells All day: disable entrana monks from taking you to entrana hikkili: changed mining guild text to say 60, not 66 xEnt: champs guild door can not be opened right now (due to not having all quests) -- ALPHA COMMANDS ONLY -- Added ::say <msg> Added ::item <id> Added ::goto <playername> Added ::town <townname>
This commit is contained in:
parent
fa43f61cd3
commit
6b162222f1
@ -1,6 +1,16 @@
|
||||
<command>
|
||||
<!-- Dev Mode 11 - Admin 10 - Mod 7 - PMod 5 - Sub 2 - Norm 1 -->
|
||||
|
||||
|
||||
|
||||
<!-- Teleports the player to a target players location - ALPHA ONLY-->
|
||||
<permission name="goto">1</permission>
|
||||
<!-- Spawns an item - ALPHA ONLY -->
|
||||
<permission name="item">1</permission>
|
||||
<!-- Global chat - ALPHA ONLY -->
|
||||
<permission name="say">1</permission>
|
||||
|
||||
|
||||
<!-- Displays "A list of commands is shown on the forums." -->
|
||||
<permission name="help">11</permission>
|
||||
<!-- Displays the time at UTC -->
|
||||
@ -10,7 +20,7 @@
|
||||
<!-- Sets fatigue to 100% -->
|
||||
<permission name="fatigue">11</permission>
|
||||
<!-- Displays the online players -->
|
||||
<permission name="online">5</permission>
|
||||
<permission name="online">1</permission>
|
||||
<!-- Displays number of players and NPCs in view -->
|
||||
<permission name="nearby">5</permission>
|
||||
<!-- Displays number of players and NPCs in view -->
|
||||
@ -25,7 +35,7 @@
|
||||
<!-- Displays last 75 cast intervals -->
|
||||
<permission name="info3">7</permission>
|
||||
<!-- Teleports the player to the specified town -->
|
||||
<permission name="town">11</permission>
|
||||
<permission name="town">1</permission>
|
||||
<!-- Bans a player -->
|
||||
<permission name="ban">7</permission>
|
||||
<!-- Unbans a player -->
|
||||
|
@ -15,6 +15,9 @@ public class Constants {
|
||||
* Message of the Day (Seen as you log in)
|
||||
*/
|
||||
public static String MOTD = "";
|
||||
|
||||
|
||||
public static final String P2P_LIMIT_MESSAGE = "This feature of only available on a members server";
|
||||
/**
|
||||
* Each time a connection is made to the server, this is incremented.
|
||||
*/
|
||||
|
@ -430,7 +430,7 @@ public class Npc extends Mob {
|
||||
remove();
|
||||
|
||||
Player owner = mob instanceof Player ? (Player) mob : null;
|
||||
if (!this.special) {
|
||||
|
||||
ItemDropDef[] drops = def.getDrops();
|
||||
|
||||
int total = 0;
|
||||
@ -441,56 +441,33 @@ public class Npc extends Mob {
|
||||
int hit = DataConversions.random(0, total);
|
||||
total = 0;
|
||||
if (!this.getDef().name.equalsIgnoreCase("ghost")) {
|
||||
if (this.getCombatLevel() >= 90 && Config.members) {
|
||||
if (Formulae.Rand(0, 3000) == 500) {
|
||||
if (Formulae.Rand(0, 1) == 1) {
|
||||
world.registerItem(new Item(1276, getX(), getY(),
|
||||
1, owner));
|
||||
} else {
|
||||
world.registerItem(new Item(1277, getX(), getY(),
|
||||
1, owner));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (ItemDropDef drop : drops) {
|
||||
if (drop == null) {
|
||||
continue;
|
||||
}
|
||||
if (drop.getWeight() == 0) {
|
||||
world.registerItem(new Item(drop.getID(), getX(),
|
||||
getY(), drop.getAmount(), owner));
|
||||
world.registerItem(new Item(drop.getID(), getX(),getY(), drop.getAmount(), owner));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hit >= total && hit < (total + drop.getWeight())) {
|
||||
if (drop.getID() != -1) {
|
||||
if (EntityHandler.getItemDef(drop.getID()).members
|
||||
&& World.isMembers()) {
|
||||
world.registerItem(new Item(drop.getID(),
|
||||
getX(), getY(), drop.getAmount(), owner));
|
||||
break;
|
||||
}
|
||||
if (!EntityHandler.getItemDef(drop.getID()).members) {
|
||||
if (EntityHandler.getItemDef(drop.getID()).members && World.isMembers()) {
|
||||
world.registerItem(new Item(drop.getID(),
|
||||
getX(), getY(), drop.getAmount(), owner));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
total += drop.getWeight();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (itemid != -1) {
|
||||
world.registerItem(new Item(itemid, getX(), getY(), 1, owner));
|
||||
world.sendWorldMessage(owner.getUsername()
|
||||
+ " has killed the correct " + getDef().name
|
||||
+ " and found a "
|
||||
+ EntityHandler.getItemDef(itemid).getName());
|
||||
itemid = -1;
|
||||
}
|
||||
special = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
World.getQuestManager().handleNpcKilled(this, owner);
|
||||
}
|
||||
|
||||
|
@ -103,10 +103,6 @@ public final class World {
|
||||
|
||||
/* End of Places */
|
||||
|
||||
/**
|
||||
* Allow Dueling?
|
||||
*/
|
||||
public static boolean DUEL = false;
|
||||
/**
|
||||
* The maximum height of the map (944 squares per level)
|
||||
*/
|
||||
@ -193,10 +189,7 @@ public final class World {
|
||||
*/
|
||||
public int eventx = 0;
|
||||
public int eventy = 0;
|
||||
/**
|
||||
* Grim reaper pickpocketable
|
||||
*/
|
||||
public boolean grimpock = false;
|
||||
|
||||
public String lastAnswer = null;
|
||||
/**
|
||||
* The mapping of npc IDs to their handler
|
||||
@ -210,8 +203,7 @@ public final class World {
|
||||
* A list of all players on the server
|
||||
*/
|
||||
private EntityList<Player> players = new EntityList<Player>(2000);
|
||||
public boolean Quiz = false;
|
||||
public boolean QuizSignup = true;
|
||||
|
||||
/**
|
||||
* The server instance
|
||||
*/
|
||||
@ -433,13 +425,6 @@ public final class World {
|
||||
return t;
|
||||
}
|
||||
|
||||
public boolean GrimPK() {
|
||||
return grimpock;
|
||||
}
|
||||
|
||||
public void GrimPK(boolean arg) {
|
||||
grimpock = arg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given npc is on the server
|
||||
|
@ -1,6 +1,8 @@
|
||||
package org.moparscape.msc.gs.npchandler;
|
||||
|
||||
import org.moparscape.msc.config.Constants.GameServer;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.Server;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.model.ChatMessage;
|
||||
import org.moparscape.msc.gs.model.MenuHandler;
|
||||
@ -15,6 +17,15 @@ public class EntranaMonks implements NpcHandler {
|
||||
public static final World world = Instance.getWorld();
|
||||
|
||||
public void handleNpc(final Npc npc, Player player) throws Exception {
|
||||
|
||||
if (!Server.isMembers()) {
|
||||
player.getActionSender()
|
||||
.sendMessage(
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
npc.unblock();
|
||||
player.setBusy(false);
|
||||
return;
|
||||
}
|
||||
final boolean toEntrana = !player.getLocation().inBounds(390, 530, 440,
|
||||
580);
|
||||
player.informOfNpcMessage(new ChatMessage(
|
||||
|
@ -27,6 +27,7 @@ public class MonkHealer implements NpcHandler {
|
||||
if (owner.isBusy()) {
|
||||
return;
|
||||
}
|
||||
|
||||
owner.informOfChatMessage(new ChatMessage(owner, reply,
|
||||
npc));
|
||||
owner.setBusy(true);
|
||||
|
@ -17,26 +17,7 @@ public class OtherNPC implements NpcHandler {
|
||||
|
||||
public static final World world = Instance.getWorld();
|
||||
|
||||
String[][] chats = {
|
||||
{ "I have nothing to say, leave me be!", "Ok sorry to bother you" },
|
||||
{ "Hi there, do you have a quest for me?",
|
||||
"No, I have no need of your time." },
|
||||
{ "Can you tell me where I can find catherby",
|
||||
"I'm sorry, but I am not familiar with this area either" },
|
||||
{ "I'm not your buddy, pal", "I'm not your pal, guy." },
|
||||
{ "Be gone, ye haughty, swill-fed baggage!", "Uh, okay." },
|
||||
{ "I've lost my marbles!",
|
||||
"Okay I'll just leave you alone then Tootles." },
|
||||
{ "I'm captain jack sparrow, leader of the black perl!",
|
||||
"really? thats so 3 years ago.." },
|
||||
{ "Hi, are you selling any godswords??",
|
||||
"What the hell are you doing here mate?" },
|
||||
{ "This great town needs a makeover don't you think?",
|
||||
"I like it the way it is" },
|
||||
{ "Huh was that you talkin to me?", "No, of course not." },
|
||||
{ "Your name is -name- huh? i have heard of a legend by that name",
|
||||
"Clearly your not mistaken" },
|
||||
{ "-name- please go away", "Fine" } };
|
||||
|
||||
|
||||
public void handleNpc(final Npc npc, Player player) throws Exception {
|
||||
|
||||
@ -53,27 +34,9 @@ public class OtherNPC implements NpcHandler {
|
||||
return;
|
||||
}
|
||||
});
|
||||
} else if (!npc.getDef().isAttackable()) {
|
||||
} else {
|
||||
|
||||
/**
|
||||
* ALL NPC's will get this, random chats.
|
||||
*/
|
||||
int rnd = Formulae.Rand(0, chats.length);
|
||||
player.setLastRandom(rnd);
|
||||
String chat = chats[rnd][0];
|
||||
chat = chat.replace("-name-", player.getUsername());
|
||||
player.informOfNpcMessage(new ChatMessage(npc, chat, player));
|
||||
Instance.getDelayedEventHandler().add(new ShortEvent(player) {
|
||||
public void action() {
|
||||
String chat2 = chats[owner.getLastRandom()][1];
|
||||
chat2 = chat2.replace("-name-", owner.getUsername());
|
||||
owner.informOfChatMessage(new ChatMessage(owner, chat2, npc));
|
||||
owner.setBusy(false);
|
||||
npc.setBusy(false);
|
||||
npc.unblock();
|
||||
return;
|
||||
}
|
||||
});
|
||||
player.getActionSender().sendMessage("The " + npc.getDef().name + " does not appear interested in talking");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,11 +245,10 @@ public class PlayerLogin implements PacketHandler {
|
||||
sender.sendLoginBox();
|
||||
sender.sendMessage(Constants.GameServer.MOTD);
|
||||
sender.sendOnlinePlayers();
|
||||
sender.sendMessage("Welcome to MoparClassic Alpha, report all bugs on forums");
|
||||
sender.sendMessage("Commands: ::town <townname>, ::item <id>, ::say <msg>, ::goto <name>");
|
||||
|
||||
|
||||
if (newchar)
|
||||
player.getActionSender().sendMessage(
|
||||
"@ran@Talk to the Community Instructor for information about "
|
||||
+ Config.SERVER_NAME);
|
||||
|
||||
if (player.clientWarn()) {
|
||||
player.getActionSender()
|
||||
|
@ -69,8 +69,8 @@ class CommandHandler extends PacketHandler {
|
||||
return ;
|
||||
}
|
||||
|
||||
p.setGroupID(1)
|
||||
val pm = CH.permissions.get(cmd)
|
||||
|
||||
pm match {
|
||||
case Some(x) => if (p.getGroupID < x) return
|
||||
case None => return
|
||||
@ -101,6 +101,9 @@ class CommandHandler extends PacketHandler {
|
||||
case "thread" => enableMultiThreading(p)
|
||||
case "ipban" => ipban(p, args, world)
|
||||
case "unipban" => unipban(p, args)
|
||||
case "goto" => goto(p, args);
|
||||
case "say" => say(p, args);
|
||||
case "item" => item(p, args);
|
||||
case "reloadipbans" => reloadIPBans(p)
|
||||
case _ => none = true
|
||||
}
|
||||
@ -320,6 +323,71 @@ class CommandHandler extends PacketHandler {
|
||||
message(p, "IP bans reloaded")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def say(p: Player, args: Array[String]) {
|
||||
val it = Instance.getWorld.getPlayers.iterator
|
||||
while (it.hasNext) {
|
||||
message(it.next, "[Global]"+p.getUsername + ": " + args.deep.mkString(" "))
|
||||
}
|
||||
}
|
||||
|
||||
def goto(p: Player, args: Array[String]) {
|
||||
if (args.length < 1) {
|
||||
message(p, "Please specify who to go to.")
|
||||
} else {
|
||||
val pl = Instance.getWorld().getPlayer(DataConversions.usernameToHash(args(0)))
|
||||
if (pl == null) {
|
||||
message(p, "Could not find player \"" + args(0) + "\".")
|
||||
} else {
|
||||
p.teleport(pl.getX, pl.getY, false)
|
||||
message(p, "You teleport to " + args(0) + ".")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def item(p: Player, args: Array[String]) {
|
||||
import org.moparscape.msc.gs.model.InvItem
|
||||
import org.moparscape.msc.gs.external.EntityHandler
|
||||
if(args.length < 1 || args.length > 2) {
|
||||
message(p, "Invalid args. Syntax: ITEM id [amount]")
|
||||
return;
|
||||
}
|
||||
val id = args(0).toInt
|
||||
if(EntityHandler.getItemDef(id) != null) {
|
||||
var amount = 1
|
||||
if (args.length == 2 && EntityHandler.getItemDef(id).isStackable) {
|
||||
amount = args(1).toInt
|
||||
}
|
||||
val item = new InvItem(id, amount)
|
||||
p.getInventory.add(item)
|
||||
p.getActionSender.sendInventory()
|
||||
Logger.mod(p.getUsername() + " spawned themself " + amount + " " + item.getDef().getName() + "(s)")
|
||||
} else {
|
||||
message(p, "Invalid id")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Helper methods
|
||||
|
||||
def message(p: Player, msg: String) {
|
||||
|
@ -1,8 +1,10 @@
|
||||
package org.moparscape.msc.gs.phandler.client;
|
||||
|
||||
import org.apache.mina.common.IoSession;
|
||||
import org.moparscape.msc.config.Constants;
|
||||
import org.moparscape.msc.config.Formulae;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.Server;
|
||||
import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
@ -46,6 +48,11 @@ public class DuelHandler implements PacketHandler {
|
||||
}
|
||||
if (player.isPMod() && !player.isMod())
|
||||
return;
|
||||
if (!Server.isMembers()) {
|
||||
player.getActionSender().sendMessage(Constants.GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isDuelConfirmAccepted() && affectedPlayer != null
|
||||
&& affectedPlayer.isDuelConfirmAccepted()) {
|
||||
// If we are actually dueling we shouldn't touch any settings
|
||||
|
@ -3,6 +3,7 @@ package org.moparscape.msc.gs.phandler.client;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.mina.common.IoSession;
|
||||
import org.moparscape.msc.config.Constants.GameServer;
|
||||
import org.moparscape.msc.config.Formulae;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.Server;
|
||||
@ -42,7 +43,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
* World instance
|
||||
*/
|
||||
public static final World world = Instance.getWorld();
|
||||
|
||||
//f2p
|
||||
private void handleDoor(final Player player, final ActiveTile tile,
|
||||
final GameObject object, final int dir, final InvItem item) {
|
||||
player.setStatus(Action.USING_INVITEM_ON_DOOR);
|
||||
@ -331,7 +332,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
case 282: // Fountain of Heroes
|
||||
if (!Server.isMembers()) {
|
||||
owner.getActionSender().sendMessage(
|
||||
"This feature is not avaliable in f2p");
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (item.getID() == 522) {
|
||||
@ -600,7 +601,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
if (!Server.isMembers()) {
|
||||
owner.getActionSender()
|
||||
.sendMessage(
|
||||
"This feature is not avaliable in f2p");
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (player.getInventory().countId(624) < 1) {
|
||||
@ -678,6 +679,10 @@ public class InvUseOnObject implements PacketHandler {
|
||||
handleSmithing(item.getID(), 0);
|
||||
break;
|
||||
case 1:
|
||||
if(Server.isMembers()) {
|
||||
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
|
||||
break;
|
||||
}
|
||||
handleSmithing(item.getID(), 1);
|
||||
break;
|
||||
case 2:
|
||||
@ -832,6 +837,11 @@ public class InvUseOnObject implements PacketHandler {
|
||||
owner.getActionSender().sendMenu(options);
|
||||
break;
|
||||
case 2:
|
||||
|
||||
if(Server.isMembers()) {
|
||||
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
|
||||
break;
|
||||
}
|
||||
options = new String[]{"Make 10 Arrow Heads", "Make 50 Arrow Heads (5 bars)", "Forge Dart Tips", "Cancel"};
|
||||
owner.setMenuHandler(new MenuHandler(options) {
|
||||
public void handleReply(int option, String reply) {
|
||||
@ -887,7 +897,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
}
|
||||
if (!Server.isMembers()) {
|
||||
owner.getActionSender().sendMessage(
|
||||
"This feature is not avaliable in f2p");
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
owner.getActionSender().sendMessage(
|
||||
@ -1169,7 +1179,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
final int retries = --times;
|
||||
if (!Server.isMembers()) {
|
||||
owner.getActionSender().sendMessage(
|
||||
"This feature is not avaliable in f2p");
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (owner.getCurStat(12) < 10) {
|
||||
@ -1341,7 +1351,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
if (item.getID() == 622) { // Seaweed (Glass)
|
||||
if (!Server.isMembers()) {
|
||||
owner.getActionSender().sendMessage(
|
||||
"This feature is not avaliable in f2p");
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
owner.setBusy(true);
|
||||
|
@ -46,7 +46,7 @@ public class ObjectAction implements PacketHandler {
|
||||
* World instance
|
||||
*/
|
||||
public static final World world = Instance.getWorld();
|
||||
|
||||
//mining
|
||||
public void handlePacket(Packet p, IoSession session) {
|
||||
Player player = (Player) session.getAttachment();
|
||||
int pID = ((RSCPacket) p).getID();
|
||||
@ -351,7 +351,8 @@ public class ObjectAction implements PacketHandler {
|
||||
} else {
|
||||
world.registerItem(new Item(23, 166, 599,
|
||||
1, owner));
|
||||
}
|
||||
}//champ
|
||||
//600
|
||||
object.containsItem(-1);
|
||||
} else if (object.getID() == 223
|
||||
&& object.getX() == 274
|
||||
@ -374,7 +375,7 @@ public class ObjectAction implements PacketHandler {
|
||||
owner.setBusy(false);
|
||||
owner.getActionSender()
|
||||
.sendMessage(
|
||||
"You need a mining level of 66 to enter");
|
||||
"You need a mining level of 60 to enter");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -11,7 +11,9 @@ import org.apache.mina.common.IoSession;
|
||||
import org.moparscape.msc.config.Config;
|
||||
import org.moparscape.msc.config.Constants;
|
||||
import org.moparscape.msc.config.Formulae;
|
||||
import org.moparscape.msc.config.Constants.GameServer;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.Server;
|
||||
import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
@ -196,6 +198,13 @@ public class SpellHandler implements PacketHandler {
|
||||
finalizeSpell(player, spell);
|
||||
break;
|
||||
case 48: // Charge
|
||||
|
||||
if (!Server.isMembers()) {
|
||||
player.getActionSender()
|
||||
.sendMessage(
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (world.getTile(player.getLocation()).hasGameObject()) {
|
||||
player.getActionSender()
|
||||
.sendMessage(
|
||||
@ -233,6 +242,12 @@ public class SpellHandler implements PacketHandler {
|
||||
}
|
||||
break;
|
||||
case 10: // Low level alchemy
|
||||
if (!Server.isMembers() && affectedItem.getDef().members) {
|
||||
player.getActionSender()
|
||||
.sendMessage(
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (affectedItem.getID() == 10) {
|
||||
player.getActionSender().sendMessage("You cannot alchemy that");
|
||||
return;
|
||||
@ -326,6 +341,12 @@ public class SpellHandler implements PacketHandler {
|
||||
}
|
||||
break;
|
||||
case 28: // High level alchemy
|
||||
if (!Server.isMembers() && affectedItem.getDef().members) {
|
||||
player.getActionSender()
|
||||
.sendMessage(
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (affectedItem.getID() == 10) {
|
||||
player.getActionSender().sendMessage("You cannot alchemy that");
|
||||
return;
|
||||
@ -354,6 +375,12 @@ public class SpellHandler implements PacketHandler {
|
||||
}
|
||||
break;
|
||||
case 43: // Enchant lvl-5 dragonstone amulet
|
||||
if (!Server.isMembers() && affectedItem.getDef().members) {
|
||||
player.getActionSender()
|
||||
.sendMessage(
|
||||
GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (affectedItem.getID() == 610) {
|
||||
if (!checkAndRemoveRunes(player, spell)) {
|
||||
return;
|
||||
@ -410,24 +437,7 @@ public class SpellHandler implements PacketHandler {
|
||||
"You may not telegrab this item");
|
||||
return;
|
||||
}
|
||||
if (affectedItem.getLocation().inBounds(490, 464,
|
||||
500, 471)
|
||||
|| affectedItem.getLocation().inBounds(490,
|
||||
1408, 500, 1415)) {
|
||||
owner.getActionSender()
|
||||
.sendMessage(
|
||||
"Telekinetic grab cannot be used in here");
|
||||
return;
|
||||
}
|
||||
if (affectedItem.getLocation().inBounds(97, 1428,
|
||||
106, 1440)
|
||||
|| affectedItem.getLocation().inBounds(490,
|
||||
1408, 500, 1415)) {
|
||||
owner.getActionSender()
|
||||
.sendMessage(
|
||||
"Telekinetic grab cannot be used in here");
|
||||
return;
|
||||
}
|
||||
|
||||
if (DataConversions.inArray(
|
||||
Formulae.telegrabBlocked,
|
||||
affectedItem.getID())) {
|
||||
@ -1430,15 +1440,31 @@ public class SpellHandler implements PacketHandler {
|
||||
player.teleport(313, 550, true);
|
||||
break;
|
||||
case 22: // Camalot
|
||||
if (!Server.isMembers()) {
|
||||
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
player.teleport(465, 456, true);
|
||||
break;
|
||||
case 26: // Ardougne
|
||||
if (!Server.isMembers()) {
|
||||
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
player.teleport(585, 621, true);
|
||||
break;
|
||||
case 31: // Watchtower
|
||||
if (!Server.isMembers()) {
|
||||
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
player.teleport(637, 2628, true);
|
||||
break;
|
||||
case 37: // Lost city
|
||||
if (!Server.isMembers()) {
|
||||
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
player.teleport(131, 3544, true);
|
||||
break;
|
||||
}
|
||||
|
@ -197,7 +197,12 @@ public class WallObjectAction implements PacketHandler {
|
||||
owner.teleport(586, 524, false);
|
||||
}
|
||||
break;
|
||||
case 55: // Mining Guild Door
|
||||
case 55:
|
||||
|
||||
if(true) {
|
||||
owner.getActionSender().sendMessage("Currently closed off at the moment!");
|
||||
return;
|
||||
}
|
||||
// Hi jacking for champs etc guild doors.
|
||||
if (object.getX() == 150
|
||||
&& object.getY() == 554) { // Champs
|
||||
@ -206,12 +211,7 @@ public class WallObjectAction implements PacketHandler {
|
||||
owner.teleport(150, 553, false);
|
||||
return;
|
||||
}
|
||||
if (owner.getSkillTotal() < 600) {
|
||||
owner.getActionSender()
|
||||
.sendMessage(
|
||||
"You need a skill total of 600 or more to enter");
|
||||
return;
|
||||
}
|
||||
|
||||
doDoor();
|
||||
owner.teleport(150, 554, false);
|
||||
return;
|
||||
|
@ -10,7 +10,7 @@
|
||||
<entry key="lsport">34526</entry>
|
||||
<entry key="queryip">localhost</entry>
|
||||
<entry key="queryport">8186</entry>
|
||||
<entry key="storage-medium">org.moparscape.msc.ls.persistence.impl.SerializedStorageMedium</entry>
|
||||
<entry key="storage-medium">org.moparscape.msc.ls.persistence.impl.DummyStorageMedium</entry>
|
||||
<entry key="auth-class">org.moparscape.msc.ls.auth.impl.DummyAuth</entry>
|
||||
<entry key="auth-meta-data">http://localhost/auth.php</entry>
|
||||
</properties>
|
||||
|
@ -215,18 +215,22 @@ public class SerializedStorageMedium implements StorageMedium {
|
||||
if (ps == null) // new char
|
||||
{
|
||||
PlayerSave save = new PlayerSave(user);
|
||||
|
||||
save.setLocation(213, 452);
|
||||
save.setAppearance((byte) 2, (byte) 8, (byte) 14, (byte) 0, (byte) 1,
|
||||
(byte) 2, true, 0l);
|
||||
(byte) 2, true, 01);
|
||||
|
||||
int[] exp = new int[Config.statArray.length];
|
||||
int[] stats = new int[Config.statArray.length];
|
||||
Arrays.fill(exp, 0);
|
||||
int[] stats = exp.clone();
|
||||
Arrays.fill(exp, 1);
|
||||
|
||||
|
||||
exp[3] = 1154;
|
||||
save.setExp(exp);
|
||||
stats[3] = 10;
|
||||
save.setCurStats(stats);
|
||||
|
||||
return save;
|
||||
} else {
|
||||
return ps;
|
||||
|
Loading…
Reference in New Issue
Block a user