• 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!

Lua TFS 1.0 Spamming NPC error

dominique120

Science & Reason
Senator
Premium User
Joined
Jun 16, 2013
Messages
3,881
Solutions
3
Reaction score
1,046
Location
Númenor
The error spams all the time in TFS 1.0
Code:
[Warning - Monsters::loadMonster] Cant load loot. data/monster/Sorcerers/ice wit
ch.xml

xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Ice Witch" nameDescription="an ice witch" race="blood" experience="580" speed="188" manacost="0">
  <health now="540" max="540"/>
  <look type="149" head="0" body="47" legs="105" feet="105" addons="0" corpse="6081"/>
  <targetchange interval="2000" chance="5"/>
  <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 staticattack="50"/>
    <flag lightlevel="0"/>
    <flag lightcolor="0"/>
    <flag targetdistance="4"/>
    <flag runonhealth="0"/>
  </flags>
  <attacks>
    <attack name="melee" interval="2000" skill="45" attack="30"/>
    <attack name="outfit" interval="1000" chance="10" range="7" item="7172" duration="8000">
      <attribute key="areaEffect" value="blueshimmer"/>
    </attack>
    <attack name="physical" interval="1000" chance="7" length="6" spread="3" min="0" max="-100">
      <attribute key="areaEffect" value="iceattack"/>
    </attack>
    <attack name="ice" interval="2000" chance="15" length="4" spread="2" min="-50" max="-110">
      <attribute key="areaEffect" value="icearea"/>
    </attack>
    <attack name="ice" interval="1000" chance="9" range="7" target="1" min="-0" max="-110">
      <attribute key="shootEffect" value="snowball"/>
      <attribute key="areaEffect" value="iceattack"/>
    </attack>
    <attack name="speed" interval="1000" chance="11" range="7" speedchange="-700" duration="20000">
      <attribute key="areaEffect" value="redshimmer"/>
    </attack>
  </attacks>
  <defenses armor="20" defense="25">
    <defense name="healing" interval="1000" chance="25" min="50" max="80">
      <attribute key="areaEffect" value="blueshimmer"/>
    </defense>
  </defenses>
  <elements>
  <element firePercent="50"/>
  <element earthPercent="40"/>
  <element holyPercent="30"/>
  <element energyPercent="-10"/>
  <element deathPercent="-10"/>
  </elements>
  <immunities>
    <immunity ice="1"/>
    <immunity paralyze="1"/>
    <immunity invisible="1"/>
  </immunities>
  <voices interval="2000" chance="5">
    <voice sentence="So you think you are cool?"/>
    <voice sentence="I hope it is not too cold for you! HeHeHe."/>
    <voice sentence="Freeze!"/>
  </voices>
  <loot>
    <item id="2148" countmax="80" chance1="100000" chancemax="0"/> --Gold Coins
    <item id="7449" chance="1222"/> --Crystal Sword
    <item id="7441" chance="5555"/> --Ice Cube
    <item id="7387" chance="1444"/> --Diamond Sceptre
    <item id="1987" chance="100000"> --Bag
      <inside>
        <item id="7896" chance="1900"/> --Glacier Kilt
        <item id="2423" chance="3333"/> --Clerical Mace
        <item id="2796" countmax="3" chance1="9999" chancemax="0"/> --Green Mushrooms
        <item id="2663" chance="1222"/> --Mystic Turban
        <item id="7459" chance="1000"/> --Ear Muffs
      </inside>
    </item>
  </loot>
</monster>
 
Yeah I know, they worked fine in 0.4 but for some reason not in 1.0. I have loads of monsters that have comments like that, do you know any quick way to remove invalid comments?
 
You could "ruin" it, by using Regex, to serach for "-- *" in your monster files (make copies just in case) then let notepad++ or w/e fix it for you.
You could also spend some time to learn Regex, that way learn to handle things like end of line, start of serach in this case "--" will be the start, replace that with "<!-- " and at the end of line add " -->".

So google it, Regex is a great tool for us who deal with ALOT of code :p
 
Back
Top