Jump to content
  • 0

Help Adding NPC's in High Five


Question

15 answers to this question

Recommended Posts

  • 0
Posted

l2j used xml files for npc back in the old days, i need to see an example of the xml file to do so..

Here is an example of the retail Gatekeeper

 

<npc id="30080" name="Clarissa" title="Gatekeeper">
	<set name="aggroRange" value="0" />
	<set name="ai_type" value="CharacterAI" />
	<set name="baseAtkRange" value="40" />
	<set name="baseCON" value="43" />
	<set name="baseCritRate" value="40" />
	<set name="baseDEX" value="30" />
	<set name="baseHpMax" value="2444.468" />
	<set name="baseHpRate" value="1" />
	<set name="baseHpReg" value="7.5" />
	<set name="baseINT" value="21" />
	<set name="baseMAtk" value="780" />
	<set name="baseMAtkSpd" value="333" />
	<set name="baseMDef" value="382" />
	<set name="baseMEN" value="20" />
	<set name="baseMpMax" value="1345.8" />
	<set name="baseMpReg" value="2.7" />
	<set name="basePAtk" value="1303" />
	<set name="basePAtkSpd" value="253" />
	<set name="basePDef" value="471" />
	<set name="baseRunSpd" value="120" />
	<set name="baseSTR" value="40" />
	<set name="baseShldDef" value="0" />
	<set name="baseShldRate" value="0" />
	<set name="baseWIT" value="20" />
	<set name="baseWalkSpd" value="50" />
	<set name="castle_id" value="3" />
	<set name="collision_height" value="25.0" />
	<set name="collision_radius" value="8.0" />
	<set name="level" value="70" />
	<set name="rewardExp" value="0" />
	<set name="rewardRp" value="0" />
	<set name="rewardSp" value="0" />
	<set name="shots" value="NONE" />
	<set name="texture" value="" />
	<set name="type" value="Merchant" />
	<skills>
		<skill id="4416" level="14" />	<!--Humans-->
	</skills>
	<teleportlist>
		<sublist id="1">
			<target loc="82888 53300 -1488" item_id="57" price="9400" name="1010013" StringName="The Town of Oren" StringNameLang="Орен" castle_id="4" />
			<target loc="111455 219400 -3544" item_id="57" price="7600" name="1010049" StringName="Heine" StringNameLang="Хейн" castle_id="6" />
			<target loc="15472 142880 -2688" item_id="57" price="6800" name="1010006" StringName="The Town of Dion" StringNameLang="Дион" castle_id="2" />
			<target loc="147850 -55300 -2728" item_id="57" price="63000" name="1010199" StringName="The Town of Goddard" StringNameLang="Годдард" castle_id="7" />
			<target loc="43835 -47749 -792" item_id="57" price="59000" name="1010200" StringName="Rune Township" StringNameLang="Руна" castle_id="8" />
			<target loc="87170 -143355 -1288" item_id="57" price="87000" name="1010574" StringName="Town of Schuttgart" StringNameLang="Шутгарт" castle_id="9" />
			<target loc="-12787 122779 -3112" item_id="57" price="29000" name="1010005" StringName="The Town of Gludio" StringNameLang="Глудио" castle_id="1" />
			<target loc="146783 25808 -2008" item_id="57" price="13000" name="1010023" StringName="The Town of Aden" StringNameLang="Аден" castle_id="5" />
			<target loc="47935 186810 -3420" item_id="57" price="5200" name="1010021" StringName="Giran Harbor" StringNameLang="Гавань Гирана" />
			<target loc="105918 109759 -3192" item_id="57" price="4400" name="1010022" StringName="Hardin's Private Academy" StringNameLang="Академия Хардина" />
			<target loc="43408 206881 -3752" item_id="57" price="5000" name="1010567" StringName="Devil's Isle" StringNameLang="Остров Дьявола"/>
			<target loc="85546 131328 -3672" item_id="57" price="1000" name="1010118" StringName="Breka's Stronghold" StringNameLang="Укрепление Бреки"/>
		</sublist>
		<sublist id="2">
			<target loc="-87328 142266 -3640" item_id="57" price="1000" name="1010506" StringName="Gludin Arena" StringNameLang="Арена Глудина"/>	<!--Gludin Arena-->
			<target loc="73579 142709 -3768" item_id="57" price="1000" name="1010507" StringName="Giran Arena" StringNameLang="Арена Гирана" />	<!--Giran Arena-->
			<target loc="113553 134813 -3640" item_id="57" price="1000" name="1010119" StringName="Gorgon Flower Garden" StringNameLang="Сад Горгон" />	<!--Gorgon Flower Garden-->
			<target loc="105918 109759 -3192" item_id="57" price="1000" name="1010022" StringName="Private Hardins Academy" StringNameLang="Академия Хардина" />	<!--Hardin's Private Academy-->
			<target loc="146440 46723 -3432" item_id="57" price="1000" name="1010053" StringName="Coliseum" StringNameLang="Колизей" />	<!--Coliseum-->
		</sublist>
		<sublist id="3">
			<target loc="-87328 142266 -3640" item_id="13722" price="1" name="1010506" StringName="Gludin Arena" StringNameLang="Арена Глудина" />	<!--Gludin Arena-->
			<target loc="73579 142709 -3768" item_id="13722" price="1" name="1010507" StringName="Giran Arena" StringNameLang="Арена Гирана" />	<!--Giran Arena-->
			<target loc="113553 134813 -3640" item_id="13722" price="1" name="1010119" StringName="Gorgon Flower Garden" StringNameLang="Сад Горгон" />	<!--Gorgon Flower Garden-->
			<target loc="105918 109759 -3192" item_id="13722" price="1" name="1010022" StringName="Private Hardins Academy" StringNameLang="Академия Хардина" />	<!--Hardin's Private Academy-->
			<target loc="146440 46723 -3432" item_id="13722" price="1" name="1010053" StringName="Coliseum" StringNameLang="Колизей" />	<!--Coliseum-->
		</sublist>
	</teleportlist>
	<attributes>
		<defence attribute="fire" value="150" />
		<defence attribute="water" value="150" />
		<defence attribute="wind" value="150" />
		<defence attribute="earth" value="150" />
		<defence attribute="holy" value="150" />
		<defence attribute="unholy" value="150" />
	</attributes>
</npc>

  • 0
Posted

this is a normal npc sql line,

 

(103, 103, "Christmas Santa", 0, "Merry Christmas!", 0, "LineageNPC2.br_xmas08_santa", 8, 24, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 490, 10, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1),

 

your pack works with an xml file. this one:

<npc id="30080" name="Clarissa" title="Gatekeeper">
	<set name="aggroRange" value="0" />
	<set name="ai_type" value="CharacterAI" />
	<set name="baseAtkRange" value="40" />
	<set name="baseCON" value="43" />
	<set name="baseCritRate" value="40" />
	<set name="baseDEX" value="30" />
	<set name="baseHpMax" value="2444.468" />
	<set name="baseHpRate" value="1" />
	<set name="baseHpReg" value="7.5" />
	<set name="baseINT" value="21" />
	<set name="baseMAtk" value="780" />
	<set name="baseMAtkSpd" value="333" />
	<set name="baseMDef" value="382" />
	<set name="baseMEN" value="20" />
	<set name="baseMpMax" value="1345.8" />
	<set name="baseMpReg" value="2.7" />
	<set name="basePAtk" value="1303" />
	<set name="basePAtkSpd" value="253" />
	<set name="basePDef" value="471" />
	<set name="baseRunSpd" value="120" />
	<set name="baseSTR" value="40" />
	<set name="baseShldDef" value="0" />
	<set name="baseShldRate" value="0" />
	<set name="baseWIT" value="20" />
	<set name="baseWalkSpd" value="50" />
	<set name="castle_id" value="3" />
	<set name="collision_height" value="25.0" />
	<set name="collision_radius" value="8.0" />
	<set name="level" value="70" />
	<set name="rewardExp" value="0" />
	<set name="rewardRp" value="0" />
	<set name="rewardSp" value="0" />
	<set name="shots" value="NONE" />
	<set name="texture" value="" />
	<set name="type" value="Merchant" />
	<skills>
		<skill id="4416" level="14" />	<!--Humans-->
	</skills>
	<teleportlist>
		<sublist id="1">
			<target loc="82888 53300 -1488" item_id="57" price="9400" name="1010013" StringName="The Town of Oren" StringNameLang="Орен" castle_id="4" />
			<target loc="111455 219400 -3544" item_id="57" price="7600" name="1010049" StringName="Heine" StringNameLang="Хейн" castle_id="6" />
			<target loc="15472 142880 -2688" item_id="57" price="6800" name="1010006" StringName="The Town of Dion" StringNameLang="Дион" castle_id="2" />
			<target loc="147850 -55300 -2728" item_id="57" price="63000" name="1010199" StringName="The Town of Goddard" StringNameLang="Годдард" castle_id="7" />
			<target loc="43835 -47749 -792" item_id="57" price="59000" name="1010200" StringName="Rune Township" StringNameLang="Руна" castle_id="8" />
			<target loc="87170 -143355 -1288" item_id="57" price="87000" name="1010574" StringName="Town of Schuttgart" StringNameLang="Шутгарт" castle_id="9" />
			<target loc="-12787 122779 -3112" item_id="57" price="29000" name="1010005" StringName="The Town of Gludio" StringNameLang="Глудио" castle_id="1" />
			<target loc="146783 25808 -2008" item_id="57" price="13000" name="1010023" StringName="The Town of Aden" StringNameLang="Аден" castle_id="5" />
			<target loc="47935 186810 -3420" item_id="57" price="5200" name="1010021" StringName="Giran Harbor" StringNameLang="Гавань Гирана" />
			<target loc="105918 109759 -3192" item_id="57" price="4400" name="1010022" StringName="Hardin's Private Academy" StringNameLang="Академия Хардина" />
			<target loc="43408 206881 -3752" item_id="57" price="5000" name="1010567" StringName="Devil's Isle" StringNameLang="Остров Дьявола"/>
			<target loc="85546 131328 -3672" item_id="57" price="1000" name="1010118" StringName="Breka's Stronghold" StringNameLang="Укрепление Бреки"/>
		</sublist>
		<sublist id="2">
			<target loc="-87328 142266 -3640" item_id="57" price="1000" name="1010506" StringName="Gludin Arena" StringNameLang="Арена Глудина"/>	<!--Gludin Arena-->
			<target loc="73579 142709 -3768" item_id="57" price="1000" name="1010507" StringName="Giran Arena" StringNameLang="Арена Гирана" />	<!--Giran Arena-->
			<target loc="113553 134813 -3640" item_id="57" price="1000" name="1010119" StringName="Gorgon Flower Garden" StringNameLang="Сад Горгон" />	<!--Gorgon Flower Garden-->
			<target loc="105918 109759 -3192" item_id="57" price="1000" name="1010022" StringName="Private Hardins Academy" StringNameLang="Академия Хардина" />	<!--Hardin's Private Academy-->
			<target loc="146440 46723 -3432" item_id="57" price="1000" name="1010053" StringName="Coliseum" StringNameLang="Колизей" />	<!--Coliseum-->
		</sublist>
		<sublist id="3">
			<target loc="-87328 142266 -3640" item_id="13722" price="1" name="1010506" StringName="Gludin Arena" StringNameLang="Арена Глудина" />	<!--Gludin Arena-->
			<target loc="73579 142709 -3768" item_id="13722" price="1" name="1010507" StringName="Giran Arena" StringNameLang="Арена Гирана" />	<!--Giran Arena-->
			<target loc="113553 134813 -3640" item_id="13722" price="1" name="1010119" StringName="Gorgon Flower Garden" StringNameLang="Сад Горгон" />	<!--Gorgon Flower Garden-->
			<target loc="105918 109759 -3192" item_id="13722" price="1" name="1010022" StringName="Private Hardins Academy" StringNameLang="Академия Хардина" />	<!--Hardin's Private Academy-->
			<target loc="146440 46723 -3432" item_id="13722" price="1" name="1010053" StringName="Coliseum" StringNameLang="Колизей" />	<!--Coliseum-->
		</sublist>
	</teleportlist>
	<attributes>
		<defence attribute="fire" value="150" />
		<defence attribute="water" value="150" />
		<defence attribute="wind" value="150" />
		<defence attribute="earth" value="150" />
		<defence attribute="holy" value="150" />
		<defence attribute="unholy" value="150" />
	</attributes>
</npc>

 

now each statment in a sql line divided by a comma, expresses an "attribute" of the npc.

 

  `id` smallint(5) unsigned NOT NULL,
  `idTemplate` smallint(5) unsigned NOT NULL,
  `name` varchar(200) NOT NULL DEFAULT '',
  `serverSideName` tinyint(1) NOT NULL DEFAULT '0',
  `title` varchar(45) NOT NULL DEFAULT '',
  `serverSideTitle` tinyint(1) NOT NULL DEFAULT '0',
  `class` varchar(200) DEFAULT NULL,
  `collision_radius` decimal(6,2) DEFAULT NULL,
  `collision_height` decimal(6,2) DEFAULT NULL,
  `level` tinyint(2) DEFAULT NULL,
  `sex` enum('etc','female','male') NOT NULL DEFAULT 'etc',
  `type` varchar(22) DEFAULT NULL,
  `attackrange` smallint(4) DEFAULT NULL,
  `hp` decimal(30,15) DEFAULT NULL,
  `mp` decimal(30,15) DEFAULT NULL,
  `hpreg` decimal(30,15) DEFAULT NULL,
  `mpreg` decimal(30,15) DEFAULT NULL,
  `str` tinyint(2) NOT NULL DEFAULT '40',
  `con` tinyint(2) NOT NULL DEFAULT '43',
  `dex` tinyint(2) NOT NULL DEFAULT '30',
  `int` tinyint(2) NOT NULL DEFAULT '21',
  `wit` tinyint(2) NOT NULL DEFAULT '20',
  `men` tinyint(2) NOT NULL DEFAULT '20',
  `exp` int(9) NOT NULL DEFAULT '0',
  `sp` int(9) NOT NULL DEFAULT '0',
  `patk` decimal(12,5) DEFAULT NULL,
  `pdef` decimal(12,5) DEFAULT NULL,
  `matk` decimal(12,5) DEFAULT NULL,
  `mdef` decimal(12,5) DEFAULT NULL,
  `atkspd` smallint(4) NOT NULL DEFAULT '230',
  `critical` tinyint(1) NOT NULL DEFAULT '1',
  `matkspd` smallint(4) NOT NULL DEFAULT '333',
  `rhand` smallint(5) unsigned NOT NULL DEFAULT '0',
  `lhand` smallint(5) unsigned NOT NULL DEFAULT '0',
  `enchant` tinyint(1) NOT NULL DEFAULT '0',
  `walkspd` decimal(10,5) NOT NULL DEFAULT '60',
  `runspd` decimal(10,5) NOT NULL DEFAULT '120',
  `dropHerbGroup` tinyint(1) NOT NULL DEFAULT '0',
  `basestats` tinyint(1) NOT NULL DEFAULT '0',

 

the first number on the sql line i gave you declares the id of the npc as you can see in the table declaration. and so goes on. now you wanna add manualy those stats to the xml file. here let me demonstrate:

<set name="aggroRange" value="0" />
	<set name="ai_type" value="LineageNPC2.br_xmas08_santa" />
	<set name="baseAtkRange" value="40" />
	<set name="baseCON" value="43" />
	<set name="baseCritRate" value="40" />
	<set name="baseDEX" value="30" />
	<set name="baseHpMax" value="2444.468" />
	<set name="baseHpRate" value="1" />
	<set name="baseHpReg" value="7.5" />
	<set name="baseINT" value="21" />
	<set name="baseMAtk" value="780" />
	<set name="baseMAtkSpd" value="333" />
	<set name="baseMDef" value="382" />
	<set name="baseMEN" value="20" />
	<set name="baseMpMax" value="1345.8" />
	<set name="baseMpReg" value="2.7" />
	<set name="basePAtk" value="1303" />
	<set name="basePAtkSpd" value="253" />
	<set name="basePDef" value="471" />
	<set name="baseRunSpd" value="120" />
	<set name="baseSTR" value="40" />
	<set name="baseShldDef" value="0" />
	<set name="baseShldRate" value="0" />
	<set name="baseWIT" value="20" />
	<set name="baseWalkSpd" value="50" />
	<set name="castle_id" value="3" />
	<set name="collision_height" value="25.0" />
	<set name="collision_radius" value="8.0" />
	<set name="level" value="70" />
	<set name="rewardExp" value="0" />
	<set name="rewardRp" value="0" />
	<set name="rewardSp" value="0" />
	<set name="shots" value="NONE" />
	<set name="texture" value="" />
	<set name="type" value="Merchant" />

 

those are the stats of your xml npc. You can edit them as you want. or you can check if you can find them in the sql file. base_con at the sql table is the con value on the xml file and so goes on.

now by:

<skills>
		<skill id="4416" level="14" />	<!--Humans-->
	</skills>

 

you declare the skills that your npc posseses. i dont know the skill ids of your pack so you will have to find them on your own.

 

 

		<sublist id="1">
			<target loc="82888 53300 -1488" item_id="57" price="9400" name="1010013" StringName="The Town of Oren" StringNameLang="Орен" castle_id="4" />
			<target loc="111455 219400 -3544" item_id="57" price="7600" name="1010049" StringName="Heine" StringNameLang="Хейн" castle_id="6" />
			<target loc="15472 142880 -2688" item_id="57" price="6800" name="1010006" StringName="The Town of Dion" StringNameLang="Дион" castle_id="2" />
			<target loc="147850 -55300 -2728" item_id="57" price="63000" name="1010199" StringName="The Town of Goddard" StringNameLang="Годдард" castle_id="7" />
			<target loc="43835 -47749 -792" item_id="57" price="59000" name="1010200" StringName="Rune Township" StringNameLang="Руна" castle_id="8" />
			<target loc="87170 -143355 -1288" item_id="57" price="87000" name="1010574" StringName="Town of Schuttgart" StringNameLang="Шутгарт" castle_id="9" />
			<target loc="-12787 122779 -3112" item_id="57" price="29000" name="1010005" StringName="The Town of Gludio" StringNameLang="Глудио" castle_id="1" />
			<target loc="146783 25808 -2008" item_id="57" price="13000" name="1010023" StringName="The Town of Aden" StringNameLang="Аден" castle_id="5" />
			<target loc="47935 186810 -3420" item_id="57" price="5200" name="1010021" StringName="Giran Harbor" StringNameLang="Гавань Гирана" />
			<target loc="105918 109759 -3192" item_id="57" price="4400" name="1010022" StringName="Hardin's Private Academy" StringNameLang="Академия Хардина" />
			<target loc="43408 206881 -3752" item_id="57" price="5000" name="1010567" StringName="Devil's Isle" StringNameLang="Остров Дьявола"/>
			<target loc="85546 131328 -3672" item_id="57" price="1000" name="1010118" StringName="Breka's Stronghold" StringNameLang="Укрепление Бреки"/>
		</sublist>
		<sublist id="2">
			<target loc="-87328 142266 -3640" item_id="57" price="1000" name="1010506" StringName="Gludin Arena" StringNameLang="Арена Глудина"/>	<!--Gludin Arena-->
			<target loc="73579 142709 -3768" item_id="57" price="1000" name="1010507" StringName="Giran Arena" StringNameLang="Арена Гирана" />	<!--Giran Arena-->
			<target loc="113553 134813 -3640" item_id="57" price="1000" name="1010119" StringName="Gorgon Flower Garden" StringNameLang="Сад Горгон" />	<!--Gorgon Flower Garden-->
			<target loc="105918 109759 -3192" item_id="57" price="1000" name="1010022" StringName="Private Hardins Academy" StringNameLang="Академия Хардина" />	<!--Hardin's Private Academy-->
			<target loc="146440 46723 -3432" item_id="57" price="1000" name="1010053" StringName="Coliseum" StringNameLang="Колизей" />	<!--Coliseum-->
		</sublist>
		<sublist id="3">
			<target loc="-87328 142266 -3640" item_id="13722" price="1" name="1010506" StringName="Gludin Arena" StringNameLang="Арена Глудина" />	<!--Gludin Arena-->
			<target loc="73579 142709 -3768" item_id="13722" price="1" name="1010507" StringName="Giran Arena" StringNameLang="Арена Гирана" />	<!--Giran Arena-->
			<target loc="113553 134813 -3640" item_id="13722" price="1" name="1010119" StringName="Gorgon Flower Garden" StringNameLang="Сад Горгон" />	<!--Gorgon Flower Garden-->
			<target loc="105918 109759 -3192" item_id="13722" price="1" name="1010022" StringName="Private Hardins Academy" StringNameLang="Академия Хардина" />	<!--Hardin's Private Academy-->
			<target loc="146440 46723 -3432" item_id="13722" price="1" name="1010053" StringName="Coliseum" StringNameLang="Колизей" />	<!--Coliseum-->
		</sublist>
	</teleportlist>

 

those are required since your npc is a gatekeeper, and there is no different file that declares the teleport points of it. its declared in the xml file itself. so thats somehow the "profession"of your npc. you have to adjust this on your own.

 

<attributes>
		<defence attribute="fire" value="150" />
		<defence attribute="water" value="150" />
		<defence attribute="wind" value="150" />
		<defence attribute="earth" value="150" />
		<defence attribute="holy" value="150" />
		<defence attribute="unholy" value="150" />
	</attributes>

 

now those are the attributes of the npc. this wont matter since its not a guard or an AI. just let them at 150.

 

You wont be able to do this right now i guess. check your pack out. check other xml files of npc's find a similar to yours and analyze the code. this will help you adapt your npc.

 

I hope i helped

  • 0
Posted

Have you tried copy/paste the whole structure of any npc and change id/stats/w.e you wish? :)

The project i use is clean,it have only that gk didn't find anything else :P
  • 0
Posted

About ppl stating L2J used to XMLize npcs in the past, just wow.

 

L2DC (fandc is probably a fork of it, no ?) is one of the few packs with XMLized npcs (so do mine). L2J got also NPC stats made, but they continue to use SQL, as they didn't rework yet the core to support XML version.

 

As stated SweeTs, to add a custom NPC on such pack, you only have to copy paste an existing template, and edit the type/name/title (if different). If the pack got few custom NPCs, I invite you to read how they're managed since I don't know how L2DC manages custom NPC : on L2J, there is a particular idTemplate to set, different of regular id. Regular id being used for template view, while idTemplate is used for custom purpose.

  • 0
Posted

Common sense, why you guys open such topics jesus christ. Anyway if you use l2fandc(dont know why but your choice i could care less), you'll have no future support because your not a team member and they are private. So if you have issues with adding an npc alredy which is open a file copy/paste a template and change whatever you want, you'll have serious issues later on.

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...