Guys, how do I do these updates? For example, for the luascript.cpp; where am I supposed to put that?! No red text, no indications.
Please let me know where I have to put stuff where you've just posted the code.
Thanks
heres a small explination:luascript.cpp and .h both have no highlighted codes?
//getCreatureHealth(cid)
lua_register(m_luaState, "getCreatureHealth", LuaScriptInterface::luaGetCreatureHealth);
//getItemParent(uid)
lua_register(m_luaState, "getItemParent", LuaScriptInterface::luaGetItemParent);
int32_t LuaScriptInterface::luaGetCreatureHealth(lua_State* L)
{
//getCreatureHealth(cid)
ScriptEnviroment* env = getEnv();
if(Creature* creature = env->getCreatureByUID(popNumber(L)))
lua_pushnumber(L, creature->getHealth());
else
{
errorEx(getError(LUA_ERROR_CREATURE_NOT_FOUND));
lua_pushboolean(L, false);
}
return 1;
}
int32_t LuaScriptInterface::luaGetItemParent(lua_State* L)
{
//getItemParent(uid)
ScriptEnviroment* env = getEnv();
Item* item = env->getItemByUID(popNumber(L));
if(!item)
{
errorEx(getError(LUA_ERROR_ITEM_NOT_FOUND));
lua_pushnil(L);
return 1;
}
Item* container = item->getParent()->getItem();
pushThing(L, container, env->addThing(container));
return 1;
}
static int32_t luaDoRemoveItem(lua_State* L);
static int32_t luaGetItemParent(lua_State* L);
TheForgottenServer for Tibia 8.6 - OtLandwould be great if someone uploaded this, i don wanna compile
My fiend told me about protocol change in stop attack
msg->AddByte(0xA3);
0xA3 has changed to 0xA7 but i cant tested it yet :S
can someone check?
Fix for sendCancelTarget (protocolgame.cpp):
Credits to Holix!Code:void ProtocolGame::sendCancelTarget() { NetworkMessage_ptr msg = getOutputBuffer(); if(msg) { TRACK_MESSAGE(msg); msg->AddByte(0xA3); [B][COLOR="Red"]msg->AddU32(0);[/COLOR][/B] } }