[Release] Fame Achievement

Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Valued Member Howei is offline
    MemberRank
    Nov 2008 Join Date
    121Posts

    [Release] Fame Achievement

    I was bored last night, so decided to make an Achievement thing for fame. Every 10 fames someone gets, a notice will come up congratulating and he/she will get NX.

    The NX the person gets is 500 * their fame. So if they get 100 fame, they will get 50,000 NX. This is EASILY customizable though. Well here it is:



    In GiveFameHandler.java add the following to the top:
    Code:
    import java.rmi.RemoteException;
    import net.sf.odinms.net.MaplePacket;
    Now below:
    Code:
    target.getClient().getSession().write(MaplePacketCreator.receiveFame(mode, c.getPlayer().getName()));
    add:
    Code:
    	if (target.getFame() % 10 == 0 && target.getFame() > 0) {
    	//Fame Achievement by Howei
    		MaplePacket mp = MaplePacketCreator.serverNotice(6, "[Achievement] " + target.getName() + " has gained the " + target.getFame() + " fame achievement! +" + formatNumber(500 * target.getFame()) + " NX Cash");
    		target.modifyCSPoints(2,500 * target.getFame());
    		try {
    			target.getClient().getChannelServer().getWorldInterface().broadcastMessage(null, mp.getBytes());
    		} catch (RemoteException e) {
    			target.getClient().getChannelServer().reconnectWorld();
    		}	
    	}
    Now below the second to last
    Code:
    }
    add:
    Code:
    	private String formatNumber(int x) {
    		//Format Number by Howei...took me awhile with my limited Java knowledge :( (I wrote in C++ first then translated)
    		String before = Integer.toString(x);
    		String result = "";
    		int n = 0;
    		for (int i = 0; i < before.length(); i++) {
    			result = before.charAt((before.length() - 1) - i) + result;
    			if (n == 2 && (i + 1) != before.length()) {
    				result = "," + result;
    				n = -1;
    			}
    			n++;
    		}	
    		return result;
    	}
    What the last code does is add commas to the amount of NX awarded so it looks better in the notice. The last code was the longest to make...

    -Howei

    EDIT: There's just one exploit to this...if PlayerA has 20 fame, he could pay PlayerB to defame him then pay PlayerC to fame him and get the NX over again.


  2. #2
    Account Upgraded | Title Enabled! Regurgitate is offline
    MemberRank
    Apr 2008 Join Date
    1,113Posts

    Re: [RLS] Fame Achievement

    Nice release [Seriously]

  3. #3
    Valued Member Howei is offline
    MemberRank
    Nov 2008 Join Date
    121Posts

    Re: [RLS] Fame Achievement

    Thank you :D
    The formatNumber() took forever <.<

  4. #4
    Member ScalloT is offline
    MemberRank
    Apr 2009 Join Date
    81Posts

    Re: [RLS] Fame Achievement

    Looks nice >.>

  5. #5
    Account Upgraded | Title Enabled! Signalize is offline
    MemberRank
    Nov 2008 Join Date
    USALocation
    363Posts

    Re: [RLS] Fame Achievement

    PHP Code:
        private static String formatNumber(int a) {
            
    String s "";
            for(
    int i s.length()-30i-=3)
                
    s.substring(0,i) + "," s.substring(i);
            return 
    s;
        } 
    Come on that was easy.

  6. #6
    :) Horizon is offline
    MemberRank
    Jan 2009 Join Date
    Illinois, U.S.Location
    2,381Posts

    Re: [RLS] Fame Achievement

    Nice release [Seriously]

  7. #7
    Account Upgraded | Title Enabled! macboy3000 is offline
    MemberRank
    Jan 2009 Join Date
    Nerds'r'Us MS!Location
    449Posts

    Re: [RLS] Fame Achievement

    the last part, the defaming and faming is the only thing i dont like
    everything else is perfect!!!!

  8. #8
    Valued Member Howei is offline
    MemberRank
    Nov 2008 Join Date
    121Posts

    Re: [RLS] Fame Achievement

    Quote Originally Posted by Signalize View Post
    PHP Code:
        private static String formatNumber(int a) {
            
    String s "";
            for(
    int i s.length()-30i-=3)
                
    s.substring(0,i) + "," s.substring(i);
            return 
    s;
        } 
    Come on that was easy.
    Well unlike you I suck at java.

  9. #9
    Proficient Member Nycrich67 is offline
    MemberRank
    Apr 2009 Join Date
    In front of a computerLocation
    151Posts

    Re: [Release] Fame Achievement

    EDIT: There's just one exploit to this...if PlayerA has 20 fame, he could pay PlayerB to defame him then pay PlayerC to fame him and get the NX over again.
    Everything else was fine;
    But that made me go alittle bit "wtf" lol.

  10. #10
    Account Upgraded | Title Enabled! ridekink08 is offline
    MemberRank
    Jun 2008 Join Date
    AuroraLocation
    411Posts

    Re: [Release] Fame Achievement

    You should release alot of achievements together like
    first boss kill
    1/2/3/4 job advancement all that would be amazing =)

  11. #11
    Account Upgraded | Title Enabled! <XENON> is offline
    MemberRank
    Feb 2009 Join Date
    Titti TownLocation
    223Posts

    Re: [Release] Fame Achievement

    nice idea :D
    i may use this.

  12. #12
    Account Upgraded | Title Enabled! Signalize is offline
    MemberRank
    Nov 2008 Join Date
    USALocation
    363Posts

    Re: [Release] Fame Achievement

    EDIT: There's just one exploit to this...if PlayerA has 20 fame, he could pay PlayerB to defame him then pay PlayerC to fame him and get the NX over again.

    Save it to database. That's what FloppyDisk did

  13. #13
    Account Upgraded | Title Enabled! JusticeDK is offline
    MemberRank
    Aug 2008 Join Date
    McDonaldLocation
    806Posts

    Re: [Release] Fame Achievement

    EDIT: There's just one exploit to this...if PlayerA has 20 fame, he could pay PlayerB to defame him then pay PlayerC to fame him and get the NX over again.
    that is what i was thinking too lol

  14. #14
    Valued Member Howei is offline
    MemberRank
    Nov 2008 Join Date
    121Posts

    Re: [Release] Fame Achievement

    Quote Originally Posted by Signalize View Post
    EDIT: There's just one exploit to this...if PlayerA has 20 fame, he could pay PlayerB to defame him then pay PlayerC to fame him and get the NX over again.

    Save it to database. That's what FloppyDisk did
    Exactly what I was planning to do.

    You should release alot of achievements together like
    first boss kill
    1/2/3/4 job advancement all that would be amazing =)
    Not a bad idea. Except for the first boss kill, I don't know how I'd do that.

  15. #15
    Account Upgraded | Title Enabled! ridekink08 is offline
    MemberRank
    Jun 2008 Join Date
    AuroraLocation
    411Posts

    Re: [Release] Fame Achievement

    That was just an example. It would be a really decent release if you
    released a full like ahcievement system in my opinion. LIke for everthing
    even for stupid stuff. Just make sure the rewards arnt so crazy =)



Page 1 of 2 12 LastLast

Advertisement