HomeHome  ­FAQFAQ  ­SearchSearch  ­MemberlistMemberlist  ­UsergroupsUsergroups  ­RegisterRegister  ­Log inLog in  
Post new topic   Reply to topicShare | 
 

 Donation Points system

View previous topic View next topic Go down 
AuthorMessage
Flav



Posts: 24
Join date: 2008-08-16

PostSubject: Donation Points system   Sat Aug 16, 2008 8:00 pm

Open MapleCharacter.java and add
Code:
   private int donationpoints;

after
Code:
   private int gifttokens;

add
Code:
         ret.donationpoints = rs.getInt("donationpoints");

after
Code:
         ret.gifttokens = rs.getInt("gTokens");

(You have to do this two times, if you can't fine the line two times you should first use this : http://odindeveloping.forumotion.net/guides-f3/fix-disapearing-nx-cash-maple-points-and-gift-tokens-t7.htm)
replace
Code:
         ps = con.prepareStatement("UPDATE accounts SET `nxCash` = ?, `mPoints` = ?, `gTokens` = ? WHERE id = ?");

with
Code:
         ps = con.prepareStatement("UPDATE accounts SET `nxCash` = ?, `mPoints` = ?, `gTokens` = ?, `donationpoints` = ? WHERE id = ?");

replace
Code:
         ps.setInt(3, gifttokens);
         ps.setInt(4, client.getAccID());

with
Code:
         ps.setInt(3, gifttokens);
         ps.setInt(4, donationpoints);
         ps.setInt(5, client.getAccID());

add
Code:
   public int getDonationPoints() {
            return donationpoints;
   }
     
        public void gainDonationPoints(int donationpoints) {
            this.donationpoints += donationpoints;
        }
     
        public void setDonationPoints(int donationpoints) {
            this.donationpoints = donationpoints;
        }

after
Code:
   public int getNX() {
          return nxcash;
   }


Open NPCConversationManager.java and add
Code:
   public int getDonationPoints() {
      return getPlayer().getDonationPoints();
   }

   public void gainDonationPoints(int donationpoints) {
                getPlayer().gainDonationPoints(donationpoints);
        }
       
        public void setDonationPoints(int donationpoints) {
            getPlayer().setDonationPoints(donationpoints);
        }

before the last bracket.

Open MySQL and execute
Code:
ALTER TABLE `accounts` ADD COLUMN `donationpoints` int(11) NOT NULL DEFAULT '0';



The NPC commands are
Code:
cm.getDonationPoints()
cm.gainDonationPoints()
cm.setDonationPoints()
Back to top Go down
View user profile
f1r3



Posts: 17
Join date: 2008-08-18

PostSubject: Re: Donation Points system   Mon Aug 18, 2008 10:52 am

nice!!! my developer worked on that
Back to top Go down
View user profile
 

Donation Points system

View previous topic View next topic Back to top 
Page 1 of 1

Permissions of this forum:You cannot reply to topics in this forum
 :: OdinMS :: Releases-
Post new topic   Reply to topic