Jump to content

Dressme Command On Acis(Fixed)


Recommended Posts

You saw the post, you edited yours ...and still searching

 

I told you the amount i want for it :) noone else will give you the same system. 
Maybe only something similar but not the same ^^

Link to comment
Share on other sites

noone else will give you the same system.

The same code nop, but the same system yeah, he will and he can get even better one, talking about coding wise :D

 

 

add me on skype: drake2wow

Pm him and don't even dare to say 'IF', nor argue about the price. Else, download free version made by Anarchy and hire someone to fix it, if necessary.

Edited by SweeTs
Link to comment
Share on other sites

Keep your money and search in forum.

http://www.maxcheaters.com/topic/167772-dressme-for-interlude/?hl=dressme

As SweeT said, You can hire someone to fix it if is necessary. 

 

 

I told you the amount i want for it :)

Go in your game and get money. Not from here.

 

 

add me on skype: drake2wow

Your event cost 500E. 

Take 3 now, and the rest someday.

Link to comment
Share on other sites

Keep your money and search in forum.

http://www.maxcheaters.com/topic/167772-dressme-for-interlude/?hl=dressme

As SweeT said, You can hire someone to fix it if is necessary. 

 

 

Go in your game and get money. Not from here.

 

 

Your event cost 500E. 

Take 3 now, and the rest someday.

Dude, go throw your trash.. Is full. :D

I would ask that guy 500, jsut to be sure he wont' buy it and won't get such thing.

Is just another retard trying to copy something... i'm betting is l2excess or some other "newname" server.

 

So since he asked about the system i use, i came up with a price. And 50 euro is pretty low :)

 

Why don't you make him free? Since u'r so good to that. I would also suggest you to help all kidzor greeks which wanna open uber servers. That would bring up l2 game to a new level :)

Oh, something else... I can sell w/e i want to sell. So don't tell me from where to make money :)

 

Is not stupid the one who asks, is stupid the one who gives.

Edited by N1ghty
Link to comment
Share on other sites

Keep your money and search in forum.

http://www.maxcheaters.com/topic/167772-dressme-for-interlude/?hl=dressme

 

Your event cost 500E. 

Take 3 now, and the rest someday.

 

Why so butthurt retard? In the enterprise scene nothing comes for free. Go back to your village

Link to comment
Share on other sites

will need to adapt to IL. but is the same code. Equip item u want, and type ".dressme"

 

### Eclipse Workspace Patch 1.0
#P CT25-DataPack
Index: dist/game/data/scripts/handlers/voicedcommandhandlers/VisualArmor.java
===================================================================
--- dist/game/data/scripts/handlers/voicedcommandhandlers/VisualArmor.java (revision 0)
+++ dist/game/data/scripts/handlers/voicedcommandhandlers/VisualArmor.java (working copy)
@@ -0,0 +1,51 @@
+package handlers.voicedcommandhandlers;
+
+import ct25.xtreme.extensions.VisualArmorController;
+import ct25.xtreme.gameserver.handler.IVoicedCommandHandler;
+import ct25.xtreme.gameserver.model.actor.instance.L2PcInstance;
+import ct25.xtreme.gameserver.network.serverpackets.InventoryUpdate;
+
+public class VisualArmor implements IVoicedCommandHandler
+{
+ private static final String[] VOICED_COMMANDS =
+ {
+ "dressme", "dressMe", "DressMe", "cloakOn", "cloakOff"
+ };
+
+
+ public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
+ {
+ if(command.contains("cloakOn"))
+ {
+ activeChar.visualArmor.weaponLRHANDId =0;
+ InventoryUpdate iu = new InventoryUpdate();
+ activeChar.sendPacket(iu);
+ activeChar.broadcastUserInfo();
+ InventoryUpdate iu2 = new InventoryUpdate();
+ activeChar.sendPacket(iu2);
+ activeChar.broadcastUserInfo();
+ activeChar.sendMessage("Cloak enabled.");
+ }
+ else if(command.contains("cloakOff"))
+ {
+ activeChar.visualArmor.weaponLRHANDId =1;
+ InventoryUpdate iu = new InventoryUpdate();
+ activeChar.sendPacket(iu);
+ activeChar.broadcastUserInfo();
+ InventoryUpdate iu2 = new InventoryUpdate();
+ activeChar.sendPacket(iu2);
+ activeChar.broadcastUserInfo();
+ activeChar.sendMessage("Cloak disabled.");
+ }
+ else
+ VisualArmorController.dressMe(activeChar);
+
+ return true;
+ }
+
+
+ public String[] getVoicedCommandList()
+ {
+ return VOICED_COMMANDS;
+ }
+}
\ No newline at end of file
Index: dist/game/data/scripts/handlers/MasterHandler.java
===================================================================
--- dist/game/data/scripts/handlers/MasterHandler.java (revision 19)
+++ dist/game/data/scripts/handlers/MasterHandler.java (working copy)
@@ -247,6 +247,7 @@
import handlers.voicedcommandhandlers.Hellbound;
import handlers.voicedcommandhandlers.Lang;
import handlers.voicedcommandhandlers.TvTVoicedInfo;
+import handlers.voicedcommandhandlers.VisualArmor;
import handlers.voicedcommandhandlers.Wedding;
import handlers.voicedcommandhandlers.stats;
 
@@ -556,6 +557,7 @@
if (Config.L2JMOD_HELLBOUND_STATUS)
VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Hellbound());
 
+   VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new VisualArmor());
_log.config("Loaded " + VoicedCommandHandler.getInstance().size() + " VoicedHandlers");
}
 
#P CT25-GameServer
Index: java/ct25/xtreme/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- java/ct25/xtreme/gameserver/model/actor/instance/L2PcInstance.java (revision 19)
+++ java/ct25/xtreme/gameserver/model/actor/instance/L2PcInstance.java (working copy)
@@ -38,6 +38,7 @@
 
import ct25.xtreme.Config;
import ct25.xtreme.L2DatabaseFactory;
+import ct25.xtreme.extensions.VisualArmorModel;
import ct25.xtreme.gameserver.Announcements;
import ct25.xtreme.gameserver.GameTimeController;
import ct25.xtreme.gameserver.GeoData;
@@ -278,6 +279,8 @@
*/
public final class L2PcInstance extends L2Playable
{
+ //Dresseme
+ public VisualArmorModel visualArmor;
// Character Skill SQL String Definitions:
private static final String RESTORE_SKILLS_FOR_CHAR = "SELECT skill_id,skill_level FROM character_skills WHERE charId=? AND class_index=?";
private static final String ADD_NEW_SKILL = "INSERT INTO character_skills (charId,skill_id,skill_level,class_index) VALUES (?,?,?,?)";
@@ -1239,6 +1242,7 @@
_radar = new L2Radar(this);
 
startVitalityTask();
+ visualArmor = new VisualArmorModel(this);
}
 
private L2PcInstance(int objectId)
@@ -7265,6 +7269,7 @@
if (!Config.WAREHOUSE_CACHE)
player.getWarehouse();
 
+
// Retrieve from the database all secondary data of this L2PcInstance
// and reward expertise/lucky skills if necessary.
// Note that Clan, Noblesse and Hero skills are given separately and not here.
Index: java/ct25/xtreme/gameserver/GameServer.java
===================================================================
--- java/ct25/xtreme/gameserver/GameServer.java (revision 19)
+++ java/ct25/xtreme/gameserver/GameServer.java (working copy)
@@ -32,6 +32,7 @@
import ct25.xtreme.Config;
import ct25.xtreme.L2DatabaseFactory;
import ct25.xtreme.Server;
+import ct25.xtreme.extensions.VisualArmorController;
import ct25.xtreme.gameserver.cache.CrestCache;
import ct25.xtreme.gameserver.cache.HtmCache;
import ct25.xtreme.gameserver.datatables.AccessLevels;
@@ -318,6 +319,7 @@
BoatManager.getInstance();
AirShipManager.getInstance();
GraciaSeedsManager.getInstance();
+ VisualArmorController.load();
 
try
{
Index: java/ct25/xtreme/extensions/VisualArmorModel.java
===================================================================
--- java/ct25/xtreme/extensions/VisualArmorModel.java (revision 0)
+++ java/ct25/xtreme/extensions/VisualArmorModel.java (working copy)
@@ -0,0 +1,156 @@
+package ct25.xtreme.extensions;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import ct25.xtreme.L2DatabaseFactory;
+import ct25.xtreme.gameserver.model.actor.instance.L2PcInstance;
+import ct25.xtreme.gameserver.network.serverpackets.InventoryUpdate;
+
+/**
+ * @author Issle
+ *
+ */
+ public class VisualArmorModel
+ {
+ private static final String RESTORE_VISUAL_ARMOR = "SELECT GlovesId,ChestId,BootsId,PantsId,LeftHandId,RightHandId,DoubleHandId FROM visual_armor WHERE CharId=?";
+ private static final String UPDATE_VISUAL_ARMOR = "UPDATE visual_armor SET GlovesId=?,ChestId=?,BootsId=?,PantsId=?,LeftHandId=?,RightHandId=?,DoubleHandId=? WHERE CharId=?";
+ private static final String CREATE_VISUAL_ARMOR = "INSERT INTO visual_armor (CharId,GlovesId,ChestId,BootsId,PantsId,LeftHandId,RightHandId,DoubleHandId) values (?,?,?,?,?,?,?,?)";
+
+ public static final String CREATE =
+ "CREATE TABLE IF NOT EXISTS `visual_armor` (" +
+ "`CharId` int(11) NOT NULL," +
+ "`GlovesId` int(11) NOT NULL DEFAULT '0'," +
+ "`BootsId` int(11) NOT NULL DEFAULT '0'," +
+ "`ChestId` int(11) NOT NULL DEFAULT '0'," +
+ "`PantsId` int(11) NOT NULL DEFAULT '0'," +
+ "`LeftHandId` int(11) NOT NULL DEFAULT '0'," +
+ "`RightHandId` int(11) NOT NULL DEFAULT '0'," +
+ "`DoubleHandId` int(11) NOT NULL DEFAULT '0',PRIMARY KEY (`CharId`))";
+
+ public static final String DROP =
+ "DROP TABLE 'visual_armor'";
+
+ public int glovesTextureId=0;
+ public int armorTextureId=0;
+ public int pantsTextureId=0;
+ public int bootsTextureId=0;
+ public int weaponLHANDId=0;
+ public int weaponRHANDId=0;
+ public int weaponLRHANDId=0;
+ public int ownerId;
+
+
+ public void updateVisualArmor()
+ {
+ Connection con = null;
+ try
+ {
+ con = L2DatabaseFactory.getInstance().getConnection();
+ PreparedStatement statement = con.prepareStatement(UPDATE_VISUAL_ARMOR);
+ statement.setInt(1, glovesTextureId);
+ statement.setInt(2, armorTextureId);
+ statement.setInt(3, bootsTextureId);
+ statement.setInt(4, pantsTextureId);
+ statement.setInt(5, weaponLHANDId);
+ statement.setInt(6, weaponRHANDId);
+ statement.setInt(7, weaponLRHANDId);
+ statement.setInt(8, ownerId);
+ statement.execute();
+ statement.close();
+
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ try { con.close(); } catch (Exception e) {}
+ }
+ }
+
+ public VisualArmorModel(L2PcInstance activeChar)
+ {
+ ownerId = activeChar.getObjectId();
+ Connection con = null;
+ try
+ {
+ con = L2DatabaseFactory.getInstance().getConnection();
+
+ PreparedStatement statement = con.prepareStatement(RESTORE_VISUAL_ARMOR);
+ statement.setInt(1, ownerId);
+ ResultSet rset = statement.executeQuery();
+ boolean got = false;
+ while(rset.next())
+ {
+ glovesTextureId = rset.getInt("GlovesId");
+ armorTextureId = rset.getInt("ChestId");
+ pantsTextureId = rset.getInt("PantsId");
+ bootsTextureId = rset.getInt("BootsId");
+ weaponLHANDId = rset.getInt("LeftHandId");
+ weaponRHANDId = rset.getInt("RightHandId");
+ weaponLRHANDId = rset.getInt("DoubleHandId");
+ got = true;
+
+ }
+
+ rset.close();
+ statement.close();
+
+ if(got == false)
+ {
+ createVisualArmor();
+ }
+
+ InventoryUpdate iu = new InventoryUpdate();
+ activeChar.sendPacket(iu);
+ activeChar.broadcastUserInfo();
+ InventoryUpdate iu2 = new InventoryUpdate();
+ activeChar.sendPacket(iu2);
+ activeChar.broadcastUserInfo();
+ activeChar.sendMessage("You changed clothes.");
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ try { con.close(); } catch (Exception e) {}
+ }
+ }
+
+ public void createVisualArmor() throws SQLException
+ {
+ Connection con = null;
+
+ try
+ {
+ con = L2DatabaseFactory.getInstance().getConnection();
+ PreparedStatement statement = con.prepareStatement(CREATE_VISUAL_ARMOR);
+
+ statement.setInt(1, ownerId);
+ statement.setInt(2, 0);
+ statement.setInt(3, 0);
+ statement.setInt(4, 0);
+ statement.setInt(5, 0);
+ statement.setInt(6, 0);
+ statement.setInt(7, 0);
+ statement.setInt(8, 0);
+
+ statement.executeUpdate();
+ statement.close();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ try { con.close(); } catch (Exception e) {}
+ }
+ }
+
+}
\ No newline at end of file
Index: java/ct25/xtreme/gameserver/network/serverpackets/CharInfo.java
===================================================================
--- java/ct25/xtreme/gameserver/network/serverpackets/CharInfo.java (revision 19)
+++ java/ct25/xtreme/gameserver/network/serverpackets/CharInfo.java (working copy)
@@ -17,6 +17,7 @@
import java.util.logging.Logger;
 
import ct25.xtreme.Config;
+import ct25.xtreme.extensions.VisualArmorController;
import ct25.xtreme.gameserver.datatables.NpcTable;
import ct25.xtreme.gameserver.instancemanager.CursedWeaponsManager;
import ct25.xtreme.gameserver.model.actor.L2Decoy;
@@ -249,20 +250,20 @@
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
if (_airShipHelm == 0)
{
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
+ writeD(VisualArmorController.getRHAND(_activeChar));
+ writeD(VisualArmorController.getLHAND(_activeChar));
}
else
{
writeD(_airShipHelm);
writeD(0);
}
- 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_CLOAK));
- writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
+ writeD(VisualArmorController.getVirtualGloves(_activeChar));
+ writeD(VisualArmorController.getVirtualBody(_activeChar));
+ writeD(VisualArmorController.getVirtualPants(_activeChar));
+ writeD(VisualArmorController.getVirtualBoots(_activeChar));
+ writeD(VisualArmorController.getCloak(_activeChar));
+ writeD(VisualArmorController.getRHAND(_activeChar));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR2));
// T1 new d's
Index: java/ct25/xtreme/gameserver/network/serverpackets/UserInfo.java
===================================================================
--- java/ct25/xtreme/gameserver/network/serverpackets/UserInfo.java (revision 19)
+++ java/ct25/xtreme/gameserver/network/serverpackets/UserInfo.java (working copy)
@@ -15,6 +15,7 @@
package ct25.xtreme.gameserver.network.serverpackets;
 
import ct25.xtreme.Config;
+import ct25.xtreme.extensions.VisualArmorController;
import ct25.xtreme.gameserver.datatables.NpcTable;
import ct25.xtreme.gameserver.instancemanager.CursedWeaponsManager;
import ct25.xtreme.gameserver.instancemanager.TerritoryWarManager;
@@ -192,20 +193,20 @@
writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
if (_airShipHelm == 0)
{
- writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
- writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
+ writeD(VisualArmorController.getRHAND(_activeChar) );
+ writeD(VisualArmorController.getLHAND(_activeChar) );
}
else
{
writeD(_airShipHelm);
writeD(0);
}
- 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_CLOAK));
- writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
+ writeD(VisualArmorController.getVirtualGloves(_activeChar));
+ writeD(VisualArmorController.getVirtualBody(_activeChar));
+ writeD(VisualArmorController.getVirtualPants(_activeChar));
+ writeD(VisualArmorController.getVirtualBoots(_activeChar));
+ writeD(VisualArmorController.getCloak(_activeChar));
+ writeD(VisualArmorController.getRHAND(_activeChar));
writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR2));
writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RBRACELET));
Index: java/ct25/xtreme/extensions/VisualArmorController.java
===================================================================
--- java/ct25/xtreme/extensions/VisualArmorController.java (revision 0)
+++ java/ct25/xtreme/extensions/VisualArmorController.java (working copy)
@@ -0,0 +1,355 @@
+package ct25.xtreme.extensions;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import ct25.xtreme.L2DatabaseFactory;
+import ct25.xtreme.gameserver.datatables.ItemTable;
+import ct25.xtreme.gameserver.model.L2ItemInstance;
+import ct25.xtreme.gameserver.model.actor.instance.L2PcInstance;
+import ct25.xtreme.gameserver.model.itemcontainer.Inventory;
+import ct25.xtreme.gameserver.network.serverpackets.InventoryUpdate;
+import ct25.xtreme.gameserver.templates.item.L2Armor;
+import ct25.xtreme.gameserver.templates.item.L2ArmorType;
+import ct25.xtreme.gameserver.templates.item.L2Item;
+import ct25.xtreme.gameserver.templates.item.L2Weapon;
+import ct25.xtreme.gameserver.templates.item.L2WeaponType;
+
+/**
+ * @author giorgakis
+ *
+ */
+public class VisualArmorController
+{
+ //As of freya there are 19 weapon types.
+ public static final int totalWeaponTypes = 19;
+
+ //As of freya there are 6 armor types.
+ public static final int totalArmorTypes = 6;
+
+ public static boolean[][] weaponMapping = new boolean[totalWeaponTypes][totalWeaponTypes];
+ public static boolean[][] armorMapping = new boolean[totalArmorTypes][totalArmorTypes];
+
+ public static void migrate()
+ {
+ System.out.println("[VisualArmor]:Migrating the database.");
+ Connection con = null;
+ try
+ {
+ con = L2DatabaseFactory.getInstance().getConnection();
+ PreparedStatement statement = con.prepareStatement(VisualArmorModel.CREATE);
+ statement.execute();
+ statement.close();
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ try { con.close(); } catch (Exception e) {}
+ }
+ }
+
+ public static void load()
+ {
+ migrate();
+ generateMappings();
+ }
+
+ /**
+ * All same type armors and same type weapons can get visual. All different types
+ * cannot get visual unless it is stated in here.
+ */
+ public static void generateMappings()
+ {
+ for(int i =0; i< weaponMapping.length; i++)
+ for(int j = 0; j< weaponMapping.length; j++)
+ weaponMapping[i][j]=false;
+
+ for(int i =0; i< armorMapping.length; i++)
+ for(int j = 0; j< armorMapping.length; j++)
+ armorMapping[i][j]=false;
+
+ callRules();
+
+ }
+
+ public static void callRules()
+ {
+ //Example: a Virtual sword can mount an Equipped blunt.
+ weaponMapping[L2WeaponType.SWORD.ordinal()][L2WeaponType.BLUNT.ordinal()] = true;
+
+ //Example: a Virtual blunt can mount an Equipped sword.
+ weaponMapping[L2WeaponType.BLUNT.ordinal()][L2WeaponType.SWORD.ordinal()] = true;
+
+ weaponMapping[L2WeaponType.BIGSWORD.ordinal()][L2WeaponType.BIGBLUNT.ordinal()] = true;
+ weaponMapping[L2WeaponType.BIGBLUNT.ordinal()][L2WeaponType.BIGSWORD.ordinal()] = true;
+
+ armorMapping[L2ArmorType.SIGIL.ordinal()][L2ArmorType.SHIELD.ordinal()] = true;
+ armorMapping[L2ArmorType.SHIELD.ordinal()][L2ArmorType.SIGIL.ordinal()] = true;
+
+ //armorMapping[L2ArmorType.HEAVY.ordinal()][L2ArmorType.LIGHT.ordinal()] = true;
+ //armorMapping[L2ArmorType.HEAVY.ordinal()][L2ArmorType.MAGIC.ordinal()] = true;
+
+ //armorMapping[L2ArmorType.LIGHT.ordinal()][L2ArmorType.HEAVY.ordinal()] = true;
+ //armorMapping[L2ArmorType.LIGHT.ordinal()][L2ArmorType.MAGIC.ordinal()] = true;
+
+ //armorMapping[L2ArmorType.MAGIC.ordinal()][L2ArmorType.LIGHT.ordinal()] = true;
+ //armorMapping[L2ArmorType.MAGIC.ordinal()][L2ArmorType.HEAVY.ordinal()] = true;
+ }
+
+ /**
+ * Checks if the weapon is the same type. If that is true then return
+ * the matching virtual id. Else check the mapping tables if any
+ * rule states that the two different weapon types should be matched.
+ * @param virtual
+ * @param equiped
+ * @param matchId
+ * @param noMatchId
+ * @return
+ */
+ public static int weaponMatching(L2WeaponType virtual, L2WeaponType equiped, int matchId, int noMatchId)
+ {
+ if(virtual == equiped)
+ return matchId;
+
+ if(weaponMapping[virtual.ordinal()][equiped.ordinal()] == true)
+ {
+ return matchId;
+ }
+
+ return noMatchId;
+ }
+
+/**
+* Checks if the armor is the same type. If that is true then return
+* the matching virtual id. Else check the mapping tables if any
+* rule states that the two different armor types should be matched.
+* @param virtual
+* @param equiped
+* @param matchId
+* @param noMatchId
+* @return
+*/
+ public static int armorMatching(L2ArmorType virtual, L2ArmorType equiped, int matchId , int noMatchId)
+ {
+ if(virtual == equiped)
+ return matchId;
+
+if (armorMapping[virtual.ordinal()][equiped.ordinal()] == true)
+ return matchId;
+
+ return noMatchId;
+ }
+
+ public static void setVirtualRhand(L2PcInstance actor)
+ {
+ actor.visualArmor.weaponRHANDId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_RHAND);
+ }
+
+ public static void setVirtualLhand(L2PcInstance actor)
+ {
+ actor.visualArmor.weaponLHANDId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_LHAND);
+ }
+
+ public static void setVirtualGloves(L2PcInstance actor)
+ {
+ actor.visualArmor.glovesTextureId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_GLOVES);
+ }
+
+ public static void setVirtualBody(L2PcInstance actor)
+ {
+ actor.visualArmor.armorTextureId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_CHEST);
+ }
+
+ public static void setVirtualPants(L2PcInstance actor)
+ {
+ int chestId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_CHEST);
+ int pantsId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_LEGS);
+
+ if(chestId != 0 && pantsId==0)
+ actor.visualArmor.pantsTextureId = chestId;
+ else
+ actor.visualArmor.pantsTextureId = pantsId;
+ }
+
+ public static void setVirtualBoots(L2PcInstance actor)
+ {
+ actor.visualArmor.bootsTextureId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_FEET);
+ }
+
+ //TODO: Merge the armor getters in one function.
+ public static int getVirtualGloves(L2PcInstance actor)
+ {
+ L2ItemInstance equipedItem = actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES);
+ if(equipedItem == null)
+ return 0;
+ //ClassCastException wont happen unless some jackass changes the values from the database.
+ L2Armor equipedGloves = (L2Armor)actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItem();
+ int equipedGlovesId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_GLOVES);
+
+ int glovesTextureId = actor.visualArmor.glovesTextureId;
+ L2Armor virtualGloves = (L2Armor)ItemTable.getInstance().getTemplate(glovesTextureId);
+
+ if(glovesTextureId != 0)
+ return armorMatching(virtualGloves.getItemType(), equipedGloves.getItemType(),glovesTextureId, equipedGlovesId);
+ else
+ return equipedGlovesId;
+ }
+
+ public static int getVirtualBody(L2PcInstance actor)
+ {
+ L2ItemInstance equipedItem = actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
+ if(equipedItem == null)
+ return 0;
+ //ClassCastException wont happen unless some jackass changes the values from the database.
+ L2Armor equipedChest = (L2Armor)actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItem();
+ int equipedChestId = actor.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST);
+
+ int chestTextureId = actor.visualArmor.armorTextureId;
+ L2Armor virtualChest = (L2Armor)ItemTable.getInstance().getTemplate(chestTextureId);
+
+ if(chestTextureId != 0)
+ return armorMatching(virtualChest.getItemType(), equipedChest.getItemType(),chestTextureId, equipedChestId);
+ else
+ return equipedChestId;
+ }
+
+ /**
+ * This is a brain fu**er handling the pants since they are
+ * also part of a fullbody armor.
+ * @param actor
+ * @return
+ */
+ public static int getVirtualPants(L2PcInstance actor)
+ {
+ L2ItemInstance equipedItem = actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS);
+
+ //Here comes the tricky part. If pants are null, then check for a fullbody armor.
+ if(equipedItem == null)
+ equipedItem = actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST);
+ if(equipedItem == null)
+ return 0;
+
+ int pantsTextureId = actor.visualArmor.pantsTextureId;
+
+ L2Armor equipedPants = (L2Armor) equipedItem.getItem();
+
+ if(equipedPants.getBodyPart() != L2Item.SLOT_FULL_ARMOR && equipedPants.getBodyPart() != L2Item.SLOT_LEGS)
+ return 0;
+ int equipedPantsId = actor.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS);
+
+
+ L2Armor virtualPants = (L2Armor)ItemTable.getInstance().getTemplate(pantsTextureId);
+
+ if(pantsTextureId != 0)
+ return armorMatching(virtualPants.getItemType(), equipedPants.getItemType(),pantsTextureId, equipedPantsId);
+ else
+ return equipedPantsId;
+ }
+
+ public static int getVirtualBoots(L2PcInstance actor)
+ {
+ L2ItemInstance equipedItem = actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET);
+ if(equipedItem == null)
+ return 0;
+ //ClassCastException wont happen unless some jackass changes the values from the database.
+ L2Armor equipedBoots = (L2Armor)actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItem();
+ int equipedBootsId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_FEET);
+
+ int bootsTextureId = actor.visualArmor.bootsTextureId;
+ L2Armor virtualGloves = (L2Armor)ItemTable.getInstance().getTemplate(bootsTextureId);
+
+ if(bootsTextureId != 0)
+ return armorMatching(virtualGloves.getItemType(), equipedBoots.getItemType(),bootsTextureId, equipedBootsId);
+ else
+ return equipedBootsId;
+ }
+
+ public static int getLHAND(L2PcInstance actor)
+ {
+ L2ItemInstance equipedItem = actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LHAND);
+ int equipedItemId = actor.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND);
+
+ int weaponLHANDId = actor.visualArmor.weaponLHANDId;
+ L2Item virtualItem = ItemTable.getInstance().getTemplate(weaponLHANDId) ;
+
+ if(equipedItem == null || weaponLHANDId == 0)
+ return equipedItemId;
+
+ //Only check same weapon types. Virtual replacement should not happen between armor/weapons.
+ if(equipedItem.getItem() instanceof L2Weapon && virtualItem instanceof L2Weapon)
+ {
+ L2Weapon weapon = (L2Weapon) equipedItem.getItem();
+ L2Weapon virtualweapon = (L2Weapon)virtualItem;
+
+ return weaponMatching(virtualweapon.getItemType(), weapon.getItemType(), weaponLHANDId, equipedItemId);
+ }
+ else if(equipedItem.getItem() instanceof L2Armor && virtualItem instanceof L2Armor)
+ {
+ L2Armor armor = (L2Armor) equipedItem.getItem();
+ L2Armor virtualarmor = (L2Armor)virtualItem;
+
+ return armorMatching(virtualarmor.getItemType(), armor.getItemType(), weaponLHANDId, equipedItemId);
+ }
+ return equipedItemId;
+ }
+
+ public static int getRHAND(L2PcInstance actor)
+ {
+ int weaponRHANDId = actor.visualArmor.weaponRHANDId;
+ L2ItemInstance equipedItem = actor.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND);
+ int equipedItemId = actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_RHAND);
+ L2Item virtualItem = ItemTable.getInstance().getTemplate(weaponRHANDId) ;
+
+ if(equipedItem == null || weaponRHANDId == 0)
+ return equipedItemId;
+
+ //Only check same weapon types. Virtual replacement should not happen between armor/weapons.
+ if(equipedItem.getItem() instanceof L2Weapon && virtualItem instanceof L2Weapon)
+ {
+ L2Weapon weapon = (L2Weapon) equipedItem.getItem();
+ L2Weapon virtualweapon = (L2Weapon)virtualItem;
+
+ return weaponMatching(virtualweapon.getItemType(), weapon.getItemType(), weaponRHANDId, equipedItemId);
+ }
+ else if(equipedItem.getItem() instanceof L2Armor && virtualItem instanceof L2Armor)
+ {
+ L2Armor armor = (L2Armor) equipedItem.getItem();
+ L2Armor virtualarmor = (L2Armor)virtualItem;
+
+ return armorMatching(virtualarmor.getItemType(), armor.getItemType(), weaponRHANDId, equipedItemId);
+ }
+ return equipedItemId;
+
+ }
+
+ public static int getCloak(L2PcInstance actor)
+ {
+ if(actor.visualArmor.weaponLRHANDId == 1)
+ return 0;
+ else
+ return actor.getInventory().getPaperdollItemId(Inventory. PAPERDOLL_CLOAK);
+
+ }
+
+ public static void dressMe(L2PcInstance activeChar)
+ {
+ setVirtualBody(activeChar);
+ setVirtualGloves(activeChar);
+ setVirtualPants(activeChar);
+ setVirtualBoots(activeChar);
+ setVirtualLhand(activeChar);
+ setVirtualRhand(activeChar);
+
+ InventoryUpdate iu = new InventoryUpdate();
+ activeChar.sendPacket(iu);
+ activeChar.broadcastUserInfo();
+ InventoryUpdate iu2 = new InventoryUpdate();
+ activeChar.sendPacket(iu2);
+ activeChar.broadcastUserInfo();
+ activeChar.sendMessage("You changed clothes.");
+ activeChar.visualArmor.updateVisualArmor();
+ }
+}
\ No newline at end of file
Link to comment
Share on other sites

 I would also suggest you to help all kidzor greeks which wanna open uber servers. That would bring up l2 game to a new level :)

Relax men.. You just have server with 100+ real online... 

Do you think you have accomplished something... Relax!

Link to comment
Share on other sites

Relax men.. You just have server with 100+ real online... 

Do you think you have accomplished something... Relax!

Be sure i accomplished much more than you.

 

What brings in discussion my server players? I just replied to this retard who only know to copy/paste servers that he have to pay and not expect it for free..

That's why this game is ruined...cuz all want it for free, and cuz of ppl who think to do something "good" and offer them free stuff..

If they don't pay, they don't get.. .if they don't get, they won't open...so everything would be fine.

 

They shouldn't expect to get players if they don't invest.... I have some guys in my list trying to make with 10$ a full server... 

Link to comment
Share on other sites

Be sure i accomplished much more than you.

 

What brings in discussion my server players? I just replied to this retard who only know to copy/paste servers that he have to pay and not expect it for free..

That's why this game is ruined...cuz all want it for free, and cuz of ppl who think to do something "good" and offer them free stuff..

If they don't pay, they don't get.. .if they don't get, they won't open...so everything would be fine.

 

They shouldn't expect to get players if they don't invest.... I have some guys in my list trying to make with 10$ a full server... 

I'm not saying that you are not right .. But it is a lot of money. Not worth so much.

What does it matter who' has accomplished more or less?

But it is a shame to pay so much. 

 

Anyway. I can't continue this convertation. it's useless!

Goodnight Nighty!

Edited by 'Baggos'
Link to comment
Share on other sites

Relax men.. You just have server with 100+ real online... 

Do you think you have accomplished something... Relax!

if the server is so bad why do so many people try and copy it

Link to comment
Share on other sites

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.



×
×
  • Create New...