Thread: [Ruse] Add map icons with ease.

Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 50
  1. #31  
    Registered Member
    BANKS's Avatar
    Join Date
    Jul 2011
    Posts
    832
    Thanks given
    339
    Thanks received
    234
    Rep Power
    224
    Interested on knowing how to remove them :O
    Reply With Quote  
     

  2. #32  
    Donator

    Join Date
    Jan 2016
    Posts
    11
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    Spoiler for Spoiler:
    Quote Originally Posted by Beagon View Post
    Hi guys, I wanted to add some minimap icons but following tutorials they all told me to add a variable for every icon.. Not gonna happen so I made a way to add it in the easy way.
    It's my first release so be gentle

    Create a new class called CustomMinimapIcon.java

    Add this into the class:
    Code:
    /**
     * CustomMinimapIcon class to make custom minimap icons
     * 
     * @author Beagon
     */
    public class CustomMinimapIcon {
    	private int x, y;
    	private Sprite sprite;
    	
    	/**
    	 * Create a new {@link CustomMinimapIcon}.
    	 * 
    	 * @param int x
    	 *            The X coordinate on the map
    	 * @param int y
    	 *            The Y coordinate on the map
    	 * @param Sprite
    	 *            The sprite to display
    	 */
    	public CustomMinimapIcon(int x, int y, Sprite sprite) {
    		this.x = x;
    		this.y = y;
    		this.sprite = sprite;
    	}
    
    	/**
    	 * Sets the X coordinate.
    	 * @return CustomMinimapIcon
    	 */
    	public CustomMinimapIcon setX(int x) {
    		this.x = x;
    		return this;
    	}
    
    	/**
    	 * Gets the X coordinate.
    	 * @param int X
    	 *            The X coordinate on the map
    	 * @return int
    	 */
    	public int getX() {
    		return this.x;
    	}
    
    	/**
    	 * Sets the Y coordinate.
    	 * @param int y
    	 *            The Y coordinate on the map
    	 * @return CustomMinimapIcon
    	 */
    	public CustomMinimapIcon setY(int y) {
    		this.y = y;
    		return this;
    	}
    
    	/**
    	 * Gets the Y coordinate.
    	 * @return int
    	 */
    	public int getY() {
    		return this.y;
    	}
    
    	/**
    	 * Sets the icon Sprite
    	 * @param Sprite sprite
    	 *            The sprite of the icon
    	 * @return CustomMinimapIcon
    	 */
    	public CustomMinimapIcon setSprite(Sprite sprite) {
    		this.sprite = sprite;
    		return this;
    	}
    	
    	/**
    	 * Gets the sprite.
    	 * @return Sprite
    	 */
    	public Sprite getSprite() {
    		return this.sprite;
    	}
    }
    Then in Client.java add this variable:
    Code:
    private ArrayList<CustomMinimapIcon> customMinimapIcons = new ArrayList<CustomMinimapIcon>();
    Now find
    Code:
    markMinimap(currentMapFunctionSprites[j5], k, i3);
    After it add:
    Code:
    for (int iconI = 0; iconI < customMinimapIcons.size(); iconI++) {
    	markMinimap(customMinimapIcons.get(iconI).getSprite(), ((customMinimapIcons.get(iconI).getX() - baseX) * 4 + 2) - myPlayer.x / 32, ((customMinimapIcons.get(iconI).getY() - baseY) * 4 + 2) - myPlayer.y / 32);
    }
    Now the last thing to make it work is find:
    Code:
    mapDotTeam = new Sprite(mediaArchives, "mapdots", 4);
    Underneath it add the line you were waiting for:

    Code:
    customMinimapIcons.add(new CustomMinimapIcon(X, Y, new Sprite(mediaArchive, "mapfunction", SpriteID)));
    This adds the icon!

    For example:
    Code:
    customMinimapIcons.add(new CustomMinimapIcon(3215, 3424, new Sprite(mediaArchive, "mapfunction", 5)));
    This would add a bank icon to Varrock Square:
    Attached image

    You can add as many of those lines as you want underneath each other.

    I hope you find any use in this!

    Greetings

    Beagon


    Thanks for this, nice release!
    Reply With Quote  
     

  3. #33  
    Registered Member
    natsu's Avatar
    Join Date
    Apr 2007
    Age
    32
    Posts
    3,435
    Thanks given
    1,084
    Thanks received
    676
    Rep Power
    1096
    i think it said dont release modified versions but who am i

    http://www.rune-server.org/runescape...s-release.html
    Reply With Quote  
     

  4. #34  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,761
    Thanks given
    75
    Thanks received
    714
    Rep Power
    1073
    Quote Originally Posted by natsu View Post
    i think it said dont release modified versions but who am i

    http://www.rune-server.org/runescape...s-release.html
    lol fuck off
    Reply With Quote  
     

  5. Thankful user:


  6. #35  
    Donator

    Join Date
    Oct 2015
    Posts
    36
    Thanks given
    17
    Thanks received
    9
    Rep Power
    12
    Is there a way to do it so they don't show on all levels? lmao
    Reply With Quote  
     

  7. #36  
    Registered Member Dragon Tonna's Avatar
    Join Date
    Aug 2006
    Posts
    62
    Thanks given
    14
    Thanks received
    12
    Rep Power
    24
    Good job.
    I would have released this if I knew so many people would have used it haha.

    EDIT: I guess it was released already.





    You can really clean up your custom areas with this
    Attached image


    Quote Originally Posted by WE THE BEST View Post
    Interested on knowing how to remove them :O
    Comment out this stuff. (might wanna comment out other methods / lines with mapFunctions)
    Code:
    /*
    for (int j5 = 0; j5 < mapFunctionsLoadedAmt; j5++) {
                 int k = (mapFunctionTileX[j5] * 4 + 2) - myPlayer.x / 32;
                 int i3 = (mapFunctionTileY[j5] * 4 + 2) - myPlayer.y / 32;
                 try {
                    markMinimap(currentMapFunctionSprites[j5], k, i3);
                    
                 } catch (Exception e) {
                    e.printStackTrace();
                }
    }
             */
    Code:
    /*
             mapFunctionsLoadedAmt = 0;
             for (int xTile = 0; xTile < 104; xTile++) {
             for (int yTIle = 0; yTIle < 104; yTIle++) {
             int uid = worldController.fetchGroundDecorationNewUID(plane,
             xTile, yTIle);
             if (uid != 0) {
             // uid = uid >> 14 & 0x7fff;
             int functionId = ObjectDef.forID(uid).mapFunctionID;
             if (functionId >= 0) {
             int k3 = xTile;
             int l3 = yTIle;
             if (functionId != 22 && functionId != 29
             && functionId != 34 && functionId != 36
             && functionId != 46 && functionId != 47
             && functionId != 48) {
             byte byte0 = 104;
             byte byte1 = 104;
             int ai1[][] = clippingPlanes[plane].clipData;
             for (int i4 = 0; i4 < 10; i4++) {
             int j4 = (int) (Math.random() * 4D);
             if (j4 == 0 && k3 > 0 && k3 > xTile - 3
             && (ai1[k3 - 1][l3] & 0x1280108) == 0)
             k3--;
             if (j4 == 1 && k3 < byte0 - 1 && k3 < xTile + 3
             && (ai1[k3 + 1][l3] & 0x1280180) == 0)
             k3++;
             if (j4 == 2 && l3 > 0 && l3 > yTIle - 3
             && (ai1[k3][l3 - 1] & 0x1280102) == 0)
             l3--;
             if (j4 == 3 && l3 < byte1 - 1 && l3 < yTIle + 3
             && (ai1[k3][l3 + 1] & 0x1280120) == 0)
             l3++;
             }
    
             }
             currentMapFunctionSprites[mapFunctionsLoadedAmt] = mapFunctions[functionId];
             mapFunctionTileX[mapFunctionsLoadedAmt] = k3;
             mapFunctionTileY[mapFunctionsLoadedAmt] = l3;
             mapFunctionsLoadedAmt++;
             }
             }
             }
    
             }
             */

    Then you can use only the icons you want from cache using these methods combined with the ones he provided.
    I load the icons into an array on startup like this.

    Code:
    for (int i = 0; i < mapIcons.length; i++) {
          mapIcons[i] = new Sprite(mediaArchive, "mapfunction", i);
    }
    Code:
    mapIcons = new Sprite[70];
    Code:
    private final Sprite mapIcons[];
    Reply With Quote  
     

  8. #37  
    Registered Member Versatile's Avatar
    Join Date
    Dec 2014
    Age
    26
    Posts
    433
    Thanks given
    247
    Thanks received
    9
    Rep Power
    9
    I added this and worked perfectly. I can even remove map icons.
    Spoiler for Don't be a deadfool:
    Reply With Quote  
     

  9. #38  
    Registered Member
    Join Date
    Apr 2017
    Posts
    16
    Thanks given
    2
    Thanks received
    0
    Rep Power
    11
    this isnt ruse at all didnt work dont even have

    half the things u said t ofind
    Reply With Quote  
     

  10. #39  
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    Quote Originally Posted by finessekid17 View Post
    this isnt ruse at all didnt work dont even have

    half the things u said t ofind
    I'm assuming this is for a Ruse V1 Client. If you have Ruse V2 like I do then this tutorial will not work for you.

    Try this one.

    https://www.rune-server.ee/runescape...-icons-v2.html
    Reply With Quote  
     

  11. #40  
    Donator


    Join Date
    Nov 2011
    Posts
    784
    Thanks given
    108
    Thanks received
    705
    Rep Power
    5000
    Thanks!
    Reply With Quote  
     

Page 4 of 5 FirstFirst ... 2345 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. [Ruse] Easy Custom Minimap Icons
    By Beagon in forum Tutorials
    Replies: 0
    Last Post: 10-25-2015, 09:39 PM
  2. Custom Minimap icons release
    By Harry in forum Tutorials
    Replies: 37
    Last Post: 03-10-2013, 01:23 AM
  3. Replies: 35
    Last Post: 08-17-2011, 08:28 PM
  4. Custom minimap icons?
    By Sub in forum Requests
    Replies: 3
    Last Post: 07-10-2010, 12:36 AM
  5. Custom Minimap Icons
    By Harry in forum Show-off
    Replies: 7
    Last Post: 02-07-2009, 03:34 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
  •