By tonynamoral, 18 de dez. de 2012 in Resolvidos
info
Group: Visconde
Joined: 21/09/10
Posts: 319
Reputation: +27
Tibia Character: 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
Edited Dezembro 18 by tonynamoral
info
Group: Visconde
Joined: 21/09/10
Posts: 319
Reputation: +27
Tibia Character: 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
Edited Dezembro 18 by tonynamoral