Jump to content

Question

3 answers to this question

Recommended Posts

  • 0
Posted

You haven't add the configs.

Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 5)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -223,6 +223,34 @@
    public static int ALT_FISH_CHAMPIONSHIP_REWARD_5;
   
    // --------------------------------------------------
+   // Events settings
+   // --------------------------------------------------
+   public static boolean TVT_EVENT_ENABLED;
+   public static int TVT_EVENT_INTERVAL;
+   public static int TVT_EVENT_PARTICIPATION_TIME;
+   public static int TVT_EVENT_RUNNING_TIME;
+   public static int TVT_EVENT_PARTICIPATION_NPC_ID;
+   public static int TVT_EVENT_MIN_PLAYERS_IN_TEAMS;
+   public static int TVT_EVENT_MAX_PLAYERS_IN_TEAMS;
+   public static int TVT_EVENT_RESPAWN_TELEPORT_DELAY;
+   public static int TVT_EVENT_START_LEAVE_TELEPORT_DELAY;
+   public static String TVT_EVENT_TEAM_1_NAME;
+   public static int[] TVT_EVENT_BACK_COORDINATES = new int[3];
+   public static int[] TVT_EVENT_TEAM_1_COORDINATES = new int[3];
+   public static String TVT_EVENT_TEAM_2_NAME;
+   public static int[] TVT_EVENT_TEAM_2_COORDINATES = new int[3];
+   public static List<int[]> TVT_EVENT_REWARDS = new ArrayList<>();
+   public static boolean TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED;
+   public static boolean TVT_EVENT_POTIONS_ALLOWED;
+   public static boolean TVT_EVENT_SUMMON_BY_ITEM_ALLOWED;
+   public static List<Integer> TVT_EVENT_DOOR_IDS = new ArrayList<>();
+   public static byte TVT_EVENT_MIN_LVL;
+   public static byte TVT_EVENT_MAX_LVL;
+   public static boolean TVT_EVENT_REMOVE_BUFFS;
+   public static boolean TVT_EVENT_HEAL_PLAYERS;
+   public static boolean TVT_KILLS_REWARD_ENABLED;
+   public static List<int[]> TVT_KILLS_REWARD = new ArrayList<>();
+  
+   // --------------------------------------------------
    // GeoEngine
    // --------------------------------------------------
   
@@ -843,6 +871,142 @@
            ALT_FISH_CHAMPIONSHIP_REWARD_4 = events.getProperty("AltFishChampionshipReward4", 200000);
            ALT_FISH_CHAMPIONSHIP_REWARD_5 = events.getProperty("AltFishChampionshipReward5", 100000);
           
+           TVT_EVENT_ENABLED = events.getProperty("TvTEventEnabled", false);
+           TVT_EVENT_INTERVAL = events.getProperty("TvTEventInterval", 18000);
+           TVT_EVENT_PARTICIPATION_TIME = events.getProperty("TvTEventParticipationTime", 3600);
+           TVT_EVENT_RUNNING_TIME = events.getProperty("TvTEventRunningTime", 1800);
+           TVT_EVENT_PARTICIPATION_NPC_ID = events.getProperty("TvTEventParticipationNpcId", 0);
+           TVT_EVENT_REMOVE_BUFFS = events.getProperty("TvTEventRemoveBuffs", false);
+           TVT_KILLS_REWARD_ENABLED = events.getProperty("TvTKillsRewardEnable", false);
+           TVT_EVENT_HEAL_PLAYERS = events.getProperty("TvTHealPlayersEnable", false);
+          
+           if (TVT_EVENT_PARTICIPATION_NPC_ID == 0)
+           {
+               TVT_EVENT_ENABLED = false;
+               System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcId");
+           }
+           else
+           {
+               String[] propertySplit = events.getProperty("TvTEventParticipationNpcCoordinates", "0,0,0").split(",");
+              
+               if (propertySplit.length < 3)
+               {
+                   TVT_EVENT_ENABLED = false;
+                   System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventParticipationNpcCoordinates");
+               }
+               else
+               {
+                   TVT_EVENT_BACK_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
+                   TVT_EVENT_BACK_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
+                   TVT_EVENT_BACK_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
+                  
+                   TVT_EVENT_MIN_PLAYERS_IN_TEAMS = Integer.parseInt(events.getProperty("TvTEventMinPlayersInTeams", "1"));
+                   TVT_EVENT_MAX_PLAYERS_IN_TEAMS = Integer.parseInt(events.getProperty("TvTEventMaxPlayersInTeams", "20"));
+                   TVT_EVENT_MIN_LVL = (byte) Integer.parseInt(events.getProperty("TvTEventMinPlayerLevel", "1"));
+                   TVT_EVENT_MAX_LVL = (byte) Integer.parseInt(events.getProperty("TvTEventMaxPlayerLevel", "80"));
+                   TVT_EVENT_RESPAWN_TELEPORT_DELAY = Integer.parseInt(events.getProperty("TvTEventRespawnTeleportDelay", "20"));
+                   TVT_EVENT_START_LEAVE_TELEPORT_DELAY = Integer.parseInt(events.getProperty("TvTEventStartLeaveTeleportDelay", "20"));
+                  
+                   TVT_EVENT_TEAM_1_NAME = events.getProperty("TvTEventTeam1Name", "Team1");
+                   propertySplit = events.getProperty("TvTEventTeam1Coordinates", "0,0,0").split(",");
+                  
+                   if (propertySplit.length < 3)
+                   {
+                       TVT_EVENT_ENABLED = false;
+                       System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam1Coordinates");
+                   }
+                   else
+                   {
+                       TVT_EVENT_TEAM_1_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
+                       TVT_EVENT_TEAM_1_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
+                       TVT_EVENT_TEAM_1_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
+                      
+                       TVT_EVENT_TEAM_2_NAME = events.getProperty("TvTEventTeam2Name", "Team2");
+                       propertySplit = events.getProperty("TvTEventTeam2Coordinates", "0,0,0").split(",");
+                      
+                       if (propertySplit.length < 3)
+                       {
+                           TVT_EVENT_ENABLED = false;
+                           System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventTeam2Coordinates");
+                       }
+                       else
+                       {
+                           TVT_EVENT_TEAM_2_COORDINATES[0] = Integer.parseInt(propertySplit[0]);
+                           TVT_EVENT_TEAM_2_COORDINATES[1] = Integer.parseInt(propertySplit[1]);
+                           TVT_EVENT_TEAM_2_COORDINATES[2] = Integer.parseInt(propertySplit[2]);
+                           propertySplit = events.getProperty("TvTEventReward", "57,100000").split(";");
+                          
+                           for (String reward : propertySplit)
+                           {
+                               String[] rewardSplit = reward.split(",");
+                              
+                               if (rewardSplit.length != 2)
+                                   System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"" + reward + "\"");
+                               else
+                               {
+                                   try
+                                   {
+                                       TVT_EVENT_REWARDS.add(new int[]
+                                       {
+                                           Integer.valueOf(rewardSplit[0]),
+                                           Integer.valueOf(rewardSplit[1])
+                                       });
+                                   }
+                                   catch (NumberFormatException nfe)
+                                   {
+                                       if (!reward.equals(""))
+                                           System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"" + reward + "\"");
+                                   }
+                               }
+                           }
+                          
+                           propertySplit = events.getProperty("TvTKillsReward", "57,100000").split(";");
+                          
+                           for (String rewardKills : propertySplit)
+                           {
+                               String[] rewardSplit = rewardKills.split(",");
+                              
+                               if (rewardSplit.length != 2)
+                                   System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"" + rewardKills + "\"");
+                               else
+                               {
+                                   try
+                                   {
+                                       TVT_KILLS_REWARD.add(new int[]
+                                       {
+                                           Integer.valueOf(rewardSplit[0]),
+                                           Integer.valueOf(rewardSplit[1])
+                                       });
+                                   }
+                                   catch (NumberFormatException nfe)
+                                   {
+                                       if (!rewardKills.equals(""))
+                                           System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventReward \"" + rewardKills + "\"");
+                                   }
+                               }
+                           }
+                          
+                           TVT_EVENT_TARGET_TEAM_MEMBERS_ALLOWED = Boolean.parseBoolean(events.getProperty("TvTEventTargetTeamMembersAllowed", "true"));
+                           TVT_EVENT_POTIONS_ALLOWED = Boolean.parseBoolean(events.getProperty("TvTEventPotionsAllowed", "false"));
+                           TVT_EVENT_SUMMON_BY_ITEM_ALLOWED = Boolean.parseBoolean(events.getProperty("TvTEventSummonByItemAllowed", "false"));
+                           propertySplit = events.getProperty("TvTEventDoorsCloseOpenOnStartEnd", "").split(";");
+                          
+                           for (String door : propertySplit)
+                           {
+                               try
+                               {
+                                   TVT_EVENT_DOOR_IDS.add(Integer.valueOf(door));
+                               }
+                               catch (NumberFormatException nfe)
+                               {
+                                   if (!door.equals(""))
+                                       System.out.println("TvTEventEngine[Config.load()]: invalid config property -> TvTEventDoorsCloseOpenOnStartEnd \"" + door + "\"");
+                               }
+                           }
+                       }
+                   }
+               }
+           }
+          
            // Geoengine
            ExProperties geoengine = load(GEOENGINE_FILE);
            GEODATA = geoengine.getProperty("GeoData", 0);
Guest
This topic is now closed to further replies.


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock