Addition of L2jBrasil vote rewards.
Contributed by pecanha.
This commit is contained in:
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1308,6 +1308,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3491,6 +3498,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1316,6 +1316,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3508,6 +3515,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1329,6 +1329,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3530,6 +3537,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1316,6 +1316,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3505,6 +3512,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1311,6 +1311,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3505,6 +3512,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1311,6 +1311,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3505,6 +3512,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1333,6 +1333,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3548,6 +3555,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1343,6 +1343,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3570,6 +3577,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1362,6 +1362,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3297,6 +3304,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1361,6 +1361,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3304,6 +3311,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1249,6 +1249,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3377,6 +3384,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1253,6 +1253,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3383,6 +3390,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1253,6 +1253,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3383,6 +3390,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1253,6 +1253,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3384,6 +3391,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1258,6 +1258,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3393,6 +3400,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1266,6 +1266,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3410,6 +3417,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -73,3 +73,23 @@ L2topDualboxesAllowed = 1
|
|||||||
# If set to true, game server console will get a report of
|
# If set to true, game server console will get a report of
|
||||||
# current vote count, votes needed for next reward and votes needed for first page.
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
AllowL2topGameServerReport = False
|
AllowL2topGameServerReport = False
|
||||||
|
|
||||||
|
# Vote reward for L2JBrasil.
|
||||||
|
AllowL2JBrasilVoteReward = False
|
||||||
|
# Vote reward server link.
|
||||||
|
# Example: https://top.l2jbrasil.com/index.php?a=stats&u=l2monkey
|
||||||
|
L2JBrasilServerLink =
|
||||||
|
# Votes for next reward needed.
|
||||||
|
L2JBrasilVotesDifference = 1
|
||||||
|
# Minutes between rewards.
|
||||||
|
# Eg. You put 5 it checks every 5 minutes for reward.
|
||||||
|
L2JBrasilRewardCheckTime = 1
|
||||||
|
# Reward(s).
|
||||||
|
L2JBrasilReward = 30002,5;
|
||||||
|
# Topzone reward max dual boxes reward.
|
||||||
|
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
|
||||||
|
L2JBrasilDualboxesAllowed = 1
|
||||||
|
# Game server console report.
|
||||||
|
# If set to true, game server console will get a report of
|
||||||
|
# current vote count, votes needed for next reward and votes needed for first page.
|
||||||
|
AllowL2JBrasilGameServerReport = True
|
||||||
|
|||||||
@@ -1267,6 +1267,13 @@ public class Config
|
|||||||
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
public static Map<Integer, Integer> L2TOP_REWARD = new HashMap<>();
|
||||||
public static int L2TOP_DUALBOXES_ALLOWED;
|
public static int L2TOP_DUALBOXES_ALLOWED;
|
||||||
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
public static boolean ALLOW_L2TOP_GAME_SERVER_REPORT;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_VOTE_REWARD;
|
||||||
|
public static String L2JBRASIL_SERVER_LINK;
|
||||||
|
public static int L2JBRASIL_VOTES_DIFFERENCE;
|
||||||
|
public static int L2JBRASIL_REWARD_CHECK_TIME;
|
||||||
|
public static Map<Integer, Integer> L2JBRASIL_REWARD = new HashMap<>();
|
||||||
|
public static int L2JBRASIL_DUALBOXES_ALLOWED;
|
||||||
|
public static boolean ALLOW_L2JBRASIL_GAME_SERVER_REPORT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class initializes all global variables for configuration.<br>
|
* This class initializes all global variables for configuration.<br>
|
||||||
@@ -3409,6 +3416,19 @@ public class Config
|
|||||||
}
|
}
|
||||||
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
L2TOP_DUALBOXES_ALLOWED = VoteReward.getInt("L2topDualboxesAllowed", 1);
|
||||||
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
ALLOW_L2TOP_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2topGameServerReport", false);
|
||||||
|
ALLOW_L2JBRASIL_VOTE_REWARD = VoteReward.getBoolean("AllowL2JBrasilVoteReward", false);
|
||||||
|
L2JBRASIL_SERVER_LINK = VoteReward.getString("L2JBrasilServerLink", "");
|
||||||
|
L2JBRASIL_VOTES_DIFFERENCE = VoteReward.getInt("L2JBrasilVotesDifference", 5);
|
||||||
|
L2JBRASIL_REWARD_CHECK_TIME = VoteReward.getInt("L2JBrasilRewardCheckTime", 5);
|
||||||
|
String L2JBRASIL_SMALL_REWARD_VALUE = VoteReward.getString("L2JBrasilReward", "57,100000000;");
|
||||||
|
String[] l2jbrasil_small_reward_splitted_1 = L2JBRASIL_SMALL_REWARD_VALUE.split(";");
|
||||||
|
for (String i : l2jbrasil_small_reward_splitted_1)
|
||||||
|
{
|
||||||
|
String[] l2jbrasil_small_reward_splitted_2 = i.split(",");
|
||||||
|
HOPZONE_REWARD.put(Integer.parseInt(l2jbrasil_small_reward_splitted_2[0]), Integer.parseInt(l2jbrasil_small_reward_splitted_2[1]));
|
||||||
|
}
|
||||||
|
L2JBRASIL_DUALBOXES_ALLOWED = VoteReward.getInt("L2JBrasilDualboxesAllowed", 1);
|
||||||
|
ALLOW_L2JBRASIL_GAME_SERVER_REPORT = VoteReward.getBoolean("AllowL2JBrasilGameServerReport", false);
|
||||||
|
|
||||||
// Load WalkerBotProtection config file (if exists)
|
// Load WalkerBotProtection config file (if exists)
|
||||||
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
final PropertiesParser WalkerBotProtection = new PropertiesParser(CUSTOM_WALKER_BOT_PROTECTION_CONFIG_FILE);
|
||||||
|
|||||||
+84
@@ -0,0 +1,84 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package org.l2jmobius.gameserver.model.votereward;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLConnection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.l2jmobius.Config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Anarchy
|
||||||
|
*/
|
||||||
|
public class L2jbrasil extends VoteSystem
|
||||||
|
{
|
||||||
|
public L2jbrasil(int votesDiff, boolean allowReport, int boxes, Map<Integer, Integer> rewards, int checkMins)
|
||||||
|
{
|
||||||
|
super(votesDiff, allowReport, boxes, rewards, checkMins);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
reward();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getVotes()
|
||||||
|
{
|
||||||
|
InputStreamReader isr = null;
|
||||||
|
BufferedReader br = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
URLConnection con = new URL(Config.L2JBRASIL_SERVER_LINK).openConnection();
|
||||||
|
con.addRequestProperty("User-Agent", "Mozilla/5.0");
|
||||||
|
isr = new InputStreamReader(con.getInputStream());
|
||||||
|
br = new BufferedReader(isr);
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while ((line = br.readLine()) != null)
|
||||||
|
{
|
||||||
|
if (line.contains("<b>Entradas(Total):</b"))
|
||||||
|
{
|
||||||
|
String votesResult = String.valueOf(line.split(">")[2].replace("<br /", ""));
|
||||||
|
int votes = Integer.valueOf(votesResult.replace(" ", ""));
|
||||||
|
return votes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
br.close();
|
||||||
|
isr.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
LOGGER.warning("VoteSystem: Error while getting server vote count from " + getSiteName() + ".");
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getSiteName()
|
||||||
|
{
|
||||||
|
return "L2JBrasil";
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
-1
@@ -50,7 +50,7 @@ public abstract class VoteSystem implements Runnable
|
|||||||
|
|
||||||
public static void initialize()
|
public static void initialize()
|
||||||
{
|
{
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD || Config.ALLOW_TOPZONE_VOTE_REWARD || Config.ALLOW_HOPZONE_VOTE_REWARD || Config.ALLOW_L2TOP_VOTE_REWARD || Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: Initialized.");
|
LOGGER.info("VoteSystem: Initialized.");
|
||||||
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
if (Config.ALLOW_NETWORK_VOTE_REWARD)
|
||||||
@@ -89,6 +89,15 @@ public abstract class VoteSystem implements Runnable
|
|||||||
{
|
{
|
||||||
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
LOGGER.info("VoteSystem: L2top.co votes disabled.");
|
||||||
}
|
}
|
||||||
|
if (Config.ALLOW_L2JBRASIL_VOTE_REWARD)
|
||||||
|
{
|
||||||
|
voteSystems.add(new L2jbrasil(Config.L2JBRASIL_VOTES_DIFFERENCE, Config.ALLOW_L2JBRASIL_GAME_SERVER_REPORT, Config.L2JBRASIL_DUALBOXES_ALLOWED, Config.L2JBRASIL_REWARD, Config.L2JBRASIL_REWARD_CHECK_TIME));
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes enabled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LOGGER.info("VoteSystem: L2JBrasil votes disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user