bernas30 0 Postado Agosto 19, 2010 Share Postado Agosto 19, 2010 continuo sem saber como alterar não sei onde editar Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-922097 Compartilhar em outros sites More sharing options...
kwovan 9 Postado Agosto 20, 2010 Share Postado Agosto 20, 2010 alguem podia me confirma isso? Não existe este bug em versões abaixo de 8.6.0. continuo sem saber como alterar não sei onde editar Precisa saber compilar um otserv para fazer isso. Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-922125 Compartilhar em outros sites More sharing options...
comedinhasss 234 Postado Setembro 7, 2010 Autor Share Postado Setembro 7, 2010 (editado) Topico atualizado... Novas modificações para serem feitas... Em npc.cpp: Procure: li.itemId = intValue; Embaixo adicione: const ItemType& it = Item::items[li.itemId]; Também procure: if(readXMLInteger(tmpNode, "subtype", intValue)) li.subType = intValue; Embaixo adicione: else { if(it.stackable) li.subType = 1; else if(it.isFluidContainer() || it.isSplash()) li.subType = 0; } Em item.cpp: Procure: s << "("; if(!it.runeSpellName.empty()) s << "\"" << it.runeSpellName << "\", "; s << "Charges:" << subType <<")"; Embaixo adicione: if(!it.runeSpellName.empty()) s << "(\"" << it.runeSpellName << "\")"; Em luascript.cpp: Procure por: //getCreatureHealth(cid) lua_register(m_luaState, "getCreatureHealth", LuaScriptInterface::luaGetCreatureHealth); Substitua por: //getItemParent(uid) lua_register(m_luaState, "getItemParent", LuaScriptInterface::luaGetItemParent); Também procure por: 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; } Substitua por: 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; } Em luascript.h: Procure por: static int32_t luaDoRemoveItem(lua_State* L); Substitua por: static int32_t luaGetItemParent(lua_State* L); Arquivos para procurar e repassar: Bom gente eu não gravei como era o antigo desse então procure uma frase e repasse Em container.cpp: Procure e repasse:Cylinder* Container::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t&) { if(index == 254 /*move up*/) { index = INDEX_WHEREEVER; *destItem = NULL; Container* parentContainer = dynamic_cast<Container*>(getParent()); if(parentContainer) return parentContainer; return this; } else if(index == 255 /*add wherever*/){ index = INDEX_WHEREEVER; *destItem = NULL; } else if(index >= (int32_t)capacity()){ /* if you have a container, maximize it to show all 20 slots then you open a bag that is inside the container you will have a bag with 8 slots and a "grey" area where the other 12 slots where from the container if you drop the item on that grey area the client calculates the slot position as if the bag has 20 slots */ index = INDEX_WHEREEVER; *destItem = NULL; } const Item* item = thing->getItem(); if(item == NULL){ return this; } if(item->isStackable()){ if(item->getParent() != this){ //try find a suitable item to stack with uint32_t n = 0; for(ItemList::iterator cit = itemlist.begin(); cit != itemlist.end(); ++cit){ if((*cit) != item && (*cit)->getID() == item->getID() && (*cit)->getItemCount() < 100){ *destItem = (*cit); index = n; return this; } ++n; } } } if(index != INDEX_WHEREEVER){ Thing* destThing = __getThing(index); if(destThing) *destItem = destThing->getItem(); Cylinder* subCylinder = dynamic_cast<Cylinder*>(*destItem); if(subCylinder){ index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } } return this; } Em item.cpp: Procure e repasse: void Item::setDefaultSubtype() { setItemCount(1); const ItemType& it = items[id]; if(it.charges) setCharges(it.charges); } Em player.cpp: Procure e repasse: Cylinder* Player::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t& flags) { if(index == 0 /*drop to capacity window*/ || index == INDEX_WHEREEVER){ *destItem = NULL; const Item* item = thing->getItem(); if(item == NULL){ return this; } //find an appropiate slot std::list<Container*> containerList; for(int i = SLOT_FIRST; i < SLOT_LAST; ++i){ Item* inventoryItem = inventory[i]; if(inventoryItem == tradeItem){ continue; } if(inventoryItem == tradeItem){ continue; } if(inventoryItem){ //try find an already existing item to stack with if(inventoryItem != item && item->isStackable() && inventoryItem->getID() == item->getID() && inventoryItem->getItemCount() < 100){ *destItem = inventoryItem; index = i; return this; } //check sub-containers else if(Container* subContainer = inventoryItem->getContainer()){ Cylinder* tmpCylinder = NULL; int32_t tmpIndex = INDEX_WHEREEVER; Item* tmpDestItem = NULL; tmpCylinder = subContainer->__queryDestination(tmpIndex, item, &tmpDestItem, flags); if(tmpCylinder && tmpCylinder->__queryAdd(tmpIndex, item, item->getItemCount(), flags) == RET_NOERROR){ index = tmpIndex; *destItem = tmpDestItem; return tmpCylinder; } containerList.push_back(subContainer); } } //empty slot else if(__queryAdd(i, item, item->getItemCount(), flags) == RET_NOERROR){ index = i; *destItem = NULL; return this; } } //check deeper in the containers for(std::list<Container*>::iterator it = containerList.begin(); it != containerList.end(); ++it){ for(ContainerIterator iit = (*it)->begin(); iit != (*it)->end(); ++iit){ if(Container* subContainer = (*iit)->getContainer()){ if(subContainer == tradeItem){ continue; } Cylinder* tmpCylinder = NULL; int32_t tmpIndex = INDEX_WHEREEVER; Item* tmpDestItem = NULL; tmpCylinder = subContainer->__queryDestination(tmpIndex, item, &tmpDestItem, flags); if(tmpCylinder && tmpCylinder->__queryAdd(tmpIndex, item, item->getItemCount(), flags) == RET_NOERROR){ index = tmpIndex; *destItem = tmpDestItem; return tmpCylinder; } } } } return this; } Thing* destThing = __getThing(index); if(destThing) *destItem = destThing->getItem(); Cylinder* subCylinder = dynamic_cast<Cylinder*>(destThing); if(subCylinder){ index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } else return this; } Novo download: Items.xml (8.6): Clique aqui Novo script de potion... ele esta em testes... se der erro eu volto no antigo Editado Setembro 7, 2010 por comedinhasss Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-929768 Compartilhar em outros sites More sharing options...
claudiopadilha 0 Postado Outubro 16, 2010 Share Postado Outubro 16, 2010 O q vc quer dizer com repassar? Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-946071 Compartilhar em outros sites More sharing options...
paulocesar0102 0 Postado Novembro 7, 2010 Share Postado Novembro 7, 2010 (editado) comedinhasss eu tenho uma duvida tipo eu to com um problema no item.otb tipo todas as vezes que eu adicino um novo item com nova id eu abroo console e diz que o item.otb não é compativel será que é erro no item editor ou se eu fizer isso ai resolve o meu problema ? versão do ot: uso espoca do Real Server 8.60 a versão do tfs eu não sei Grato Pela Atenção ! Editado Novembro 7, 2010 por Relikia0102 Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-954365 Compartilhar em outros sites More sharing options...
korggo 8 Postado Novembro 27, 2010 Share Postado Novembro 27, 2010 (editado) Vlw ae pelo tuto + REP pra tu ae ;P Manow ajuda ae... compilei o tfs blz... nao deu erro!!! mais quando vai logar com o acc manager os itens dele cai td no chao e isso tbm acontece quando cria uma acc nova.. o que sera q deu errado alguem pode me ajuda? Muito obrigado!! Editado Novembro 29, 2010 por korggo Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-961172 Compartilhar em outros sites More sharing options...
drakylucas 160 Postado Dezembro 12, 2010 Share Postado Dezembro 12, 2010 ow cara você sabe como passa pa 8.62 ou 8.70 tb? mudando a versao no resources.lua da debug =d Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-972679 Compartilhar em outros sites More sharing options...
alecurita 0 Postado Fevereiro 6, 2011 Share Postado Fevereiro 6, 2011 Como fasso para ver soucers do executavel?? nunca mexi nisso teria como dar uma ajuda? Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-998327 Compartilhar em outros sites More sharing options...
RHCP 24 Postado Maio 5, 2011 Share Postado Maio 5, 2011 link do items.xml off... Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-1031206 Compartilhar em outros sites More sharing options...
danilocastrianisantos 2 Postado Julho 28, 2011 Share Postado Julho 28, 2011 muito bom me ajudou muito Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-1075074 Compartilhar em outros sites More sharing options...
arkires 8 Postado Agosto 6, 2011 Share Postado Agosto 6, 2011 cara arruma no topico ae isso aki Em luascript.cpp: Procure por: //getCreatureHealth(cid) lua_register(m_luaState, "getCreatureHealth", LuaScriptInterface::luaGetCreatureHealth); Embaixo adicione: //getItemParent(uid) lua_register(m_luaState, "getItemParent", LuaScriptInterface::luaGetItemParent); cendo que vc tem que substituir e não adiciona ok fora esse erro ta tudo certo ... Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-1080711 Compartilhar em outros sites More sharing options...
Andrui 1 Postado Agosto 18, 2011 Share Postado Agosto 18, 2011 Onde ta essas Pasta esses arquivos pra Edita?! Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-1087225 Compartilhar em outros sites More sharing options...
aliadoboo 0 Postado Agosto 21, 2011 Share Postado Agosto 21, 2011 /home/marlon/forgottenserver/luascript.cpp:1373: undefined reference to `LuaScriptInterface::luaGetCreatureHealth(lua_State*)' collect2: ld returned 1 exit status make[1]: *** [theforgottenserver] Error 1 make[1]: Leaving directory `/home/marlon/forgottenserver' make: *** [all] Error 2 oq posso fazer ? problema no acc mannager, items cai no chao Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-1088862 Compartilhar em outros sites More sharing options...
652584 0 Postado Setembro 21, 2011 Share Postado Setembro 21, 2011 kara vc ta tentando mudar a versão ou mudar o serv inteiro olha , pra vc mudar só a versão , a unica coisa que vc tem que faser é trocar o EXE dele para um de 8.60 Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-1106144 Compartilhar em outros sites More sharing options...
Adriez 6 Postado Outubro 9, 2011 Share Postado Outubro 9, 2011 (editado) fmz manos ??? mano os items do account manager e do primeiro char criado ta caindo no chao ta com erro essa parte flws fmz player.cpp Cylinder* Player::__queryDestination(int32_t& index, const Thing* thing, Item** destItem, uint32_t& flags) { if(index == 0 /*drop to capacity window*/ || index == INDEX_WHEREEVER){ *destItem = NULL; const Item* item = thing->getItem(); if(item == NULL){ return this; } //find an appropiate slot std::list<Container*> containerList; for(int i = SLOT_FIRST; i < SLOT_LAST; ++i){ Item* inventoryItem = inventory[i]; if(inventoryItem == tradeItem){ continue; } if(inventoryItem == tradeItem){ continue; } if(inventoryItem){ //try find an already existing item to stack with if(inventoryItem != item && item->isStackable() && inventoryItem->getID() == item->getID() && inventoryItem->getItemCount() < 100){ *destItem = inventoryItem; index = i; return this; } //check sub-containers else if(Container* subContainer = inventoryItem->getContainer()){ Cylinder* tmpCylinder = NULL; int32_t tmpIndex = INDEX_WHEREEVER; Item* tmpDestItem = NULL; tmpCylinder = subContainer->__queryDestination(tmpIndex, item, &tmpDestItem, flags); if(tmpCylinder && tmpCylinder->__queryAdd(tmpIndex, item, item->getItemCount(), flags) == RET_NOERROR){ index = tmpIndex; *destItem = tmpDestItem; return tmpCylinder; } containerList.push_back(subContainer); } } //empty slot else if(__queryAdd(i, item, item->getItemCount(), flags) == RET_NOERROR){ index = i; *destItem = NULL; return this; } } //check deeper in the containers for(std::list<Container*>::iterator it = containerList.begin(); it != containerList.end(); ++it){ for(ContainerIterator iit = (*it)->begin(); iit != (*it)->end(); ++iit){ if(Container* subContainer = (*iit)->getContainer()){ if(subContainer == tradeItem){ continue; } Cylinder* tmpCylinder = NULL; int32_t tmpIndex = INDEX_WHEREEVER; Item* tmpDestItem = NULL; tmpCylinder = subContainer->__queryDestination(tmpIndex, item, &tmpDestItem, flags); if(tmpCylinder && tmpCylinder->__queryAdd(tmpIndex, item, item->getItemCount(), flags) == RET_NOERROR){ index = tmpIndex; *destItem = tmpDestItem; return tmpCylinder; } } } } return this; } Thing* destThing = __getThing(index); if(destThing) *destItem = destThing->getItem(); Cylinder* subCylinder = dynamic_cast<Cylinder*>(destThing); if(subCylinder){ index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } else return this; } Editado Outubro 9, 2011 por Adriez Link para o comentário https://xtibia.com/forum/topic/137248-passando-um-otserv-para-860/page/3/#findComment-1113578 Compartilhar em outros sites More sharing options...
Posts Recomendados