Postado Setembro 9, 2015 9 anos galera queria adaptar essa função int32_t LuaScriptInterface::luaGetCreatureName(lua_State* L) { //getCreatureName(cid) ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) lua_pushstring(L, creature->getName().c_str()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } eu queria que quando essa função foce usada em um montros essa linha: lua_pushstring(L, creature->getName().c_str()); foce substituída por: lua_pushstring(L, monster->nomereal.c_str());
Postado Setembro 9, 2015 9 anos Essa variável "nomereal", já existe? _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Postado Setembro 9, 2015 9 anos Autor sim mano olha tem uma função abaixo que usar ela ScriptEnviroment* env = getEnv(); if(Monster* monster = env->getCreatureByUID(popNumber(L))->getMonster()) lua_pushstring(L, monster->realname.c_str()); else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; }
Postado Setembro 10, 2015 9 anos Tenta, não manjo de C++, mas vai que funciona: int32_t LuaScriptInterface::luaGetCreatureName(lua_State* L) { //getCreatureName(cid) ScriptEnviroment* env = getEnv(); if(Creature* creature = env->getCreatureByUID(popNumber(L))) if(Monster* monster = env->getCreatureByUID(popNumber(L))->getMonster()) lua_pushstring(L, monster->realname.c_str()); else { lua_pushstring(L, creature->getName().c_str()); } else { errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; } _ .-'` `} _./) / } .'o \ | } '.___.'`.\ {` /`\_/ , `. } ME DA UMA NOZ! \=' .-' _`\ { `'`;/ `, } _\ @ ; } /__`;-...'--' Cluck!
Postado Setembro 13, 2015 9 anos alguem pode me ajuda com uma dll que faça meu client rodar com sprites extendidas...
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.