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

C++ [tfs 1.3] onSpawn bug (monster with same Name dont spawn)

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,188
Solutions
34
Reaction score
201
Hi, i use this saga system here (converted to 1.3): [C++/Creaturescripts] When player no stroage id, monster dont attack (https://otland.net/threads/c-creaturescripts-when-player-no-stroage-id-monster-dont-attack.129314/#post1251693)

If player have the correct storage, the monster attack and can be attacked by a player.
If player dont have, monster dont move and not attack player, and player cant attack monster.

So i have this monster, called demon_saga.
Lua:
<monster name="demon_saga" file="saga quest/demon_saga.xml"/>

demon_saga.xml
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<monster name="Demon" nameDescription="a demon" race="fire" experience="6000" speed="280">
    <health now="16200" max="16200" />
    <look type="35" corpse="5995" />
    <targetchange interval="4000" chance="20" />
    <flags>

        <flag sagamonster="1"/>
        <flag saganumber="1"/>
  
        <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="70" />
        <flag runonhealth="0" />
    </flags>
    <attacks>
        <attack name="melee" interval="2000" min="1200" max="-2000" >
        </attack>
    </attacks>
    <summons maxSummons="1">
        <summon name="fire elemental" interval="2000" chance="10" />
    </summons>
</monster>
edit: this bug happens only with monsters that have the same name others monsters (like this i showed), if i create a monster with new name, i can kill and he respawn correctly.

The bug happens only in linux, when the saga monster dies, it is not born again.
In windows, everything works normal, it is born right.
Why does this bug happen only in linux? how can i correct it?

I think can be some bug in this part, can any people help?
spawn.cpp: otland/forgottenserver (https://github.com/otland/forgottenserver/blob/master/src/spawn.cpp#L198)
 
Last edited:
Back
Top