Jump to content
  • 0

[help] vote reward system


GsL

Question

Hello guys i need help for adapt a code to l2frozen C6

i know to add simple codes but this is hard for me i have some questions for this lets start

 

This i have add it at configs at random place.. l2jfrozen.properties

# Vote reward for Hopzone.
AllowHopzoneVoteReward = True
# Vote reward server link.
HopzoneServerLink = http://l2.hopzone.net/lineage2/details/74078/L2World-Servers/
# First page of servers list link.
HopzoneFirstPageLink = http://l2.hopzone.net/lineage2/
# Votes for next reward needed.
HopzoneVotesDifference = 5
# Rank needed for server to be on first page.
HopzoneFirstPageRankNeeded = 15
# Minutes between rewards.
# Eg. You put 5 it checks every 5 minutes for reward.
HopzoneRewardCheckTime = 5
# Small reward(s).
HopzoneSmallReward = 57,100000000;
# Big reward(s).
HopzoneBigReward = 3470,1;
# Hopzone reward max dual boxes reward.
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
HopzoneDuaboxesAllowed = 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.
AllowHopzoneGameServerReport = True

# Vote reward for Topzone.
AllowTopzoneVoteReward = True
# Vote reward server link.
TopzoneServerLink = http://l2topzone.com/lineage2/server-info/6296/L2ToxiccomProMMORPG.html/
# First page of servers list link.
TopzoneFirstPageLink = http://l2topzone.com/lineage2/server-list/top.html/
# Votes for next reward needed.
TopzoneVotesDifference = 5
# Rank needed for server to be on first page.
TopzoneFirstPageRankNeeded = 15
# Minutes between rewards.
# Eg. You put 5 it checks every 5 minutes for reward.
TopzoneRewardCheckTime = 5
# Small reward(s).
TopzoneSmallReward = 57,100000000;
# Big reward(s).
TopzoneBigReward = 3470,1;
# Hopzone reward max dual boxes reward.
# For example if you put 2 and someone has 3 boxes open 2 will be rewarded.
TopzoneDuaboxesAllowed = 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.
AllowTopzoneGameServerReport = True

 

After i add this at configs.java

 

    public static boolean ALLOW_HOPZONE_VOTE_REWARD;
    public static String HOPZONE_SERVER_LINK;
    public static String HOPZONE_FIRST_PAGE_LINK;
    public static int HOPZONE_VOTES_DIFFERENCE;
    public static int HOPZONE_FIRST_PAGE_RANK_NEEDED;
    public static int HOPZONE_REWARD_CHECK_TIME;
public static Map<Integer, Integer> HOPZONE_SMALL_REWARD = new FastMap<Integer, Integer>();
public static Map<Integer, Integer> HOPZONE_BIG_REWARD = new FastMap<Integer, Integer>();
public static int HOPZONE_DUALBOXES_ALLOWED;
    public static boolean ALLOW_HOPZONE_GAME_SERVER_REPORT;
    public static boolean ALLOW_TOPZONE_VOTE_REWARD;
    public static String TOPZONE_SERVER_LINK;
    public static String TOPZONE_FIRST_PAGE_LINK;
    public static int TOPZONE_VOTES_DIFFERENCE;
    public static int TOPZONE_FIRST_PAGE_RANK_NEEDED;
    public static int TOPZONE_REWARD_CHECK_TIME;
public static Map<Integer, Integer> TOPZONE_SMALL_REWARD = new FastMap<Integer, Integer>();
public static Map<Integer, Integer> TOPZONE_BIG_REWARD = new FastMap<Integer, Integer>();
public static int TOPZONE_DUALBOXES_ALLOWED;
    public static boolean ALLOW_TOPZONE_GAME_SERVER_REPORT;

 

without problem at random place*

 

after that i ad this but all lines is with red 

 

i must change this but with??

elcardia.getProperty

 

and where i must add this lines at random place to?

 

                ALLOW_HOPZONE_VOTE_REWARD = Boolean.parseBoolean(elcardia.getProperty("AllowHopzoneVoteReward", "false"));
                HOPZONE_SERVER_LINK = elcardia.getProperty("HopzoneServerLink", "http://l2.hopzone.net/lineage2/details/74078/L2World-Servers/");
                HOPZONE_FIRST_PAGE_LINK = elcardia.getProperty("HopzoneFirstPageLink", "http://l2.hopzone.net/lineage2/");
                HOPZONE_VOTES_DIFFERENCE = Integer.parseInt(elcardia.getProperty("HopzoneVotesDifference", "5"));
               	HOPZONE_FIRST_PAGE_RANK_NEEDED = Integer.parseInt(elcardia.getProperty("HopzoneFirstPageRankNeeded", "15"));
               	HOPZONE_REWARD_CHECK_TIME = Integer.parseInt(elcardia.getProperty("HopzoneRewardCheckTime", "5"));
                String HOPZONE_SMALL_REWARD_VALUE = elcardia.getProperty("HopzoneSmallReward", "57,100000000;");
                String[] hopzone_small_reward_splitted_1 = HOPZONE_SMALL_REWARD_VALUE.split(";");
                for (String i : hopzone_small_reward_splitted_1)
                {
                	String[] hopzone_small_reward_splitted_2 = i.split(",");
                	HOPZONE_SMALL_REWARD.put(Integer.parseInt(hopzone_small_reward_splitted_2[0]), Integer.parseInt(hopzone_small_reward_splitted_2[1]));
                }
                String HOPZONE_BIG_REWARD_VALUE = elcardia.getProperty("HopzoneBigReward", "3470,1;");
                String[] hopzone_big_reward_splitted_1 = HOPZONE_BIG_REWARD_VALUE.split(";");
                for (String i : hopzone_big_reward_splitted_1)
                {
                	String[] hopzone_big_reward_splitted_2 = i.split(",");
                	HOPZONE_BIG_REWARD.put(Integer.parseInt(hopzone_big_reward_splitted_2[0]), Integer.parseInt(hopzone_big_reward_splitted_2[1]));
                }
                HOPZONE_DUALBOXES_ALLOWED = Integer.parseInt(elcardia.getProperty("HopzoneDualboxesAllowed", "1"));
                ALLOW_HOPZONE_GAME_SERVER_REPORT = Boolean.parseBoolean(elcardia.getProperty("AllowHopzoneGameServerReport", "false"));
                ALLOW_TOPZONE_VOTE_REWARD = Boolean.parseBoolean(elcardia.getProperty("AllowTopzoneVoteReward", "false"));
                TOPZONE_SERVER_LINK = elcardia.getProperty("TopzoneServerLink", "http://l2.topzone.net/lineage2/details/74078/L2World-Servers/");
                TOPZONE_FIRST_PAGE_LINK = elcardia.getProperty("TopzoneFirstPageLink", "http://l2.topzone.net/lineage2/");
                TOPZONE_VOTES_DIFFERENCE = Integer.parseInt(elcardia.getProperty("TopzoneVotesDifference", "5"));
               	TOPZONE_FIRST_PAGE_RANK_NEEDED = Integer.parseInt(elcardia.getProperty("TopzoneFirstPageRankNeeded", "15"));
               	TOPZONE_REWARD_CHECK_TIME = Integer.parseInt(elcardia.getProperty("TopzoneRewardCheckTime", "5"));
                String TOPZONE_SMALL_REWARD_VALUE = elcardia.getProperty("TopzoneSmallReward", "57,100000000;");
                String[] topzone_small_reward_splitted_1 = TOPZONE_SMALL_REWARD_VALUE.split(";");
                for (String i : topzone_small_reward_splitted_1)
                {
                	String[] topzone_small_reward_splitted_2 = i.split(",");
                	TOPZONE_SMALL_REWARD.put(Integer.parseInt(topzone_small_reward_splitted_2[0]), Integer.parseInt(topzone_small_reward_splitted_2[1]));
                }
                String TOPZONE_BIG_REWARD_VALUE = elcardia.getProperty("TopzoneBigReward", "3470,1;");
                String[] topzone_big_reward_splitted_1 = TOPZONE_BIG_REWARD_VALUE.split(";");
                for (String i : topzone_big_reward_splitted_1)
                {
                	String[] topzone_big_reward_splitted_2 = i.split(",");
                	TOPZONE_BIG_REWARD.put(Integer.parseInt(topzone_big_reward_splitted_2[0]), Integer.parseInt(topzone_big_reward_splitted_2[1]));
                }
                TOPZONE_DUALBOXES_ALLOWED = Integer.parseInt(elcardia.getProperty("TopzoneDualboxesAllowed", "1"));
                ALLOW_TOPZONE_GAME_SERVER_REPORT = Boolean.parseBoolean(elcardia.getProperty("AllowTopzoneGameServerReport", "false"));

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

elcardia.getProperty must be changed in which file you want the system to take the configs, if you have l2jfrozen for example add the configs in for example l2jfrozen.getProperty 

 

 

 

 

                ALLOW_HOPZONE_VOTE_REWARD = Boolean.parseBoolean(elcardia.getProperty("AllowHopzoneVoteReward", "false"));
                HOPZONE_SERVER_LINK = elcardia.getProperty("HopzoneServerLink", "http://l2.hopzone.net/lineage2/details/74078/L2World-Servers/");
                HOPZONE_FIRST_PAGE_LINK = elcardia.getProperty("HopzoneFirstPageLink", "http://l2.hopzone.net/lineage2/");
                HOPZONE_VOTES_DIFFERENCE = Integer.parseInt(elcardia.getProperty("HopzoneVotesDifference", "5"));
               	HOPZONE_FIRST_PAGE_RANK_NEEDED = Integer.parseInt(elcardia.getProperty("HopzoneFirstPageRankNeeded", "15"));
               	HOPZONE_REWARD_CHECK_TIME = Integer.parseInt(elcardia.getProperty("HopzoneRewardCheckTime", "5"));
                String HOPZONE_SMALL_REWARD_VALUE = elcardia.getProperty("HopzoneSmallReward", "57,100000000;");
                String[] hopzone_small_reward_splitted_1 = HOPZONE_SMALL_REWARD_VALUE.split(";");
                for (String i : hopzone_small_reward_splitted_1)
                {
                	String[] hopzone_small_reward_splitted_2 = i.split(",");
                	HOPZONE_SMALL_REWARD.put(Integer.parseInt(hopzone_small_reward_splitted_2[0]), Integer.parseInt(hopzone_small_reward_splitted_2[1]));
                }
                String HOPZONE_BIG_REWARD_VALUE = elcardia.getProperty("HopzoneBigReward", "3470,1;");
                String[] hopzone_big_reward_splitted_1 = HOPZONE_BIG_REWARD_VALUE.split(";");
                for (String i : hopzone_big_reward_splitted_1)
                {
                	String[] hopzone_big_reward_splitted_2 = i.split(",");
                	HOPZONE_BIG_REWARD.put(Integer.parseInt(hopzone_big_reward_splitted_2[0]), Integer.parseInt(hopzone_big_reward_splitted_2[1]));
                }
                HOPZONE_DUALBOXES_ALLOWED = Integer.parseInt(elcardia.getProperty("HopzoneDualboxesAllowed", "1"));
                ALLOW_HOPZONE_GAME_SERVER_REPORT = Boolean.parseBoolean(elcardia.getProperty("AllowHopzoneGameServerReport", "false"));
                ALLOW_TOPZONE_VOTE_REWARD = Boolean.parseBoolean(elcardia.getProperty("AllowTopzoneVoteReward", "false"));
                TOPZONE_SERVER_LINK = elcardia.getProperty("TopzoneServerLink", "http://l2.topzone.net/lineage2/details/74078/L2World-Servers/");
                TOPZONE_FIRST_PAGE_LINK = elcardia.getProperty("TopzoneFirstPageLink", "http://l2.topzone.net/lineage2/");
                TOPZONE_VOTES_DIFFERENCE = Integer.parseInt(elcardia.getProperty("TopzoneVotesDifference", "5"));
               	TOPZONE_FIRST_PAGE_RANK_NEEDED = Integer.parseInt(elcardia.getProperty("TopzoneFirstPageRankNeeded", "15"));
               	TOPZONE_REWARD_CHECK_TIME = Integer.parseInt(elcardia.getProperty("TopzoneRewardCheckTime", "5"));
                String TOPZONE_SMALL_REWARD_VALUE = elcardia.getProperty("TopzoneSmallReward", "57,100000000;");
                String[] topzone_small_reward_splitted_1 = TOPZONE_SMALL_REWARD_VALUE.split(";");
                for (String i : topzone_small_reward_splitted_1)
                {
                	String[] topzone_small_reward_splitted_2 = i.split(",");
                	TOPZONE_SMALL_REWARD.put(Integer.parseInt(topzone_small_reward_splitted_2[0]), Integer.parseInt(topzone_small_reward_splitted_2[1]));
                }
                String TOPZONE_BIG_REWARD_VALUE = elcardia.getProperty("TopzoneBigReward", "3470,1;");
                String[] topzone_big_reward_splitted_1 = TOPZONE_BIG_REWARD_VALUE.split(";");
                for (String i : topzone_big_reward_splitted_1)
                {
                	String[] topzone_big_reward_splitted_2 = i.split(",");
                	TOPZONE_BIG_REWARD.put(Integer.parseInt(topzone_big_reward_splitted_2[0]), Integer.parseInt(topzone_big_reward_splitted_2[1]));
                }
                TOPZONE_DUALBOXES_ALLOWED = Integer.parseInt(elcardia.getProperty("TopzoneDualboxesAllowed", "1"));
                ALLOW_TOPZONE_GAME_SERVER_REPORT = Boolean.parseBoolean(elcardia.getProperty("AllowTopzoneGameServerReport", "false"));

in the l2jfrozen section of configs if you encounter more problems add me in msn lordstelio@hotmail.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...