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/teleports/OracleTeleport/OracleTeleport.java

    r8406 r8630  
    1515package teleports.OracleTeleport; 
    1616 
     17import com.l2jserver.gameserver.model.Location; 
    1718import com.l2jserver.gameserver.model.actor.L2Npc; 
    1819import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; 
     20import com.l2jserver.gameserver.model.itemcontainer.PcInventory; 
    1921import com.l2jserver.gameserver.model.quest.Quest; 
    2022import com.l2jserver.gameserver.model.quest.QuestState; 
    2123import com.l2jserver.gameserver.model.quest.State; 
    2224import com.l2jserver.gameserver.network.SystemMessageId; 
    23 import com.l2jserver.gameserver.network.serverpackets.SystemMessage; 
    2425import com.l2jserver.gameserver.util.Util; 
    2526 
     
    2829        private final static int[] TOWN_DAWN = 
    2930        { 
    30                 31078,31079,31080,31081,31083,31084,31082,31692,31694,31997,31168 
     31                31078, 31079, 31080, 31081, 31083, 31084, 31082, 31692, 31694, 31997, 31168 
    3132        }; 
    3233         
    3334        private final static int[] TOWN_DUSK = 
    3435        { 
    35                 31085,31086,31087,31088,31090,31091,31089,31693,31695,31998,31169 
     36                31085, 31086, 31087, 31088, 31090, 31091, 31089, 31693, 31695, 31998, 31169 
    3637        }; 
    3738         
    3839        private final static int[] TEMPLE_PRIEST = 
    3940        { 
    40                 31127,31128,31129,31130,31131,31137,31138,31139,31140,31141 
     41                31127, 31128, 31129, 31130, 31131, 31137, 31138, 31139, 31140, 31141 
    4142        }; 
    4243         
    4344        private final static int[] RIFT_POSTERS = 
    4445        { 
    45                 31488,31489,31490,31491,31492,31493 
     46                31488, 31489, 31490, 31491, 31492, 31493 
    4647        }; 
    4748         
    4849        private final static int[] TELEPORTERS = 
    4950        { 
    50                 31078,31079,31080,31081,31082,31083,31084,31692,31694,31997,31168, 
    51                 31085,31086,31087,31088,31089,31090,31091,31693,31695,31998,31169, 
    52                 31494,31495,31496,31497,31498,31499,31500,31501,31502,31503,31504, 
    53                 31505,31506,31507,31095,31096,31097,31098,31099,31100,31101,31102, 
    54                 31103,31104,31105,31106,31107,31108,31109,31110,31114,31115,31116, 
    55                 31117,31118,31119,31120,31121,31122,31123,31124,31125 
    56         }; 
    57          
    58         private final static int[][] RETURN_LOCS = 
    59         { 
    60                 {-80555,150337,-3040},{-13953,121404,-2984},{16354,142820,-2696},{83369,149253,-3400}, 
    61                 {111386,220858,-3544},{83106,53965,-1488},{146983,26595,-2200},{148256,-55454,-2779}, 
    62                 {45664,-50318,-800},{86795,-143078,-1341},{115136,74717,-2608},{-82368,151568,-3120}, 
    63                 {-14748,123995,-3112},{18482,144576,-3056},{81623,148556,-3464},{112486,220123,-3592}, 
    64                 {82819,54607,-1520},{147570,28877,-2264},{149888,-56574,-2979},{44528,-48370,-800}, 
    65                 {85129,-142103,-1542},{116642,77510,-2688},{-41572,209731,-5087},{-52872,-250283,-7908}, 
    66                 {45256,123906,-5411},{46192,170290,-4981},{111273,174015,-5437},{-20604,-250789,-8165}, 
    67                 {-21726, 77385,-5171},{140405, 79679,-5427},{-52366, 79097,-4741},{118311,132797,-4829}, 
    68                 {172185,-17602,-4901},{ 83000,209213,-5439},{-19500, 13508,-4901},{12525, -248496,-9580}, 
    69                 {-41561,209225,-5087},{45242,124466,-5413},{110711,174010,-5439},{-22341,77375,-5173}, 
    70                 {-52889,79098,-4741},{117760,132794,-4831},{171792,-17609,-4901},{82564,209207,-5439}, 
    71                 {-41565,210048,-5085},{45278,123608,-5411},{111510,174013,-5437},{-21489,77372,-5171}, 
    72                 {-52016,79103,-4739},{118557,132804,-4829},{172570,-17605,-4899},{83347,209215,-5437}, 
    73                 {42495,143944,-5381},{45666,170300,-4981},{77138,78389,-5125},{139903,79674,-5429}, 
    74                 {-20021,13499,-4901},{113418,84535,-6541},{-52940,-250272,-7907},{46499,170301,-4979}, 
    75                 {-20280,-250785,-8163},{140673,79680,-5437},{-19182,13503,-4899},{12837,-248483,-9579} 
     51                31078, 
     52                31079, 
     53                31080, 
     54                31081, 
     55                31082, 
     56                31083, 
     57                31084, 
     58                31692, 
     59                31694, 
     60                31997, 
     61                31168, 
     62                31085, 
     63                31086, 
     64                31087, 
     65                31088, 
     66                31089, 
     67                31090, 
     68                31091, 
     69                31693, 
     70                31695, 
     71                31998, 
     72                31169, 
     73                31494, 
     74                31495, 
     75                31496, 
     76                31497, 
     77                31498, 
     78                31499, 
     79                31500, 
     80                31501, 
     81                31502, 
     82                31503, 
     83                31504, 
     84                31505, 
     85                31506, 
     86                31507, 
     87                31095, 
     88                31096, 
     89                31097, 
     90                31098, 
     91                31099, 
     92                31100, 
     93                31101, 
     94                31102, 
     95                31103, 
     96                31104, 
     97                31105, 
     98                31106, 
     99                31107, 
     100                31108, 
     101                31109, 
     102                31110, 
     103                31114, 
     104                31115, 
     105                31116, 
     106                31117, 
     107                31118, 
     108                31119, 
     109                31120, 
     110                31121, 
     111                31122, 
     112                31123, 
     113                31124, 
     114                31125 
     115        }; 
     116         
     117        private final static Location[] RETURN_LOCS = 
     118        { 
     119                new Location(-80555, 150337, -3040), 
     120                new Location(-13953, 121404, -2984), 
     121                new Location(16354, 142820, -2696), 
     122                new Location(83369, 149253, -3400), 
     123                new Location(111386, 220858, -3544), 
     124                new Location(83106, 53965, -1488), 
     125                new Location(146983, 26595, -2200), 
     126                new Location(148256, -55454, -2779), 
     127                new Location(45664, -50318, -800), 
     128                new Location(86795, -143078, -1341), 
     129                new Location(115136, 74717, -2608), 
     130                new Location(-82368, 151568, -3120), 
     131                new Location(-14748, 123995, -3112), 
     132                new Location(18482, 144576, -3056), 
     133                new Location(81623, 148556, -3464), 
     134                new Location(112486, 220123, -3592), 
     135                new Location(82819, 54607, -1520), 
     136                new Location(147570, 28877, -2264), 
     137                new Location(149888, -56574, -2979), 
     138                new Location(44528, -48370, -800), 
     139                new Location(85129, -142103, -1542), 
     140                new Location(116642, 77510, -2688), 
     141                new Location(-41572, 209731, -5087), 
     142                new Location(-52872, -250283, -7908), 
     143                new Location(45256, 123906, -5411), 
     144                new Location(46192, 170290, -4981), 
     145                new Location(111273, 174015, -5437), 
     146                new Location(-20604, -250789, -8165), 
     147                new Location(-21726, 77385, -5171), 
     148                new Location(140405, 79679, -5427), 
     149                new Location(-52366, 79097, -4741), 
     150                new Location(118311, 132797, -4829), 
     151                new Location(172185, -17602, -4901), 
     152                new Location(83000, 209213, -5439), 
     153                new Location(-19500, 13508, -4901), 
     154                new Location(12525, -248496, -9580), 
     155                new Location(-41561, 209225, -5087), 
     156                new Location(45242, 124466, -5413), 
     157                new Location(110711, 174010, -5439), 
     158                new Location(-22341, 77375, -5173), 
     159                new Location(-52889, 79098, -4741), 
     160                new Location(117760, 132794, -4831), 
     161                new Location(171792, -17609, -4901), 
     162                new Location(82564, 209207, -5439), 
     163                new Location(-41565, 210048, -5085), 
     164                new Location(45278, 123608, -5411), 
     165                new Location(111510, 174013, -5437), 
     166                new Location(-21489, 77372, -5171), 
     167                new Location(-52016, 79103, -4739), 
     168                new Location(118557, 132804, -4829), 
     169                new Location(172570, -17605, -4899), 
     170                new Location(83347, 209215, -5437), 
     171                new Location(42495, 143944, -5381), 
     172                new Location(45666, 170300, -4981), 
     173                new Location(77138, 78389, -5125), 
     174                new Location(139903, 79674, -5429), 
     175                new Location(-20021, 13499, -4901), 
     176                new Location(113418, 84535, -6541), 
     177                new Location(-52940, -250272, -7907), 
     178                new Location(46499, 170301, -4979), 
     179                new Location(-20280, -250785, -8163), 
     180                new Location(140673, 79680, -5437), 
     181                new Location(-19182, 13503, -4899), 
     182                new Location(12837, -248483, -9579) 
    76183        }; 
    77184         
     
    117224                        if (Util.contains(TEMPLE_PRIEST, npcId) && st.getState() == State.STARTED) 
    118225                        { 
    119                                 int x = RETURN_LOCS[st.getInt("id")][0]; 
    120                                 int y = RETURN_LOCS[st.getInt("id")][1]; 
    121                                 int z = RETURN_LOCS[st.getInt("id")][2]; 
    122                                 player.teleToLocation(x, y, z); 
     226                                Location loc = RETURN_LOCS[st.getInt("id")]; 
     227                                player.teleToLocation(loc, false); 
    123228                                player.setIsIn7sDungeon(false); 
    124229                                st.exitQuest(true); 
     
    126231                        else if (Util.contains(RIFT_POSTERS, npcId) && st.getState() == State.STARTED) 
    127232                        { 
    128                                 int x = RETURN_LOCS[st.getInt("id")][0]; 
    129                                 int y = RETURN_LOCS[st.getInt("id")][1]; 
    130                                 int z = RETURN_LOCS[st.getInt("id")][2]; 
    131                                 player.teleToLocation(x, y, z); 
     233                                Location loc = RETURN_LOCS[st.getInt("id")]; 
     234                                player.teleToLocation(loc, false); 
    132235                                htmltext = "rift_back.htm"; 
    133236                                st.exitQuest(true); 
     
    275378                        else if (player.getAllActiveQuests().length > 40) 
    276379                        { 
    277                                 player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.TOO_MANY_QUESTS)); 
     380                                player.sendPacket(SystemMessageId.TOO_MANY_QUESTS); 
    278381                                st.exitQuest(true); 
    279382                        } 
     
    283386                                st.exitQuest(true); 
    284387                        } 
    285                         else if (playerLevel >= 20 && playerLevel < 30 && st.getQuestItemsCount(57) < 2000) 
    286                         { 
    287                                 htmltext = "ziggurat_noadena.htm"; 
    288                                 st.exitQuest(true); 
    289                         } 
    290                         else if (playerLevel >= 30 && playerLevel < 40 && st.getQuestItemsCount(57) < 4500) 
    291                         { 
    292                                 htmltext = "ziggurat_noadena.htm"; 
    293                                 st.exitQuest(true); 
    294                         } 
    295                         else if (playerLevel >= 40 && playerLevel < 50 && st.getQuestItemsCount(57) < 8000) 
    296                         { 
    297                                 htmltext = "ziggurat_noadena.htm"; 
    298                                 st.exitQuest(true); 
    299                         } 
    300                         else if (playerLevel >= 50 && playerLevel < 60 && st.getQuestItemsCount(57) < 12500) 
    301                         { 
    302                                 htmltext = "ziggurat_noadena.htm"; 
    303                                 st.exitQuest(true); 
    304                         } 
    305                         else if (playerLevel >= 60 && playerLevel < 70 && st.getQuestItemsCount(57) < 18000) 
    306                         { 
    307                                 htmltext = "ziggurat_noadena.htm"; 
    308                                 st.exitQuest(true); 
    309                         } 
    310                         else if (playerLevel >= 70 && st.getQuestItemsCount(57) < 24500) 
     388                        else if (playerLevel >= 20 && playerLevel < 30 && st.getQuestItemsCount(PcInventory.ADENA_ID) < 2000) 
     389                        { 
     390                                htmltext = "ziggurat_noadena.htm"; 
     391                                st.exitQuest(true); 
     392                        } 
     393                        else if (playerLevel >= 30 && playerLevel < 40 && st.getQuestItemsCount(PcInventory.ADENA_ID) < 4500) 
     394                        { 
     395                                htmltext = "ziggurat_noadena.htm"; 
     396                                st.exitQuest(true); 
     397                        } 
     398                        else if (playerLevel >= 40 && playerLevel < 50 && st.getQuestItemsCount(PcInventory.ADENA_ID) < 8000) 
     399                        { 
     400                                htmltext = "ziggurat_noadena.htm"; 
     401                                st.exitQuest(true); 
     402                        } 
     403                        else if (playerLevel >= 50 && playerLevel < 60 && st.getQuestItemsCount(PcInventory.ADENA_ID) < 12500) 
     404                        { 
     405                                htmltext = "ziggurat_noadena.htm"; 
     406                                st.exitQuest(true); 
     407                        } 
     408                        else if (playerLevel >= 60 && playerLevel < 70 && st.getQuestItemsCount(PcInventory.ADENA_ID) < 18000) 
     409                        { 
     410                                htmltext = "ziggurat_noadena.htm"; 
     411                                st.exitQuest(true); 
     412                        } 
     413                        else if (playerLevel >= 70 && st.getQuestItemsCount(PcInventory.ADENA_ID) < 24500) 
    311414                        { 
    312415                                htmltext = "ziggurat_noadena.htm"; 
Note: See TracChangeset for help on using the changeset viewer.