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/TeleportToFantasy/TeleportToFantasy.java

    r8487 r8630  
    1919import javolution.util.FastMap; 
    2020 
     21import com.l2jserver.gameserver.model.Location; 
    2122import com.l2jserver.gameserver.model.actor.L2Npc; 
    2223import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; 
     
    2829 
    2930/** 
    30  * @author Plim 
    31  * Original python script by Kerberos 
     31 * @author Plim Original python script by Kerberos 
    3232 */ 
    3333public class TeleportToFantasy extends Quest 
     
    3636        private static final Map<Integer, Integer> TELEPORTERS = new FastMap<Integer, Integer>(); 
    3737         
    38         private static final int[][] RETURN_LOCS =  
     38        private static final Location[] RETURN_LOCS = 
    3939        { 
    40                 {-80826,149775,-3043}, 
    41                 {-12672,122776,-3116}, 
    42                 {15670,142983,-2705}, 
    43                 {83400,147943,-3404}, 
    44                 {111409,219364,-3545}, 
    45                 {82956,53162,-1495}, 
    46                 {146331,25762,-2018}, 
    47                 {116819,76994,-2714}, 
    48                 {43835,-47749,-792}, 
    49                 {147930,-55281,-2728}, 
    50                 {87386,-143246,-1293}, 
    51                 {12882,181053,-3560} 
     40                new Location(-80826, 149775, -3043), 
     41                new Location(-12672, 122776, -3116), 
     42                new Location(15670, 142983, -2705), 
     43                new Location(83400, 147943, -3404), 
     44                new Location(111409, 219364, -3545), 
     45                new Location(82956, 53162, -1495), 
     46                new Location(146331, 25762, -2018), 
     47                new Location(116819, 76994, -2714), 
     48                new Location(43835, -47749, -792), 
     49                new Location(147930, -55281, -2728), 
     50                new Location(87386, -143246, -1293), 
     51                new Location(12882, 181053, -3560) 
    5252        }; 
    5353         
    54         private static final int[][] ISLE_LOCS =  
     54        private static final Location[] ISLE_LOCS = 
    5555        { 
    56                 {-58752,-56898,-2032}, 
    57                 {-59716,-57868,-2032}, 
    58                 {-60691,-56893,-2032}, 
    59                 {-59720,-55921,-2032} 
     56                new Location(-58752, -56898, -2032), 
     57                new Location(-59716, -57868, -2032), 
     58                new Location(-60691, -56893, -2032), 
     59                new Location(-59720, -55921, -2032) 
    6060        }; 
    6161         
     
    7373                        int random_id = st.getRandom(ISLE_LOCS.length); 
    7474                         
    75                         st.getPlayer().teleToLocation(ISLE_LOCS[random_id][0], ISLE_LOCS[random_id][1], ISLE_LOCS[random_id][2]); 
     75                        player.teleToLocation(ISLE_LOCS[random_id], false); 
    7676                        st.setState(State.STARTED); 
    7777                        st.set("id", String.valueOf(TELEPORTERS.get(npc.getNpcId()))); 
     
    8383                        { 
    8484                                int return_id = st.getInt("id") - 1; 
    85                         st.getPlayer().teleToLocation(RETURN_LOCS[return_id][0],RETURN_LOCS[return_id][1],RETURN_LOCS[return_id][2]); 
    86                         st.unset("id"); 
     85                                player.teleToLocation(RETURN_LOCS[return_id], false); 
     86                                st.unset("id"); 
    8787                        } 
    8888                         
    8989                        else 
    9090                        { 
    91                                 player.sendPacket(new NpcSay(npc.getObjectId(),0,npc.getNpcId(),NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_ILL_BE_SENDING_YOU_BACK_TO_RUNE_TOWNSHIP_WHICH_IS_THE_NEAREST_TOWN)); 
    92                         st.getPlayer().teleToLocation(43835,-47749,-792); 
     91                                player.sendPacket(new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), NpcStringId.IF_YOUR_MEANS_OF_ARRIVAL_WAS_A_BIT_UNCONVENTIONAL_THEN_ILL_BE_SENDING_YOU_BACK_TO_RUNE_TOWNSHIP_WHICH_IS_THE_NEAREST_TOWN)); 
     92                                player.teleToLocation(43835, -47749, -792); 
    9393                        } 
    9494                         
     
    102102        { 
    103103                super(questId, name, descr); 
    104  
    105                 TELEPORTERS.put(30059, 3); //TRISHA 
    106                 TELEPORTERS.put(30080, 4); //CLARISSA 
    107                 TELEPORTERS.put(30177, 6); //VALENTIA 
    108                 TELEPORTERS.put(30233, 8); //ESMERALDA 
    109                 TELEPORTERS.put(30256, 2); //BELLA 
    110                 TELEPORTERS.put(30320, 1); //RICHLIN 
    111                 TELEPORTERS.put(30848, 7); //ELISA 
    112                 TELEPORTERS.put(30899, 5); //FLAUEN 
    113                 TELEPORTERS.put(31320, 9); //ILYANA 
    114                 TELEPORTERS.put(31275, 10); //TATIANA 
    115                 TELEPORTERS.put(31964, 11); //BILIA 
     104                 
     105                TELEPORTERS.put(30059, 3); // TRISHA 
     106                TELEPORTERS.put(30080, 4); // CLARISSA 
     107                TELEPORTERS.put(30177, 6); // VALENTIA 
     108                TELEPORTERS.put(30233, 8); // ESMERALDA 
     109                TELEPORTERS.put(30256, 2); // BELLA 
     110                TELEPORTERS.put(30320, 1); // RICHLIN 
     111                TELEPORTERS.put(30848, 7); // ELISA 
     112                TELEPORTERS.put(30899, 5); // FLAUEN 
     113                TELEPORTERS.put(31320, 9); // ILYANA 
     114                TELEPORTERS.put(31275, 10); // TATIANA 
     115                TELEPORTERS.put(31964, 11); // BILIA 
    116116                 
    117117                for (int npcId : TELEPORTERS.keySet()) 
Note: See TracChangeset for help on using the changeset viewer.