Thread: Bounty Interface and Activity/Kill Feed

Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1 Bounty Interface and Activity/Kill Feed 
    Banned

    Join Date
    Dec 2016
    Posts
    181
    Thanks given
    61
    Thanks received
    52
    Rep Power
    0
    Just made this for fun, you guys can have it.
    Spoiler for Media:

    Attached image
    Attached image
    Attached image

    Enjoy.

    Sprites: mega.nz

    Add this to your desired location:
    Code:
    ActivityFeed.sumbit(other, player);
    Add this class to server:
    Code:
    package org.kelda.node.content;
    
    import java.util.ArrayList;
    import java.util.List;
    
    import org.kelda.node.entity.World;
    import org.kelda.node.entity.mobile.player.Player;
    import org.kelda.node.entity.mobile.player.net.out.impl.SendString;
    
    /**
     * Activity feed
     * @author snowman5069 x trees
     */
    public class ActivityFeed {
    
    	private static short time = 100;
    	static int ids[] = { 25358, 25359, 25360 };
    	public static final List<String> entries = new ArrayList<String>();
    
    	public static void update() {
    		//System.out.println("[Activity HUD] : Update() - sending announcements.. size = " + entries.size());
    		for (int j = 0; j < World.getPlayers().length; j++) {
    			if (World.getPlayers()[j] != null) {
    				Player player = World.getPlayers()[j];
    				if ((player != null) && (entries != null)) {
    					updateInterface(player, entries);
    				}
    			}
    		}
    		// shift();
    	}
    
    	public static void sumbit(Player other, Player player) {
    		if (entries.size() >= 3) {
    			shift();
    		}
    		entries.add("" + other.getPlayer().getUsername() + " has killed " + player.getPlayer().getUsername() + "!");
    		update();
    	}
    
    	private static void sendGlocalAnnouncement(String entry, int id) {
    		for (Player i : World.getPlayers())
    			if (i != null)
    				i.send(new SendString(entry, id));
    	}
    
    	public static void tick() {
    		time--;
    		if (time == 0) {
    			shift();
    			update();
    			time = 100;
    		}
    	}
    
    	private static void shift() {
    		if (entries.isEmpty()) {
    			return;
    		}
    		entries.remove(0);
    	}
    
    	private static void updateInterface(Player player, List<String> entries2) {
    		sendGlocalAnnouncement(entries.size() > 0 ? entries.get(0).toString() : "", ids[0]);
    		sendGlocalAnnouncement(entries.size() > 1 ? entries.get(1).toString() : "", ids[1]);
    		sendGlocalAnnouncement(entries.size() > 2 ? entries.get(2).toString() : "", ids[2]);
    	}
    }
    Add this code to client in RSInterface:
    Code:
    	public static void bountyHunter(TextDrawingArea[] tda) {
    		RSInterface tab = addInterface(25347);
    		tab.totalChildren(13);
    
    		addText(25349, "Bounty Target:", 0xffcccc, true, true, -1, tda, 1);
    		addText(25350, "snowman5069", 0xff6666, true, true, -1, tda, 2);
    		addText(25351, "@or1@2147m", 0xff3333, false, true, -1, tda, 1);
    		addText(25352, "+Timer Sec", 0xff6666, true, true, -1, tda, 2);
    		addTransparentSprite(25348, 0, "BountyHunter/IMAGE");
    		addSprite(25353, 1, "BountyHunter/SKULL");
    		addSprite(25354, 1, "BountyHunter/VALUE");
    		addSprite(25355, 0, "BountyHunter/TROPHY");
    		addText(25356, "@or1@k/d", 0xff3333, false, true, -1, tda, 1);
    		addText(25357, "Dangerous", tda, 0, 0xff9040, true, true);
    		addText(25358, "@or1@Snowman5069@whi@ has killed @yel@ Hercul3s007@whi@!", tda, 0, 0xff9040, true, true);
    		addText(25359, "@bla@Snaajkn5069@whi@ has killed @cya@ Haaer0a07@whi@!", tda, 0, 0xff9040, true, true);
    		addText(25360, "@dre@larryfish@whi@ has killed @yel@ likong45@whi@!", tda, 0, 0xff9040, true, true);
    
    		tab.child(0, 25348, 290, 10);
    		tab.child(1, 25349, 340, 13);
    		tab.child(2, 25350, 452, 13);
    		tab.child(3, 25351, 320, 34);
    		tab.child(4, 25352, 470, 34);
    		tab.child(5, 25353, 476, 254);
    		tab.child(6, 25354, 300, 34);
    		tab.child(7, 25355, 370, 34);
    		tab.child(8, 25356, 388, 34);
    		tab.child(9, 25357, 485, 278);
    		tab.child(10, 25358, 100, 15);
    		tab.child(11, 25359, 100, 25);
    		tab.child(12, 25360, 100, 35);
    	}
    
    	public static void addTransparentSprite(int id, int spriteId, String spriteName) {
    		RSInterface tab = interfaceCache[id] = new RSInterface();
    		tab.id = id;
    		tab.parentID = id;
    		tab.type = 5;
    		tab.atActionType = 0;
    		tab.contentType = 0;
    		tab.aByte254 = (byte) 0;
    		tab.hoverType = 52;
    		tab.sprite1 = imageLoader(spriteId, spriteName);
    		tab.sprite2 = imageLoader(spriteId, spriteName);
    		tab.width = 512;
    		tab.height = 334;
    		tab.drawsTransparent = true;
    	}
    Spoiler for Media:

    Attached image


    if you want them to disappear over time like above... add this somewhere..
    Code:
    ActivityFeed.tick();
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    2,853
    Thanks given
    1,213
    Thanks received
    1,622
    Rep Power
    5000
    Actually a cool idea. Will implement my own version of this into the Elvarg project.
    Reply With Quote  
     

  4. #3  
    Banned

    Join Date
    Dec 2016
    Posts
    181
    Thanks given
    61
    Thanks received
    52
    Rep Power
    0
    Quote Originally Posted by Professor Oak View Post
    Actually a cool idea. Will implement my own version of this into the Elvarg project.
    thanks bro. sprites uploaded.
    Reply With Quote  
     

  5. #4  
    Extreme Donator Bounty Interface and Activity/Kill Feed Market Banned



    Join Date
    Aug 2011
    Age
    28
    Posts
    3,589
    Thanks given
    1,402
    Thanks received
    1,620
    Rep Power
    5000
    Nice work, thanks for this

    Attached image

    Attached image
    Discord: Roy#2382

    Reply With Quote  
     

  6. #5  
    Donator

    Superman's Avatar
    Join Date
    Feb 2015
    Posts
    870
    Thanks given
    316
    Thanks received
    247
    Rep Power
    1326
    That's pretty dope, you could actually make a osrs pvp server based on bh craters system, since your interface kinda looks like the bh crater interface
    ex. if you get a target(anywhere in the runescape world) can tele, then youll able to tele back to safe zone,
    if you went on a rouge, youll get a 180 sec penalty, avoiding you from able to tele or go to a safe zone
    Reply With Quote  
     

  7. #6  
    Banned

    Join Date
    Dec 2016
    Posts
    181
    Thanks given
    61
    Thanks received
    52
    Rep Power
    0
    Quote Originally Posted by Superman_ View Post
    That's pretty dope, you could actually make a osrs pvp server based on bh craters system, since your interface kinda looks like the bh crater interface
    ex. if you get a target(anywhere in the runescape world) can tele, then youll able to tele back to safe zone,
    if you went on a rouge, youll get a 180 sec penalty, avoiding you from able to tele or go to a safe zone
    whats with people wanting osrs bounty :x lol
    Reply With Quote  
     

  8. #7  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Thanks for the share.
    Reply With Quote  
     

  9. #8  
    Extreme Donator


    Join Date
    Oct 2010
    Posts
    2,853
    Thanks given
    1,213
    Thanks received
    1,622
    Rep Power
    5000
    I used the feed idea to make a "Server feed" kind of thingy. It will have kills, announcements and more. Thanks pal.

    Attached image
    Reply With Quote  
     

  10. #9  
    Banned

    Join Date
    Dec 2016
    Posts
    181
    Thanks given
    61
    Thanks received
    52
    Rep Power
    0
    Quote Originally Posted by Professor Oak View Post
    I used the feed idea to make a "Server feed" kind of thingy. It will have kills, announcements and more. Thanks pal.

    Attached image
    Looks good, Glad i could inspire.

    did something similar (skeleton was to test, i used on bosses and player kills)
    Attached image
    Attached image
    Reply With Quote  
     

  11. #10  
    Extreme Donator

    Kiana's Avatar
    Join Date
    May 2015
    Posts
    1,050
    Thanks given
    147
    Thanks received
    187
    Rep Power
    223
    Nice i like, Thanks.
    Reply With Quote  
     

Page 1 of 3 123 LastLast

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. Adding My Bounty Hunter Interfaces and Skulls
    By TheRedArmy in forum Tutorials
    Replies: 45
    Last Post: 09-28-2010, 02:11 PM
  2. Replies: 20
    Last Post: 04-27-2009, 04:45 AM
  3. Replies: 21
    Last Post: 04-27-2009, 04:45 AM
  4. Replies: 30
    Last Post: 02-10-2008, 04:48 PM
  5. Recoloring the whole interface and stuff!!!!!!
    By Ninja Cat in forum Tutorials
    Replies: 19
    Last Post: 12-09-2007, 07:03 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
  •