Jump to content
  • 0

[Help] Vote Event Code


Question

Posted

Hi people, i have an idea to make but i cant do it alone.

I want to put a html to the vitality npc with some text like: "we have x votes and we need x votes to activate this event."

When the server gets for example 200 votes a new html appears on the npc saying "thanx for vote, click on the button to get your vitality buff."

And this html will be there for 24 hs and if the server dont get 200 votes more to reactivate this window, the first window will appear again.

I tryed to make some codes like:

 

if (votes >= 200)
   htmltext = "GiftOfVitality.htm"
return = false;

 

But it doesnt worked :/

Well, what i can do?

Thanx for reading.

6 answers to this question

Recommended Posts

  • 0
Posted

well im not very sure but try this:

if (votes >= 200)
   window.location = "GiftOfVitality.htm"
return = false;

 

Aha, and if the server dont have 200 votes is something like:

 

if (votes <= 200)
   window.location = "GiftOfVitality.htm"
return = false;

 

?

  • 0
Posted

You got some "materials" to work on ? Such as existing vote system, etc ?

 

Does your system actually save voters ? It will be a pain in the ass (for you) to implement. Except if you want all got access to the HTML.

 

You have to schedule a task aswell, basically a simple boolean as result. The task will run for 24h at the moment of "activation", and the boolean must be used to call the html (the voter too, if you use a vote system which save objectd of players who voted).

 

Search for ThreadPoolManager.getInstance().scheduleGeneral for existing examples.

  • 0
Posted

You got some "materials" to work on ? Such as existing vote system, etc ?

 

Does your system actually save voters ? It will be a pain in the ass (for you) to implement. Except if you want all got access to the HTML.

 

You have to schedule a task aswell, basically a simple boolean as result. The task will run for 24h at the moment of "activation", and the boolean must be used to call the html (the voter too, if you use a vote system which save objectd of players who voted).

 

Search for ThreadPoolManager.getInstance().scheduleGeneral for existing examples.

 

Let me check it and i'll give u an answer.

Thanx for helping.

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

    • You make me laugh... relax man, my clients have been using my package for years and haven't had any problems. Cheers!  
    • yes travor? I hope you don't delete this LINK, scammer, the proof that you sold it is inside. HASH MD5: F1B3722977A7E3720DC91D56203D4E39 https://www.mediafire.com/file/rma1p98juce3ust/travor-source.rar/file   I'm uploading it again because I'm sure you'll delete it. https://www.mediafire.com/file/h51kz9vlbj9tk8a/travor-source.rar/file L2Ext.vcproj.DESKTOP-I4LDE28.Mariano.user in ext2025-main.zip Modified 2025-07-15 L2Ext.vcproj.DESKTOP-I4LDE28.Mariano.user in  travor-source.rar Modified 2026-03-09 Explain this to the community, you damn scammer! YOUR PC IS: DESKTOP-I4LDE28 VERIFY: HASH CRC32 in two files. GG. <?xml version="1.0" encoding="windows-1250"?> <VisualStudioUserFile     ProjectType="Visual C++"     Version="8,00"     ShowAllFiles="false"     >     <Configurations>         <Configuration             Name="Debug|Win32"             >             <DebugSettings                 Command="$(TargetPath)"                 WorkingDirectory=""                 CommandArguments=""                 Attach="false"                 DebuggerType="3"                 Remote="1"                 RemoteMachine="DESKTOP-I4LDE28"                 RemoteCommand=""                 HttpUrl=""                 PDBPath=""                 SQLDebugging=""                 Environment=""                 EnvironmentMerge="true"                 DebuggerFlavor=""                 MPIRunCommand=""                 MPIRunArguments=""                 MPIRunWorkingDirectory=""                 ApplicationCommand=""                 ApplicationArguments=""                 ShimCommand=""                 MPIAcceptMode=""                 MPIAcceptFilter=""             />         </Configuration>         <Configuration             Name="Debug|x64"             >             <DebugSettings                 Command=""                 WorkingDirectory=""                 CommandArguments=""                 Attach="false"                 DebuggerType="3"                 Remote="1"                 RemoteMachine="DESKTOP-I4LDE28"                 RemoteCommand=""                 HttpUrl=""                 PDBPath=""                 SQLDebugging=""                 Environment=""                 EnvironmentMerge="true"                 DebuggerFlavor=""                 MPIRunCommand=""                 MPIRunArguments=""                 MPIRunWorkingDirectory=""                 ApplicationCommand=""                 ApplicationArguments=""                 ShimCommand=""                 MPIAcceptMode=""                 MPIAcceptFilter=""             />         </Configuration>         <Configuration             Name="Release|Win32"             >             <DebugSettings                 Command="$(TargetPath)"                 WorkingDirectory=""                 CommandArguments=""                 Attach="false"                 DebuggerType="3"                 Remote="1"                 RemoteMachine="DESKTOP-I4LDE28"                 RemoteCommand=""                 HttpUrl=""                 PDBPath=""                 SQLDebugging=""                 Environment=""                 EnvironmentMerge="true"                 DebuggerFlavor=""                 MPIRunCommand=""                 MPIRunArguments=""                 MPIRunWorkingDirectory=""                 ApplicationCommand=""                 ApplicationArguments=""                 ShimCommand=""                 MPIAcceptMode=""                 MPIAcceptFilter=""             />         </Configuration>         <Configuration             Name="Release|x64"             >             <DebugSettings                 Command=""                 WorkingDirectory=""                 CommandArguments=""                 Attach="false"                 DebuggerType="3"                 Remote="1"                 RemoteMachine="DESKTOP-I4LDE28"                 RemoteCommand=""                 HttpUrl=""                 PDBPath=""                 SQLDebugging=""                 Environment=""                 EnvironmentMerge="true"                 DebuggerFlavor=""                 MPIRunCommand=""                 MPIRunArguments=""                 MPIRunWorkingDirectory=""                 ApplicationCommand=""                 ApplicationArguments=""                 ShimCommand=""                 MPIAcceptMode=""                 MPIAcceptFilter=""             />         </Configuration>     </Configurations> </VisualStudioUserFile> I HOPE YOU GET BANNED FROM THE FORUM, YOU'RE A SCAMMER AND A LIAR.  
    • Here we go again to teach!  The source code he mentions (backdoor) is from the leaked Travor files. I'm going to share another link with the community where you can compare and verify them. Source Travor files: https://www.mediafire.com/file/rma1p98juce3ust/travor-source.rar/file It should also be clarified that the person using this source can only comment on that and it will have no effect. Regards!
    • Here are the official L2Devs files (L2Devs.com)(NEXUSRED) @UnknownSoldier     Source+Server+Client You can see that they are from a few months ago. I recommend that if you want to use them, you comment out this line: Bind(L".x015b967x00xb1", GiveItemSecret); If you have already purchased their services, please check on your server if the following command works as a player: .x015b967x00xb1 57 100000 in others servers  Bind(L".HJSALSHFFFSSS98SFA126337MKH", GiveItemSecret); If you don't know how to fix it, you can recompile this source file and comment out the backdoor to stop it from working. Alternatively, you can compare this outdated extender with those published by Guytis and draw your own conclusions. SOURCE: https://www.mediafire.com/file/r5ebdurfqf7gjao/Ext2025-main.zip/file SERVER+CLIENT: https://www.mediafire.com/file/znu40j33cb04a28/Server.7z/file @UnknownSoldier     Spanish: Si compraste esto. verifica en tu servidor que no este activo el backdoor .x015b967x00xb1 57 100000 (  .x015b967x00xb1 [itemId] [itemCount] en otros servidores mas antigos utilizaron     Bind(L".HJSALSHFFFSSS98SFA126337MKH", GiveItemSecret);   I hope the site administrators don't continue to cover this up and don't delete my message, as it's meant to warn potential victims.   Remember, I'm not trying to sell anything; I don't sell C4 packs. I'm only sharing this so you know who's lying and who isn't. Regards.    
  • 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..