• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua List of types

Angelous

New Member
Joined
Oct 28, 2015
Messages
7
Reaction score
0
I wanna know where can i find a list with all creaturescripts, globalevent, and any other types, p.e.:

<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
<event type="login" name="FirstItems" event="script" value="firstitems.lua"/>


Here have 2 types: death and login. Have any file of TFS that have it?
 
In the sources of course :p
For creature events in creatureevent.cpp starting on line 170 to 192
Code:
    if (tmpStr == "login") {
        m_type = CREATURE_EVENT_LOGIN;
    } else if (tmpStr == "logout") {
        m_type = CREATURE_EVENT_LOGOUT;
    } else if (tmpStr == "think") {
        m_type = CREATURE_EVENT_THINK;
    } else if (tmpStr == "preparedeath") {
        m_type = CREATURE_EVENT_PREPAREDEATH;
    } else if (tmpStr == "death") {
        m_type = CREATURE_EVENT_DEATH;
    } else if (tmpStr == "kill") {
        m_type = CREATURE_EVENT_KILL;
    } else if (tmpStr == "advance") {
        m_type = CREATURE_EVENT_ADVANCE;
    } else if (tmpStr == "modalwindow") {
        m_type = CREATURE_EVENT_MODALWINDOW;
    } else if (tmpStr == "textedit") {
        m_type = CREATURE_EVENT_TEXTEDIT;
    } else if (tmpStr == "healthchange") {
        m_type = CREATURE_EVENT_HEALTHCHANGE;
    } else if (tmpStr == "manachange") {
        m_type = CREATURE_EVENT_MANACHANGE;
    } else if (tmpStr == "extendedopcode") {
        m_type = CREATURE_EVENT_EXTENDED_OPCODE;

For global events in globalevent.cpp starting on line 298 to 302
Code:
        case GLOBALEVENT_STARTUP: return "onStartup";
        case GLOBALEVENT_SHUTDOWN: return "onShutdown";
        case GLOBALEVENT_RECORD: return "onRecord";
        case GLOBALEVENT_TIMER: return "onTime";
        default: return "onThink";
You will have to be more specific with the rest of what your looking for.
 
Back
Top