Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] @pvpinfo + kill to death ratio

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jun 24, 2008
Messages
63
Reaction score
7
PHP:
else if (splitted[0].equals("@pvpinfo")){
				
				MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
					
		            int pvpKillz = victim.getPvpKills();
		            int pvpDeathz = victim.getPvpDeaths();
		            
		            mc.dropMessage("PvP Kills: " + pvpKillz + " PvP Deaths: " + pvpDeathz);
}

Works like a charm just type in @pvpinfo <charname>.

*edit @pvpinfo + kill to death ratio (Works 100% Tested)
PHP:
}else if (splitted[0].equals("@pvpinfo")){
				
				MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
					
		            int pvpKillz = victim.getPvpKills();
		            int pvpDeathz = victim.getPvpDeaths();
		            double pvpKillz2 = (double)(pvpKillz);
		            double pvpDeathz2 = (double)(pvpDeathz);
		            double killDeathRatio = pvpKillz2/pvpDeathz2;
		            mc.dropMessage("PvP Kills: " + pvpKillz + " PvP Deaths: " + pvpDeathz + " Kill to Death Ratio: " + killDeathRatio);
		            }


*edit 2
@spy with pvp info Credit goes out to qwerty for @spy

PHP:
else if (splitted[0].equals("@spy")) {
                        double var;double var2;int str; int dex;int intel; int luk; int meso; int maxhp; int maxmp;
                           MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                           var = victim.getJumpMod();    var2 =  victim.getSpeedMod();    str = victim.getStr();    dex = victim.getDex();  intel = victim.getInt();   luk = victim.getLuk();   meso = victim.getMeso(); maxhp = victim.getCurrentMaxHp();maxmp = victim.getCurrentMaxMp();
                           int pvpKillz = victim.getPvpKills();
                           int pvpDeathz = victim.getPvpDeaths();
                           double pvpKillz2 = (double)(pvpKillz);
                           double pvpDeathz2 = (double)(pvpDeathz);
                           double killDeathRatio = pvpKillz2/pvpDeathz2;
                           
                             mc.dropMessage("JumpMod is" + var + " and Speedmod is" + var2+ "!");
                             mc.dropMessage("Players stats are:");
                             mc.dropMessage(" Str: "+ str+", Dex: "+ dex+ ", Int: " + intel + ", Luk: "+ luk +" .");
                             mc.dropMessage("Player has "+ meso + "mesos.");
                             mc.dropMessage("Max hp is" + maxhp + " Max mp is" + maxmp + ".");
                             mc.dropMessage("PvP Kills: " + pvpKillz + " PvP Deaths: " + pvpDeathz + " Kill to Death Ratio: " + killDeathRatio);
                    }


Thanks goes out to airfl0w for making pvp!
 
Last edited:
Skilled Illusionist
Joined
Apr 4, 2008
Messages
382
Reaction score
2
Re: [Release] @pvpinfo

dont release something till its finished but good work!
 
Skilled Illusionist
Joined
Apr 17, 2008
Messages
386
Reaction score
0
Re: [Release] @pvpinfo

Sounds good. That ratio would sound pretty awesome if it worked.
 
Custom Title Activated
Loyal Member
Joined
Apr 5, 2008
Messages
1,025
Reaction score
5
Re: [Release] @pvpinfo

nice man :)
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Wait wait...Judging from the 1st few posts...
This questions me...
does this work?
 
Experienced Elementalist
Joined
Jun 18, 2008
Messages
216
Reaction score
0
rofl fail... made this a year ago, and i made in-game top 5 0.o heres how it works

u need this thingie

Code:
        }public static ResultSet pvp() {		
		try {
			Connection con = DatabaseConnection.getConnection(); 
			PreparedStatement ps = con.prepareStatement("SELECT name,pvpkills FROM characters ORDER BY pvpkills desc LIMIT 5");
                     return ps.executeQuery();
                     
		} catch (Exception ex) {}
			
		return null;
	}

and u need this command

Code:
else if (splitted[0].equals("@pvp5")) {
             ResultSet rs = pvp();
                           try { mc.dropMessage("Pvp Top 5");
                               while(rs.next()){
                                  
                                  mc.dropMessage("Player : " + rs.getString("name") + "        |      Kills :" + rs.getInt("pvpkills"));
                               }
                            } catch(Exception ex) {}
                        }[/CODE
 
Newbie Spellweaver
Joined
Jun 15, 2008
Messages
99
Reaction score
0
rofl fail... made this a year ago, and i made in-game top 5 0.o heres how it works

u need this thingie

Code:
        }public static ResultSet pvp() {		
		try {
			Connection con = DatabaseConnection.getConnection(); 
			PreparedStatement ps = con.prepareStatement("SELECT name,pvpkills FROM characters ORDER BY pvpkills desc LIMIT 5");
                     return ps.executeQuery();
                     
		} catch (Exception ex) {}
			
		return null;
	}

and u need this command

Code:
else if (splitted[0].equals("@pvp5")) {
             ResultSet rs = pvp();
                           try { mc.dropMessage("Pvp Top 5");
                               while(rs.next()){
                                  
                                  mc.dropMessage("Player : " + rs.getString("name") + "        |      Kills :" + rs.getInt("pvpkills"));
                               }
                            } catch(Exception ex) {}
                        }[b][/CODE[/b][/QUOTE]

Saying he failed?
 
Junior Spellweaver
Joined
Apr 4, 2008
Messages
157
Reaction score
11
Well, nice release. Its nice for normal players to check there PvP scores
 
Junior Spellweaver
Joined
Jun 27, 2008
Messages
148
Reaction score
0
Nice. D: Imma update it because I'm picky about how stuff looks and works. :3
 
Mother effin' clouds
Loyal Member
Joined
Apr 13, 2008
Messages
1,534
Reaction score
448
sweet bump faggot. Oh wait your on my msn, oops lol xDD
Try it out before asking if it works or not ;)
 
Status
Not open for further replies.
Back
Top