Jump to content
  • 0

Question

Posted (edited)

Hello again -.- sorry i bother you all the time i am used to develop Aion no L2j (im learning)

so i dig into lineage 2 and so far i understood pretty much many things by reading the source at the same time

btw i work on Freya

 

So i want make a custom Summon-pet  like Wolf collar

 

things i did

 

1) Made a L2Pet  in custom_npc (done)

2) Make a custom item in Customitems.xml  that is using SummonHandler  (bypass) (done)

3) Made the skill for the item (1 level) (done)

4) Wrote the  itemId, summonId, duration into the summon_data.scv file

5) Insert the item - skill  into system (etcitem.grp, itemname,grp)

 

Inside game i click on item and nothing happen BUT when i use normal wolf 

and i click on my item it says "You already have a pet" which mean it works (it use the handler)

 

Anything i miss?

 

Ps the SummonHandler i read it all (this is how i knew what to do) 

like these lines

 

final int npcId = sitem.getNpcId();
if (npcId == 0)
return;
 
final L2NpcTemplate npcTemplate = NpcTable.getInstance().getTemplate(npcId);
if (npcTemplate == null)
return;
but i dont know what else i miss :O
Edited by AccessDenied

Recommended Posts

  • 0
Posted

Without any bug report or code, don't expect to get answers. I'm not Gandalf.

There is no error or anything but sure let me post my things

 

1) My Pet_Data.xml

<pet id="11106" index="1">
		<set name="food" val="2515" />
		<set name="hungry_limit" val="55" />
		<set name="load" val="54510" />
		<stats>
			<stat level="1">
				<set name="max_meal" val="248" />
				<set name="exp" val="0" />
				<set name="get_exp_type" val="73" />
				<set name="consume_meal_in_battle" val="2" />
				<set name="consume_meal_in_normal" val="2" />
				<set name="org_pattack" val="2.11864406779661" />
				<set name="org_pdefend" val="11.1111111111111" />
				<set name="org_mattack" val="1.44675925925926" />
				<set name="org_mdefend" val="8.13062889692864" />
				<set name="org_hp" val="24.8725961538461" />
				<set name="org_mp" val="20" />
				<set name="org_hp_regen" val="55" />
				<set name="org_mp_regen" val="0.9" />
				<set name="soulshot_count" val="1" />
				<set name="spiritshot_count" val="1" />
			</stat>
		</stats>
		
	</pet>

2) My Custom Item for call the summon

 

 

<item id="77714" type="EtcItem" name="Custom Summon Elf">

<set name="icon" val="icon.etc_prefect_belt_i00" />
<set name="default_action" val="skill_maintain" />
<set name="etcitem_type" val="pet_collar" />
<set name="material" val="leather" />
<set name="weight" val="10" />
<set name="is_oly_restricted" val="true" />
<set name="handler" val="SummonItems" />
<set name="item_skill" val="11106-1" />
<set name="use_condition" val="{{uc_transmode_exclude;{tt_flying;tt_pure_stat}}}" />
</item>

 

3) My Custom skill that item use

 

 

<skill id="11106" levels="1" name="Wolf's Necklace">

<set name="target" val="TARGET_SELF" />
<set name="hitTime" val="5000" />
<set name="staticHitTime" val="true" />
<set name="skillType" val="COREDONE" />
<set name="isMagic" val="true" />
<set name="operateType" val="OP_ACTIVE" />
</skill>

 

4) summon_items.csv line

 

### Elf Summon ###
77714;11106;1
  • 0
Posted

I readed line by like the SummonHandler and anything relative to summon to understand and so far all these are used and needed..

but i dont know what else i miss

Also i added the item in system and the skill  maybe the system need a Pet Line in some file?

Like maybe it has something like PetGrp.dat? i cant see anything like that

  • 0
Posted

Nowhere, on both item or skill, you got a npcId. So how it is supposed to know which npcId to call, it's a mystery.

pet_collar can also create trouble if linked to specific pets (wolves). I only guess.

 

----

 

I know dwarves females are supposed to get beard, but it's only a FANTASY. And even if it was true, my beard would be red like my hair, not white.

  • 0
Posted

Nowhere, on both item or skill, you got a npcId. So how it is supposed to know which npcId to call, it's a mystery.

 

pet_collar can also create trouble if linked to specific pets (wolves). I only guess.

 

----

 

I know dwarves females are supposed to get beard, but it's only a FANTASY. And even if it was true, my beard would be red like my hair, not white.

yes but i copied the one from wolf collar.. how wolf collar works then ? without npc id.. 

  • 0
Posted (edited)

You have to feed npcId on SummonItem, which normally is the goal of the .csv.

 

Do you have npc data 11106 too ? And avoid to use ids higher than 65536.

Edited by Tryskell
  • 0
Posted

You have to feed npcId on SummonItem, which normally is the goal of the .csv.

 

Do you have npc data 11106 too ? And avoid to use ids higher than 65536.

I did as i said at csv

4) summon_items.csv line

 

### Elf Summon ###
77714;11106;1
 
and when u say npc_data    you mean npcaidata? if not yes i added the npc  11106   at custom_npc and it extends L2Pet class
  • 0
Posted

Does the npc work correctly, spawning it manually ?

 

Put some logs on SummonItems handler to see exactly what happen, and where the code blocks.

The npc is inside custom_npc 

11106 18544 Elf 1 Elf 1 Monster2.inferno_drake_100_bi 20 20 50 etc L2Pet 40 40.000000000000000 40.000000000000000 40.000000000000000 40.000000000000000 40 40 40 40 40 40 40 40 40 40 40 40 40 40 0 40 0 0 0 60 120 1 1 0 0
 
 
but because is L2Pet instance     i cant spawn it.. it says "target not found"
 
also i have no log for handles in _log_ folder..
  • 0
Posted

Tk means to put some log, like the log on gs or even a player.sendMessage(" "); in the middle of the code, to see if it's executed :P

  • 0
Posted (edited)

Tk means to put some log, like the log on gs or even a player.sendMessage(" "); in the middle of the code, to see if it's executed :P

No need i already mention that if i have a pet and i click on my item it says " you already have a pet" so this mean it use the handler and it execute until the last line

 

by the way thanks for the friendly answers, i come from Aion community and lineage 2 is working different.

Thanks tryskel and sweets

Edited by AccessDenied
  • 0
Posted

As you said above "target no found". That means the npc doesn't exist. You try to summon existing npc or "custom"? Npc seems the problem.

  • 0
Posted

As you said above "target no found". That means the npc doesn't exist. You try to summon existing npc or "custom"? Npc seems the problem.

Dont think saw as i read the source the lineage 2 has 2 options or to load sql from npc or if config is activated from custom_npc

as far as i tested spawns that extends L2Npc or other Instance it works

L2Pet Instance doesnt work..  my npc is inside custom_npc (yes is True in config) and its the only one that doesnt spawn everything else work fine.

  • 0
Posted

Also sweets here a proof that none L2Pet works i checked all default pets

 

2hgxs3a.png

 

None spawn .. whatever extends L2Pet doesnt spawn  so maybe the L2PetInstance is not for spawn

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.



×
×
  • Create New...