Thread: Adding Smilies to your server

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 Adding Smilies to your server 
    Donator
    Dunpk's Avatar
    Join Date
    Apr 2014
    Posts
    145
    Thanks given
    26
    Thanks received
    13
    Rep Power
    15
    helo guys,
    Some pictures







    at first u need to get smilies and add it to your cache

    secound :-

    Client side.

    go to RSFontSystem.java file

    find handleOldSyntax method

    under add
    Code:
    		if(SMILIES_TOGGLED && !text.contains(":store")) {
    			//Cba making another sprite[] ill just use modicons for these lol //Gabbe
    			text = replace(text, ":=)", "<img=12>");text = replace(text, "=)", "<img=12>"); text = replace(text, ":)", "<img=12>");text = replace(text, ":]", "<img=12>");
    			text = replace(text, ":=(", "<img=13>");text = replace(text, "=(", "<img=13>");text = replace(text, ":(", "<img=13>");text = replace(text, ":[", "<img=13>");
    			text = replace(text, ":|", "<img=14>");
    			text = replace(text, ":S", "<img=15>"); text = replace(text, ":s", "<img=15>");
    			text = replace(text, ":O", "<img=17>"); text = replace(text, ":o", "<img=17>");
    			text = replace(text, ":8", "<img=16>");
    			text = replace(text, ":$", "<img=18>");
    			text = replace(text, ";)", "<img=19>");text = replace(text, ";]", "<img=19>");
    			text = replace(text, ":/", "<img=20>"); text = replace(text, ":\\", "<img=20>"); text = replace(text, "\\:", "<img=20>");
    			text = replace(text, "(y)", "<img=21>"); text = replace(text, "(Y)", "<img=21>");
    			text = replace(text, "(n)", "<img=22>"); text = replace(text, "(N)", "<img=22>");
    			text = replace(text, ":p", "<img=23>"); text = replace(text, ":P", "<img=23>");
    			text = replace(text, ":d", "<img=24>"); text = replace(text, ":D", "<img=24>");text = replace(text, "=D", "<img=24>"); text = replace(text, "=d", "<img=24>");
    			text = replace(text, "^^", "<img=25>");
    			text = replace(text, "<3", "<img=26>"); text = replace(text, "(L)", "<img=26>"); text = replace(text, "(l)", "<img=26>");
    			text = replace(text, ":'(", "<img=28>");
    			text = replace(text, ":*", "<img=29>");
    			text = replace(text, "(a)", "<img=27>"); text = replace(text, "(A)", "<img=27>");
    			text = replace(text, "-.-", "<img=30>");
    			text = replace(text, "O.o", "<img=31>"); text = replace(text, "o.O", "<img=31>");text = replace(text, "o.o", "<img=31>"); text = replace(text, "O.O", "<img=31>");
    		}
    now add this somewhere u want

    Code:
    	private static String replace(String s, String from, String to)
    	{
    		if(from == "=D" && s.contains("col"))
    			return s;
    		return replaceAllString(s, from, to);
    
    		/*try {
    
    			if(s.contains(from)) {
    				System.out.println("FOund: "+from+" in string "+s+", replacing to: "+s.replaceAll(from, to));
    				return s.replace(from, to);
    			}
    		} catch(Exception e) {
    			e.printStackTrace();
    		}*/
    
    		//return s;
    	}

    and now add this

    Code:
    	public static String replaceAllString(String strOrig, String strFind, String strReplace) {  
    		if(strOrig == null) {  
    			return null;  
    		}  
    		StringBuffer sb = new StringBuffer(strOrig);  
    		String toReplace = "";  
    
    		if (strReplace == null) toReplace = "";  
    		else toReplace = strReplace;  
    
    		int pos = strOrig.length();  
    
    		while (pos > -1) {  
    			pos = strOrig.lastIndexOf(strFind, pos);  
    			if (pos > -1) sb.replace(pos, pos+strFind.length(), toReplace);  
    			pos = pos - strFind.length();  
    		}  
    
    		return sb.toString();  
    	}


    press thanks button if it helped you
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Registered Member
    Join Date
    Jul 2014
    Posts
    306
    Thanks given
    62
    Thanks received
    40
    Rep Power
    0
    pics would help
    Reply With Quote  
     

  4. #3  
    Donator
    Dunpk's Avatar
    Join Date
    Apr 2014
    Posts
    145
    Thanks given
    26
    Thanks received
    13
    Rep Power
    15
    Quote Originally Posted by inkk View Post
    pics would help
    ok sir
    Reply With Quote  
     

  5. #4  
    Registered Member

    Join Date
    Feb 2013
    Posts
    1,680
    Thanks given
    245
    Thanks received
    397
    Rep Power
    329
    You should add credits to Ruse / Gabbe, since I'm pretty sure you ripped from Ruse.
    Also, it's a client tutorial.
    Reply With Quote  
     

  6. #5  
    Registered Member

    Join Date
    Nov 2013
    Posts
    752
    Thanks given
    185
    Thanks received
    456
    Rep Power
    5000
    Quote Originally Posted by Dunpk View Post
    helo guys,
    Some pictures







    at first u need to get smilies and add it to your cache

    secound :-

    Client side.

    go to RSFontSystem.java file

    find handleOldSyntax method

    under add


    now add this somewhere u want




    and now add this





    press thanks button if it helped you
    Thanks for the contribution. sounds interessting tutorial, might use it






    Reply With Quote  
     

  7. #6  
    Member

    Join Date
    Nov 2011
    Posts
    2,438
    Thanks given
    571
    Thanks received
    485
    Rep Power
    0
    Not bad actually.
    Reply With Quote  
     

  8. #7  
    JavaScript Heathen 👹
    frostbit3's Avatar
    Join Date
    Mar 2012
    Age
    26
    Posts
    399
    Thanks given
    360
    Thanks received
    86
    Discord
    View profile
    Rep Power
    70
    Replace the quote tags with code tags, it makes it easier to read. This is also the wrong section.

    All that aside, this is a pretty cool snippet. It's a lot better seeing emoticons vs text emoticons imo.
    >> real life is pretty much the same as code. off-by-one, naming, and unterminated recursion
    Reply With Quote  
     

  9. #8  
    Banned
    Join Date
    Sep 2015
    Age
    27
    Posts
    124
    Thanks given
    25
    Thanks received
    19
    Rep Power
    0
    Quote Originally Posted by Delinquent View Post
    You should add credits to Ruse / Gabbe, since I'm pretty sure you ripped from Ruse.
    Also, it's a client tutorial.
    actually credits goes to trees for originally coming up with emojis for rsps
    Reply With Quote  
     

  10. #9  
    Donator
    Dunpk's Avatar
    Join Date
    Apr 2014
    Posts
    145
    Thanks given
    26
    Thanks received
    13
    Rep Power
    15
    Quote Originally Posted by Mister Slyther View Post
    Not bad actually.
    thank you

    Quote Originally Posted by frostbit3 View Post
    Replace the quote tags with code tags, it makes it easier to read. This is also the wrong section.

    All that aside, this is a pretty cool snippet. It's a lot better seeing emoticons vs text emoticons imo.
    replaced to code
    Reply With Quote  
     

  11. #10  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,472
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    so you ripped from a base, didnt give credit and didnt even remove the tag someone else made.

    now you're begging for thanks/rep

    ogod

    Code:
    //Cba making another sprite[] ill just use modicons for these lol //Gabbe

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    Reply With Quote  
     

  12. Thankful user:


Page 1 of 2 12 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. [718]Adding smilies to your server
    By TheAJ in forum Tutorials
    Replies: 45
    Last Post: 01-02-2016, 06:11 PM
  2. Adding Shops To Your Server
    By shuffler in forum Tutorials
    Replies: 5
    Last Post: 05-26-2008, 05:49 PM
  3. Adding objects to your server
    By super in forum Tutorials
    Replies: 8
    Last Post: 03-13-2008, 05:17 AM
  4. Replies: 8
    Last Post: 08-24-2007, 05:56 AM
  5. adding Preeching to your server!
    By zomgs in forum Tutorials
    Replies: 12
    Last Post: 08-23-2007, 12:32 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •