Jump to content

Recommended Posts

Posted

Hello guys.

 

You have already seen this feature, but i decided to share it since i coded this one from scratch. There many features like:

 

Customize your look by choosing 1 by 1 the items you want.

Get the target's look.

Get the target's single part.

Ability to add items available through configs.

You can see the changes too.

 

# DressMe system.
AllowDressMeSystem = False
# DressMe values.
# Note: It works like name,id;name,id
# WARNING: No spaces on names, use _ instead of space.
DressMeChests = Draconic,6379;Imperial,6373;Arcana,6383
DressMeLegs = Imperial,6374
DressMeBoots = Draconic,6381;Imperial,6376;Arcana,6385
DressMeGloves = Draconic,6380;Imperial,6375;Arcana,6384
DressMeWeapons = Draconic_Bow,7577;Shining_Bow,6594;Arcana_Mace,6608

 

public static boolean ALLOW_DRESS_ME_SYSTEM;
public static Map<String, Integer> DRESS_ME_CHESTS = new HashMap<>();
public static Map<String, Integer> DRESS_ME_LEGS = new HashMap<>();
public static Map<String, Integer> DRESS_ME_BOOTS = new HashMap<>();
public static Map<String, Integer> DRESS_ME_GLOVES = new HashMap<>();
public static Map<String, Integer> DRESS_ME_WEAPONS = new HashMap<>();

ALLOW_DRESS_ME_SYSTEM = c.getProperty("AllowDressMeSystem", false);
		String temp = c.getProperty("DressMeChests", "");
		String[] temp2 = temp.split(";");
		for (String s : temp2)
		{
			String[] t = s.split(",");
			DRESS_ME_CHESTS.put(t[0], Integer.parseInt(t[1]));
		}
		temp = c.getProperty("DressMeLegs", "");
		temp2 = temp.split(";");
		for (String s : temp2)
		{
			String[] t = s.split(",");
			DRESS_ME_LEGS.put(t[0], Integer.parseInt(t[1]));
		}
		temp = c.getProperty("DressMeBoots", "");
		temp2 = temp.split(";");
		for (String s : temp2)
		{
			String[] t = s.split(",");
			DRESS_ME_BOOTS.put(t[0], Integer.parseInt(t[1]));
		}
		temp = c.getProperty("DressMeGloves", "");
		temp2 = temp.split(";");
		for (String s : temp2)
		{
			String[] t = s.split(",");
			DRESS_ME_GLOVES.put(t[0], Integer.parseInt(t[1]));
		}
		temp = c.getProperty("DressMeWeapons", "");
		temp2 = temp.split(";");
		for (String s : temp2)
		{
			String[] t = s.split(",");
			DRESS_ME_WEAPONS.put(t[0], Integer.parseInt(t[1]));
		}

 

/*
* 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import net.sf.l2j.gameserver.datatables.ItemTable;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

/**
* @author Anarchy
*
*/
public class DressMe implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS = { "dressme" };

@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar)
{
	if (command.equals("dressme"))
	{
		sendMainWindow(activeChar);
	}

	return true;
}

public static void sendMainWindow(L2PcInstance activeChar)
{
	NpcHtmlMessage htm = new NpcHtmlMessage(0);
	htm.setFile("./data/html/custom/dressme/main.htm");
	htm.replace("%enabled%", activeChar.isDressMeEnabled() ? "enabled" : "disabled");
	if (activeChar.getDressMeData() == null)
	{
		htm.replace("%chestinfo%", "You have no custom chest.");
		htm.replace("%legsinfo%", "You have no custom legs.");
		htm.replace("%bootsinfo%", "You have no custom boots.");
		htm.replace("%glovesinfo%", "You have no custom gloves.");
		htm.replace("%weapinfo%", "You have no custom weapon.");
	}
	else
	{
		htm.replace("%chestinfo%", activeChar.getDressMeData().getChestId() == 0 ? "You have no custom chest." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getChestId()).getName());
		htm.replace("%legsinfo%", activeChar.getDressMeData().getLegsId() == 0 ? "You have no custom legs." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getLegsId()).getName());
		htm.replace("%bootsinfo%", activeChar.getDressMeData().getBootsId() == 0 ? "You have no custom boots." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getBootsId()).getName());
		htm.replace("%glovesinfo%", activeChar.getDressMeData().getGlovesId() == 0 ? "You have no custom gloves." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getGlovesId()).getName());
		htm.replace("%weapinfo%", activeChar.getDressMeData().getWeapId() == 0 ? "You have no custom weapon." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getWeapId()).getName());
	}

	activeChar.sendPacket(htm);
}

@Override
public String[] getVoicedCommandList()
{
	return VOICED_COMMANDS;
}
}

 

/*
* 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.handler.bypasshandlers;

import java.util.StringTokenizer;

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.custom.DressMeData;
import net.sf.l2j.gameserver.datatables.ItemTable;
import net.sf.l2j.gameserver.handler.IBypassHandler;
import net.sf.l2j.gameserver.handler.voicedcommandhandlers.DressMe;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

/**
* @author Anarchy
*
*/
public class DressMeBypasses implements IBypassHandler
{
private static final String[] BYPASSES = { "bp_changedressmestatus", "bp_editWindow", "bp_setpart", "bp_gettarget", "bp_main" };

@Override
public boolean handleBypass(String bypass, L2PcInstance activeChar)
{
	if (bypass.equals("bp_changedressmestatus"))
	{
		if (activeChar.isDressMeEnabled())
		{
			activeChar.setDressMeEnabled(false);
			activeChar.broadcastUserInfo();
		}
		else
		{
			activeChar.setDressMeEnabled(true);
			activeChar.broadcastUserInfo();
		}

		DressMe.sendMainWindow(activeChar);
	}

	if (bypass.startsWith("bp_editWindow"))
	{
		String bp = bypass.substring(14);
		StringTokenizer st = new StringTokenizer(bp);

		sendEditWindow(activeChar, st.nextToken());
	}

	if (bypass.startsWith("bp_setpart"))
	{
		String bp = bypass.substring(11);
		StringTokenizer st = new StringTokenizer(bp);

		String part = st.nextToken();
		String type = st.nextToken();

		setPart(activeChar, part, type);
	}

	if (bypass.startsWith("bp_gettarget"))
	{
		String bp = bypass.substring(13);
		StringTokenizer st = new StringTokenizer(bp);

		String part = st.nextToken();

		stealTarget(activeChar, part);
	}

	if (bypass.equals("bp_main"))
	{
		DressMe.sendMainWindow(activeChar);
	}

	return true;
}

public void stealTarget(L2PcInstance p, String part)
{
	if (p.getTarget() == null || !(p.getTarget() instanceof L2PcInstance))
	{
		p.sendMessage("Invalid target.");
		return;
	}

	L2PcInstance t = (L2PcInstance)p.getTarget();

	if (p.getDressMeData() == null)
	{
		DressMeData dmd = new DressMeData();
		p.setDressMeData(dmd);
	}

	boolean returnMain = false;

	switch (part)
	{
		case "chest":
		{
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) == null)
			{
				p.getDressMeData().setChestId(0);
			}
			else
			{
				p.getDressMeData().setChestId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItemId());
			}
			break;
		}
		case "legs":
		{
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) == null)
			{
				p.getDressMeData().setLegsId(0);
			}
			else
			{
				p.getDressMeData().setLegsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS).getItemId());
			}
			break;
		}
		case "gloves":
		{
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) == null)
			{
				p.getDressMeData().setGlovesId(0);
			}
			else
			{
				p.getDressMeData().setGlovesId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItemId());
			}
			break;
		}
		case "boots":
		{
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) == null)
			{
				p.getDressMeData().setBootsId(0);
			}
			else
			{
				p.getDressMeData().setBootsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItemId());
			}
			break;
		}
		case "weap":
		{
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null)
			{
				p.getDressMeData().setWeapId(0);
			}
			else
			{
				p.getDressMeData().setWeapId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getItemId());
			}
			break;
		}
		case "all":
		{
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) == null)
			{
				p.getDressMeData().setChestId(0);
			}
			else
			{
				p.getDressMeData().setChestId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItemId());
			}
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) == null)
			{
				p.getDressMeData().setLegsId(0);
			}
			else
			{
				p.getDressMeData().setLegsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS).getItemId());
			}
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) == null)
			{
				p.getDressMeData().setGlovesId(0);
			}
			else
			{
				p.getDressMeData().setGlovesId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItemId());
			}
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) == null)
			{
				p.getDressMeData().setBootsId(0);
			}
			else
			{
				p.getDressMeData().setBootsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItemId());
			}
			if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null)
			{
				p.getDressMeData().setWeapId(0);
			}
			else
			{
				p.getDressMeData().setWeapId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getItemId());
			}
			returnMain = true;
			break;
		}
	}

	p.broadcastUserInfo();
	if (!returnMain)
		sendEditWindow(p, part);
	else
		DressMe.sendMainWindow(p);
}

public void setPart(L2PcInstance p, String part, String type)
{
	if (p.getDressMeData() == null)
	{
		DressMeData dmd = new DressMeData();
		p.setDressMeData(dmd);
	}

	switch (part)
	{
		case "chest":
		{
			if (Config.DRESS_ME_CHESTS.keySet().contains(type))
			{
				p.getDressMeData().setChestId(Config.DRESS_ME_CHESTS.get(type));
			}

			break;
		}
		case "legs":
		{
			if (Config.DRESS_ME_LEGS.keySet().contains(type))
			{
				p.getDressMeData().setLegsId(Config.DRESS_ME_LEGS.get(type));
			}

			break;
		}
		case "gloves":
		{
			if (Config.DRESS_ME_GLOVES.keySet().contains(type))
			{
				p.getDressMeData().setGlovesId(Config.DRESS_ME_GLOVES.get(type));
			}

			break;
		}
		case "boots":
		{
			if (Config.DRESS_ME_BOOTS.keySet().contains(type))
			{
				p.getDressMeData().setBootsId(Config.DRESS_ME_BOOTS.get(type));
			}

			break;
		}
		case "weap":
		{
			if (Config.DRESS_ME_WEAPONS.keySet().contains(type))
			{
				p.getDressMeData().setWeapId(Config.DRESS_ME_WEAPONS.get(type));
			}

			break;
		}
	}

	p.broadcastUserInfo();
	sendEditWindow(p, part);
}

public void sendEditWindow(L2PcInstance p, String part)
{
	NpcHtmlMessage htm = new NpcHtmlMessage(0);
	htm.setFile("./data/html/custom/dressme/edit.htm");
	htm.replace("%part%", part);
	switch (part)
	{
		case "chest":
		{
			if (p.getDressMeData() == null)
			{
				htm.replace("%partinfo%", "You have no custom chest.");
			}
			else
			{
				htm.replace("%partinfo%", p.getDressMeData().getChestId() == 0 ? "You have no custom chest." : ItemTable.getInstance().getTemplate(p.getDressMeData().getChestId()).getName());
			}
			String temp = "";
			for (String s : Config.DRESS_ME_CHESTS.keySet())
			{
				temp += s+";";
			}
			htm.replace("%dropboxdata%", temp);
			break;
		}
		case "legs":
		{
			if (p.getDressMeData() == null)
			{
				htm.replace("%partinfo%", "You have no custom legs.");
			}
			else
			{
				htm.replace("%partinfo%", p.getDressMeData().getLegsId() == 0 ? "You have no custom legs." : ItemTable.getInstance().getTemplate(p.getDressMeData().getLegsId()).getName());
			}
			String temp = "";
			for (String s : Config.DRESS_ME_LEGS.keySet())
			{
				temp += s+";";
			}
			htm.replace("%dropboxdata%", temp);
			break;
		}
		case "gloves":
		{
			if (p.getDressMeData() == null)
			{
				htm.replace("%partinfo%", "You have no custom gloves.");
			}
			else
			{
				htm.replace("%partinfo%", p.getDressMeData().getGlovesId() == 0 ? "You have no custom gloves." : ItemTable.getInstance().getTemplate(p.getDressMeData().getGlovesId()).getName());
			}
			String temp = "";
			for (String s : Config.DRESS_ME_GLOVES.keySet())
			{
				temp += s+";";
			}
			htm.replace("%dropboxdata%", temp);
			break;
		}
		case "boots":
		{
			if (p.getDressMeData() == null)
			{
				htm.replace("%partinfo%", "You have no custom boots.");
			}
			else
			{
				htm.replace("%partinfo%", p.getDressMeData().getBootsId() == 0 ? "You have no custom boots." : ItemTable.getInstance().getTemplate(p.getDressMeData().getBootsId()).getName());
			}
			String temp = "";
			for (String s : Config.DRESS_ME_BOOTS.keySet())
			{
				temp += s+";";
			}
			htm.replace("%dropboxdata%", temp);
			break;
		}
		case "weap":
		{
			if (p.getDressMeData() == null)
			{
				htm.replace("%partinfo%", "You have no custom weapon.");
			}
			else
			{
				htm.replace("%partinfo%", p.getDressMeData().getWeapId() == 0 ? "You have no custom weapon." : ItemTable.getInstance().getTemplate(p.getDressMeData().getWeapId()).getName());
			}
			String temp = "";
			for (String s : Config.DRESS_ME_WEAPONS.keySet())
			{
				temp += s+";";
			}
			htm.replace("%dropboxdata%", temp);
			break;
		}
	}

	p.sendPacket(htm);
}

@Override
public String[] getBypassHandlersList()
{
	return BYPASSES;
}
}

 

/*
* 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
*/
package net.sf.l2j.gameserver.custom;

/**
* @author Anarchy
*
*/
public class DressMeData
{
private int chestId,
legsId,
glovesId,
feetId,
weapId;

public DressMeData()
{
	chestId = 0;
	legsId = 0;
	glovesId = 0;
	feetId = 0;
	weapId = 0;
}

public int getChestId()
{
	return chestId;
}

public int getLegsId()
{
	return legsId;
}

public int getGlovesId()
{
	return glovesId;
}

public int getBootsId()
{
	return feetId;
}

public int getWeapId()
{
	return weapId;
}

public void setChestId(int val)
{
	chestId = val;
}

public void setLegsId(int val)
{
	legsId = val;
}

public void setGlovesId(int val)
{
	glovesId = val;
}

public void setBootsId(int val)
{
	feetId = val;
}

public void setWeapId(int val)
{
	weapId = val;
}
}

 

CharInfo.java
Replace these:

writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));

with these:

if (!_activeChar.isDressMeEnabled())
	{
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));
	}
	else
	{
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId()));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId()));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId()));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId()));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
		writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));
	}

 

UserInfo.java
Replace these:

                                          writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));

		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));

with these:

                             if (!_activeChar.isDressMeEnabled())
	{
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));

		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));
	}
	else
	{
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD));
		writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND));
		writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId()));
		writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId()));
		writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId()));
		writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId()));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK));
		writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR));
		writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE));

		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId()));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId()));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId()));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId()));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK));
		writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId()));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
		writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE));
	}

 

L2PcInstance.java
              private DressMeData _dressmedata = null;

public DressMeData getDressMeData()
{
	return _dressmedata;
}

public void setDressMeData(DressMeData val)
{
	_dressmedata = val;
}

private boolean _dressed = false;

public boolean isDressMeEnabled()
{
	return _dressed;
}

public void setDressMeEnabled(boolean val)
{
	_dressed = val;
}

 

And the htmls:

 

data/html/custom/dressme/edit.htm

<html><body>
<center>
Current %part%: %partinfo%
<br>
<combobox width=120 height=17 var=val list=%dropboxdata%>
<br1>
<a action="bypass -h bp_setpart %part% $val">Set.</a>
<br1>
<a action="bypass -h bp_gettarget %part%">Get target's.</a>
<br>
<a action="bypass -h bp_main">Back.</a>
</center>
</body></html>

 

data/html/custom/dressme/main.htm

<html><body>
<center>
Here you can change your appearance!
<br>
Dress me status is currently <font color="LEVEL">%enabled%</font>.<br1>
<a action="bypass -h bp_changedressmestatus">Change status.</a>
<br>
Your current custom appearance items:
<br>
</center>
Chest: %chestinfo%
<br1>
<a action="bypass -h bp_editWindow chest">Edit.</a>
<br>
Legs: %legsinfo%
<br1>
<a action="bypass -h bp_editWindow legs">Edit.</a>
<br>
Gloves: %glovesinfo%
<br1>
<a action="bypass -h bp_editWindow gloves">Edit.</a>
<br>
Boots: %bootsinfo%
<br1>
<a action="bypass -h bp_editWindow boots">Edit.</a>
<br>
Weapon: %weapinfo%
<br1>
<a action="bypass -h bp_editWindow weap">Edit.</a>
<br>
<center><a action="bypass -h bp_gettarget all">Get target's appearance.</a></center>
</body></html>

 

Credits to me, coded for aCis.

Posted

I had shared one for aCis too, it was only a parser and the userInfo, but since Dev decided to "fix" my karma 6 times back then because he claim it was leech I decided to drop the download link

Posted

I had shared one for aCis too, it was only a parser and the userInfo, but since Dev decided to "fix" my karma 6 times back then because he claim it was leech I decided to drop the download link

Yeah, i remember that. I don't think that's someone can doubt i made this one though, it's clearly not shared before working like this.

 

EDIT: You can see the changes too, not just the others. Forgot to mention that.

Posted

so if i coded anything already shared from scratch i can share it too ?

 

Sure, your version might be better by the another one.

 

But of course, I am talking about big feature. Because how much better can an online-command, for example, can be?

Posted

Sure, your version might be better by the another one.

 

But of course, I am talking about big feature. Because how much better can an online-command, for example, can be?

fk this logic really

Posted

Actually leach what from this ? its just writeD(itemId) but they think its hard cause the result looks hard and they call it leach, nevermind :D

  • 1 year later...
  • 3 months later...
  • 3 months later...
  • 1 month later...
Posted

Hello. Nice work there. Question. I see the code needs 3 new files right? What name should we give to them and where do they need to be? If you help me out here, it will be very useful. Thank you verymuch .

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

    • Selling Telegram bots with 2024 year old. Strong. Bots clean, without subscribers, without blocking Price list: From 3 bots - 3.5$ for 1sht. From 20 bots - 3$ for 1pc. From 60 bots - 2.8$ for 1pc. From 100 bots - 2.5$ for 1pc. From 400 bots - 2$ for 1pc. Full transfer of owner rights / transfer account. Sell empty channels 2022. Without shadow bans. Not used. Without posts. Write in Telegram - @SMMTG6
    • Hello everyone   We are engaged in search engine optimization bots in Telegram.   - We make ranking bots to order Telegram search bots up to 100,000 premium subscribers.   We work with countries such as: USA, China, Israel, Russia, Uzbekistan, India, Saudi Arabia, Iran, Italy, Turkey and other countries. Clarify with us. Possible output in multi-geo (several countries).   Prices from 10$ from 20$ per 1000 Premium subscribers, depending on the country.   Term of manufacture of bot - 4 days   We are one of the most famous sellers in Telegram. We agree on the guarantor at your expense.   ☆ Our Telegram-channel - https://t.me/+e_DKWnC5AFw0ZDhi   ☆ For questions about buying a bot contact @SMMTG6   ☆ Our panel with the best Premium subscribers - smmtg.pro
    • Opening April 26 at 19:00 (UTC +3)  https://lineage2dex.com/en/sign-in Open Beta Test from April 22 This is pre-announcing of NEW season server, so we want to share some key points of it. Full details with road map, patch notes we will announce a bit latter Main features Modern Classic client (less lags, smoother gameplay, a lot of useful interface features). Anti-bot protection - we use our own system in combine with popular solutions like AAC, so in the end our project have one of the best anti-bot shield exists. Buff book to buff yourself or your summon/pet. With regular buff book you can create only 1 buff profile, if you need more - get the modern buff book and create up to 10 profiles! Daily rewards - login to the game every day and get rewards. Expanded subclass slots - you can have 5 subclasses from the beginning and expand up to 10. Class/Gender change - you can change your main class and gender if you want. Masterwork items (can be obtained by crafting or farming RBs, have better bonuses than regular items). Item Broker Auctions in towns can sell some epic jewelry and other useful goods for adena (3 times per week). Giran Harbor Fair - daily event which allows you to get temporary epic jewelry a lot of other rare items for adena. Talents - special tree with passive skills which will help you to tune your class better. Team vs Team event. Episodes - we open new content step by step to keep you engaged, bring more fun and extend the game. Episodes reveal following features: Hellbound Island Isle of Preyer, with new content, new Dynasty gear PvP item improvement allows you to improve your items with additional bonuses. Charms can be equipped in one of the special slots that open when wearing a bracelet. Each type of charm grants the wearer certain bonuses Instance Zones New Epic Bosses - Freya, Beleth, Tiat, Trasken Cyclic macros (macros restarts when finishes) Why choose Dex? We have destroyed the stereotypes that PvP servers live for a couple of weeks. Our Union x50 server proves it (working from April 2020 with good online). We have enough high-end content that will allow you to maintain interest in the game all the time! And we are always working on improving the game and adding new interesting activities and content. Seasonal servers have a road map with planned list of changes to keep you engaged. When the time comes the server will be merged with the Union server. So if you're new on Dex, you can start from zero like all othe players on NEW (seasonal) server. All your items and characters will be safe, and you can continue play when season over on our main server - UNION. High-end content (unlocked over episodes) Hellbound Island Spoiler Hellbound is an endgame location mostly for parties, but if you will be well geared you can farm most spots solo. You can get to Hellbound with help of gatekeepers. Hellbound contains multiple raid bosses and entrance to new epic boss Beleth. Drop from raid bosses and from entire island in general is very valuable. Monsters at Hellbound can drop special Hellbound Coins which can be exchanged to some useful goods at the Hellbound Trader Joseph. Isle of Prayer Spoiler Isle of Prayer is a high-end location, divided into several areas, each tailored for different classes and playstyles. By completing quests and farming mobs on IoP, you can obtain Dynasty equipment. You can read more about specific features and spots from our wiki: The most popular Lineage 2 classic server waiting for you. Download L2 client and play! You expect grandiose battles and incredible siege. The adrenaline just rolls! The most popular Lineage 2 classic server waiting for you. Download L2 client and play! You expect grandiose battles and incredible siege. The adrenaline just rolls!  lineage2dex.com We will be glad to hear any comments and suggestions on our discord channel, join it we have very friendly community there  - Join discord  
    • rly cool l2off pack...but rly expesive....
  • Topics

×
×
  • Create New...