Merge pull request #45 from xEnt22/master

Alpha changes
This commit is contained in:
xEnt22 2012-01-07 21:03:55 -08:00
commit 4fef550b68
16 changed files with 229 additions and 164 deletions

View File

@ -1,6 +1,16 @@
<command> <command>
<!-- Dev Mode 11 - Admin 10 - Mod 7 - PMod 5 - Sub 2 - Norm 1 --> <!-- 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." --> <!-- Displays "A list of commands is shown on the forums." -->
<permission name="help">11</permission> <permission name="help">11</permission>
<!-- Displays the time at UTC --> <!-- Displays the time at UTC -->
@ -10,7 +20,7 @@
<!-- Sets fatigue to 100% --> <!-- Sets fatigue to 100% -->
<permission name="fatigue">11</permission> <permission name="fatigue">11</permission>
<!-- Displays the online players --> <!-- Displays the online players -->
<permission name="online">5</permission> <permission name="online">1</permission>
<!-- Displays number of players and NPCs in view --> <!-- Displays number of players and NPCs in view -->
<permission name="nearby">5</permission> <permission name="nearby">5</permission>
<!-- Displays number of players and NPCs in view --> <!-- Displays number of players and NPCs in view -->
@ -25,7 +35,7 @@
<!-- Displays last 75 cast intervals --> <!-- Displays last 75 cast intervals -->
<permission name="info3">7</permission> <permission name="info3">7</permission>
<!-- Teleports the player to the specified town --> <!-- Teleports the player to the specified town -->
<permission name="town">11</permission> <permission name="town">1</permission>
<!-- Bans a player --> <!-- Bans a player -->
<permission name="ban">7</permission> <permission name="ban">7</permission>
<!-- Unbans a player --> <!-- Unbans a player -->

View File

@ -15,6 +15,9 @@ public class Constants {
* Message of the Day (Seen as you log in) * Message of the Day (Seen as you log in)
*/ */
public static String MOTD = ""; 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. * Each time a connection is made to the server, this is incremented.
*/ */

View File

@ -431,7 +431,7 @@ public class Npc extends Mob {
remove(); remove();
Player owner = mob instanceof Player ? (Player) mob : null; Player owner = mob instanceof Player ? (Player) mob : null;
if (!this.special) {
ItemDropDef[] drops = def.getDrops(); ItemDropDef[] drops = def.getDrops();
int total = 0; int total = 0;
@ -442,56 +442,33 @@ public class Npc extends Mob {
int hit = DataConversions.random(0, total); int hit = DataConversions.random(0, total);
total = 0; total = 0;
if (!this.getDef().name.equalsIgnoreCase("ghost")) { 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) { for (ItemDropDef drop : drops) {
if (drop == null) { if (drop == null) {
continue; continue;
} }
if (drop.getWeight() == 0) { if (drop.getWeight() == 0) {
world.registerItem(new Item(drop.getID(), getX(), world.registerItem(new Item(drop.getID(), getX(),getY(), drop.getAmount(), owner));
getY(), drop.getAmount(), owner));
continue; continue;
} }
if (hit >= total && hit < (total + drop.getWeight())) { if (hit >= total && hit < (total + drop.getWeight())) {
if (drop.getID() != -1) { if (drop.getID() != -1) {
if (EntityHandler.getItemDef(drop.getID()).members if (EntityHandler.getItemDef(drop.getID()).members && World.isMembers()) {
&& World.isMembers()) {
world.registerItem(new Item(drop.getID(),
getX(), getY(), drop.getAmount(), owner));
break;
}
if (!EntityHandler.getItemDef(drop.getID()).members) {
world.registerItem(new Item(drop.getID(), world.registerItem(new Item(drop.getID(),
getX(), getY(), drop.getAmount(), owner)); getX(), getY(), drop.getAmount(), owner));
break; break;
} }
} }
} }
total += drop.getWeight(); 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); World.getQuestManager().handleNpcKilled(this, owner);
} }

View File

@ -106,10 +106,6 @@ public final class World {
/* End of Places */ /* End of Places */
/**
* Allow Dueling?
*/
public static boolean DUEL = false;
/** /**
* The maximum height of the map (944 squares per level) * The maximum height of the map (944 squares per level)
*/ */
@ -196,10 +192,7 @@ public final class World {
*/ */
public int eventx = 0; public int eventx = 0;
public int eventy = 0; public int eventy = 0;
/**
* Grim reaper pickpocketable
*/
public boolean grimpock = false;
public String lastAnswer = null; public String lastAnswer = null;
/** /**
* The mapping of npc IDs to their handler * The mapping of npc IDs to their handler
@ -213,8 +206,7 @@ public final class World {
* A list of all players on the server * A list of all players on the server
*/ */
private EntityList<Player> players = new EntityList<Player>(2000); private EntityList<Player> players = new EntityList<Player>(2000);
public boolean Quiz = false;
public boolean QuizSignup = true;
/** /**
* The server instance * The server instance
*/ */
@ -436,13 +428,6 @@ public final class World {
return t; return t;
} }
public boolean GrimPK() {
return grimpock;
}
public void GrimPK(boolean arg) {
grimpock = arg;
}
/** /**
* Checks if the given npc is on the server * Checks if the given npc is on the server

View File

@ -1,6 +1,8 @@
package org.moparscape.msc.gs.npchandler; package org.moparscape.msc.gs.npchandler;
import org.moparscape.msc.config.Constants.GameServer;
import org.moparscape.msc.gs.Instance; import org.moparscape.msc.gs.Instance;
import org.moparscape.msc.gs.Server;
import org.moparscape.msc.gs.event.ShortEvent; import org.moparscape.msc.gs.event.ShortEvent;
import org.moparscape.msc.gs.model.ChatMessage; import org.moparscape.msc.gs.model.ChatMessage;
import org.moparscape.msc.gs.model.MenuHandler; import org.moparscape.msc.gs.model.MenuHandler;
@ -15,6 +17,15 @@ public class EntranaMonks implements NpcHandler {
public static final World world = Instance.getWorld(); public static final World world = Instance.getWorld();
public void handleNpc(final Npc npc, Player player) throws Exception { 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, final boolean toEntrana = !player.getLocation().inBounds(390, 530, 440,
580); 580);
player.informOfNpcMessage(new ChatMessage( player.informOfNpcMessage(new ChatMessage(

View File

@ -27,6 +27,7 @@ public class MonkHealer implements NpcHandler {
if (owner.isBusy()) { if (owner.isBusy()) {
return; return;
} }
owner.informOfChatMessage(new ChatMessage(owner, reply, owner.informOfChatMessage(new ChatMessage(owner, reply,
npc)); npc));
owner.setBusy(true); owner.setBusy(true);

View File

@ -17,26 +17,7 @@ public class OtherNPC implements NpcHandler {
public static final World world = Instance.getWorld(); 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 { public void handleNpc(final Npc npc, Player player) throws Exception {
@ -53,27 +34,9 @@ public class OtherNPC implements NpcHandler {
return; return;
} }
}); });
} else if (!npc.getDef().isAttackable()) { } else {
/** player.getActionSender().sendMessage("The " + npc.getDef().name + " does not appear interested in talking");
* 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;
}
});
} }
} }

View File

@ -245,11 +245,10 @@ public class PlayerLogin implements PacketHandler {
sender.sendLoginBox(); sender.sendLoginBox();
sender.sendMessage(Constants.GameServer.MOTD); sender.sendMessage(Constants.GameServer.MOTD);
sender.sendOnlinePlayers(); 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()) { if (player.clientWarn()) {
player.getActionSender() player.getActionSender()

View File

@ -69,8 +69,8 @@ class CommandHandler extends PacketHandler {
return ; return ;
} }
p.setGroupID(1)
val pm = CH.permissions.get(cmd) val pm = CH.permissions.get(cmd)
pm match { pm match {
case Some(x) => if (p.getGroupID < x) return case Some(x) => if (p.getGroupID < x) return
case None => return case None => return
@ -101,6 +101,9 @@ class CommandHandler extends PacketHandler {
case "thread" => enableMultiThreading(p) case "thread" => enableMultiThreading(p)
case "ipban" => ipban(p, args, world) case "ipban" => ipban(p, args, world)
case "unipban" => unipban(p, args) 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 "reloadipbans" => reloadIPBans(p)
case _ => none = true case _ => none = true
} }
@ -320,6 +323,71 @@ class CommandHandler extends PacketHandler {
message(p, "IP bans reloaded") 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 // Helper methods
def message(p: Player, msg: String) { def message(p: Player, msg: String) {

View File

@ -1,8 +1,10 @@
package org.moparscape.msc.gs.phandler.client; package org.moparscape.msc.gs.phandler.client;
import org.apache.mina.common.IoSession; import org.apache.mina.common.IoSession;
import org.moparscape.msc.config.Constants;
import org.moparscape.msc.config.Formulae; import org.moparscape.msc.config.Formulae;
import org.moparscape.msc.gs.Instance; 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.Packet;
import org.moparscape.msc.gs.connection.RSCPacket; import org.moparscape.msc.gs.connection.RSCPacket;
import org.moparscape.msc.gs.core.GameEngine; import org.moparscape.msc.gs.core.GameEngine;
@ -46,6 +48,11 @@ public class DuelHandler implements PacketHandler {
} }
if (player.isPMod() && !player.isMod()) if (player.isPMod() && !player.isMod())
return; return;
if (!Server.isMembers()) {
player.getActionSender().sendMessage(Constants.GameServer.P2P_LIMIT_MESSAGE);
return;
}
if (player.isDuelConfirmAccepted() && affectedPlayer != null if (player.isDuelConfirmAccepted() && affectedPlayer != null
&& affectedPlayer.isDuelConfirmAccepted()) { && affectedPlayer.isDuelConfirmAccepted()) {
// If we are actually dueling we shouldn't touch any settings // If we are actually dueling we shouldn't touch any settings

View File

@ -3,6 +3,7 @@ package org.moparscape.msc.gs.phandler.client;
import java.util.List; import java.util.List;
import org.apache.mina.common.IoSession; import org.apache.mina.common.IoSession;
import org.moparscape.msc.config.Constants.GameServer;
import org.moparscape.msc.config.Formulae; import org.moparscape.msc.config.Formulae;
import org.moparscape.msc.gs.Instance; import org.moparscape.msc.gs.Instance;
import org.moparscape.msc.gs.Server; import org.moparscape.msc.gs.Server;
@ -42,7 +43,7 @@ public class InvUseOnObject implements PacketHandler {
* World instance * World instance
*/ */
public static final World world = Instance.getWorld(); public static final World world = Instance.getWorld();
//f2p
private void handleDoor(final Player player, final ActiveTile tile, private void handleDoor(final Player player, final ActiveTile tile,
final GameObject object, final int dir, final InvItem item) { final GameObject object, final int dir, final InvItem item) {
player.setStatus(Action.USING_INVITEM_ON_DOOR); player.setStatus(Action.USING_INVITEM_ON_DOOR);
@ -331,7 +332,7 @@ public class InvUseOnObject implements PacketHandler {
case 282: // Fountain of Heroes case 282: // Fountain of Heroes
if (!Server.isMembers()) { if (!Server.isMembers()) {
owner.getActionSender().sendMessage( owner.getActionSender().sendMessage(
"This feature is not avaliable in f2p"); GameServer.P2P_LIMIT_MESSAGE);
return; return;
} }
if (item.getID() == 522) { if (item.getID() == 522) {
@ -600,7 +601,7 @@ public class InvUseOnObject implements PacketHandler {
if (!Server.isMembers()) { if (!Server.isMembers()) {
owner.getActionSender() owner.getActionSender()
.sendMessage( .sendMessage(
"This feature is not avaliable in f2p"); GameServer.P2P_LIMIT_MESSAGE);
return; return;
} }
if (player.getInventory().countId(624) < 1) { if (player.getInventory().countId(624) < 1) {
@ -678,6 +679,10 @@ public class InvUseOnObject implements PacketHandler {
handleSmithing(item.getID(), 0); handleSmithing(item.getID(), 0);
break; break;
case 1: case 1:
if(Server.isMembers()) {
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
break;
}
handleSmithing(item.getID(), 1); handleSmithing(item.getID(), 1);
break; break;
case 2: case 2:
@ -832,6 +837,11 @@ public class InvUseOnObject implements PacketHandler {
owner.getActionSender().sendMenu(options); owner.getActionSender().sendMenu(options);
break; break;
case 2: 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"}; options = new String[]{"Make 10 Arrow Heads", "Make 50 Arrow Heads (5 bars)", "Forge Dart Tips", "Cancel"};
owner.setMenuHandler(new MenuHandler(options) { owner.setMenuHandler(new MenuHandler(options) {
public void handleReply(int option, String reply) { public void handleReply(int option, String reply) {
@ -887,7 +897,7 @@ public class InvUseOnObject implements PacketHandler {
} }
if (!Server.isMembers()) { if (!Server.isMembers()) {
owner.getActionSender().sendMessage( owner.getActionSender().sendMessage(
"This feature is not avaliable in f2p"); GameServer.P2P_LIMIT_MESSAGE);
return; return;
} }
owner.getActionSender().sendMessage( owner.getActionSender().sendMessage(
@ -1169,7 +1179,7 @@ public class InvUseOnObject implements PacketHandler {
final int retries = --times; final int retries = --times;
if (!Server.isMembers()) { if (!Server.isMembers()) {
owner.getActionSender().sendMessage( owner.getActionSender().sendMessage(
"This feature is not avaliable in f2p"); GameServer.P2P_LIMIT_MESSAGE);
return; return;
} }
if (owner.getCurStat(12) < 10) { if (owner.getCurStat(12) < 10) {
@ -1341,7 +1351,7 @@ public class InvUseOnObject implements PacketHandler {
if (item.getID() == 622) { // Seaweed (Glass) if (item.getID() == 622) { // Seaweed (Glass)
if (!Server.isMembers()) { if (!Server.isMembers()) {
owner.getActionSender().sendMessage( owner.getActionSender().sendMessage(
"This feature is not avaliable in f2p"); GameServer.P2P_LIMIT_MESSAGE);
return; return;
} }
owner.setBusy(true); owner.setBusy(true);

View File

@ -46,7 +46,7 @@ public class ObjectAction implements PacketHandler {
* World instance * World instance
*/ */
public static final World world = Instance.getWorld(); public static final World world = Instance.getWorld();
//mining
public void handlePacket(Packet p, IoSession session) { public void handlePacket(Packet p, IoSession session) {
Player player = (Player) session.getAttachment(); Player player = (Player) session.getAttachment();
int pID = ((RSCPacket) p).getID(); int pID = ((RSCPacket) p).getID();
@ -351,7 +351,8 @@ public class ObjectAction implements PacketHandler {
} else { } else {
world.registerItem(new Item(23, 166, 599, world.registerItem(new Item(23, 166, 599,
1, owner)); 1, owner));
} }//champ
//600
object.containsItem(-1); object.containsItem(-1);
} else if (object.getID() == 223 } else if (object.getID() == 223
&& object.getX() == 274 && object.getX() == 274
@ -374,7 +375,7 @@ public class ObjectAction implements PacketHandler {
owner.setBusy(false); owner.setBusy(false);
owner.getActionSender() owner.getActionSender()
.sendMessage( .sendMessage(
"You need a mining level of 66 to enter"); "You need a mining level of 60 to enter");
} }
}); });
} else { } else {

View File

@ -11,7 +11,9 @@ import org.apache.mina.common.IoSession;
import org.moparscape.msc.config.Config; import org.moparscape.msc.config.Config;
import org.moparscape.msc.config.Constants; import org.moparscape.msc.config.Constants;
import org.moparscape.msc.config.Formulae; import org.moparscape.msc.config.Formulae;
import org.moparscape.msc.config.Constants.GameServer;
import org.moparscape.msc.gs.Instance; 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.Packet;
import org.moparscape.msc.gs.connection.RSCPacket; import org.moparscape.msc.gs.connection.RSCPacket;
import org.moparscape.msc.gs.core.GameEngine; import org.moparscape.msc.gs.core.GameEngine;
@ -198,6 +200,13 @@ public class SpellHandler implements PacketHandler {
finalizeSpell(player, spell); finalizeSpell(player, spell);
break; break;
case 48: // Charge case 48: // Charge
if (!Server.isMembers()) {
player.getActionSender()
.sendMessage(
GameServer.P2P_LIMIT_MESSAGE);
return;
}
if (world.getTile(player.getLocation()).hasGameObject()) { if (world.getTile(player.getLocation()).hasGameObject()) {
player.getActionSender() player.getActionSender()
.sendMessage( .sendMessage(
@ -235,6 +244,12 @@ public class SpellHandler implements PacketHandler {
} }
break; break;
case 10: // Low level alchemy case 10: // Low level alchemy
if (!Server.isMembers() && affectedItem.getDef().members) {
player.getActionSender()
.sendMessage(
GameServer.P2P_LIMIT_MESSAGE);
return;
}
if (affectedItem.getID() == 10) { if (affectedItem.getID() == 10) {
player.getActionSender().sendMessage("You cannot alchemy that"); player.getActionSender().sendMessage("You cannot alchemy that");
return; return;
@ -328,6 +343,12 @@ public class SpellHandler implements PacketHandler {
} }
break; break;
case 28: // High level alchemy case 28: // High level alchemy
if (!Server.isMembers() && affectedItem.getDef().members) {
player.getActionSender()
.sendMessage(
GameServer.P2P_LIMIT_MESSAGE);
return;
}
if (affectedItem.getID() == 10) { if (affectedItem.getID() == 10) {
player.getActionSender().sendMessage("You cannot alchemy that"); player.getActionSender().sendMessage("You cannot alchemy that");
return; return;
@ -356,6 +377,12 @@ public class SpellHandler implements PacketHandler {
} }
break; break;
case 43: // Enchant lvl-5 dragonstone amulet 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 (affectedItem.getID() == 610) {
if (!checkAndRemoveRunes(player, spell)) { if (!checkAndRemoveRunes(player, spell)) {
return; return;
@ -412,24 +439,7 @@ public class SpellHandler implements PacketHandler {
"You may not telegrab this item"); "You may not telegrab this item");
return; 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( if (DataConversions.inArray(
Formulae.telegrabBlocked, Formulae.telegrabBlocked,
affectedItem.getID())) { affectedItem.getID())) {
@ -1432,15 +1442,31 @@ public class SpellHandler implements PacketHandler {
player.teleport(313, 550, true); player.teleport(313, 550, true);
break; break;
case 22: // Camalot case 22: // Camalot
if (!Server.isMembers()) {
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
return;
}
player.teleport(465, 456, true); player.teleport(465, 456, true);
break; break;
case 26: // Ardougne case 26: // Ardougne
if (!Server.isMembers()) {
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
return;
}
player.teleport(585, 621, true); player.teleport(585, 621, true);
break; break;
case 31: // Watchtower case 31: // Watchtower
if (!Server.isMembers()) {
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
return;
}
player.teleport(637, 2628, true); player.teleport(637, 2628, true);
break; break;
case 37: // Lost city case 37: // Lost city
if (!Server.isMembers()) {
player.getActionSender().sendMessage(GameServer.P2P_LIMIT_MESSAGE);
return;
}
player.teleport(131, 3544, true); player.teleport(131, 3544, true);
break; break;
} }

View File

@ -197,7 +197,12 @@ public class WallObjectAction implements PacketHandler {
owner.teleport(586, 524, false); owner.teleport(586, 524, false);
} }
break; 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. // Hi jacking for champs etc guild doors.
if (object.getX() == 150 if (object.getX() == 150
&& object.getY() == 554) { // Champs && object.getY() == 554) { // Champs
@ -206,12 +211,7 @@ public class WallObjectAction implements PacketHandler {
owner.teleport(150, 553, false); owner.teleport(150, 553, false);
return; return;
} }
if (owner.getSkillTotal() < 600) {
owner.getActionSender()
.sendMessage(
"You need a skill total of 600 or more to enter");
return;
}
doDoor(); doDoor();
owner.teleport(150, 554, false); owner.teleport(150, 554, false);
return; return;

View File

@ -10,7 +10,7 @@
<entry key="lsport">34526</entry> <entry key="lsport">34526</entry>
<entry key="queryip">localhost</entry> <entry key="queryip">localhost</entry>
<entry key="queryport">8186</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-class">org.moparscape.msc.ls.auth.impl.DummyAuth</entry>
<entry key="auth-meta-data">http://localhost/auth.php</entry> <entry key="auth-meta-data">http://localhost/auth.php</entry>
</properties> </properties>

View File

@ -221,18 +221,22 @@ public class SerializedStorageMedium implements StorageMedium {
if (ps == null) // new char if (ps == null) // new char
{ {
PlayerSave save = new PlayerSave(user); PlayerSave save = new PlayerSave(user);
save.setLocation(213, 452); save.setLocation(213, 452);
save.setAppearance((byte) 2, (byte) 8, (byte) 14, (byte) 0, (byte) 1, 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[] exp = new int[Config.statArray.length];
int[] stats = new int[Config.statArray.length];
Arrays.fill(exp, 0); Arrays.fill(exp, 0);
int[] stats = exp.clone(); Arrays.fill(exp, 1);
exp[3] = 1154; exp[3] = 1154;
save.setExp(exp); save.setExp(exp);
stats[3] = 10; stats[3] = 10;
save.setCurStats(stats); save.setCurStats(stats);
return save; return save;
} else { } else {
return ps; return ps;