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

Monsters help.

Ufonica

New Member
Joined
Aug 3, 2018
Messages
55
Reaction score
0
Hello again,
So i'm trying to make a new monster by copying a old monster and editing the name/file name of it but for some reason when i reload monsters/restart the server it will not let me spawn the monster in game with /m command and gives me the error that the monster with that name can not be found, even though i have correctly added the monster in side the monsters file.

If someone can tell me how to fix this problem that would be greatly appreciated, thanks.
 
Can you post a screenshot of each section?
monsters.xml
the file & folder/location of said file.
The inside of the monster you are trying to create.

In most cases its either a spelling mistake or a location mistake.
If it's neither of those it could be a missing letter/bracket in the monster file.

Can't know for sure without seeing it first hand.
Even if you are certain that there is no mistake, a second pair of eyes with a freah perspective can spot something you've overlooked multiple times.
 
File location - Data/Monster/Amazons

Monster file

Code:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="zaynab" nameDescription="a zaynab" race="blood" experience="9000000000" speed="200" manacost="390">
  <health now="110" max="110"/>
  <look type="137" head="113" body="120" legs="114" feet="132" corpse="6081"/>
  <targetchange interval="5000" chance="8"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="1"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="4"/>
    <flag staticattack="90"/>
    <flag runonhealth="10"/>
  </flags>
  <attacks>
    <attack name="melee" interval="2000" skill="20" attack="16"/>
    <attack name="physical" interval="2000" chance="10" range="7" min="0" max="-40">
      <attribute key="shootEffect" value="throwingknife"/>
    </attack>
  </attacks>
  <defenses armor="12" defense="12"/>
  <elements>
    <element physicalPercent="-8"/>
    <element deathPercent="-7"/>
  </elements>
  <immunities>
    <immunity physical="0"/>
    <immunity energy="0"/>
    <immunity fire="0"/>
    <immunity poison="0"/>
    <immunity lifedrain="0"/>
    <immunity paralyze="0"/>
    <immunity outfit="0"/>
    <immunity drunk="0"/>
    <immunity invisible="0"/>
  </immunities>
  <voices interval="5000" chance="10">
    <voice sentence="Yeeee ha!"/>
    <voice sentence="Your head shall be mine!"/>
  </voices>
  <loot>
    <item id="2148" countmax="20" chance1="100000" chancemax="0"/> --Gold Coins
    <item id="2467" chance="20000"/> --Leather Armor
    <item id="2385" chance="20000"/> --Sabre
    <item id="2229" countmax="2" chance1="10000" chancemax="0"/> -- Skull
    <item id="1987" chance="100000"> --Bag
      <inside>
        <item id="2691" countmax="2" chance1="20000" chancemax="0"/> --Brown Bread
        <item id="2050" chance="20000"/> --Torch
      </inside>
    </item>
  </loot>
</monster>
 
Are you sure the monster you copied this from works?

Seems like you have some green texting issues down in your loot section.
(although depending on your server the issue in-game can change.)
(Sometimes you can't get loot from monster, sometimes the monster file errors entirely and you can't spawn the monster.)

Try fixing that first.
If it's still not working, I'd suggest following my directions from my earlier post.

WG6B30p.png
 
Tried it, still not working, i was thinking maybe is it because the talkaction is trying to load a lua file instead of a xml file, as this is the error i am getting in the console.
Code:
[17:3:26.265] [Error - TalkAction Interface]
[17:3:26.265] data/talkactions/scripts/creature.lua:onSay
[17:3:26.265] Description:
[17:3:26.265] (luaDoCreateMonster) Monster with name 'zaynab' not found
 
Can you post a screenshot of each section?
monsters.xml
the file & folder/location of said file.
The inside of the monster you are trying to create.

In most cases its either a spelling mistake or a location mistake.
If it's neither of those it could be a missing letter/bracket in the monster file.

Can't know for sure without seeing it first hand.
Even if you are certain that there is no mistake, a second pair of eyes with a freah perspective can spot something you've overlooked multiple times.

Are you sure the monster you copied this from works?

Seems like you have some green texting issues down in your loot section.
(although depending on your server the issue in-game can change.)
(Sometimes you can't get loot from monster, sometimes the monster file errors entirely and you can't spawn the monster.)

Try fixing that first.
If it's still not working, I'd suggest following my directions from my earlier post.

WG6B30p.png
 
All existing monsters i am using work 100% fine, it's just when i change their file name they seem to stop working, like i can edit existing monsters/change name however when i change the file name and try again it will not work.
 
I just corrected the comments, everything else looks fine.
HTML:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="zaynab" nameDescription="a zaynab" race="blood" experience="9000000000" speed="200" manacost="390">
  <health now="110" max="110"/>
  <look type="137" head="113" body="120" legs="114" feet="132" corpse="6081"/>
  <targetchange interval="5000" chance="8"/>
  <strategy attack="100" defense="0"/>
  <flags>
    <flag summonable="1"/>
    <flag attackable="1"/>
    <flag hostile="1"/>
    <flag illusionable="1"/>
    <flag convinceable="1"/>
    <flag pushable="0"/>
    <flag canpushitems="1"/>
    <flag canpushcreatures="0"/>
    <flag targetdistance="4"/>
    <flag staticattack="90"/>
    <flag runonhealth="10"/>
  </flags>
  <attacks>
    <attack name="melee" interval="2000" skill="20" attack="16"/>
    <attack name="physical" interval="2000" chance="10" range="7" min="0" max="-40">
      <attribute key="shootEffect" value="throwingknife"/>
    </attack>
  </attacks>
  <defenses armor="12" defense="12"/>
  <elements>
    <element physicalPercent="-8"/>
    <element deathPercent="-7"/>
  </elements>
  <immunities>
    <immunity physical="0"/>
    <immunity energy="0"/>
    <immunity fire="0"/>
    <immunity poison="0"/>
    <immunity lifedrain="0"/>
    <immunity paralyze="0"/>
    <immunity outfit="0"/>
    <immunity drunk="0"/>
    <immunity invisible="0"/>
  </immunities>
  <voices interval="5000" chance="10">
    <voice sentence="Yeeee ha!"/>
    <voice sentence="Your head shall be mine!"/>
  </voices>
  <loot>
    <item id="2148" countmax="20" chance1="100000" chancemax="0"/> <!--Gold Coins -->
    <item id="2467" chance="20000"/> <!--Leather Armor-->
    <item id="2385" chance="20000"/> <!--Sabre -->
    <item id="2229" countmax="2" chance1="10000" chancemax="0"/> <!-- Skull -->
    <item id="1987" chance="100000"> <!--Bag -->
      <inside>
        <item id="2691" countmax="2" chance1="20000" chancemax="0"/> <!--Brown Bread -->
        <item id="2050" chance="20000"/> <!--Torch -->
      </inside>
    </item>
  </loot>
</monster>
 
Code:
function onSay(cid, words, param, channel)
    local func = doCreateMonster
    if(words:sub(2, 2) == "n") then
        func = doCreateNpc
    end
    local pid = cid
    local t = string.explode(param, ",")
    if(t[2]) then
        pid = getPlayerByNameWildcard(t[2])
        if(not pid) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
            return true
        end
    end
    local position = getCreaturePosition(pid)
    local effect = CONST_ME_MAGIC_RED
    local ret = func(t[1], position, false)
    if(tonumber(ret) == nil) then
        effect = CONST_ME_POFF
        doPlayerSendDefaultCancel(cid, (ret == false and RETURNVALUE_NOTPOSSIBLE or RETURNVALUE_NOTENOUGHROOM))
    end
    doSendMagicEffect(position, effect)
    return true
end
 
Ye i forgot to add it to monsters.xml, now i feel stupid, i thought i added it, sorry guys and thanks for all your help. Rep for you both :)
 
Back
Top