Postado Fevereiro 17, 2018 7 anos Solução Em luascript.cpp, você adiciona no final do arquivo: Spoiler int32_t LuaInterface::luaDoCreatureCastSpell(lua_State* L) { //doCreatureCastSpell(cid, spellName) std::string spellname = popString(L); ScriptEnviroment* env = getEnv(); Creature* creature = env->getCreatureByUID(popNumber(L)); if(!creature) { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushnil(L); return 1; } Spell* spell = g_spells->getInstantSpellByName(spellname); if(spell) { lua_pushboolean(L, spell->castSpell(creature)); return 1; } errorEx(getError(LUA_ERROR_SPELL_NOT_FOUND)); lua_pushnil(L); return 1; } no mesmo arquivo, procure por: luaL_register(m_luaState, "std", LuaInterface::luaStdTable); e abaixo dele adicione: Spoiler //doCreatureCastSpell(cid, spellName) lua_register(m_luaState, "doCreatureCastSpell", LuaInterface::luaDoCreatureCastSpell); Agora em luascript.h, procure por: static int32_t luaStdSHA512(lua_State* L); e abaixo adicione: Spoiler static int32_t luaDoCreatureCastSpell(lua_State* L); Agora só compilar. Editado Fevereiro 23, 2018 7 anos por MaTTch (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.