Jump to content

Recommended Posts

Posted (edited)
Hello mate you do not have to buy it there is a working version of that shared here http://www.maxcheaters.com/topic/188957-vote-manager-npc/
i translate that for you and is realy simple to add it ..
 
we start::
head-src\com\l2jfrozen\gameserver\model\actor\instance\L2PcInstance.java
 
search
private static final String RESTORE_CHARACTER = 
and in the end ofcode we find (  aio,aio_end, )
 and we add
lastVoteHopzone, lastVoteTopzone, hasVotedHop, hasVotedTop, monthVotes, totalVotes, tries
then search
private long _lastTeleportAction = 0;
and down from there we put
private boolean _isVoting = false;


public final boolean isVoting()
{
return _isVoting;
}


public final void setIsVoting(boolean value)
{
_isVoting = value;
}
 private boolean hasVotedTop,hasVotedHop;




public boolean hasVotedBoth()


   {
       return hasVotedHop && hasVotedTop;
   }
   public void setHop(boolean target)
   {
       hasVotedHop=target;
   }
   public void setTop(boolean target)
   {
       hasVotedTop=target;
   }


private void loadVotes()
   {
       int flag=0;
       try (Connection con = L2DatabaseFactory.getInstance().getConnection())
       {
           PreparedStatement statement = con.prepareStatement("SELECT hasVotedTop FROM characters WHERE obj_Id=?");
           statement.setInt(1, getObjectId());
           ResultSet rset = statement.executeQuery();
           while (rset.next())
           {
               flag = rset.getInt("hasVotedTop");
           }
           if (flag == 1)
           {
               setTop(true);
           }
           else
           {
               setTop(false);
           }
       }
       catch (Exception e)
       {
          
           if (Config.DEVELOPER)
           {
               e.printStackTrace();
           }
       }
       flag=0;
       try (Connection con = L2DatabaseFactory.getInstance().getConnection())
       {
           PreparedStatement statement = con.prepareStatement("SELECT hasVotedHop FROM characters WHERE obj_Id=?");
           statement.setInt(1, getObjectId());
           ResultSet rset = statement.executeQuery();
           while (rset.next())
           {
               flag = rset.getInt("hasVotedHop");
           }
           if (flag == 1)
           {
               setHop(true);
           }
           else
           {
               setHop(false);
           }
       }
       catch (Exception e)
       {
          
           if (Config.DEVELOPER)
           {
               e.printStackTrace();
           }
       }
   }
then search
startWarnUserTakeBreak();
and we put down there:
loadVotes();
then we go on  head-src\com\l2jfrozen\Config.java
and search
public static int HERO_CUSTOM_DAY;
and we put down there 
public static String VOTE_LINK_HOPZONE;
public static String VOTE_LINK_TOPZONE;
public static int VOTE_REWARD_ID1;
public static int VOTE_REWARD_ID2;
public static int VOTE_REWARD_ID3;
public static int VOTE_REWARD_ID4;
public static int VOTE_REWARD_AMOUNT1;
public static int VOTE_REWARD_AMOUNT2;
public static int VOTE_REWARD_AMOUNT3;
public static int VOTE_REWARD_AMOUNT4;
public static int SECS_TO_VOTE;
public static int EXTRA_REW_VOTE_AM;

then we search for

HERO_CUSTOM_DAY = Integer.parseInt(L2JFrozenSettings.getProperty("HeroCustomDay", "0"));
and we put down there:
VOTE_LINK_HOPZONE = L2JFrozenSettings.getProperty("HopzoneUrl", "null");
VOTE_LINK_TOPZONE = L2JFrozenSettings.getProperty("TopzoneUrl", "null");
VOTE_REWARD_ID1 = Integer.parseInt(L2JFrozenSettings.getProperty("VoteRewardId1", "300"));
VOTE_REWARD_ID2 = Integer.parseInt(L2JFrozenSettings.getProperty("VoteRewardId2", "300"));
VOTE_REWARD_ID3 = Integer.parseInt(L2JFrozenSettings.getProperty("VoteRewardId3", "300"));
VOTE_REWARD_ID4 = Integer.parseInt(L2JFrozenSettings.getProperty("VoteRewardId4", "300"));
VOTE_REWARD_AMOUNT1 = Integer.parseInt(L2JFrozenSettings.getProperty("VoteRewardAmount1", "300"));
VOTE_REWARD_AMOUNT2 = Integer.parseInt(L2JFrozenSettings.getProperty("VoteRewardAmount2", "300"));
VOTE_REWARD_AMOUNT3 = Integer.parseInt(L2JFrozenSettings.getProperty("VoteRewardAmount3", "300"));
VOTE_REWARD_AMOUNT4 = Integer.parseInt(L2JFrozenSettings.getProperty("VoteRewardAmount4", "300"));
SECS_TO_VOTE = Integer.parseInt(L2JFrozenSettings.getProperty("SecondsToVote", "20"));
EXTRA_REW_VOTE_AM = Integer.parseInt(L2JFrozenSettings.getProperty("ExtraRewVoteAm", "20"));
then go  head-src\com\l2jfrozen\gameserver\GameServer.java
 
and find
 // Load GameServer Configs
        Config.load();
and we put down there:
VoteManager.load();
then go to gameserver\config\functions\l2jfrozen.properties
and we put everywhere we want 
# ------------------------------
# Vote System Ingame  -
# ------------------------------
HopzoneUrl = 
TopzoneUrl = 


# The characters will have a choice between 3 rewards.Set id for them
VoteRewardId1 = 6392
VoteRewardId2 = 6393
VoteRewardId3 = 4357


# Set the amount of each reward.
VoteRewardAmount1 = 1
VoteRewardAmount2 = 1
VoteRewardAmount3 = 30


# Set the seconds that the character has
# until he votes in the site's banners
SecondsToVote = 45


# Amount of votes a character must collect
# in order to get the 4th vote reward
ExtraRewVoteAm = 20


# Info of the extra reward item
VoteRewardId4 = 6673
VoteRewardAmount4 = 1

then we go to navicat and left click on Characters and we click on Design table

and we add
 
lastVoteHopzone bigint 20 0


lastVoteTopzone bigint 20 0


hasVotedHop int 10 0


hasVotedTop int 10 0


monthVotes int 10 0


totalVotes int 10 0


tries int 10 0
 
and now we must create a new npc and  (type)       L2VoteManager
Edited by L2LostWard

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • I assume you're some kind of Rito Games player too, right? If so, I've got some bad news for you. We've been reversing their stuff for years, and the VGK driver collects far more information from your PC than you could imagine.   I won't leak or discuss any specifics here for obvious reasons, but if you've played on certain "serious" projects, they may also have something running on your system. Whether it's mining your GPU or doing other shady things, the point is that you can't really say you're completely safe in today's gaming world. 😄 EAC, BE, Vanguard, FACEIT, and pretty much any kernel level anticheat have extremely deep access to your system.   In the wrong hands, that level of access can become a serious privacy risk. If you have the knowledge, dump the game and take a look for yourself. You might be surprised by what's actually going on behind the scenes.   No wonder the VGK team decided to remove the driver from startup and switch to an on demand approach. I guess the exposure became too much of a risk for them to ignore, so they had to make changes to protect their reputation and keep their image clean.   So let's get to the point. Any anticheat for Lineage 2, whether it's considered good or bad, comes with the same issue: if someone wants to compromise your privacy, they can potentially do it because you don't truly know what you're launching or what kind of drivers it installs or loads. TL;DR: Without proper knowledge and analysis, you can't really know what's happening behind the scenes. Cheers.   Let me remind some people who may have forgotten about this. Many years ago, there was a project called BeyondWorld H5. I saw people complaining that their systems became extremely laggy and their GPUs were overheating after running the game for a long time. After further analysis, we found that the client was heavily using the GPU in a way that appeared to be mining related. The point is that nothing is impossible  if someone has enough access and knowledge, many things can happen.
    • I said I'd buy it for my player, I didn't say I would run it on my pc. 
    • Hi there! I am starting to develop my server and I am looking for a professional interface editor. I already have a client and I would like to hire somebody to edit it for me or to offer their own interfaces. I have looked around but all the pre-made interfaces out there, so far, has not pleased me and I what I need for my server. So if you are a professional interface maker, please let me know! Thank you!
    • Thanks FunBasec, I recommend this developer ! He is very friendly and professional.
    • The project is a change to original l2 with modern game mechanics that is more "western". For example every race can craft, not just dwarves. Mages can cast spells without the need of a dedicated box MP charger. MP chargers are also able to solo farm and deal decent damage on their own. Paladins are now 2h sword dedicated healers/support dps. Drop rates are normalized among all classes, no longer needing spoil to craft.   The idea of the project is keep true to the old vanilla classic experience where you are rewarded for effort. And you must put effort into achieving things. Leveling is slow, gear wont be given to you, you must work towards obtaining upgrades. etc.   These are only a small portion of changes I am making to the game. I would love help and bounce design ideas off of others for some future content update ideas. Like can we design unique raid boss encounters? How about end-game content ideas? How can we make owning castles valuable? Maybe an instanced underground mining zone? Or unique raid fights that the clan can do for extra loot?    There's tons of ideas I have and I would like some help creating them.    This is not a paid project. It is a passion project with people who have a passion for l2 and wanna see the community grow.    Currently using client 418. 
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..