What's new

Skrypty & Kody Problem monsters

Status
Not open for further replies.

Sanderson

Active User
Joined
Aug 27, 2009
Messages
108
Reaction score
0
[XML]<?xml version="1.0" encoding="UTF-8"?>
<monster name="King Kong" nameDescription="a king kong" race="blood" experience="3000000" speed="680" manacost="0">
<health now="80000" max="80000"/>
<look type="116" corpse="6043"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="50"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="800" min="-800" max="-1800"/>
</attack>
</attacks>
<defense>
<defenses armor="50" defense="55">
<defense name="healing" interval="1000" chance="20" min="1000" max="2000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
<defense name="speed" interval="1000" chance="100" speedchange="300" duration="20000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
</defenses>
<elements>
<element deathPercent="-50"/>
</elements>
<immunities>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="GA GA GAA!!" yell="1"/>
<voice sentence="UGA BUGA HUEHUEHUE" yell="1"/>
<voice sentence="GIVE ME BAAAANAN" yell="1"/>
<voice sentence=":O UUUGA"/>
<voice sentence="Ghh ghh" yell="0"/>
</voices>
<loot>
<item id="2676" countmax="100" chance="100000"/><!-- bananas -->
<item id="1987" chance="100000"><!-- bag -->
<inside>
<item id="2214" chance="3333333"/><!-- ring of healing -->
<item id="2470" chance="33333333"/><!-- golden legs -->
<item id="2520" chance="20000"/><!-- demon shield -->
<item id="8930" chance="1200"/><!-- emerald sword -->
<item id="2522" chance="400"/><!-- great shield -->
</inside>
</item>
</loot>
</monster>
[/XML]
Jest co? nie tak z tym skryptem?
W konsoli pisze ?e jest jakis b??d ale jako? nie moge znale??.

@edit
Code:
[26/03/2015 20:42:30] [Warning - Monsters::loadMonster] Cannot load monster (King Kong) file (data/monster/Demons/King Kong.xml).
[26/03/2015 20:42:30] Line: 24, Info: Extra content at the end of the document
Zmienia?em t? linijk? z 5 razy ci?gle ten sam b??d dodam tak?e ze przed tym by? b??d na linijc? 34 ale jakos mi si? uda?o naprawi?.
 

Slumek541

Active User
Joined
Jul 29, 2013
Messages
89
Reaction score
1
Age
27
Odp: Problem monsters

Ale ogolnie co sie dzieje? moze wstawisz ss z konsoli jaki blad wczytuje ci ogolnie tego moba?
 

Placek

Blue Waffle
Joined
Sep 30, 2008
Messages
6,793
Reaction score
672
Age
9
Odp: Problem monsters

Masz:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="King Kong" nameDescription="a king kong" race="blood" experience="3000000" speed="680" manacost="0">
	<health now="80000" max="80000"/>
	<look type="116" corpse="6043"/>
	<targetchange interval="5000" chance="8"/>
	<strategy attack="100" defense="0"/>
	<flags>
		<flag summonable="0"/>
		<flag attackable="1"/>
		<flag hostile="1"/>
		<flag illusionable="0"/>
		<flag convinceable="0"/>
		<flag pushable="0"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="1"/>
		<flag targetdistance="1"/>
		<flag staticattack="50"/>
		<flag runonhealth="0"/>
	</flags>
	<attacks>
		<attack name="melee" interval="800" min="-800" max="-1800"/>
		</attack>
	</attacks>
			<defenses armor="50" defense="55">
				<defense name="healing" interval="1000" chance="20" min="1000" max="2000">
					<attribute key="areaEffect" value="blueshimmer"/>
				</defense>
				<defense name="speed" interval="1000" chance="100" speedchange="300" duration="20000">
					<attribute key="areaEffect" value="redshimmer"/>
		</defense>
	</defenses>
	<elements>
		<element deathPercent="-50"/>
	</elements>
	<immunities>
		<immunity lifedrain="1"/>
		<immunity paralyze="1"/>
		<immunity invisible="1"/>
	</immunities>
	<voices interval="5000" chance="10">
		<voice sentence="GA GA GAA!!" yell="1"/>
		<voice sentence="UGA BUGA HUEHUEHUE" yell="1"/>
		<voice sentence="GIVE ME BAAAANAN" yell="1"/>
		<voice sentence=":O UUUGA"/>
		<voice sentence="Ghh ghh" yell="0"/>
	</voices>
	<loot>
		<item id="2676" countmax="100" chance="100000"/><!-- bananas -->
		<item id="1987" chance="100000"><!-- bag -->
			<inside>
				<item id="2214" chance="3333333"/><!-- ring of healing -->
				<item id="2470" chance="33333333"/><!-- golden legs -->
				<item id="2520" chance="20000"/><!-- demon shield -->
				<item id="8930" chance="1200"/><!-- emerald sword -->
				<item id="2522" chance="400"/><!-- great shield -->
			</inside>
		</item>
	</loot>
</monster>
 

Sanderson

Active User
Joined
Aug 27, 2009
Messages
108
Reaction score
0
Odp: Problem monsters

@up
Nie dzia?a, ci?gle ten sam b??d jaki wymieni?em wy?ej.
 

Logit3ch

Advanced User
Joined
Oct 2, 2013
Messages
165
Reaction score
6
Odp: Problem monsters

Bo uzyles 2 razy </defense> a <defense> wystepuje tylko raz w 24 linijce, nigdzie wczesniej nie ma.
 

Placek

Blue Waffle
Joined
Sep 30, 2008
Messages
6,793
Reaction score
672
Age
9
Odp: Problem monsters

@up
Nope... Czytac sie naucz...
W 24 jest otwarte defense - zbedna linijka w ogole.
25 defenses - tu sie zaczyna dopiero obrona.
defense z 26 jest zamkniete w 28.
defense z 29 jest zamkniete w 31.
W 32 jest zamkniete defenses z 25.

Czyli po wywaleniu 24 powinno dzialac samo w sobie defenses, bo masz calosc defenses dzialajace i w srodku bez bledu 2x defense.
Czyli kod ktory podalem wczesniej poprawia ten blad, ale jest jeszcze jeden...
W 21 linii masz atak ktory jest zamkniety w tej samej linii, a linie pozniej jest zamkniety jeszcze raz. To niszczy caly tag monster przez co przy nastepnym bloku ktory po tych atakach jest(czyli defenses) wyskakuje blad.
Masz poprawiona wersje:
[xml]<?xml version="1.0" encoding="UTF-8"?>
<monster name="King Kong" nameDescription="a king kong" race="blood" experience="3000000" speed="680" manacost="0">
<health now="80000" max="80000"/>
<look type="116" corpse="6043"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="50"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="800" min="-800" max="-1800"/>
</attacks>

<defenses armor="50" defense="55">

<defense name="healing" interval="1000" chance="20" min="1000" max="2000">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>

<defense name="speed" interval="1000" chance="100" speedchange="300" duration="20000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>

</defenses>

<elements>
<element deathPercent="-50"/>
</elements>
<immunities>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="GA GA GAA!!" yell="1"/>
<voice sentence="UGA BUGA HUEHUEHUE" yell="1"/>
<voice sentence="GIVE ME BAAAANAN" yell="1"/>
<voice sentence=":O UUUGA"/>
<voice sentence="Ghh ghh" yell="0"/>
</voices>
<loot>
<item id="2676" countmax="100" chance="100000"/><!-- bananas -->
<item id="1987" chance="100000"><!-- bag -->
<inside>
<item id="2214" chance="3333333"/><!-- ring of healing -->
<item id="2470" chance="33333333"/><!-- golden legs -->
<item id="2520" chance="20000"/><!-- demon shield -->
<item id="8930" chance="1200"/><!-- emerald sword -->
<item id="2522" chance="400"/><!-- great shield -->
</inside>
</item>
</loot>
</monster>[/xml]

I pamietaj o tym, zeby odpowiednio zamykac wszystko co otwierasz i w odpowiedniej kolejnosci.
Jak masz <defenses> to zamykasz przez </defenses>.
I tak w kazdym przypadku. Przy czym jesli wszystko jest w jednej linii i na koncu masz />, to jest juz zamkniete i nie wymaga kolejnej linii w postaci </defenses>.
Bo:
<defenses></defenses>
To to samo co:
<defenses />

Sprowadzaj?c to do najprostrzych wyjasnien i bez niepotrzebnego kombinowania, mozna tak powiedziec.
 

Sanderson

Active User
Joined
Aug 27, 2009
Messages
108
Reaction score
0
Odp: Problem monsters

Dzieki Placek ten skrypt zadzia?a? :)
 
Status
Not open for further replies.
Top