Thread: My to do list [Looking for Coder/Paying]

Results 1 to 3 of 3
  1. #1 My to do list [Looking for Coder/Paying] 
    Registered Member
    Join Date
    Feb 2013
    Posts
    27
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    ----------------------------------------
    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
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jul 2013
    Posts
    244
    Thanks given
    3
    Thanks received
    11
    Rep Power
    11
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Owner of Virtus
    k0ed ur mom's Avatar
    Join Date
    Jun 2012
    Age
    31
    Posts
    541
    Thanks given
    20
    Thanks received
    46
    Rep Power
    11
    Quote Originally Posted by scopingtanks View Post
    ----------------------------------------
    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
    Code:
    77 -2 false - KillStreak Rewards Shop - additemshere
    In shop.java under
    Code:
    public void buy(Player player, int slotId, int quantity) {
    add
    Code:
    		if (money !=995) {
    			for (int ks = 0; ks < KSPrices.length; ks++) {
    				if (item.getId() == KSPrices[ks][0]) {
    					if (player.getKillStreak() < KSPrices[ks][1] * quantity) {
    						player.getPackets().sendGameMessage("You need a killstreak of " + KSPrices[ks][1] + " to buy this item!");
    						return;
    					} else
    					player.getPackets().sendGameMessage("You have bought a " + item.getDefinitions().getName() + " from the KillStreak Rewards store.");
    					player.getInventory().addItem(KSPrices[ks][0], 1);
    					player.KillStreak-= - KSPrices[ks][1];
    					return;
    				}
    			}
    		}
    Also add this anywhere
    Code:
    	public static int[][] KSPrices = { { exampleitemid, exampleprice }, { 1, 1 } };
    also be sure to add the item id's and prices there that you add to your unpacked shop
    5. Could you elaborate about what is wrong with it?
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. My to do list[if u can help pleaseeee]
    By scopingtanks in forum Help
    Replies: 5
    Last Post: 07-07-2013, 04:19 PM
  2. [508+] My To Do List :)
    By BrandonBerner in forum Help
    Replies: 10
    Last Post: 01-25-2011, 06:03 PM
  3. Looking for coder paying with $
    By Spopovich in forum Requests
    Replies: 13
    Last Post: 03-01-2010, 04:16 PM
  4. Replies: 19
    Last Post: 10-22-2009, 06:15 PM
  5. Replies: 3
    Last Post: 02-18-2008, 07:13 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •