QuaS
Cykotitan Pwned =/
I didn't relase anything last time, so here we go.
luascript.h
luascript.cpp
Returns Time since last move in ms. Works with rev 3660+;
Example use: http://otland.net/f163/istrapped-cid-getthingsfrompos-pos-except-istileblocking-pos-103626/
luascript.h
PHP:
static int32_t luaGetTimeSinceLastMove(lua_State* L);
PHP:
//getTimeSinceLastMove(cid) ms
lua_register(m_luaState, "getTimeSinceLastMove", LuaInterface::luaGetTimeSinceLastMove);
[...]
int32_t LuaInterface::luaGetTimeSinceLastMove(lua_State* L)
{
//getTimeSinceLastMove(cid) by quas
ScriptEnviroment* env = getEnv();
Creature* creature = env->getCreatureByUID(popNumber(L));
if(!creature)
{
errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND));
lua_pushboolean(L, false);
return 1;
}
lua_pushnumber(L, creature->getTimeSinceLastMove());
return 1;
}
Returns Time since last move in ms. Works with rev 3660+;
Example use: http://otland.net/f163/istrapped-cid-getthingsfrompos-pos-except-istileblocking-pos-103626/
Last edited: