Jump to content

Recommended Posts

Posted

when the options are ready, write //startvotes for html ...

also //showvotes will show the votes

//clear - the command will help you to clear the options and votes

 

Are Those Guys Too Stupid Or I Just Started To Reading Java ?ahahaha Fail They Cant Understand

Posted

Ain't a whole new Bypass Handler useless, just for that?

srsly i'm working with bypass in classes, everyone can use it in my way or in other ways.

Posted

Nice idea...you can make an auto-manager that will take an action based on the votes...Like a trivia or anti-bot or a lot of other events. And it could be edited so you ca show that html to a person or a party or a clan or who knows what...Gj

Posted

Nice idea...you can make an auto-manager that will take an action based on the votes...Like a trivia or anti-bot or a lot of other events. And it could be edited so you ca show that html to a person or a party or a clan or who knows what...Gj

I will extend it including your idea

Posted

from  RequestBypassToServer.java - Index: net.sf.l2j.gameserver.clientpackets

 

i get error this line

 

else if (_command.startsWith("Quest "))

{

if(!activeChar.validateBypass(_command))

return;

 

L2PcInstance player = getClient().getActiveChar();

if (player == null) return;

 

String p = _command.substring(6).trim();

int idx = p.indexOf(' ');

if (idx < 0)

player.processQuestEvent(p, "");

else

player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim());

}

+ else if(_command.startsWith("custom_"))

+ {

+ L2PcInstance player = getClient().getActiveChar();

+ if(!player.validateBypass(_command))

+ return;

+

+ BypassHandler.getInstance().handleBypass(player, _command);

+ }

 

 

i can't find this cordination ... BypassHandler.java - Index: net.sf.l2j.gameserver.model.custom

 

from   Vote.java - Index: net.sf.l2j.gameserver.model.entity.Events

 

/* 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 2, 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, write to the Free Software

* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA

* 02111-1307, USA.

*

* http://www.gnu.org/copyleft/gpl.html

*/

package net.sf.l2j.gameserver.model.entity.Events;

 

import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminCustom;

import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;

 

/**

* @author  xAddytzu

*/

public class Vote

{

private static Vote _instance = null;

private List<String> _IPs = new FastList<String>();

public static int voteCount1 = 0;

public static int voteCount2 = 0;

public static int voteCount3 = 0;

public static Vote getInstance()

{

if(_instance == null)

_instance = new Vote();

 

return _instance;

}

public void handleCommand(L2PcInstance player,String command)

{

if(command.startsWith("custom_vote_1"))

{

if (_IPs.contains(player.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress()))

continue;

 

_IPs.add(player.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress());

voteCount1++;

player.sendMessage("Thanks for your vote.");

}

else if(command.startsWith("custom_vote_2"))

{

if (_IPs.contains(player.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress()))

continue;

 

_IPs.add(player.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress());

voteCount2++;

player.sendMessage("Thanks for your vote.");

}

else if(command.startsWith("custom_vote_3"))

{

if (_IPs.contains(player.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress()))

continue;

 

_IPs.add(player.getClient().getConnection().getSocketChannel().socket().getInetAddress().getHostAddress());

voteCount3++;

player.sendMessage("Thanks for your vote.");

}

}

public void showVoteHtml(L2PcInstance activeChar)

{

String htmFile = "data/html/custom/vote.htm";

NpcHtmlMessage html = new NpcHtmlMessage(1);

html.setFile(htmFile);

html.replace("%first%", String.valueOf(AdminCustom.first));

html.replace("%second%", String.valueOf(AdminCustom.second));

html.replace("%third%", String.valueOf(AdminCustom.third));

html.replace("%voteCount1%", String.valueOf(voteCount1));

html.replace("%voteCount2%", String.valueOf(voteCount2));

html.replace("%voteCount3%", String.valueOf(voteCount3));

activeChar.sendPacket(html);

}

public void clear()

{

voteCount1 = 0;

voteCount2 = 0;

voteCount3 = 0;

AdminCustom.first = "";

AdminCustom.second = "";

AdminCustom.third = "";

_IPs.clear();

}

}

 

why i get this errors? i do everything right..

Posted

+            BypassHandler.getInstance().handleBypass(player, _command);

just import the file :)


 

well, there isnt any class "IPs". any solution?

Posted

+            BypassHandler.getInstance().handleBypass(player, _command);

just import the file :)


 

well, there isnt any class "IPs". any solution?

 

is the same...again i get error...from all cordinate where i need put java codes i get errors..Isn't for IL?

Posted

+            BypassHandler.getInstance().handleBypass(player, _command);

just import the file :)


 

well, there isnt any class "IPs". any solution?

_IPs is a list.

 

import java.util.List;

import javolution.util.FastList;

 

anyway if you are using Eclipse, hold Ctrl+Shift+O (Organize Imports)

 

Posted

_IPs is a list.

 

import java.util.List;

import javolution.util.FastList;

Oh okey, now it gotten fixed. But im now im having problems with getSocketChannel, even if i change it to Socket.

 

Any solution again? Thanks

Posted

Oh okey, now it gotten fixed. But im now im having problems with getSocketChannel, even if i change it to Socket.

 

Any solution again? Thanks

Search in your source code how to get an ip ...

Posted

well, i made it

_IPs.add(player.getClient().getConnection().getSocket().getInetAddress().getHostAddress());

, i deleted getsocketchanel and socket and added getSocket. No errors.

 

but is it going to work?

 

 


 

Edit:

			if (_IPs.contains(player.getClient().getConnection().getSocket().getInetAddress().getHostAddress()))
			[color=yellow]continue;[/color]

Last error >:(

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 should buy it then I’ll make a discount  
    • Hi everyone,   In 2014, I completely stepped away from developing L2 servers and doing L2J-related work. Since then, I’ve only opened this server about once a year and helped a few servers and individuals for free. I haven’t taken on any paid L2J work since then.   LINEAGE2.GOLD is a project that has reached about Season 6. The first season launched at the end of 2020 and was a fully rebuilt Gold-style server on the Classic client (protocol 110). It featured many custom systems and enhancements. After several seasons, I decided to abandon the Mobius-based project and move to Lucera, as my goal was to get as close as possible to Interlude PTS behavior while still staying on the L2J platform.   The current project was once again completely rebuilt, this time on the Essence client (protocol 306), and is based on Lucera. Because of that, acquiring a license from Deazer is required.   My Lucera extender includes, but is not limited to: Formulas.java Basic anti-bot detection, which proved quite effective, we caught most Adrenaline users using relatively simple server-side logic, logged them, and took staff action. Simple admin account lookup commands based on IP, HWID, and similar identifiers. In-game Captcha via https://lineage2.gold/code, protected by Cloudflare, including admin commands for blacklisting based on aggression levels and whitelisting. Additional admin tools such as Auto-Play status checks, Enchanted Hero Weapon live sync, force add/remove clans from castle sieges, item listeners for live item monitoring, and more. A fully rewritten Auto-Play system with support for ExAutoPlaySetting, while still using the Auto-Play UI wheel, featuring: Debuff Efficiency Party Leader Assist Respectful Hunting Healer AI Target Mode Range Mode Summoner buff support Dwarf mechanics Reworked EffectDispelEffects to restore buffs after Cancellation. Raid Bomb item support. Reworked CronZoneSwitcher. Prime Time Raid Respawn Service. Community Board features such as Top rankings and RB/Epic status. Custom systems for Noblesse, Subclasses, support-class rewards, and much more.   Depending on the deal, the project can include: The lineage2.gold domain The website built on the Laravel PHP framework The server’s Discord Client Interface source Server files and extender source The server database (excluding private data such as emails and passwords)   I’m primarily looking for a serious team to continue the project, as it would be a shame to see this work abandoned. This is not cheap. You can DM me with offers. If you’re wondering why I’m doing this: I’ve felt a clear lack of appreciation from the L2 community, and I’m not interested in doing charity work for people who don’t deserve it. I’m simply not someone who tolerates BS. Server Info: https://lineage2.gold/info Server for test: https://lineage2.gold/download Over 110 videos YouTube playlist: https://www.youtube.com/watch?v=HO7BZaxUv2U&list=PLD9WZ0Nj-zstZaYeWxAxTKbX7ia2M_DUu&index=113
  • 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..

AdBlock Extension Detected!

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

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

I've Disabled AdBlock