[Release] PvP Commands.

Joined
Oct 29, 2008
Messages
563
Reaction score
8
Here we go. Dont ask me questions. FlameShield : active UPDATED!


- no need to explain? o-o
Code:
} else if (splitted[0].equals("@Challenge")) {
    MapleCharacter challenged = cserv.getPlayerStorage().getCharacterByName(splitted[1]);
    if(challenged == null) {
        mc.dropMessage(challenged.getName() + " does not exist.");
    }
    if(challenged.getFighting()) {
        mc.dropMessage("Please wait, " + challenged.getName() + " is fighting someone else.");
    }
    if(c.getPlayer().getMap() != challenged.getMap()) {
        mc.dropMessage(challenged.getName() + " is not on your map.");
    }
    if(challenged.getInvite()) {
        mc.dropMessage("Please wait, " + challenged.getInviter().getName() + " has invited " + challenged.getName() + " to fight before you.");
    }
    if(c.getPlayer().getInvited()) {
        mc.dropMessage("You've already invited " + c.getPlayer().getInvitedone().getName() + " to fight. Please @Withdraw if you wish to take away the invitation.");
    }
    if(!challenged.getFighting() && c.getPlayer().getMap() == challenged.getMap() && !challenged.getInvite() && !c.getPlayer().getInvited()) {
        challenged.getClient().getSession().write(MaplePacketCreator.serverNotice(6, c.getPlayer().getName() + " has sent you an invitation to fight. Please @Accept or @Decline."));
        challenged.setInvite(true);
        challenged.setInviter(c.getPlayer());
        c.getPlayer().setInvited(true);
        c.getPlayer().setInvitedone(challenged);
        mc.dropMessage("You've successfully invited " + challenged.getName() + " to fight. @Withdraw if you wish to take away the invitation.");
    }

Code:
} else if(splitted[0].equals("@Decline")) {
    if(c.getPlayer().getInviter() != null) {
    MapleCharacter inviter = c.getPlayer().getInviter();
    inviter.setInvited(false);
    inviter.setInvitedone(null);
    inviter.getClient().getSession().write(MaplePacketCreator.serverNotice(6, c.getPlayer().getName() + " has declined your invitation."));
    c.getPlayer().setInvite(false);
    c.getPlayer().setInviter(null);
    } else {
        mc.dropMessage("There have not been any invitations sent to you so it is impossible to decline.");
}

Code:
} else if(splitted[0].equals("@Accept")) {
    if(c.getPlayer().getInviter() != null) {
        MapleCharacter inviter = c.getPlayer().getInviter();
        inviter.setAttacker(c.getPlayer());
        c.getPlayer().setAttacker(inviter);
        inviter.setInvitedone(null);
        c.getPlayer().setInvite(false);
        c.getPlayer().setInviter(null);
        inviter.getClient().getSession().write(MaplePacketCreator.serverNotice(6, c.getPlayer().getName() +" has accepted your invitation to fight. Get ready to rumble!"));
        for(int x = 3; x > 0; x -= 1) {
        MaplePacket packet = MaplePacketCreator.serverNotice(6, "A fight will start between " + inviter.getName() + " and " + c.getPlayer().getName() + " in " + x + " seconds!");
        try 
        {
            c.getChannelServer().getInstance(c.getChannel()).getWorldInterface().broadcastMessage(c.getPlayer().getName(), packet.getBytes());
            } catch (RemoteException e) {
		c.getChannelServer().reconnectWorld();
            }
        try
        {
            Thread.sleep(1000);
        } catch (Exception e) {} 
        }
        MaplePacket packet = MaplePacketCreator.serverNotice(0, "The fight has started in Channel " + c.getChannel() + ", " + c.getPlayer().getMap().getMapName() + "!");
        try 
        {
            c.getChannelServer().getInstance(c.getChannel()).getWorldInterface().broadcastMessage(c.getPlayer().getName(), packet.getBytes());
            } catch (RemoteException e) {
		c.getChannelServer().reconnectWorld();
            }
        inviter.setPvpMap(c.getPlayer().getMapId());
        c.getPlayer().setPvpMap(c.getPlayer().getMapId());
        inviter.setFighting(true);
        c.getPlayer().setFighting(true);
        packet = MaplePacketCreator.getClock(180);
        c.getPlayer().getMap().broadcastMessage(packet);
        TimerManager.getInstance().schedule(new Runnable() {
            public void run() {
                int playerkills = c.getPlayer().getKill();
                int attackerkills = c.getPlayer().getAttacker().getKill();
                MaplePacket packet;
                if(playerkills > attackerkills) {
                    packet = MaplePacketCreator.serverNotice(0, c.getPlayer().getName() + " has beaten " + c.getPlayer().getAttacker().getName() + ", " + playerkills + " to " + attackerkills + "!");
                    try 
                    {
                        c.getChannelServer().getInstance(c.getChannel()).getWorldInterface().broadcastMessage(c.getPlayer().getName(), packet.getBytes());
                    } catch (RemoteException e) {
                        c.getChannelServer().reconnectWorld();
                    }
                } else if(attackerkills > playerkills) {
                    packet = MaplePacketCreator.serverNotice(0, c.getPlayer().getAttacker().getName() + " has beaten " + c.getPlayer().getName() + ", " + attackerkills + " to " + playerkills + "!");
                    try 
                    {
                        c.getChannelServer().getInstance(c.getChannel()).getWorldInterface().broadcastMessage(c.getPlayer().getName(), packet.getBytes());
                    } catch (RemoteException e) {
                        c.getChannelServer().reconnectWorld();
                    }
                } else {
                    packet = MaplePacketCreator.serverNotice(0, c.getPlayer().getName() + " and " + c.getPlayer().getAttacker().getName() + "have tied!");
                    try 
                    {
                        c.getChannelServer().getInstance(c.getChannel()).getWorldInterface().broadcastMessage(c.getPlayer().getName(), packet.getBytes());
                    } catch (RemoteException e) {
                        c.getChannelServer().reconnectWorld();
                    }
                }
                c.getPlayer().getAttacker().setFighting(false);
                c.getPlayer().setFighting(false);
                c.getPlayer().getAttacker().setPvpMap(999999999);
                c.getPlayer().setPvpMap(999999999);
                c.getPlayer().setKill(0);
                c.getPlayer().getAttacker().setKill(0);
                c.getPlayer().setHp(c.getPlayer().getMaxHp());
                c.getPlayer().setMp(c.getPlayer().getMaxMp());
                c.getPlayer().getAttacker().setHp(c.getPlayer().getAttacker().getMaxHp());
                c.getPlayer().getAttacker().setMp(c.getPlayer().getAttacker().getMaxMp());
                c.getPlayer().updateSingleStat(MapleStat.HP, c.getPlayer().getMaxHp());
                c.getPlayer().updateSingleStat(MapleStat.MP, c.getPlayer().getMaxMp());
                c.getPlayer().getAttacker().updateSingleStat(MapleStat.HP, c.getPlayer().getAttacker().getMaxHp());
                c.getPlayer().getAttacker().updateSingleStat(MapleStat.MP, c.getPlayer().getAttacker().getMaxMp());
                int ellinia = 0;
                int perion = 0;
                int kerning = 0;
                int henesys = 0;
                try
                {
                Connection con = DatabaseConnection.getConnection();
                PreparedStatement ps = con.prepareStatement("SELECT * FROM townpoints");
                ResultSet rs = ps.executeQuery();
                ellinia = rs.getInt("Ellinia");
                perion = rs.getInt("Perion");
                henesys = rs.getInt("Henesys");
                kerning = rs.getInt("Kerning");
                ellinia++;
                perion++;
                henesys++;
                kerning++;
                con.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
                con.setAutoCommit(false);
                if(c.getPlayer().getJob().isA(MapleJob.MAGICIAN) && !c.getPlayer().getAttacker().getJob().isA(MapleJob.MAGICIAN)) {
                ps = con.prepareStatement("UPDATE townpoints SET Ellinia = ?");
                ps.setInt(1, ellinia);
                ps.executeUpdate();
                }
                if(c.getPlayer().getJob().isA(MapleJob.THIEF) && !c.getPlayer().getAttacker().getJob().isA(MapleJob.THIEF)) {
                ps = con.prepareStatement("UPDATE townpoints SET Kerning = ?");
                ps.setInt(1, kerning);
                ps.executeUpdate();
                }
                if(c.getPlayer().getJob().isA(MapleJob.WARRIOR) && !c.getPlayer().getAttacker().getJob().isA(MapleJob.WARRIOR)) {
                ps = con.prepareStatement("UPDATE townpoints SET Perion = ?");
                ps.setInt(1, perion);
                ps.executeUpdate();
                }
                if(c.getPlayer().getJob().isA(MapleJob.BOWMAN) && !c.getPlayer().getAttacker().getJob().isA(MapleJob.BOWMAN)) {
                ps = con.prepareStatement("UPDATE townpoints SET Henesys = ?");
                ps.setInt(1, henesys);
                ps.executeUpdate();
                }
            } catch (Exception e) {}
                c.getPlayer().getAttacker().setAttacker(null);
                c.getPlayer().setAttacker(null);
            }
        }, 180000);
    } else {
        mc.dropMessage("There have not been any invitations sent to you so it is impossible to accept.");
    }
}

Code:
else if(splitted[0].equals("@Withdraw")) {
    if(c.getPlayer().getInvitedone() != null) {
    MapleCharacter invitedone = c.getPlayer().getInvitedone();
    invitedone.setInvite(false);
    invitedone.setInviter(null);
    mc.dropMessage("You have withdrawn your invitation from " + invitedone.getName() + ".");
    invitedone.getClient().getSession().write(MaplePacketCreator.serverNotice(6, c.getPlayer().getName() + " has withdrawn the invitation to fight."));
    c.getPlayer().setInvited(false);
    c.getPlayer().setInvitedone(null);
    } else {
        mc.dropMessage("You have not sent any invitations so it is impossible to withdraw.");
}

Code:
//PVP challenging
        private boolean fighting = false;
        private boolean invite = false;
        private boolean invited = false;
        private MapleCharacter invitedone = null;
        private MapleCharacter inviter = null;
        private MapleCharacter attacker = null;
        private int pvpmapid = 999999999;
        private int kills = 0;
        //PVP end

Code:
//pvp
        public boolean getFighting() {
                return fighting;
        }

Code:
public void setFighting(boolean fighting) {
            this.fighting = fighting;
        }

Code:
public boolean getInvite() {
                return invite;
        }

Code:
public void setInvite(boolean invite) {
            this.invite = invite;
        }

Code:
public MapleCharacter getInviter() {
                return inviter;
        }

Code:
public void setInviter(MapleCharacter inviter) {
            this.inviter = inviter;
        }

Code:
public MapleCharacter getInvitedone() {
                return invitedone;
        }

Code:
public void setInvitedone(MapleCharacter invitedone) {
            this.invitedone = invitedone;
        }

Code:
public boolean getInvited() {
                return invited;
        }

Code:
public void setInvited(boolean invited) {
            this.invited = invited;
        }

UPDATED :ott1:

Bye bye now... Figure out the rest yourselfs! :ott1:
 
Last edited:
PHP:
        for(int x = 3; x > 0; x -= 1) {
        MaplePacket packet = MaplePacketCreator.serverNotice(6, "A fight will start between " + inviter.getName() + " and " + c.getPlayer().getName() + " in " + x + " seconds!");
        try 
        {
            c.getChannelServer().getInstance(c.getChannel()).getWorldInterface().broadcastMessage(c.getPlayer().getName(), packet.getBytes());
            } catch (RemoteException e) {
		c.getChannelServer().reconnectWorld();
            }
        try
        {
            Thread.sleep(1000);
        } catch (Exception e) {} 
        }

lol why would you want to repeat this 3 times in 3 seconds o_____o.
 
Code:
        for(int x = 3; x > 0; x -= 1) {
        MaplePacket packet = MaplePacketCreator.serverNotice(6, "A fight will start between " + inviter.getName() + " and " + c.getPlayer().getName() + " in " + x + " seconds!");
        try 
        {
            c.getChannelServer().getInstance(c.getChannel()).getWorldInterface().broadcastMessage(c.getPlayer().getName(), packet.getBytes());
            } catch (RemoteException e) {
        c.getChannelServer().reconnectWorld();
            }
        try
        {
            Thread.sleep(1000);
        } catch (Exception e) {} 
        }
WHAT THE FUUCK
 
you are sooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo fucking retarded! You saw the thread in the main section and the you planned to release this, which is in ZeroFusion (LEAKED). I doubt this will work, and the PvP in ZeroFusion leaked is not really finish.....AND, you don't just copy the damn commands.
 
you are sooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo fucking retarded! You saw the thread in the main section and the you planned to release this, which is in ZeroFusion (LEAKED). I doubt this will work, and the PvP in ZeroFusion leaked is not really finish.....AND, you don't just copy the damn commands.

lols chill man can you link me to the place he leaked it
 
LOl, This was not in ZeroFusions Leaked source :P. You dont make sence. First you say the his pvp doesnt work... Why would he input those commands then?

Give Evidence that it is leaked from HIS Source.
 
If im not wrong, this is from LooneyMS SRC? Im not sure, But please do not give half-fuck release. It doesnt make sense at all, :)
 
U sure those functions u are using in MapleCharacter exist?
Maybe you should provide the methods u are using.
PHP:
if(challenged.getFighting()) {
u sure u have getFighting function in MapleCharacter?
 
By the way you're missing A LOT just proving how this is mine and how much you Leeched it from my old source. I request this be removed as This is completely ripped off of my old Source Released by GMSinister. If any mod wan't proof please IM me at

AIM: Linux0545
MSN: [email protected]

Code:
        for(int x = 3; x > 0; x -= 1) {
        MaplePacket packet = MaplePacketCreator.serverNotice(6, "A fight will start between " + inviter.getName() + " and " + c.getPlayer().getName() + " in " + x + " seconds!");
        try
        {
            c.getChannelServer().getInstance(c.getChannel()).getWorldInterface().broadcastMessage(c.getPlayer().getName(), packet.getBytes());
            } catch (RemoteException e) {
        c.getChannelServer().reconnectWorld();
            }
        try
        {
            Thread.sleep(1000);
        } catch (Exception e) {}
        }
WHAT THE FUUCK


You're right to say "WTF" but just to let you know this is needed, and I could use this one little thing as a help to prove it's mine.
 
I request this be removed as This is completely ripped off of my old Source Released by GMSinister. If any mod wan't proof please IM me at

AIM: Linux0545
MSN: [email protected]




You're right to say "WTF" but just to let you know this is needed, and I could use this one little thing as a help to prove it's mine.

Making assumptions i see?
 
Back