• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Why is my custom monster not working?

Listo

New Member
Joined
Aug 17, 2008
Messages
222
Reaction score
0
Hello Otland,

Why is this script not working?
If I try to summon it ingame it says: Sorry, not possible.

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Killer Scorp" nameDescription="a killer scorpion" race="undead" experience="10000" speed="500" manacost="0">
<health now="15000" max="15000"/>
<look type="398" corpse="13501"/>
<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="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" skill="100" attack="160" poison="160"/>
<attack name="physical" interval="3000" chance="15" range="7" radius="3" target="0" min="-700" max="-1700">
<attribute key="areaEffect" value="groundshaker"/>
</attack>
<attack name="speed" interval="2000" chance="17" radius="4" target="0" duration="10000" speedchange="-400">
<attribute key="areaEffect" value="poff"/>
</attack>
<attack name="poison" interval="1000" chance="23" range="7" min="-500" max="-1000">
<attribute key="shootEffect" value="poison"/>
<attribute key="areaEffect" value="poison"/>
</attack>
<attack name="poison" interval="3000" chance="30" length="8" spread="0" min="-800" max="-1300">
<attribute key="areaEffect" value="poison"/>
</attack>
</attacks>
<defenses armor="50" defense="55">
<defense name="speed" interval="2000" chance="10" speedchange="450" duration="5000">
<attribute key="areaEffect" value="redshimmer"/>
<defense name="healing" interval="1000" chance="15" min="400" max="600">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element energyPercent="-15"/>
<element icePercent="-5"/>
<element firePercent="50"/>
<element holyPercent="-5"/>
</elements>
<immunities>
<immunity earth="1"/>
<immunity outfit="1"/>
<immunity drunk="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="2000" chance="5">
<voice sentence="rattle!"/>
<voice sentence="tak tak!"/>
<voice sentence="tak tak tak!"/>
</voices>
<loot>
<item id="2160" countmax="2" chance="23750"/>
<item id="13535" chance="100"/><!-- fist on a stick -->
<item id="7414" chance="100"/><!-- abyss hammer -->
<item id="2452" chance="250"/><!-- heavy mace -->
<item id="2466" chance="650"/><!-- golden armor -->
<item id="3955" chance="500"/>
<item id="2462" chance="20000"/><!-- devil helmet -->
<item id="2033" chance="10000"/><!-- devil helmet -->
<item id="2492" chance="500"/><!-- dragon scale mail -->
</loot>
</monster>

Monster.xml is okay.
No errors in console.

Hope you guys can help me

BB
 
Yes I did.

<monster name="Killer Scorp" file="9.6/Killer Scorp.xml"/>

- - - Updated - - -

O and another thing. Why this movement don't works:
function onStepIn(cid, item, fromPosition, itemEx, toPosition)
if (item.itemid == 1698) then
doCreatureSay(cid, "Such a chill sofa", TALKTYPE_ORANGE_1)
elseif (item.itemid == 1699) then
doCreatureSay(cid, "Such a chill sofa", TALKTYPE_ORANGE_1)
end
return TRUE
end

<movevent event="StepIn" itemid="1698" value="sofa.lua"/>
<movevent event="StepIn" itemid="1699" value="sofa.lua"/>

- - - Updated - - -

bump
 
With movement try:
XML:
<movevent type="StepIn" itemid="1698-1699" event="script" value="sofa.lua"/>
Lua:
function onStepIn(cid, item, fromPosition, itemEx, toPosition)
doCreatureSay(cid, "Such a chill sofa", TALKTYPE_ORANGE_1)
return TRUE 
end
If still nothing post error message.

And pls use "
Code:
[ /CODE]" or "[code=lua][ /LUA]" or "[code=xml][ /XML]"


And about monster. No error really?? :p There is error when server is loading monsters. ^_^
[CODE]
[13:16:47.677] [Warning - Monsters::loadMonster] Cannot load monster (check) file (data/monster/check.xml).
[13:16:47.677] Line: 71, Info: Premature end of data in tag monster line 2

This is corrected version:
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Killer Scorp" nameDescription="a killer scorpion" race="undead" experience="10000" speed="500" manacost="0">
	<health now="15000" max="15000"/>
	<look type="398" corpse="13501"/>
	<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="90"/>
	<flag runonhealth="0"/>
</flags>
<attacks>
	<attack name="melee" interval="2000" skill="100" attack="160" poison="160"/>
		<attack name="physical" interval="3000" chance="15" range="7" radius="3" target="0" min="-700" max="-1700">
		<attribute key="areaEffect" value="groundshaker"/>
	</attack>
	<attack name="speed" interval="2000" chance="17" radius="4" target="0" duration="10000" speedchange="-400">
		<attribute key="areaEffect" value="poff"/>
	</attack>
	<attack name="poison" interval="1000" chance="23" range="7" min="-500" max="-1000">
		<attribute key="shootEffect" value="poison"/>
		<attribute key="areaEffect" value="poison"/>
	</attack>
	<attack name="poison" interval="3000" chance="30" length="8" spread="0" min="-800" max="-1300">
		<attribute key="areaEffect" value="poison"/>
	</attack>
</attacks>
<defenses armor="50" defense="55">
	<defense name="speed" interval="2000" chance="10" speedchange="450" duration="5000">
		<attribute key="areaEffect" value="redshimmer"/>
	</defense>
	<defense name="healing" interval="1000" chance="15" min="400" max="600">
		<attribute key="areaEffect" value="blueshimmer"/>
	</defense>
</defenses>
<elements>
	<element energyPercent="-15"/>
	<element icePercent="-5"/>
	<element firePercent="50"/>
	<element holyPercent="-5"/>
	</elements>
<immunities>
	<immunity earth="1"/>
	<immunity outfit="1"/>
	<immunity drunk="1"/>
	<immunity invisible="1"/>
</immunities>
<voices interval="2000" chance="5">
	<voice sentence="rattle!"/>
	<voice sentence="tak tak!"/>
	<voice sentence="tak tak tak!"/>
</voices>
<loot>
	<item id="2160" countmax="2" chance="23750"/>
	<item id="13535" chance="100"/><!-- fist on a stick -->
	<item id="7414" chance="100"/><!-- abyss hammer -->
	<item id="2452" chance="250"/><!-- heavy mace -->
	<item id="2466" chance="650"/><!-- golden armor -->
	<item id="3955" chance="500"/>
	<item id="2462" chance="20000"/><!-- devil helmet -->
	<item id="2033" chance="10000"/><!-- devil helmet -->
	<item id="2492" chance="500"/><!-- dragon scale mail -->
</loot>
</monster>
There was a lack of </defense> tag after
Code:
<defense name="speed" interval="2000" chance="10" speedchange="450" duration="5000">
		<attribute key="areaEffect" value="redshimmer"/>
Btw. if you will use TABS it will be easier to find mismatch errors. :D

Pls rep.
 
Last edited:
Thanks mate. I didn't get any error with the monster like i said:p. But it's working now. Maybe it's just tfs 0.2..
Movements isn't working yet though. Getting this error:
[18/02/2013 10:39:55] Warning: [Event::checkScript] Event onStepOut not found. /scripts/sofa.lua
 
XML:
<movevent event="StepIn" itemid="1698-1699" script="sofa.lua"/>
Lua:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
		doCreatureSay(cid, "Such a chill sofa", TALKTYPE_ORANGE_1)
return true
end
Now should work.
 
Back
Top