forked from 2009Scape/Server
commit
8e79560ac6
8 changed files with 61 additions and 7 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -60,10 +60,14 @@ public final class WorldListSQLHandler extends SQLEntryHandler<GameServer> {
|
|||
return;
|
||||
}
|
||||
int players = entry.getPlayerAmount();
|
||||
WorldInfo info = entry.getInfo();
|
||||
if (!entry.isActive()) {
|
||||
players = -1;
|
||||
}
|
||||
WorldInfo info = entry.getInfo();
|
||||
if (players <= 0) {
|
||||
PreparedStatement statement = connection.prepareStatement("UPDATE members SET online='0' WHERE lastWorld='" + value + "'");
|
||||
statement.executeUpdate();
|
||||
}
|
||||
PreparedStatement statement = connection.prepareStatement("UPDATE " + table + " SET players='" + players + "', ip='" + info.getAddress() + "', country='" + info.getCountry().getId() + "', member='" + (info.isMembers() ? 1 : 0) + "', revision='" + info.getRevision() + "' WHERE world='" + value + "'");
|
||||
statement.executeUpdate();
|
||||
SQLManager.close(statement.getConnection());
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public enum Pickpocket {
|
|||
ROGUE(new int[] { 187, 2267, 2268, 2269, 8122 }, 32, new int[][] { { 995, 25 }, { 995, 40 }, { 1993, 1 }, { 556, 2 }, { 1219, 1 }, { 1523, 1 }, { 1944 } }, 35.5, 2),
|
||||
CAVE_GOBLIN(new int[] { 5752, 5753, 5754, 5755, 5756, 5757, 5758, 5759, 5760, 5761, 5762, 5763, 5764, 5765, 5766, 5767, 5768 }, 36, new int[][] { { 995, 30, 1 }, { 590, 1 }, { 4522, 1 }, { 4544, 1 }, { 596, 1 }, { 1939, 1 }, { 441, 4, 1 }, { 441, 1 }, { 10981, 1 } }, 40, 2),
|
||||
MASTER_FARMER(new int[] { 2234, 2235 }, 38, new int[][] { { 5096, 1 }, { 5097, 1 }, { 5098, 1 }, { 5099, 1 }, { 5100, 1 }, { 5101, 1 }, { 5102, 1 }, { 5103, 1 }, { 5104, 1 }, { 5105, 1 }, { 5106, 1 }, { 5291, 1 }, { 5292, 1 }, { 5293, 1 }, { 5294, 1 }, { 5295, 1 }, { 5296, 1 }, { 5297, 1 }, { 5298, 1 }, { 5299, 1 }, { 5300, 1 }, { 5301, 1 }, { 5302, 1 }, { 5304, 1 }, { 5305, 1 }, { 5306, 1 }, { 5307, 1 }, { 5308, 1 }, { 5309, 1 }, { 5310, 1 }, { 5311, 1 }, { 5312, 1 }, { 5318, 1 }, { 5319, 1 }, { 5320, 1 }, { 5321, 1 }, { 5322, 1 }, { 5323, 1 }, { 5324, 1 }, { 5296, 1 }, { 5297, 1 }, { 5298, 1 }, { 5299, 1 }, { 5300, 1 }, { 5301, 1 }, { 5302, 1 }, { 5303, 1 }, { 5304, 1 } }, 43, 3, "You attempt to pick the " + "@name" + "'s pocket...", "You pick the " + "@name" + "'s pocket.", "You fail to pick the " + "@name" + "'s pocket.", "Cor blimey mate, what are ye doing in me pockets?"),
|
||||
GUARD(new int[] { 9, 32, 206, 296, 297, 298, 299, 344, 345, 346, 368, 678, 812, 9, 32, 296, 297, 298, 299, 2699, 2700, 2701, 2702, 2703, 3228, 3229, 3230, 3231, 3232, 3233, 3241, 3407, 3408, 4307, 4308, 4309, 4310, 4311, 5919, 5920, }, 40, new int[][] { { 995, 30 }, { 995, 25 } }, 46.5, 2),
|
||||
GUARD(new int[] { 9, 32, 206, 296, 297, 298, 299, 344, 345, 346, 368, 678, 812, 9, 32, 296, 297, 298, 299, 2699, 2700, 2701, 2702, 2703, 3228, 3229, 3230, 3231, 3232, 3233, 3241, 3407, 3408, 4307, 4308, 4309, 4310, 4311, 5919, 5920, }, 40, new int[][] { { 995, 30 } }, 46.5, 2),
|
||||
FREMENIK_CITIZEN(new int[] { 2462 }, 45, new int[][] { { 995, 40 } }, 65, 2),
|
||||
BEARDED_BANDIT(new int[] { 1880, 1881, 6174 }, 45, new int[][] { { 995, 40 } }, 65, 5),
|
||||
DESERT_BANDIT(new int[] { 1926, 1921 }, 53, new int[][] { { 995, 30 }, { 995, 30 } }, 79.5, 3),
|
||||
|
|
@ -199,4 +199,4 @@ public enum Pickpocket {
|
|||
public int getStunDamage() {
|
||||
return stunDamage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ public class Player extends Entity {
|
|||
inventory.addAll(c[0]);
|
||||
if (gravestone) {
|
||||
graveManager.create(ticks, items);
|
||||
sendMessages("<col=990000>Because of your current gavestone, you have "+graveManager.getType().getDecay()+" minutes to get your items and", "<col=990000>equipment back after dying in combat.");
|
||||
sendMessages("<col=990000>Because of your current gravestone, you have "+graveManager.getType().getDecay()+" minutes to get your items and", "<col=990000>equipment back after dying in combat.");
|
||||
}
|
||||
familiarManager.dismiss();
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package plugin.consumable;
|
|||
import org.crandor.game.content.global.consumable.ConsumableProperties;
|
||||
import org.crandor.game.content.global.consumable.Consumables;
|
||||
import org.crandor.game.content.global.consumable.Drink;
|
||||
import org.crandor.game.content.skill.SkillBonus;
|
||||
import org.crandor.game.content.skill.Skills;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.plugin.InitializablePlugin;
|
||||
import org.crandor.game.node.item.Item;
|
||||
|
|
@ -15,6 +17,11 @@ import org.crandor.game.node.item.Item;
|
|||
@InitializablePlugin
|
||||
public final class CupofTeaPlugin extends Drink {
|
||||
|
||||
/**
|
||||
* Represents the skill bonuses.
|
||||
*/
|
||||
private SkillBonus[] bonuses;
|
||||
|
||||
/**
|
||||
* Represents the force chat to use.
|
||||
*/
|
||||
|
|
@ -30,12 +37,19 @@ public final class CupofTeaPlugin extends Drink {
|
|||
* Constructs a new {@code CupofTeaPlugin} {@code Object}.
|
||||
*/
|
||||
public CupofTeaPlugin() {
|
||||
super(712, new ConsumableProperties(2, 1980));
|
||||
super(712, new ConsumableProperties(3, 1980));
|
||||
this.bonuses = new SkillBonus[1];
|
||||
this.bonuses[0] = new SkillBonus(Skills.ATTACK, 0, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void consume(final Item item, final Player player) {
|
||||
player.sendChat(CHAT);
|
||||
if (this.bonuses != null) {
|
||||
for (SkillBonus b : bonuses) {
|
||||
addBonus(player, b);
|
||||
}
|
||||
}
|
||||
super.remove(player, item);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ public final class MagicTutorDialogue extends DialoguePlugin {
|
|||
stage = 12;
|
||||
break;
|
||||
case 12:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Nemarti, the Ranged Combat tutor and I both give out", "items every 30 minutes, however you must choose", "wether you want runes or ranged equipment. To", "claim runes, right-click on me and choose Claim, to claim");
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Nemarti, the Ranged Combat tutor and I both give out", "items every 30 minutes, however you must choose", "whether you want runes or ranged equipment. To", "claim runes, right-click on me and choose Claim, to claim");
|
||||
stage = 13;
|
||||
break;
|
||||
case 13:
|
||||
|
|
@ -159,7 +159,7 @@ public final class MagicTutorDialogue extends DialoguePlugin {
|
|||
stage = 14;
|
||||
break;
|
||||
case 14:
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "When you have the sepll available, click on it once, then", "click on your target. A good target would be a monster", "that is below your combat level.");
|
||||
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "When you have the spell available, click on it once, then", "click on your target. A good target would be a monster", "that is below your combat level.");
|
||||
stage = 15;
|
||||
break;
|
||||
case 15:
|
||||
|
|
|
|||
36
Server/src/plugin/skill/herblore/SwampToadPlugin.java
Normal file
36
Server/src/plugin/skill/herblore/SwampToadPlugin.java
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
package plugin.skill.herblore;
|
||||
|
||||
|
||||
import org.crandor.cache.def.impl.ItemDefinition;
|
||||
import org.crandor.game.interaction.OptionHandler;
|
||||
import org.crandor.game.node.Node;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.game.node.item.Item;
|
||||
import org.crandor.plugin.InitializablePlugin;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
/**
|
||||
* Represents the swamp toad plugin.
|
||||
* @author Zombiemode
|
||||
* @version 1.0
|
||||
*/
|
||||
@InitializablePlugin
|
||||
public final class SwampToadPlugin extends OptionHandler {
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
ItemDefinition.setOptionHandler("remove-legs", this);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
if (player.getInventory().replace(new Item(2152), ((Item) node).getSlot()) != null) {
|
||||
player.getPacketDispatch().sendMessage("You pull the legs off the toad. Poor toad. At least they'll grow back.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWalk() { return false; }
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue