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

TFS 0.X Monsters do not run creatureevent.

gabriel28

Member
Joined
Mar 16, 2012
Messages
199
Solutions
6
Reaction score
24
As the title says, the monsters on my server are not running creatureevents, I believe it's a problem in the source, but I did not make changes to that part.
The part that records the events in monster.cpp is like this:
// register creature events
for(StringVec::iterator it = mType->scriptList.begin(); it != mType->scriptList.end(); ++it)
{
if(!registerCreatureEvent(*it))
std::clog << "[Warning - Monster::Monster] Unknown event name - " << *it << std::endl;
}
If anyone can help, I appreciate it.
TFS 0.4 rev 3884
 
you have to register them via registerCreatureEvent(cid, "eventName") in lua
if you want all monsters registered however, you can add this in your monster xml files (you have to do it for each one, unless you have an onSpawn creature event)
XML:
<script>
    <event name="event name here"/>
</script>
 
@Static_
I did this, registered in login.lua and put this tag in the xml file, but it didn't work.
And I have the onSpawn event in my source, but I can't get it to work either.
 
Back
Top