Jump to content

Question

Posted

Kalhspera meloi tou mxc,ftiaxnw enan server kai prospatho na kanw modify 2 codes alla den mporo

isos ama kapoio melos exei ligo xrono kai diathesi na me voithisei oste na tous valei mesa sto project pou xrisimopoiw (l2jfrozen) tha tou hmoun evgnomon.

1)Otan alazeis sub class h otan kaneis sub class na vgenh h armor kai to weapon

2)Otan foras weapon 2 handed na prepei na to vgaleis gia na valeis shield

kai 3o ama ginete fusika,to vote system tou l2jfrozen einai polu ''clasic'' 9elw na mou valei an mporei to mono pou na vgenei sto announcement na einai ''We have 100 votes next vote reward at 105 votes'' h kati tetoio ena aplo alla wraio xoris pola announce kai na litourgei sunexos oxi diladi ka9e 30 lepta,ka9e 5 votes na pernoun aftomata reward oi players.

 

An kapoios exei ton elefthero xrono na asxolithei as kanei pm(ta codes gia to eclipse tous exw idi apla den mporo na tous valw epidi den exw gnwsis alla prospathisa :/ )

7 answers to this question

Recommended Posts

  • 0
Posted

1) πήγαινε στο l2pcinstance και βρες αυτό

public boolean setActiveClass(int classIndex)
{

και κάνε επικόλληση αυτό από κάτω

  L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
               
                if (chest != null)
                {  
                        L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
                        InventoryUpdate iu = new InventoryUpdate();
                       
                        for (L2ItemInstance element : unequipped)
                                iu.addModifiedItem(element);
                       
                        sendPacket(iu);
                        lhand = null;
                        iu = null;
                        unequipped = null;
                }

 

2) Υπάρχει ήδη αυτό στο useitem.java

else if(curwep.getItemType() == L2WeaponType.BIGSWORD && item.getItemType() == L2WeaponType.NONE)
		{
			activeChar.sendMessage("You are not allowed to do this.");
			return;
		}

δεν ξέρω αν το type της shield είναι NONE ή κάποιο άλλο, ψάξτο αυτό

  • 0
Posted

1) πήγαινε στο l2pcinstance και βρες αυτό

public boolean setActiveClass(int classIndex)
{

και κάνε επικόλληση αυτό από κάτω

  L2ItemInstance chest = getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
               
                if (chest != null)
                {  
                        L2ItemInstance[] unequipped = getInventory().unEquipItemInBodySlotAndRecord(chest.getItem().getBodyPart());
                        InventoryUpdate iu = new InventoryUpdate();
                       
                        for (L2ItemInstance element : unequipped)
                                iu.addModifiedItem(element);
                       
                        sendPacket(iu);
                        lhand = null;
                        iu = null;
                        unequipped = null;
                }

 

2) Υπάρχει ήδη αυτό στο useitem.java

else if(curwep.getItemType() == L2WeaponType.BIGSWORD && item.getItemType() == L2WeaponType.NONE)
		{
			activeChar.sendMessage("You are not allowed to do this.");
			return;
		}

δεν ξέρω αν το type της shield είναι NONE ή κάποιο άλλο, ψάξτο αυτό

o 8a to valw kai egw..:D


Kalhspera meloi tou mxc,ftiaxnw enan server kai prospatho na kanw modify 2 codes alla den mporo

isos ama kapoio melos exei ligo xrono kai diathesi na me voithisei oste na tous valei mesa sto project pou xrisimopoiw (l2jfrozen) tha tou h-beep- evgnomon.

1)Otan alazeis sub class h otan kaneis sub class na vgenh h armor kai to weapon

2)Otan foras weapon 2 handed na prepei na to vgaleis gia na valeis shield

kai 3o ama ginete fusika,to vote system tou l2jfrozen einai polu ''clasic'' 9elw na mou valei an mporei to mono pou na vgenei sto announcement na einai ''We have 100 votes next vote reward at 105 votes'' h kati tetoio ena aplo alla wraio xoris pola announce kai na litourgei sunexos oxi diladi ka9e 30 lepta,ka9e 5 votes na pernoun aftomata reward oi players.

 

An kapoios exei ton elefthero xrono na asxolithei as kanei pm(ta codes gia to eclipse tous exw idi apla den mporo na tous valw epidi den exw gnwsis alla prospathisa :/ )

@L2lostWard eipes oti exeis ta codes? mipws mporeis na mou doseis afto gia to vote?:D
  • 0
Posted

uparxei idi sto l2jfrozen project ksexorista exw ta codes gia ta prwta 2 :)

και το τρίτο υπάρχει και είναι όπως το περιγράφεις μάλιστα. Κοίταξε στα configs σου και άλλαξε τις ρυθμίσεις.
  • 0
Posted

και το τρίτο υπάρχει και είναι όπως το περιγράφεις μάλιστα. Κοίταξε στα configs σου και άλλαξε τις ρυθμίσεις.

prepei na paei mesw eclipse kai na sbhsei oti den 8elei(to vote system tou frozen bgazei polla announce apla sbhneis oti den 8es)

  • 0
Posted

prepei na paei mesw eclipse kai na sbhsei oti den 8elei(to vote system tou frozen bgazei polla announce apla sbhneis oti den 8es)

ας το βγάλει εντελώς και να βάλει ένα που έχει γίνει share εδώ.
  • 0
Posted

ας το βγάλει εντελώς και να βάλει ένα που έχει γίνει share εδώ.

basika den xreiazetai giati apla to allo douleuei kala

 

package com.l2jfrozen.gameserver.handler;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;

import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.model.L2World;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.entity.Announcements;
import com.l2jfrozen.gameserver.powerpak.PowerPakConfig;
import com.l2jfrozen.gameserver.thread.ThreadPoolManager;

public class AutoVoteRewardHandler
{
private static Logger _log = Logger.getLogger(AutoVoteRewardHandler.class.getName());

private int hopzoneVotesCount = 0;
private int topzoneVotesCount = 0;
private List<String> already_rewarded;

private static boolean topzone = false;
private static boolean hopzone = false;

private AutoVoteRewardHandler()
{
	_log.info("Vote Reward System Initiated.");

	if(hopzone){
		int hopzone_votes = getHopZoneVotes();

		if(hopzone_votes == -1){
			hopzone_votes = 0;
		}

		setHopZoneVoteCount(hopzone_votes);
	}

	if(topzone){
		int topzone_votes = getTopZoneVotes();

		if(topzone_votes == -1){
			topzone_votes = 0;
		}

		setTopZoneVoteCount(topzone_votes);
	}

	ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AutoReward(), PowerPakConfig.VOTES_SYSYEM_INITIAL_DELAY, PowerPakConfig.VOTES_SYSYEM_STEP_DELAY);
}

private class AutoReward implements Runnable
{
	@Override
	public void run()
	{

		if(hopzone){
			int hopzone_votes = getHopZoneVotes();

			if(hopzone_votes != -1){
				_log.info("Server Votes on HopZone: " + hopzone_votes);
				Announcements.getInstance().announceToAll("Server Votes on HopZone: " + hopzone_votes + "");

				if (hopzone_votes != 0 && hopzone_votes >= getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD)
				{
					already_rewarded = new ArrayList<String>();

					Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers();

					//L2ItemInstance item;
					for (L2PcInstance player : pls)
					{
						if (player != null && !player.isOffline() && player.isOnline()==1)
						{
							if(player._active_boxes<=1 || (player._active_boxes>1 && checkSingleBox(player))){

								Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet();
								for (Integer i : items)
								{
									//item = player.getInventory().getItemByItemId(i);

									//TODO: check on maxstack for item
									player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true);

								}

							}
						}
					}
					setHopZoneVoteCount(hopzone_votes);
				}
				Announcements.getInstance().announceToAll("Next Reward in " + (getHopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes");
				//site web
				Announcements.getInstance().announceToAll("Server Website: "+PowerPakConfig.SERVER_WEB_SITE);

			}

		}

		if(topzone && hopzone && PowerPakConfig.VOTES_SYSYEM_STEP_DELAY>0)
			try
			{
				Thread.sleep(PowerPakConfig.VOTES_SYSYEM_STEP_DELAY/2);
			}
			catch(InterruptedException e)
			{
				if(Config.ENABLE_ALL_EXCEPTIONS)
					e.printStackTrace();
			}

		if(topzone){
			int topzone_votes = getTopZoneVotes();

			if(topzone_votes != -1){

				_log.info("Server Votes on TopZone: " + topzone_votes);
				Announcements.getInstance().announceToAll("Server Votes on TopZone: " + topzone_votes + "");

				if (topzone_votes != 0 && topzone_votes >= getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD)
				{
					already_rewarded = new ArrayList<String>();

					Collection<L2PcInstance> pls = L2World.getInstance().getAllPlayers();

					//L2ItemInstance item;
					for (L2PcInstance player : pls)
					{
						if (player != null && !player.isOffline() && player.isOnline()==1)
						{
							if(player._active_boxes<=1 || (player._active_boxes>1 && checkSingleBox(player))){

								Set<Integer> items = PowerPakConfig.VOTES_REWARDS_LIST.keySet();
								for (Integer i : items)
								{
									//item = player.getInventory().getItemByItemId(i);

									//TODO: check on maxstack for item
									player.addItem("reward", i, PowerPakConfig.VOTES_REWARDS_LIST.get(i), player, true);

								}

							}
						}
					}
					setTopZoneVoteCount(topzone_votes);
				}

				Announcements.getInstance().announceToAll("Next Reward in " + (getTopZoneVoteCount() + PowerPakConfig.VOTES_FOR_REWARD) + " Votes");
				//site web
				Announcements.getInstance().announceToAll("Server Website: "+PowerPakConfig.SERVER_WEB_SITE);

			}


		}

	}
}

private boolean checkSingleBox(L2PcInstance player){

	if(player.getClient()!=null && player.getClient().getConnection()!=null && !player.getClient().getConnection().isClosed() && !player.isOffline()){

		String playerip = player.getClient().getConnection().getInetAddress().getHostAddress();

		if(already_rewarded.contains(playerip))
			return false;
		already_rewarded.add(playerip);
		return true;
	}

	//if no connection (maybe offline shop) dnt reward
	return false;
}

private int getHopZoneVotes()
{
	int votes = -1;
	URL url = null;
	URLConnection con = null;
	InputStream is = null;
	InputStreamReader isr = null;
	BufferedReader in = null;
	try
	{
		url = new URL(PowerPakConfig.VOTES_SITE_HOPZONE_URL);
		con = url.openConnection();    
		con.addRequestProperty("User-Agent", "Mozilla/4.76");
		is = con.getInputStream();
		isr = new InputStreamReader(is);		    
		in = new BufferedReader(isr);
		String inputLine;
		while ((inputLine = in.readLine()) != null)
		{
			if (inputLine.contains("Anonymous User Votes"))
			{
				votes = Integer.valueOf(inputLine.split(">")[2].replace("</span", ""));
				break;
			}
		}
	}
	catch (Exception e)
	{
		_log.info("[AutoVoteReward] Server HOPZONE is offline or something is wrong in link");
		//e.printStackTrace();
	}
	finally
	{
		if(in!=null)
			try
			{
				in.close();
			}
			catch(IOException e1)
			{
				e1.printStackTrace();
			}
		if(isr!=null)
			try
			{
				isr.close();
			}
			catch(IOException e1)
			{
				e1.printStackTrace();
			}
		if(is!=null)
			try
			{
				is.close();
			}
			catch(IOException e1)
			{
				e1.printStackTrace();
			}

	}
	return votes;
}

private int getTopZoneVotes()
{
	int votes = -1;
	URL url = null;
	URLConnection con = null;
	InputStream is = null;
	InputStreamReader isr = null;
	BufferedReader in = null;
	try
	{
		url = new URL(PowerPakConfig.VOTES_SITE_TOPZONE_URL);
		con = url.openConnection();    
		con.addRequestProperty("User-Agent", "Mozilla/4.76");
		is = con.getInputStream();
		isr = new InputStreamReader(is);		    
		in = new BufferedReader(isr);
		String inputLine;
		while ((inputLine = in.readLine()) != null)
		{
			if (inputLine.contains("Votes"))
			{
				String votesLine = in.readLine() ;

				votes = Integer.valueOf(votesLine.split(">")[5].replace("</font", ""));
				break;
			}
		}
	}
	catch (Exception e)
	{
		_log.info("[AutoVoteReward] Server TOPZONE is offline or something is wrong in link");
		//e.printStackTrace();
	}
	finally
	{
		if(in!=null)
			try
			{
				in.close();
			}
			catch(IOException e1)
			{
				e1.printStackTrace();
			}
		if(isr!=null)
			try
			{
				isr.close();
			}
			catch(IOException e1)
			{
				e1.printStackTrace();
			}
		if(is!=null)
			try
			{
				is.close();
			}
			catch(IOException e1)
			{
				e1.printStackTrace();
			}
	}
	return votes;
}

private void setHopZoneVoteCount(int voteCount)
{
	hopzoneVotesCount = voteCount;
}

private int getHopZoneVoteCount()
{
	return hopzoneVotesCount;
}

private void setTopZoneVoteCount(int voteCount)
{
	topzoneVotesCount = voteCount;
}

private int getTopZoneVoteCount()
{
	return topzoneVotesCount;
}

public static AutoVoteRewardHandler getInstance()
{
	if(PowerPakConfig.VOTES_SITE_HOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_HOPZONE_URL.equals("")){
		hopzone = true;
	}

	if(PowerPakConfig.VOTES_SITE_TOPZONE_URL != null && !PowerPakConfig.VOTES_SITE_TOPZONE_URL.equals("")){
		topzone = true;
	}

	if(topzone || hopzone)
		return SingletonHolder._instance;
	return null;
}

@SuppressWarnings("synthetic-access")
private static class SingletonHolder
{
	protected static final AutoVoteRewardHandler    _instance       = new AutoVoteRewardHandler();
}
}

pare kai balto ena pou fixara twra aplo announce

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.



  • Posts

    • Interlude x15 –  No soy el administrador de este servidor, pero es un nuevo proyecto que está muy bien configurado — ¡solo necesita una comunidad! Si estás buscando una experiencia nueva, equilibrada y emocionante en Interlude, este es el lugar. ¡Participa! Únete al servidor Trae tu clan o equipo ¡Ayuda a que el servidor crezca!   Fecha de Apertura 16 de Mayo de 2025 Horario de Apertura 19:00 GMT-3 Versión del Juego Interlude Versión de la Interfaz Classic (protocolo 166) Rates de EXP y SP Dinámicos Niveles 1 al 19: EXP 15, SP 10 Niveles 20 al 39: EXP 13, SP 7 Niveles 40 al 51: EXP 11, SP 3 Niveles 52 al 60: EXP 9, SP 3 Niveles 61 al 75: EXP 7, SP 1.5 Niveles 76+: EXP 2, SP 1 Otros Rates Adena: x1 Chance de Drop: x1 Chance de Spoil: x1 Cantidad de SealStone: x2 RB XP/SP: x3 RB Drop: x2 Configuraciones Únicas Hasta 3 cuentas por PC (2 gratis + 1 paga) Sistema de Enchant skill desactivado Sistema de Augment weapon desactivado Mana potion: efecto de 2000, reutilización de 15 segundos Sin auto-learn skill SP y Book para aprender skills Quests 1ª y 2ª Transferencia de Clase por Adena 3ª Transferencia de Clase por 700 Halisha Marks Subclase custom: solo hablar con las cajas de los 4 jefes Nobles Retail Recompensa de Transferencia de Profesión Recibe un ticket de 1ª profesión (artículos del starter pack) Recibe un ticket de 2ª profesión (Montura de Clase) Mejoras en el Auto-farm Hemos reestructurado la IA del auto-farm Corregida la zona de caza Configuraciones de alcance de la caza automática Clanes y Alianzas Máximo de miembros por clan: 25 miembros Máximo de clanes por alianza: 1 clan El clan ya inicia nivel 8, sin reputación y sin skills Comandos Dentro del Juego .cfg - Para ajustar configuraciones del juego .instancezone - Verificar el tiempo de instancias .sellbuff - Para comenzar a vender buffs .topclan - Para verificar el top clan .acp - Para usar el sistema de auto potion Bono de EXP Extra en la Party 6 miembros: 20% 7 miembros: 30% 8 miembros: 40% 9 miembros: 50% NPC Buff Duración: 1 hora Total de buffs: 24 + 4 (Divine Inspiration) Buffs básicos sin protección y sin profecías   Join  >> DISCORD <<    
    • 🚀 MoMoProxy Static Residential Proxies For Sale!     🔹 Stable, secure & high-anonymity 🔹 >10Mbps speed, <10ms latency 🔹 99.99% uptime & static IPs 🔹 Unlimited traffic & connections 🌍 30M+ clean residential IPs ✅ Whitelist & user/pass auth 💳 Flexible plans (7/30/90 days) 💰 From $3/IP (Pay-per-IP) 🔥 Perfect for: ✔️ Ad verification ✔️ E-commerce/social media ✔️ Data scraping ✔️ Anti-detect browsers 🆓 Start free trial today! 🔗 [Insert Link] #Proxy #ResidentialProxies #WebScraping #DigitalMarketing   1/ Why Choose MoMoProxy? ✅ Global ISP network (30M+ IPs) ✅ Dedicated dashboard for easy management ✅ 24/7 stable operation ✅ HTTP(S)/SOCKS5 support 2/ Use Cases: 📊 Ad fraud detection 🛒 Sneaker copping & e-com 📱 Social media automation 🌐 Travel aggregation & more! 3/ Get Started in 4 Steps: A. Pick MoMoProxy B. Grab your IP credentials C. Configure your tool D. Enjoy unlimited sessions!   https://momoproxy.com/static-residential-proxies https://momoproxy.com/static-residential-proxies https://momoproxy.com/static-residential-proxies    
    • ➡ Discount for your purchase: MAY2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: MAY2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • Special offer until end of the month, don't lose it. 250  include datapack and patch latest.
  • Topics

×
×
  • Create New...