Por tonynamoral, 18 de dez. de 2012 em Resolvidos
info
Grupo: Visconde
Registrado: 21/09/10
Posts: 319
Reputação: +27
Char no Tibia: lest sarif
int32_t LuaScriptInterface::luaSetCreatureName(lua_State* L) { //setCreatureName(cid, newName, newDescription) std::string newDesc = popString(L); std::string newName = popString(L); ScriptEnviroment* env = getEnv(); Creature* creature; if(creature = env->getCreatureByUID(popNumber(L))){ Monster* monster = (Monster*)creature; monster->name = newName; monster->nameDescription = newDesc; lua_pushboolean(L, true); } else{ errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; }
Eu gostaria de que invez de mudar o nome do monstro , mudasse do Player
Editado Dezembro 18 por tonynamoral
info
Grupo: Visconde
Registrado: 21/09/10
Posts: 319
Reputação: +27
Char no Tibia: lest sarif
int32_t LuaScriptInterface::luaSetCreatureName(lua_State* L) { //setCreatureName(cid, newName, newDescription) std::string newDesc = popString(L); std::string newName = popString(L); ScriptEnviroment* env = getEnv(); Creature* creature; if(creature = env->getCreatureByUID(popNumber(L))){ Monster* monster = (Monster*)creature; monster->name = newName; monster->nameDescription = newDesc; lua_pushboolean(L, true); } else{ errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND)); lua_pushboolean(L, false); } return 1; }Eu gostaria de que invez de mudar o nome do monstro , mudasse do Player
Editado Dezembro 18 por tonynamoral