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

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?

 

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 >:(

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
Reply to this topic...

×   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.




  • Posts

    • ⚡️ Fast onboarding without compliance; 💰 Clear fees, no RR; 📆 Weekly payouts in USDT. ✅ We accept: adult, dating, nutra, IPTV, VPN, and other stable projects; ❌ We do not work with startups, showcase sites, or black-hat schemes.   https://laucharge.com/creditcard  
    • 亲爱的 SocNet 服务用户! 我们正在积极寻找以下商品的供应商: — Snapchat 旧的和新的账号 | 带分数 (snapscores) | 地区:欧洲/美国 | 邮箱/手机号完全访问 — Reddit 旧账号(暴力破解或被盗来源,自注册)| 拥有帖子和评论业力 100 到 100,000+ | 附带邮箱完全访问 — LinkedIn 旧账号,带真实连接 (connections) | 地区:欧洲/美国 | 邮箱完全访问 + 有效的双重验证密码 — Instagram 旧账号 (2010-2023 年) | 邮箱完全访问(可能还包含已连接的双重验证密码) — Facebook 旧账号 (2010-2023 年) | 邮箱完全访问(可能还包含已连接的双重验证密码) | 有好友或无好友 | 地区:欧洲/美国/亚洲 — Threads 账号 | 邮箱完全访问(可能还包含已连接的双重验证密码) — TikTok/Facebook/Google ADS 广告代理账号 请通过以下联系方式联系我们 —— 我们将讨论合作条件! 我们也始终欢迎其他合作伙伴关系的提议。 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ✅ ➡ WhatsApp: https://wa.me/79051904467 ✅ ➡ Discord: socnet_support ✅ ➡ ✉ 邮箱: solomonbog@socnet.store ✅ 相关链接: 数字商品商店 (网站): 前往 购买 Telegram Stars 的 Telegram 机器人: 前往 SMM 面板: 前往 – 推广您的社交媒体账号。 商店 Telegram 机器人: 前往 我们想向您介绍当前在我们服务中购买商品和服务的促销和特价优惠清单: 1. 使用优惠码 SEPTEMBER2025 (9 月份购物 9 折)在我们的商店(网站、机器人)购买!首次购买还可使用优惠码 SOCNET (85 折)。 2. 获得 $1 商店余额或 10-20% 折扣,只需在我们网站注册后写下您的用户名,格式如下:"SEND ME BONUS, MY USERNAME IS..." —— 需要在我们的论坛帖子中提交! 3. 获得 $1 SMM 面板首次试用奖励:只需在我们的网站(支持)提交一个主题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道和购买星星的机器人中发放 Telegram Stars! 新闻资源: ➡ Telegram 频道: https://t.me/accsforyou_shop ✅ ➡ WhatsApp 频道: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ✅ ➡ Discord 服务器: https://discord.gg/y9AStFFsrh ✅ 通过这些联系方式您还可以: — 获取批发采购咨询 — 建立合作伙伴关系(现有合作伙伴: https://socnet.bgng.io/partners) — 成为我们的供应商 SocNet —— 数字商品和高级订阅商店
    • 亲爱的 SocNet 服务用户! 我们正在积极寻找以下商品的供应商: — Snapchat 旧的和新的账号 | 带分数 (snapscores) | 地区:欧洲/美国 | 邮箱/手机号完全访问 — Reddit 旧账号(暴力破解或被盗来源,自注册)| 拥有帖子和评论业力 100 到 100,000+ | 附带邮箱完全访问 — LinkedIn 旧账号,带真实连接 (connections) | 地区:欧洲/美国 | 邮箱完全访问 + 有效的双重验证密码 — Instagram 旧账号 (2010-2023 年) | 邮箱完全访问(可能还包含已连接的双重验证密码) — Facebook 旧账号 (2010-2023 年) | 邮箱完全访问(可能还包含已连接的双重验证密码) | 有好友或无好友 | 地区:欧洲/美国/亚洲 — Threads 账号 | 邮箱完全访问(可能还包含已连接的双重验证密码) — TikTok/Facebook/Google ADS 广告代理账号 请通过以下联系方式联系我们 —— 我们将讨论合作条件! 我们也始终欢迎其他合作伙伴关系的提议。 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ✅ ➡ WhatsApp: https://wa.me/79051904467 ✅ ➡ Discord: socnet_support ✅ ➡ ✉ 邮箱: solomonbog@socnet.store ✅ 相关链接: 数字商品商店 (网站): 前往 购买 Telegram Stars 的 Telegram 机器人: 前往 SMM 面板: 前往 – 推广您的社交媒体账号。 商店 Telegram 机器人: 前往 我们想向您介绍当前在我们服务中购买商品和服务的促销和特价优惠清单: 1. 使用优惠码 SEPTEMBER2025 (9 月份购物 9 折)在我们的商店(网站、机器人)购买!首次购买还可使用优惠码 SOCNET (85 折)。 2. 获得 $1 商店余额或 10-20% 折扣,只需在我们网站注册后写下您的用户名,格式如下:"SEND ME BONUS, MY USERNAME IS..." —— 需要在我们的论坛帖子中提交! 3. 获得 $1 SMM 面板首次试用奖励:只需在我们的网站(支持)提交一个主题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道和购买星星的机器人中发放 Telegram Stars! 新闻资源: ➡ Telegram 频道: https://t.me/accsforyou_shop ✅ ➡ WhatsApp 频道: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ✅ ➡ Discord 服务器: https://discord.gg/y9AStFFsrh ✅ 通过这些联系方式您还可以: — 获取批发采购咨询 — 建立合作伙伴关系(现有合作伙伴: https://socnet.bgng.io/partners) — 成为我们的供应商 SocNet —— 数字商品和高级订阅商店
    • 亲爱的 SocNet 服务用户! 我们正在积极寻找以下商品的供应商: — Snapchat 旧的和新的账号 | 带分数 (snapscores) | 地区:欧洲/美国 | 邮箱/手机号完全访问 — Reddit 旧账号(暴力破解或被盗来源,自注册)| 拥有帖子和评论业力 100 到 100,000+ | 附带邮箱完全访问 — LinkedIn 旧账号,带真实连接 (connections) | 地区:欧洲/美国 | 邮箱完全访问 + 有效的双重验证密码 — Instagram 旧账号 (2010-2023 年) | 邮箱完全访问(可能还包含已连接的双重验证密码) — Facebook 旧账号 (2010-2023 年) | 邮箱完全访问(可能还包含已连接的双重验证密码) | 有好友或无好友 | 地区:欧洲/美国/亚洲 — Threads 账号 | 邮箱完全访问(可能还包含已连接的双重验证密码) — TikTok/Facebook/Google ADS 广告代理账号 请通过以下联系方式联系我们 —— 我们将讨论合作条件! 我们也始终欢迎其他合作伙伴关系的提议。 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ✅ ➡ WhatsApp: https://wa.me/79051904467 ✅ ➡ Discord: socnet_support ✅ ➡ ✉ 邮箱: solomonbog@socnet.store ✅ 相关链接: 数字商品商店 (网站): 前往 购买 Telegram Stars 的 Telegram 机器人: 前往 SMM 面板: 前往 – 推广您的社交媒体账号。 商店 Telegram 机器人: 前往 我们想向您介绍当前在我们服务中购买商品和服务的促销和特价优惠清单: 1. 使用优惠码 SEPTEMBER2025 (9 月份购物 9 折)在我们的商店(网站、机器人)购买!首次购买还可使用优惠码 SOCNET (85 折)。 2. 获得 $1 商店余额或 10-20% 折扣,只需在我们网站注册后写下您的用户名,格式如下:"SEND ME BONUS, MY USERNAME IS..." —— 需要在我们的论坛帖子中提交! 3. 获得 $1 SMM 面板首次试用奖励:只需在我们的网站(支持)提交一个主题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道和购买星星的机器人中发放 Telegram Stars! 新闻资源: ➡ Telegram 频道: https://t.me/accsforyou_shop ✅ ➡ WhatsApp 频道: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ✅ ➡ Discord 服务器: https://discord.gg/y9AStFFsrh ✅ 通过这些联系方式您还可以: — 获取批发采购咨询 — 建立合作伙伴关系(现有合作伙伴: https://socnet.bgng.io/partners) — 成为我们的供应商 SocNet —— 数字商品和高级订阅商店
    • 亲爱的 SocNet 服务用户! 我们正在积极寻找以下商品的供应商: — Snapchat 旧的和新的账号 | 带分数 (snapscores) | 地区:欧洲/美国 | 邮箱/手机号完全访问 — Reddit 旧账号(暴力破解或被盗来源,自注册)| 拥有帖子和评论业力 100 到 100,000+ | 附带邮箱完全访问 — LinkedIn 旧账号,带真实连接 (connections) | 地区:欧洲/美国 | 邮箱完全访问 + 有效的双重验证密码 — Instagram 旧账号 (2010-2023 年) | 邮箱完全访问(可能还包含已连接的双重验证密码) — Facebook 旧账号 (2010-2023 年) | 邮箱完全访问(可能还包含已连接的双重验证密码) | 有好友或无好友 | 地区:欧洲/美国/亚洲 — Threads 账号 | 邮箱完全访问(可能还包含已连接的双重验证密码) — TikTok/Facebook/Google ADS 广告代理账号 请通过以下联系方式联系我们 —— 我们将讨论合作条件! 我们也始终欢迎其他合作伙伴关系的提议。 联系方式和支持: ➡ Telegram: https://t.me/socnet_support ✅ ➡ WhatsApp: https://wa.me/79051904467 ✅ ➡ Discord: socnet_support ✅ ➡ ✉ 邮箱: solomonbog@socnet.store ✅ 相关链接: 数字商品商店 (网站): 前往 购买 Telegram Stars 的 Telegram 机器人: 前往 SMM 面板: 前往 – 推广您的社交媒体账号。 商店 Telegram 机器人: 前往 我们想向您介绍当前在我们服务中购买商品和服务的促销和特价优惠清单: 1. 使用优惠码 SEPTEMBER2025 (9 月份购物 9 折)在我们的商店(网站、机器人)购买!首次购买还可使用优惠码 SOCNET (85 折)。 2. 获得 $1 商店余额或 10-20% 折扣,只需在我们网站注册后写下您的用户名,格式如下:"SEND ME BONUS, MY USERNAME IS..." —— 需要在我们的论坛帖子中提交! 3. 获得 $1 SMM 面板首次试用奖励:只需在我们的网站(支持)提交一个主题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道和购买星星的机器人中发放 Telegram Stars! 新闻资源: ➡ Telegram 频道: https://t.me/accsforyou_shop ✅ ➡ WhatsApp 频道: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n ✅ ➡ Discord 服务器: https://discord.gg/y9AStFFsrh ✅ 通过这些联系方式您还可以: — 获取批发采购咨询 — 建立合作伙伴关系(现有合作伙伴: https://socnet.bgng.io/partners) — 成为我们的供应商 SocNet —— 数字商品和高级订阅商店
  • Topics

×
×
  • Create New...

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