Players can't add GMs to buddylist

Page 1 of 4 1234 LastLast
Results 1 to 15 of 48
  1. #1
    Account Upgraded | Title Enabled! flav is offline
    MemberRank
    Jul 2008 Join Date
    655Posts

    Players can't add GMs to buddylist

    BuddylistModifyHandler.java
    Add
    Code:
    Connection con = DatabaseConnection.getConnection();
                try {
                    PreparedStatement ps = con.prepareStatement("SELECT * FROM characters WHERE gm > 0 AND name = ?");
                    ps.setString(1, addName);
                    ResultSet rs = ps.executeQuery();
    
                    if (rs.next() && !player.isGM()) {
                        player.dropMessage(1, "Gamemaster is not available as a buddy.");
                        return;
                    }
    
                    rs.close();
                    ps.close();
                } catch (SQLException sqlE) {}
    Under
    Code:
    String addName = slea.readMapleAsciiString();


  2. #2
    Valued Member Shogi is offline
    MemberRank
    Apr 2008 Join Date
    134Posts

    Re: Players can't add GMs to buddylist

    Thanks, that very useful and gms-like :) added!

    C:\Users\אור לייזר\Documents\NetBeansProjects\MapleDev\src\net\sf\odinms\net\channel\handler\BuddylistModifyHandler.java:75: cannot find symbol
    symbol : method isGM()
    location: class net.sf.odinms.client.MapleCharacter
    if (rs.next() && !player.isGM()) {
    C:\Users\אור לייזר\Documents\NetBeansProjects\MapleDev\src\net\sf\odinms\net\channel\handler\BuddylistModifyHandler.java:107: con is already defined in handlePacket(net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor,net.sf.odinms.client.MapleClient)
    Connection con = DatabaseConnection.getConnection();
    C:\Users\אור לייזר\Documents\NetBeansProjects\MapleDev\src\net\sf\odinms\net\channel\handler\BuddylistModifyHandler.java:140: con is already defined in handlePacket(net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor,net.sf.odinms.client.MapleClient)
    Connection con = DatabaseConnection.getConnection();

    3 errors.

  3. #3
    Account Upgraded | Title Enabled! ItzMe is offline
    MemberRank
    Apr 2009 Join Date
    412Posts

    Re: Players can't add GMs to buddylist

    Quote Originally Posted by Shogi View Post
    Thanks, that very useful and gms-like :) added!
    how the fuck can u know its gms-like
    u event dont know a NAME of a GM in global
    nice release btw

  4. #4
    Valued Member Shogi is offline
    MemberRank
    Apr 2008 Join Date
    134Posts

    Re: Players can't add GMs to buddylist

    IN THE BETA VERSION WE KNEW IT, AND EVEN WE U TRY TO ADD GM U CANT, flammer.

  5. #5
    Account Upgraded | Title Enabled! flav is offline
    MemberRank
    Jul 2008 Join Date
    655Posts

    Re: Players can't add GMs to buddylist

    Quote Originally Posted by ItzMe View Post
    how the fuck can u know its gms-like
    u event dont know a NAME of a GM in global
    nice release btw
    Go in Bera and try to add "Bera" to your buddylist and there is also a GM list on the Nexon forums anywhere. If you play EMS try to add "GMMango".


    Quote Originally Posted by Shogi View Post
    C:\Users\אור לייזר\Documents\NetBeansProjects\MapleDev\src\net\sf\odinms\net\channel\handler\BuddylistModifyHandler.java:75: cannot find symbol
    symbol : method isGM()
    location: class net.sf.odinms.client.MapleCharacter
    if (rs.next() && !player.isGM()) {
    C:\Users\אור לייזר\Documents\NetBeansProjects\MapleDev\src\net\sf\odinms\net\channel\handler\BuddylistModifyHandler.java:107: con is already defined in handlePacket(net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor,net.sf.odinms.client.MapleClient)
    Connection con = DatabaseConnection.getConnection();
    C:\Users\אור לייזר\Documents\NetBeansProjects\MapleDev\src\net\sf\odinms\net\channel\handler\BuddylistModifyHandler.java:140: con is already defined in handlePacket(net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor,net.sf.odinms.client.MapleClient)
    Connection con = DatabaseConnection.getConnection();

    3 errors.
    For the first one add this in your MapleCharacter.java :
    Code:
    public boolean isGM() {
            return gmLevel >= 1;
        }
    For the other ones just comment the lines out, it is already defined at top now.

  6. #6
    Valued Member Shogi is offline
    MemberRank
    Apr 2008 Join Date
    134Posts

    Re: Players can't add GMs to buddylist

    PHP Code:
                    PreparedStatement ps con.prepareStatement("SELECT * FROM characters WHERE gm > 0 AND name = ?"); 
    not should be gm > 1 ?

  7. #7
    Account Upgraded | Title Enabled! flav is offline
    MemberRank
    Jul 2008 Join Date
    655Posts

    Re: Players can't add GMs to buddylist

    Quote Originally Posted by Shogi View Post
    PHP Code:
                    PreparedStatement ps con.prepareStatement("SELECT * FROM characters WHERE gm > 0 AND name = ?"); 
    not should be gm > 1 ?
    gm > 1 would mean level 2+ but level 1 is also GM, at least in my source.

  8. #8
    none seryi is offline
    MemberRank
    Apr 2005 Join Date
    Honk KongLocation
    835Posts

    Re: Players can't add GMs to buddylist

    I prefer to make name with symbols.. so they can't PM me either

  9. #9
    Valued Member Shogi is offline
    MemberRank
    Apr 2008 Join Date
    134Posts

    Re: Players can't add GMs to buddylist

    Quote Originally Posted by flav View Post
    gm > 1 would mean level 2+ but level 1 is also GM, at least in my source.
    oh, i get it..
    what to do with the 2 other errors?
    didnt get it..

  10. #10
    Account Upgraded | Title Enabled! CharlieBoy is offline
    MemberRank
    Mar 2009 Join Date
    SwedenLocation
    471Posts

    Re: Players can't add GMs to buddylist

    Quote Originally Posted by ItzMe View Post
    how the fuck can u know its gms-like
    u event dont know a NAME of a GM in global
    nice release btw
    Some one got a bad day or period blood 0.0?
    Or just wanna flame to incresse ur post counte?

  11. #11
    Gamma Xerixe is offline
    MemberRank
    Apr 2008 Join Date
    MalaysiaLocation
    3,605Posts

    Re: Players can't add GMs to buddylist

    Why not just do it this way?
    Its shorter and saves time
    Below
    MapleCharacter otherChar = c.getChannelServer().getPlayerStorage().getCharacterByName(addName);

    Add
    Code:
    if (otherChar.isGM()) {
                            return;
                        }

  12. #12
    Account Upgraded | Title Enabled! flav is offline
    MemberRank
    Jul 2008 Join Date
    655Posts

    Re: Players can't add GMs to buddylist

    Quote Originally Posted by Xerixe View Post
    Why not just do it this way?
    Its shorter and saves time
    Below
    MapleCharacter otherChar = c.getChannelServer().getPlayerStorage().getCharacterByName(addName);

    Add
    Code:
    if (otherChar.isGM()) {
                            return;
                        }
    It has a good reason that I didn't do it like that, what if "otherChar" is offline?

  13. #13
    Account Upgraded | Title Enabled! ItzMe is offline
    MemberRank
    Apr 2009 Join Date
    412Posts

    Re: Players can't add GMs to buddylist

    Quote Originally Posted by CharlieBoy View Post
    Some one got a bad day or period blood 0.0?
    Or just wanna flame to incresse ur post counte?
    both lawl
    xDD

    EDIT: i was accepted as a gm for TropixStory
    and than they say im declined -.-

  14. #14
    Xephizion Development Ehab is offline
    MemberRank
    Apr 2008 Join Date
    Somewhere I BelLocation
    1,935Posts

    Re: Players can't add GMs to buddylist

    good release
    gonna test now.

  15. #15
    Account Upgraded | Title Enabled! ProGamerForLife is offline
    MemberRank
    Sep 2008 Join Date
    iTouchMsLocation
    1,195Posts

    Re: Players can't add GMs to buddylist

    Meh
    i know some gms in bera
    and well those niggas wont accept me =[
    so this is gms alike =[



Page 1 of 4 1234 LastLast

Advertisement