Scripting
Script Structure
onThink(monster, interval)
function onThink(monster, interval) print("I'm thinking") end
onAppear(monster, creature)
function onAppear(monster, creature) if monster:getId() == creature:getId() then print(monster:getId(), creature:getId()) end end
onDisappear(monster, creature)
function onDisappear(monster, creature) if monster:getId() == creature:getId() then print(monster:getId(), creature:getId()) end end
onMove(monster, creature, fromPosition, toPosition)
function onMove(monster, creature, fromPosition, toPosition) if monster:getId() == creature:getId() then print(monster:getId(), creature:getId(), fromPosition, toPosition) end end
onSay(monster, creature, type, message)
function onSay(monster, creature, type, message) print(monster:getId(), creature:getId(), type, message) end
Last updated