• 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 Particular monster on spawn in map

hellboy

Intermediate OT User
Joined
Apr 6, 2008
Messages
544
Solutions
6
Reaction score
121
Location
player:getTown()
It's possible to fire lua script on spawn one monster type in map (using only monster xml file and lua)?
 
I believe it was, back in the day. You'd need to declare either an onThink creatureevent for the creature.xml, or an onSpawn, if there is such a thing. Please do some research, or look into your source files, and if you are able to communicate further, we might be able to help.
 
I believe it was, back in the day. You'd need to declare either an onThink creatureevent for the creature.xml, or an onSpawn, if there is such a thing. Please do some research, or look into your source files, and if you are able to communicate further, we might be able to help.

I fount something like that in source: forgottenserver/monsters.cpp at master · otland/forgottenserver · GitHub
Could you provide any example? I can't find anything in default data pack in data/monsters that look like

Code:
<script>
[...]

Code:
grep -r 'script' monster/ | grep -iv 'namedescription' | wc -l
Return 0
 
check my signature for a 1.2 implementation of onSpawn
if you're not using 1.2 just use the search bar and look for onSpawn for your tfs version
 
check my signature for a 1.2 implementation of onSpawn
if you're not using 1.2 just use the search bar and look for onSpawn for your tfs version
Thanks. I'll search few days in forum for another answer. If I can't find anything else, I'll mark your answer as "Best answer" and set Thread as resolved.
 
Back
Top