• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 1.0 Unknown element percent

dominique120

Science & Reason
Senator
Premium User
Joined
Jun 16, 2013
Messages
3,881
Solutions
3
Reaction score
1,046
Location
Númenor
I've searched but all I find are unsolved 0.2.x threads. Here is the error:

Code:
[Warning - Monsters::loadMonster] Unknown element percent. data/monster/Skeleton
s/pirate skeleton.xml

And the XML

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="pirate skeleton" nameDescription="a pirate skeleton" race="UNDEAD" experience="85" speed="230" manacost="0">
  <health now="190" max="190"/>
  <look type="195" head="0" body="0" legs="0" feet="0" corpse="6070"/>
  <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="1"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="0"/>
    <flag staticattack="90"/>
    <flag targetdistance="1"/>
    <flag runonhealth="0"/>
  </flags>
    <elements>
        <element HolyPercent="-25"/>
    </elements>
<attacks>
    <attack name="melee" interval="2000" min="-0" max="-50"/>
</attacks>
  <defenses armor="18" defense="19"/>
  <immunities>
    <immunity physical="0"/>
    <immunity energy="0"/>
    <immunity fire="1"/>
    <immunity poison="0"/>
    <immunity lifedrain="0"/>
    <immunity paralyze="0"/>
    <immunity outfit="0"/>
    <immunity drunk="0"/>
    <immunity invisible="1"/>
  </immunities>
  <loot>
    <item id="2148" countmax="25" chance1="40000" chancemax="108"/>
    <item id="2229" countmax="2" chance1="9727" chancemax="0"/>
    <item id="2231" chance="4000"/>
    <item id="6095" chance="5000"/>
    <item id="5927" chance="100000">
      <inside>
        <item id="2376" chance="18402"/>
        <item id="2449" chance="8491"/>
      </inside>
    </item>
  </loot>
</monster>
 
holyPercent
This works, I also noticed I miss typed physical in a few others so I got this error with those to.

And what do I do with this?

Code:
[Warning - Monsters::loadMonster] Cant load spell. data/monster/King.xml
[Warning - Monsters::loadMonster] Cant load spell. data/monster/King.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="King" nameDescription="King" race="blood" experience="12000" speed="1500" manacost="0">
  <health now="60000" max="60000"/>
  <look type="332" head="0" body="0" legs="0" feet="0" corpse="6080"/>
  <targetchange interval="2000" chance="0"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="0"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>

  <attacks>
        <attack name="melee" interval="2000" min="-500" max="-1100"/>
    <attack name="lifedrain" interval="2000" chance="12" range="1" min="-360" max="-640"/>
    <attribute key="areaEffect" value="redshimmer"/>
      <attribute key="shootEffect" value="holy"/>
  </attacks>
  <defenses armor="21" defense="17">
    <defense name="healing" interval="2000" chance="13" min="400" max="650">
      <attribute key="areaEffect" value="blueshimmer"/>
    </defense>
  </defenses>
  <elements>
  <element earthPercent="20"/>
  <element holyPercent="-25"/>
  <element icePercent="10"/>
  <element energyPercent="30"/>
  </elements>
  <immunities>
  <immunity drown="1"/>
    <immunity death="1"/>
    <immunity lifedrain="1"/>
    <immunity paralyze="1"/>
    <immunity invisible="1"/>
  </immunities>
  <loot>
  <item id="3976" countmax="6" chance1="82500" chancemax="0"/>
    <item id="2148" countmax="50" chance1="80000" chancemax="0"/>
    <item id="2050" chance="57750"/>
    <item id="2483" chance="4000"/>
    <item id="2473" chance="5000"/>
    <item id="2398" chance="20000"/>
    <item id="5913" countmax="1" chance1="1000" chancemax="0"/>
    <item id="1987" chance="100000">
      <inside>
        <item id="2460" chance="20000"/>
        <item id="2229" countmax="2" chance1="3520" chancemax="0"/>
        <item id="2403" chance="19000"/>
        <item id="2168" chance="1000"/>
      </inside>
    </item>
  </loot>
</monster>
 
create a lifedrain.lua and a healing.lua and add it to spells.xml with impossible mana and give it some spell words and use them :p
so instead of
Code:
<attack name="lifedrain" interval="2000" chance="12" range="1" min="-360" max="-640"/>

you can do this
Code:
<attack name="your spell hur" interval="2000" chance="12" range="1" min="-360" max="-640"/>

OR here is the real answer to your problem lol
make this..
Code:
<attack name="lifedrain" interval="2000" chance="12" range="1" min="-360" max="-640"/>
    <attribute key="areaEffect" value="redshimmer"/>
      <attribute key="shootEffect" value="holy"/>
</attacks>

into this
Code:
<attack name="lifedrain" interval="2000" chance="12" range="1" min="-360" max="-640">
    <attribute key="areaEffect" value="redshimmer"/>
      <attribute key="shootEffect" value="holy"/>
  </attack>
</attacks>
 
Fixed version
Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="King" nameDescription="King" race="blood" experience="12000" speed="1500" manacost="0">
  <health now="60000" max="60000"/>
  <look type="332" head="0" body="0" legs="0" feet="0" corpse="6080"/>
  <targetchange interval="2000" chance="0"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="0"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="1"/>
    <flag staticattack="90"/>
    <flag runonhealth="0"/>
  </flags>

  <attacks>
    <attack name="melee" interval="2000" min="-500" max="-1100"/>
    <attack name="lifedrain" interval="2000" chance="12" range="1" min="-360" max="-640">
      <attribute key="areaEffect" value="redshimmer"/>
      <attribute key="shootEffect" value="holy"/>
    </attack>
  </attacks>
  <defenses armor="21" defense="17">
    <defense name="healing" interval="2000" chance="13" min="400" max="650">
      <attribute key="areaEffect" value="blueshimmer"/>
    </defense>
  </defenses>
  <elements>
  <element earthPercent="20"/>
  <element holyPercent="-25"/>
  <element icePercent="10"/>
  <element energyPercent="30"/>
  </elements>
  <immunities>
  <immunity drown="1"/>
    <immunity death="1"/>
    <immunity lifedrain="1"/>
    <immunity paralyze="1"/>
    <immunity invisible="1"/>
  </immunities>
  <loot>
  <item id="3976" countmax="6" chance1="82500" chancemax="0"/>
    <item id="2148" countmax="50" chance1="80000" chancemax="0"/>
    <item id="2050" chance="57750"/>
    <item id="2483" chance="4000"/>
    <item id="2473" chance="5000"/>
    <item id="2398" chance="20000"/>
    <item id="5913" countmax="1" chance1="1000" chancemax="0"/>
    <item id="1987" chance="100000">
      <inside>
        <item id="2460" chance="20000"/>
        <item id="2229" countmax="2" chance1="3520" chancemax="0"/>
        <item id="2403" chance="19000"/>
        <item id="2168" chance="1000"/>
      </inside>
    </item>
  </loot>
</monster>
 
Back
Top