----------------------------------------
Things to do
----------------------------------------
only have dicebag usable in dicezone
Figure out how to Change item Bonuses
Figure out how to make Black Partyhat, Santa hat, and Hween
Figure out how to make killstreak rewards and killstreak capes [Milestone Capes]
Fix Support Rank
Easy stuff, don't pay someone to do it. Give me a few and i'll edit this post with help.
1. In inventoryoptionshandler.java under
Code:
public static void handleItemOption1(Player player, final int slotId, final int itemId, Item item) {
add
Code:
final int destX = player.getX();
final int destY = player.getY();
and
Code:
if (itemId == DICEBAGIDHERE) {
if (destX >= COORDSHERE && destX >= COORDSHERE && destY >= COORDSHERE && destY >= COORDSHERE);
//add what dicebag does here
else
player.getPackets().sendGameMessage("You need to be inside the dicing area to use the dicebag!");
}
2. Download [Only registered and activated users can see links. ] and extract to your source in data/items.
To change bonuses, edit the .txt file that corresponds with the item you want to change. To save the changes, 1'st add this to your source (where the package says)
Code:
package com.rs.tools;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import com.rs.cache.Cache;
import com.rs.utils.Logger;
import com.rs.utils.Utils;
public class ItemBonusesPacker {
public static final void main(String[] args) throws IOException {
Cache.init();
DataOutputStream out = new DataOutputStream(new FileOutputStream("./data/items/bonuses.ib"));
for (int itemId = 0; itemId < Utils.getItemDefinitionsSize(); itemId++) {
File file = new File("./data/items/bonuses/" + itemId + ".txt");
try {
Logger.log("ItemBonusesPacker", "Packing bonuses for item: " + itemId);
if (file.exists()) {
BufferedReader reader = new BufferedReader(new FileReader(file));
out.writeShort(itemId);
reader.readLine();
// att bonuses
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
reader.readLine();
// def bonuses
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
reader.readLine();
// Damage absorption
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
reader.readLine();
// Other bonuses
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
out.writeShort(Integer.valueOf(reader.readLine()));
reader.close();
}
} catch(Throwable e) {
Logger.handle(e);
}
/*if (reader.readLine() != null)
throw new RuntimeException("Should be null line" + itemId);*/
}
Logger.log("ItemBonusesPacker", "Packed item bonuses.");
out.flush();
out.close();
}
}
2'nd make a .batch file with this inside it
Code:
@echo off
title Bonus Packer
echo Started!
"C:/Program Files/Java/jre7/bin/java.exe" -Xmx512m -cp bin;lib/* com.rs.tools.ItemBonusesPacker
pause
Run that batch file to save the stats
3. Follow [Only registered and activated users can see links. ] for the items you want to change colors of
4. In player.java add this
Code:
public int KillStreak;
public int getKillStreak() {
return KillStreak;
}
In Wilderness.java replace your sendDeath method with
Code:
public boolean sendDeath() {
WorldTasksManager.schedule(new WorldTask() {
int loop;
@Override
public void run() {
if (loop == 0) {
player.setNextAnimation(new Animation(836));
} else if (loop == 1) {
player.getPackets().sendGameMessage(
"Oh dear, you have died.");
} else if (loop == 3) {
Player killer = player.getMostDamageReceivedSourcePlayer();
if (killer != null) {
killer.removeDamage(player);
killer.increaseKillCount(player);
killer.KillStreak++;
}
player.sendItemsOnDeath(killer);
player.getEquipment().init();
player.getInventory().init();
player.reset();
player.KillStreak = 0;
player.setNextWorldTile(new WorldTile(
Settings.RESPAWN_PLAYER_LOCATION));
player.setNextAnimation(new Animation(-1));
} else if (loop == 4) {
removeIcon();
removeControler();
player.getPackets().sendMusicEffect(90);
stop();
}
loop++;
}
}, 0, 1);
return false;
}
To make a shop, go to data/items/unpackedShops.txt
make a new line with