Revscriptsys
Script Structure
Constructor:
CreatureEvent(eventName)
eventName: equivalent to the
name
tag in XML.Events:
onLogin(player)
onLogout(player)
onThink(creature, interval)
onPrepareDeath(creature, killer)
onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)
onKill(creature, target)
onAdvance(player, skill, oldLevel, newLevel)
onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
onManaChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
onTextEdit(player, item, text)
onModalWindow(player, modalWindowId, buttonId, choiceId)
onExtendedOpcode(player, opcode, buffer)
Methods:
creatureEvent:register(): Finalizes the creatureEvent's definition and registers it.
creatureEvent:type(eventType):
eventType: Equivalent to the
type
tag in XML.
Examples
Last updated