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

Monster [TFS 1.1] Cat mages - insane custom AI example

zbizu

Legendary OT User
Joined
Nov 22, 2010
Messages
3,323
Solutions
26
Reaction score
2,694
Location
Poland
cat mages with unique style of combat
preview: https://i.imgur.com/815P4uz.gifv

written for the lulz, don't expect it to be efficient/optimised

creaturescripts.xml:
Code:
	<event type="healthchange" name="catmageboss_onhp" script="monster/catlordboss.lua"/>
	<event type="preparedeath" name="catmageboss_resurr" script="monster/catlordboss.lua"/>

monster\catlordboss.lua
Code:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
	return demoneko.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
end

function onPrepareDeath(creature, lastHitKiller, mostDamageKiller)
	return demoneko.onPrepareDeath(creature, lastHitKiller, mostDamageKiller)
end

monsters.xml
Code:
	<monster name="Master Nekomancer" file="Added/master nekomancer.xml"/>
	<monster name="Nekomancer Elite" file="Added/nekomancer elite.xml"/>
	<monster name="Nekomancer" file="Added/nekomancer.xml"/>
	<monster name="Novice Nekomancer" file="Added/novice nekomancer.xml"/>

monster\scripts\catmage.lua
Code:
function onCreatureAppear(self, creature) return false end
function onCreatureDisappear(self, creature) return false end
function onCreatureMove(self, creature, oldPosition, newPosition) return false end
function onCreatureSay(self, creature, type, message) return false end
function onThink(self, interval) return neko.onThink(self, interval) end

monster\scripts\catmageboss.lua
Code:
function onCreatureAppear(self, creature) return demoneko.onCreatureAppear(self, creature) end
function onCreatureDisappear(self, creature) return demoneko.onCreatureDisappear(self, creature) end
function onCreatureMove(self, creature, oldPosition, newPosition) return demoneko.onCreatureMove(self, creature, oldPosition, newPosition) end
function onCreatureSay(self, creature, type, message) return demoneko.onCreatureSay(self, creature, type, message) end
function onThink(self, interval) return demoneko.onThink(self, interval) end

monster\scripts\catmagenovice.lua
Code:
function onCreatureAppear(self, creature) return false end
function onCreatureDisappear(self, creature) return false end
function onCreatureMove(self, creature, oldPosition, newPosition) return false end
function onCreatureSay(self, creature, type, message) return false end
function onThink(self, interval) return noviceneko.onThink(self, interval) end

monster\scripts\catmageelite.lua
Code:
function onCreatureAppear(self, creature) return false end
function onCreatureDisappear(self, creature) return false end
function onCreatureMove(self, creature, oldPosition, newPosition) return false end
function onCreatureSay(self, creature, type, message) return false end
function onThink(self, interval) return nekoelite.onThink(self, interval) end

added\master nekomancer.xml http://pastebin.com/uUnDKiuT
added\nekomancer elite.xml http://pastebin.com/f9i89yKc
added\nekomancer.xml http://pastebin.com/kBiUBgk1
added\novice nekomancer.xml http://pastebin.com/nT3ZvHiB

data\AI_catmageboss.lua http://pastebin.com/fKMf6n5S

global.lua:
Code:
dofile('data/AI_catmageboss.lua')
 
Great once again Zbizu, tibias AI is way to boring, time to make the creatures smarter!

Kind Regards,
Eldin.
 
You forgot to post the creature events I guess. If someone loads it all the way you have, it should say this on their console.


[Warning - Monster::Monster] Unknown event name: catmageboss_onhp
[Warning - Monster::Monster] Unknown event name: catmageboss_resurr
 
LMAO! Well I'm definitely feeling dumb today! Thanks man, great release!
 
Back
Top