Ignore:
Timestamp:
Jan 16, 2012 7:56:19 AM (4 months ago)
Author:
MELERIX
Message:

STABLE: Sync with BETA [8629]

Location:
trunk/L2J_DataPack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/L2J_DataPack

  • trunk/L2J_DataPack/dist/game/data/scripts/custom/MissQueen/MissQueen.java

    r8406 r8630  
    3838 
    3939        // enable/disable coupon give 
    40         private static final boolean QUEEN_ENABLED = false; 
     40        private static boolean QUEEN_ENABLED = false; 
    4141        // Newbie/one time rewards section 
    4242        // Any quest should rely on a unique bit, but 
     
    6666                 
    6767                if (!QUEEN_ENABLED) 
     68                { 
    6869                        return htmltext; 
    69                 else 
     70                } 
     71                 
     72                QuestState st = player.getQuestState(qn); 
     73                int newbie = player.getNewbie(); 
     74                int level = player.getLevel(); 
     75                int occupation_level = player.getClassId().level(); 
     76                int pkkills = player.getPkKills(); 
     77                if (event.equals("newbie_give_coupon")) 
    7078                { 
    71                         QuestState st = player.getQuestState(qn); 
    72                         int newbie = player.getNewbie(); 
    73                         int level = player.getLevel(); 
    74                         int occupation_level = player.getClassId().level(); 
    75                         int pkkills = player.getPkKills(); 
    76                         if (event.equals("newbie_give_coupon")) 
     79                        /* 
     80                         * TODO: check if this is the very first character for this account would need a bit of SQL, or a core method to determine it. This condition should be stored by the core in the account_data table upon character creation. 
     81                         */ 
     82                        if (level >= 6 && level <= 25 && pkkills == 0 && occupation_level == 0) 
    7783                        { 
    78                                 /* 
    79                                  * TODO: check if this is the very first charactr for this account would need a bit of SQL, or a core method to determine it. This condition should be stored by the core in the account_data table upon character creation. 
    80                                  */ 
    81                                 if (level >= 6 && level <= 25 && pkkills == 0 && occupation_level == 0) 
     84                                if ((newbie | NEWBIE_REWARD) != newbie) 
    8285                                { 
    83                                         if ((newbie | NEWBIE_REWARD) != newbie) 
    84                                         { 
    85                                                 player.setNewbie(newbie | NEWBIE_REWARD); 
    86                                                 st.giveItems(COUPNE_ONE, 1); 
    87                                                 htmltext = "31760-2.htm"; // here's the coupon you requested 
    88                                         } 
    89                                         else 
    90                                                 htmltext = "31760-1.htm"; // you got a coupon already! 
     86                                        player.setNewbie(newbie | NEWBIE_REWARD); 
     87                                        st.giveItems(COUPNE_ONE, 1); 
     88                                        htmltext = "31760-2.htm"; // here's the coupon you requested 
    9189                                } 
    9290                                else 
    93                                         htmltext = "31760-3.htm"; // you're not eligible to get a coupon (level caps, pkkills or already changed class) 
     91                                        htmltext = "31760-1.htm"; // you got a coupon already! 
    9492                        } 
    95                         else if (event.equals("traveller_give_coupon")) 
    96                         { 
    97                                 if (level >= 6 && level <= 25 && pkkills == 0 && occupation_level == 1) 
    98                                 { // check the player state against this quest newbie rewarding mark. 
    99                                         if ((newbie | TRAVELER_REWARD) != newbie) 
    100                                         { 
    101                                                 player.setNewbie(newbie | TRAVELER_REWARD); 
    102                                                 st.giveItems(COUPNE_TWO, 1); 
    103                                                 htmltext = "31760-5.htm"; // here's the coupon you requested 
    104                                         } 
    105                                         else 
    106                                                 htmltext = "31760-4.htm"; // you got a coupon already! 
     93                        else 
     94                                htmltext = "31760-3.htm"; // you're not eligible to get a coupon (level caps, pkkills or already changed class) 
     95                } 
     96                else if (event.equals("traveller_give_coupon")) 
     97                { 
     98                        if (level >= 6 && level <= 25 && pkkills == 0 && occupation_level == 1) 
     99                        { // check the player state against this quest newbie rewarding mark. 
     100                                if ((newbie | TRAVELER_REWARD) != newbie) 
     101                                { 
     102                                        player.setNewbie(newbie | TRAVELER_REWARD); 
     103                                        st.giveItems(COUPNE_TWO, 1); 
     104                                        htmltext = "31760-5.htm"; // here's the coupon you requested 
    107105                                } 
    108106                                else 
    109                                         htmltext = "31760-6.htm"; // you're not eligible to get a coupon (level caps, pkkills or already changed class) 
     107                                        htmltext = "31760-4.htm"; // you got a coupon already! 
    110108                        } 
    111                          
    112                         return htmltext; 
     109                        else 
     110                                htmltext = "31760-6.htm"; // you're not eligible to get a coupon (level caps, pkkills or already changed class) 
    113111                } 
     112                 
     113                return htmltext; 
    114114        } 
    115115 
     
    119119                QuestState st = player.getQuestState(qn); 
    120120                if (st == null) 
    121                         st = this.newQuestState(player); 
     121                        st = newQuestState(player); 
    122122                return "31760.htm"; 
    123123        } 
Note: See TracChangeset for help on using the changeset viewer.