LOL
You highlited what to remove, remove it.
|
public double getCreationExp() {
return creationExp;
}
public long getTime() {
return time;
}
public int getSpawnCost() {
return spawnCost;
}
public static Map<Integer, Pouches> getPouches() {
return pouches;
}
}
private Pouches pouches;
public Summoning(Pouches pouches) {
this.setPouches(pouches);
}
public static void infusePouches(Player player) {
player.getInterfaceManager().sendInterface(INTERFA CE);// close to this
Object[] options = new Object[] { 78, 1, "List<col=FF9040>",
"Infuse-X<col=FF9040>", "Infuse-All<col=FF9040>",
"Infuse-10<col=FF9040>", "Infuse-5<col=FF9040>",
"Infuse<col=FF9040>", 10, 8, INTERFACE << 16 | 16 };
// to slot, from slot, options, width, height, component
player.getPackets().sendRunScript(757, options);
player.getPackets().sendIComponentSettings(INTERFA CE, 16, 0, 430, 190);
}
public static Familiar createFamiliar(Player player, Pouches pouch) {
try {
return (Familiar) Class
.forName(
"com.rs.game.npc.familiar."
+ (NPCDefinitions.getNPCDefinitions(pouch
.getNpcId())).name.replace(" ", "")
.replace("-", ""))
.getConstructor(Player.class, Pouches.class,
WorldTile.class, int.class, boolean.class)
.newInstance(player, pouch, player, -1, true);
} catch (Throwable e) {
return null;
}
}
public static void spawnFamiliar(Player player, Pouches pouch) {
if (player.getFamiliar() != null)
return;
ItemDefinitions def = ItemDefinitions.getItemDefinitions(pouch
.getPouchId());
if (def == null)
return;
HashMap<Integer, Integer> skillReq = def.getWearingSkillRequiriments();
boolean hasRequiriments = true;
if (skillReq != null) {
for (int skillId : skillReq.keySet()) {
if (skillId > 24 || skillId < 0)
continue;
int level = skillReq.get(skillId);
if (level < 0 || level > 120)
continue;
if (player.getSkills().getLevelForXp(skillId) < level) {
if (hasRequiriments)
player.getPackets()
.sendGameMessage(
"You are not high enough level to use this pouch.");
hasRequiriments = false;
String name = Skills.SKILL_NAME[skillId].toLowerCase();
player.getPackets().sendGameMessage(
"You need to have a"
+ (name.startsWith("a") ? "n" : "") + " "
+ name + " level of " + level
+ " to summon this.");
}
}
}
if (!hasRequiriments
|| player.getSkills().getLevel(Skills.SUMMONING) < pouch
.getSpawnCost())
return;
if (!player.isDonator()
&& (pouch == Pouches.PACK_YAK || pouch == Pouches.UNICORN_STALLION)) {
player.getPackets().sendGameMessage("You are not a donator.");
return;
}
final Familiar npc = createFamiliar(player, pouch);
if (npc == null) {
player.getPackets().sendGameMessage(
"This familiar is not added yet.");
return;
}
player.getInventory().deleteItem(pouch.getPouchId( ), 1);
player.getSkills().drainSummoning(pouch.getSpawnCo st());
player.setFamiliar(npc);
}
public static boolean sendCreatePouch(Player player, int itemId, int count) {
ItemDefinitions def = ItemDefinitions.getItemDefinitions(itemId);
if (def == null)
return false;
HashMap<Integer, Integer> skillReq = def.getWearingSkillRequiriments();
boolean hasRequiriments = true;
if (skillReq != null) {
for (int skillId : skillReq.keySet()) {
if (skillId > 24 || skillId < 0)
continue;
int level = skillReq.get(skillId);
if (level < 0 || level > 120)
continue;
if (player.getSkills().getLevelForXp(skillId) < level) {
if (hasRequiriments)
player.getPackets()
.sendGameMessage(
"You are not high enough level to use this item.");
hasRequiriments = false;
String name = Skills.SKILL_NAME[skillId].toLowerCase();
player.getPackets().sendGameMessage(
"You need to have a"
+ (name.startsWith("a") ? "n" : "") + " "
+ name + " level of " + level
+ " to create this.");
}
}
HashMap<Integer, Integer> itemReq = def
.getWearingSkillRequiriments();
if (itemReq != null) {
for (int reqId : itemReq.keySet()) {
int amount = skillReq.get(reqId);
if (!player.getInventory().containsItem(reqId, amount)) {
hasRequiriments = false;
String name = ItemDefinitions.getItemDefinitions(reqId)
.getName();
player.getPackets().sendGameMessage(
"You need to have a"
+ (name.startsWith("a") ? "n" : "")
+ " " + name + " X " + amount + ".");
}
player.getInventory().deleteItem(reqId, amount);
}
}
}
if (!hasRequiriments)
return true;
player.getInventory().addItem(new Item(itemId, count));
return true;
}
public Pouches getPouches() {
return pouches;
}
public void setPouches(Pouches pouches) {
this.pouches = pouches;
}
}
i need help for when it says you need to be donator for pack yaks and unicorns i dont know how to take that out so anyone can use them....
LOL
You highlited what to remove, remove it.
Replace what you have just shown us with this ^Code:public double getCreationExp() { return creationExp; } public long getTime() { return time; } public int getSpawnCost() { return spawnCost; } public static Map<Integer, Pouches> getPouches() { return pouches; } } private Pouches pouches; public Summoning(Pouches pouches) { this.setPouches(pouches); } public static void infusePouches(Player player) { player.getInterfaceManager().sendInterface(INTERFA CE);// close to this Object[] options = new Object[] { 78, 1, "List<col=FF9040>", "Infuse-X<col=FF9040>", "Infuse-All<col=FF9040>", "Infuse-10<col=FF9040>", "Infuse-5<col=FF9040>", "Infuse<col=FF9040>", 10, 8, INTERFACE << 16 | 16 }; // to slot, from slot, options, width, height, component player.getPackets().sendRunScript(757, options); player.getPackets().sendIComponentSettings(INTERFA CE, 16, 0, 430, 190); } public static Familiar createFamiliar(Player player, Pouches pouch) { try { return (Familiar) Class .forName( "com.rs.game.npc.familiar." + (NPCDefinitions.getNPCDefinitions(pouch .getNpcId())).name.replace(" ", "") .replace("-", "")) .getConstructor(Player.class, Pouches.class, WorldTile.class, int.class, boolean.class) .newInstance(player, pouch, player, -1, true); } catch (Throwable e) { return null; } } public static void spawnFamiliar(Player player, Pouches pouch) { if (player.getFamiliar() != null) return; ItemDefinitions def = ItemDefinitions.getItemDefinitions(pouch .getPouchId()); if (def == null) return; HashMap<Integer, Integer> skillReq = def.getWearingSkillRequiriments(); boolean hasRequiriments = true; if (skillReq != null) { for (int skillId : skillReq.keySet()) { if (skillId > 24 || skillId < 0) continue; int level = skillReq.get(skillId); if (level < 0 || level > 120) continue; if (player.getSkills().getLevelForXp(skillId) < level) { if (hasRequiriments) player.getPackets() .sendGameMessage( "You are not high enough level to use this pouch."); hasRequiriments = false; String name = Skills.SKILL_NAME[skillId].toLowerCase(); player.getPackets().sendGameMessage( "You need to have a" + (name.startsWith("a") ? "n" : "") + " " + name + " level of " + level + " to summon this."); } } } if (!hasRequiriments || player.getSkills().getLevel(Skills.SUMMONING) < pouch .getSpawnCost()) return; } final Familiar npc = createFamiliar(player, pouch); if (npc == null) { player.getPackets().sendGameMessage( "This familiar is not added yet."); return; } player.getInventory().deleteItem(pouch.getPouchId( ), 1); player.getSkills().drainSummoning(pouch.getSpawnCo st()); player.setFamiliar(npc); } public static boolean sendCreatePouch(Player player, int itemId, int count) { ItemDefinitions def = ItemDefinitions.getItemDefinitions(itemId); if (def == null) return false; HashMap<Integer, Integer> skillReq = def.getWearingSkillRequiriments(); boolean hasRequiriments = true; if (skillReq != null) { for (int skillId : skillReq.keySet()) { if (skillId > 24 || skillId < 0) continue; int level = skillReq.get(skillId); if (level < 0 || level > 120) continue; if (player.getSkills().getLevelForXp(skillId) < level) { if (hasRequiriments) player.getPackets() .sendGameMessage( "You are not high enough level to use this item."); hasRequiriments = false; String name = Skills.SKILL_NAME[skillId].toLowerCase(); player.getPackets().sendGameMessage( "You need to have a" + (name.startsWith("a") ? "n" : "") + " " + name + " level of " + level + " to create this."); } } HashMap<Integer, Integer> itemReq = def .getWearingSkillRequiriments(); if (itemReq != null) { for (int reqId : itemReq.keySet()) { int amount = skillReq.get(reqId); if (!player.getInventory().containsItem(reqId, amount)) { hasRequiriments = false; String name = ItemDefinitions.getItemDefinitions(reqId) .getName(); player.getPackets().sendGameMessage( "You need to have a" + (name.startsWith("a") ? "n" : "") + " " + name + " X " + amount + "."); } player.getInventory().deleteItem(reqId, amount); } } } if (!hasRequiriments) return true; player.getInventory().addItem(new Item(itemId, count)); return true; } public Pouches getPouches() { return pouches; } public void setPouches(Pouches pouches) { this.pouches = pouches; } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |