Jump to content
  • 0

help enchant weapon tou npc


Question

4 answers to this question

Recommended Posts

  • 0
Posted

em..

http://maxcheaters.com/forum/index.php?topic=27218.0 ---> Interlude

http://maxcheaters.com/forum/index.php?topic=186925.0; ---> Freya

uparxun polla file..

ektos apo to Search Button uparxei kai to google egw apo ekei psaxnw :) (xD)

  • 0
Posted

AA Java code 8es?

NpcTable.java

                                        "matkspd",
						"rhand",
						"lhand",
+						"enchant",
						"armor",
						"walkspd",
						"runspd",



---------------------------------------------------------------------
                                                "matkspd",
							"rhand",
							"lhand",
+							"enchant",
							"armor",
							"walkspd",
							"runspd",
---------------------------------------------------------------------
                        npcDat.set("aggroRange", NpcData.getInt("aggro"));
			npcDat.set("rhand", NpcData.getInt("rhand"));
			npcDat.set("lhand", NpcData.getInt("lhand"));
                        npcDat.set("enchant", NpcData.getInt("enchant"));

						"matkspd",
						"rhand",
						"lhand",
+						"enchant",
						"armor",
						"walkspd",
						"runspd",
---------------------------------------------------------------------
L2NpcTemplate.java
+	public final int enchantEffect;
	public final int armor;
	public final String factionId;
	public final int factionRange;
---------------------------------------------------------------------
                aggroRange = set.getInteger("aggroRange");
		rhand = set.getInteger("rhand");
		lhand = set.getInteger("lhand");
+		enchantEffect = set.getInteger("enchant");

L2NpcInstance.java	
+	private int _currentEnchant;
	private int _currentCollisionHeight; // used for npc grow effect skills
	private int _currentCollisionRadius; // used for npc grow effect skills

---------------------------------------------------------------------
		// initialize the "current" equipment
		_currentLHandId = getTemplate().lhand;
		_currentRHandId = getTemplate().rhand;
+		_currentEnchant = Config.SHOW_NPC_ENCHANT ? Rnd.get(4,21) : getTemplate().enchantEffect;

return _currentRHandId;
	}

+	public int getEnchantEffect()
+	{
+		return _currentEnchant;
+	}
+

---------------------------------------------------------------------
_currentRHandId = newWeaponId;
	}

+	public void setLRHandId(int newLWeaponId, int newRWeaponId)
+	{
+		_currentRHandId = newRWeaponId;
+		_currentLHandId = newLWeaponId;
+		updateAbnormalEffect();
+	}
+
---------------------------------------------------------------------
NpcInfo.java

	private boolean _isAttackable, _isSummoned;
	private int _mAtkSpd, _pAtkSpd;
	private int _runSpd, _walkSpd, _swimRunSpd, _swimWalkSpd, _flRunSpd, _flWalkSpd, _flyRunSpd, _flyWalkSpd;
-	private int _rhand, _lhand;
+	private int _rhand, _lhand, _enchantEffect;

---------------------------------------------------------------------
		_isAttackable = cha.isAutoAttackable(attacker);
		_rhand = cha.getRightHandItem();
		_lhand = cha.getLeftHandItem();
+		_enchantEffect = cha.getEnchantEffect();

---------------------------------------------------------------------
		writeC(0x00); // C3  team circle 1-blue, 2-red
		writeF(_collisionRadius);
		writeF(_collisionHeight);
-		writeD(0x00); // C4
+		writeD(_enchantEffect);

SQL

ALTER TABLE `npc` ADD `enchant` TINYINT(1) NOT NULL DEFAULT '0' AFTER `lhand`;
ALTER TABLE `custom_npc` ADD `enchant` TINYINT(1) NOT NULL DEFAULT '0' AFTER `lhand`;
UPDATE  `npc` SET  `enchant` =  '1' WHERE  `rhand` !=0

Guest
This topic is now closed to further replies.
×
×
  • Create New...