I am unable to give my summons custom skills. Let's say I want to add Dash (4) lvl 1 to Nightshade. I inserted the lvl 1 Nightshade (same with the summon skill lvl) in Npc_skill table. I restarted server and checked in game but it does not add the skill. I found SOME ID's in Eclipse (RequestActionUse) but they are only the skill ID without the NPC ID.
I am also unable to give my summon a weapon. I wanted to give my summon weapon ID 232 (dark elven dagger), but in game it does not show up even when it is set in the SQL. I have tried other weapons and other summoned NPC's.
Could this be a client problem?
Using Interlude L2JFrozen...
### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PetInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PetInstance.java (revision 906)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PetInstance.java (working copy)
@@ -26,6 +26,7 @@
import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.ai.CtrlIntention;
+import com.l2jfrozen.gameserver.datatables.sql.ItemTable;
import com.l2jfrozen.gameserver.datatables.sql.L2PetDataTable;
import com.l2jfrozen.gameserver.idfactory.IdFactory;
import com.l2jfrozen.gameserver.managers.CursedWeaponsManager;
@@ -90,6 +91,8 @@
if(_data == null)
{
_data = L2PetDataTable.getInstance().getPetData(getTemplate().npcId, getStat().getLevel());
+ _currentLHandId = getTemplate().lhand;
+ _currentRHandId = getTemplate().rhand;
}
return _data;
@@ -314,17 +317,40 @@
{
_pkKills = pkKills;
}
+
+ private int _currentLHandId; // normally this shouldn't change from the template, but there exist exceptions
+ private int _currentRHandId; // normally this shouldn't change from the template, but there exist exceptions
+ public void setLHandId(int newWeaponId)
+ {
+ _currentLHandId = newWeaponId;
+ }
+
+ public void setRHandId(int newWeaponId)
+ {
+ _currentRHandId = newWeaponId;
+ }
+ public int getLeftHandItem()
+ {
+ return _currentLHandId;
+ }
+
+ /**
+ * Return the Identifier of the item in the right hand of this L2NpcInstance contained in the L2NpcTemplate.<BR>
+ * <BR>
+ */
+ public int getRightHandItem()
+ {
+ return _currentRHandId;
+ }
/**
+ /**
* Returns the pet's currently equipped weapon instance (if any).
*/
@Override
public L2ItemInstance getActiveWeaponInstance()
{
- for(L2ItemInstance item : getInventory().getItems())
- if(item.getLocation() == L2ItemInstance.ItemLocation.PET_EQUIP && item.getItem().getBodyPart() == L2Item.SLOT_R_HAND)
- return item;
-
+ // regular NPCs dont have weapons instancies
return null;
}
@@ -334,28 +360,52 @@
@Override
public L2Weapon getActiveWeaponItem()
{
- L2ItemInstance weapon = getActiveWeaponInstance();
+ int weaponId = getTemplate().rhand;
+
+ if(weaponId < 1)
+ return null;
+
+ L2Item item = ItemTable.getInstance().getTemplate(getTemplate().rhand);
- if(weapon == null)
+ if(!(item instanceof L2Weapon))
return null;
- return (L2Weapon) weapon.getItem();
+ return (L2Weapon) item;
}
+ /**
+ * Return null (regular NPCs don't have weapons instancies).<BR>
+ * <BR>
+ */
+
@Override
public L2ItemInstance getSecondaryWeaponInstance()
{
- // temporary? unavailable
+ // regular NPCs dont have weapons instancies
return null;
}
+ /**
+ * Return the weapon item equiped in the left hand of the L2NpcInstance or null.<BR>
+ * <BR>
+ */
@Override
public L2Weapon getSecondaryWeaponItem()
{
- // temporary? unavailable
- return null;
- }
+ // Get the weapon identifier equiped in the right hand of the L2NpcInstance
+ int weaponId = getTemplate().lhand;
+
+ if(weaponId < 1)
+ return null;
+
+ // Get the weapon item equiped in the right hand of the L2NpcInstance
+ L2Item item = ItemTable.getInstance().getTemplate(getTemplate().lhand);
+
+ if(!(item instanceof L2Weapon))
+ return null;
+ return (L2Weapon) item;
+ }
@Override
public PetInventory getInventory()
{
The stuff I changed is in that patch, I took pieces from L2NpcInstance which had something about weapons, but didn't work qq
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.
I am selling my l2jeternity high five (all inclusive option $300) license+daily $50(mission) mod, autofarm, this is a very good and stable H5 assembly on market if you know how to run it properly, project developer LordWinter also a very passionate person and active in daily basis, because I am no longer using it, selling this out to put in good use for new h5 l2project. I am selling this for $180, pm me for details/offer. thanks
*Sale and rebinding with the consent of the developer LordWinter
payment option : paypal/crypto
telegram:
@arcadin77
Hello friends, good morning, good afternoon or good evening, depending on the time you are seeing this! I have been trying to decompile and compile again with only the classes that I want LineageEffect.u for a few days now, but I have not been successful. Could someone help me by clearing up some doubts about how I can do this work and be successful?!
**INTERLUDE REMASTERED**
Moonland is a server that's been running for about three years without wipe, and they don't plan on wiping it anytime soon.
I'm selling my items or even the account due to not having much time to play anymore.
I'm selling only for $$$. Not going to disclose my nickname in the server, but here are some of the items:
Lvl 5 equipment for both mage and fighter
+100 mage pvp set
2mastery jewels for fighter, 2 for mage, blessed antharas, blessed queen ant, ring of fallen angel, earring of fafurion.
1k + col, VIP cosmetics for armor, agathion and weapons(duals + mage wep)
I'm only selling for real money via paypal or cs2 skins so don't offer me anything else.
Question
DONALD TRUMP 2016
I am unable to give my summons custom skills. Let's say I want to add Dash (4) lvl 1 to Nightshade. I inserted the lvl 1 Nightshade (same with the summon skill lvl) in Npc_skill table. I restarted server and checked in game but it does not add the skill. I found SOME ID's in Eclipse (RequestActionUse) but they are only the skill ID without the NPC ID.
I am also unable to give my summon a weapon. I wanted to give my summon weapon ID 232 (dark elven dagger), but in game it does not show up even when it is set in the SQL. I have tried other weapons and other summoned NPC's.
Could this be a client problem?
Using Interlude L2JFrozen...
The stuff I changed is in that patch, I took pieces from L2NpcInstance which had something about weapons, but didn't work qq
SQL
Thanks
2 answers to this question
Recommended Posts
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.