mehah / otclient

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
242 stars 177 forks source link

improve: smart event controller #805

Closed mehah closed 1 week ago

mehah commented 1 week ago

If you register an event in onInit() or in the general scope of the script, the event will be automatically registered at startup and disconnected when the module is destroyed. If it is inside onGameStart(), the events will be connected when entering the game map and disconnected when leaving and also when the module is destroyed.