Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''remover''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

Encontrado 20 registros

  1. Olá bom dia, se alguém puder me ajudar ficaria muito grato! Porfavor alguém consegue disponibilizar um script de npc que altere PvP do player? Vou explicar, a pessoa cria o char e já chega sendo npvp, portanto na cidade terá um npc em que ele possa se alterar pra pvp, gostaria que o player que não tivesse PvP ficasse com a caveirinha verde do lado do char e o PvP fica normal (podendo pegar caveirinha branca, red, black. Também gostaria se for possível adicionar tempo para pode trocar novamente, tipo 24 horas. Se alguém puder uma luz porfavor, desde já agradeço. Server global 12.51 tfs 1.3
  2. Olá, eu vim trazer um script que eu produzi para absolutamente nada além de treino, eu estou postando pois talvez seja útil para alguém em algum momento do espaçotempo. E também vou ceder todos os créditos ao @Woox, afinal eu não ia conseguir sem ele, então meu muito obrigado. local configuration = { positionParedinso1 = {x=1067, y=1071, z=7, stackpos=1}, -- Posição do objeto que ira sumir time = 1*15*1000, -- tempo para o objeto voltar para o seu lugar devido monstrosTime = 1*10*1000, -- tempo até os monstros despertarem guardioes = { [1] = {name = "Hellfire Fighter", pos = {x = 1065, y = 1071, z = 7}}, -- Todas posições onde os monstros seram criados [2] = {name = "Massive Fire Elemental", pos = {x = 1061, y = 1069, z = 7}}, -- Bem como seus nomes e quantidade [3] = {name = "Fury", pos = {x = 1069, y = 1074, z = 7}}, [4] = {name = "Demon", pos = {x = 1069, y = 1071, z = 7}}, [5] = {name = "Diabolic Imp", pos = {x = 1066, y = 1074, z = 7}}, [6] = {name = "Fire Devil", pos = {x = 1064, y = 1075, z = 7}}, [7] = {name = "Fire Elemental", pos = {x = 1062, y = 1069, z = 7}}, [8] = {name = "Massive Fire Elemental", pos = {x = 1067, y = 1068, z = 7}} } } function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 1945 then -- alavanca doTransformItem(item.uid, 1946) positionParedinso = getThingFromPos(configuration.positionParedinso1) if positionParedinso.itemid ~= 0 then doRemoveItem(positionParedinso.uid, 1) doCreatureSay(cid, "Um som terrível de engrenagens antigas se movendo pode ser ouvido imediatamente após você puxar a alavanca. \z Estrondos, chamas e vozes demoniacas estão vindo na sua direção, são ouvidos cada vez mais altos, corra por sua vida, \z você acaba fezer um mal antigo despertar.", TALKTYPE_ORANGE_1) -- Mensagem que será exibida após você puxar a alavanca addEvent(function() for k, v in pairs(configuration.guardioes) do doCreateMonster(v.name, v.pos) end end, configuration.monstrosTime) addEvent(doCreateItem, configuration.time, 12794, configuration.positionParedinso1) -- "12794" é o ID da parede que você quer criar após puxar a alavanca end else doTransformItem(item.uid, 1945) end end
  3. Olá a todos, estou tendo um problema com esse script, caso um ou mais jogadores, utilizem pulando stacks de escadas, O problema que acontece é se o jogador pular a stack de outro jogador com a condição, a condição não sai do jogador que estava com ela antes, eu queria uma maneira de fazer remover a condição do SQM inteiro, e não de um único jogador, obrigado pela atenção, segue abaixo o script.
  4. Sabem que quando nós jogamos um item sobre a bp ele entra? queria remover isso, queria que so entrasse ao jogar diretamente dentro creio que seja nesse arquivo container.cpp ////////////////////////////////////////////////////////////////////////// OpenTibia - an opensource roleplaying game////////////////////////////////////////////////////////////////////////// This program is free software: you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation, either version 3 of the License, or// (at your option) any later version.//// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.//// You should have received a copy of the GNU General Public License// along with this program. If not, see <http://www.gnu.org/licenses/>.////////////////////////////////////////////////////////////////////////#include "otpch.h"#include "container.h"#include "game.h"#include "iomap.h"#include "player.h"extern Game g_game;ContainerContainer(uint16_t type) : Item(type){ maxSize = items[type].maxItems; serializationCount = 0; totalWeight = 0.0;}Container~Container(){ for(ItemListiterator cit = itemlist.begin(); cit != itemlist.end(); ++cit) { (*cit)->setParent(NULL); (*cit)->unRef(); } itemlist.clear();}Item* Containerclone() const{ Container* _item = static_cast<Container*>(Itemclone()); for(ItemListconst_iterator it = itemlist.begin(); it != itemlist.end(); ++it) _item->addItem((*it)->clone()); return _item;}Container* ContainergetParentContainer(){ if(Cylinder* cylinder = getParent()) { if(Item* item = cylinder->getItem()) return item->getContainer(); } return NULL;}void ContaineraddItem(Item* item){ itemlist.push_back(item); item->setParent(this);}Attr_ReadValue ContainerreadAttr(AttrTypes_t attr, PropStream& propStream){ switch(attr) { case ATTR_CONTAINER_ITEMS: { uint32_t count; if(!propStream.getLong(count)) return ATTR_READ_ERROR; serializationCount = count; return ATTR_READ_END; } default: break; } return ItemreadAttr(attr, propStream);}bool ContainerunserializeItemNode(FileLoader& f, NODE node, PropStream& propStream){ if(!ItemunserializeItemNode(f, node, propStream)) return false; uint32_t type; for(NODE nodeItem = f.getChildNode(node, type); nodeItem; nodeItem = f.getNextNode(nodeItem, type)) { //load container items if(type != OTBM_ITEM) return false; PropStream itemPropStream; f.getProps(nodeItem, itemPropStream); Item* item = ItemCreateItem(itemPropStream); if(!item) return false; if(!item->unserializeItemNode(f, nodeItem, itemPropStream)) return false; addItem(item); updateItemWeight(item->getWeight()); } return true;}void ContainerupdateItemWeight(double diff){ totalWeight += diff; if(Container* parent = getParentContainer()) parent->updateItemWeight(diff);}double ContainergetWeight() const{ return ItemgetWeight() + totalWeight;}stdstring ContainergetContentDescription() const{ stdstringstream s; return getContentDescription(s).str();}stdstringstream& ContainergetContentDescription(stdstringstream& s) const{ bool begin = true; Container* evil = const_cast<Container*>(this); for(ContainerIterator it = evil->begin(); it != evil->end(); ++it) { Container* tmp = (*it)->getContainer(); if(tmp && !tmp->empty()) continue; if(!begin) s << ", "; else begin = false; s << (*it)->getNameDescription(); } if(begin) s << "nothing"; return s;}Item* ContainergetItem(uint32_t index){ size_t n = 0; for(ItemListconst_iterator cit = getItems(); cit != getEnd(); ++cit) { if(n == index) return *cit; else ++n; } return NULL;}uint32_t ContainergetItemHoldingCount() const{ uint32_t counter = 0; for(ContainerIterator it = begin(); it != end(); ++it) ++counter; return counter;}bool ContainerisHoldingItem(const Item* item) const{ for(ContainerIterator it = begin(); it != end(); ++it) { if((*it) == item) return true; } return false;}void ContaineronAddContainerItem(Item* item){ const Position& cylinderMapPos = getPosition(); SpectatorVec list; SpectatorVeciterator it; g_game.getSpectators(list, cylinderMapPos, false, false, 2, 2, 2, 2); //send to client Player* player = NULL; for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->sendAddContainerItem(this, item); } //event methods for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->onAddContainerItem(this, item); }}void ContaineronUpdateContainerItem(uint32_t index, Item* oldItem, const ItemType& oldType, Item* newItem, const ItemType& newType){ const Position& cylinderMapPos = getPosition(); SpectatorVec list; SpectatorVeciterator it; g_game.getSpectators(list, cylinderMapPos, false, false, 2, 2, 2, 2); //send to client Player* player = NULL; for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->sendUpdateContainerItem(this, index, oldItem, newItem); } //event methods for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->onUpdateContainerItem(this, index, oldItem, oldType, newItem, newType); }}void ContaineronRemoveContainerItem(uint32_t index, Item* item){ const Position& cylinderMapPos = getPosition(); SpectatorVec list; SpectatorVeciterator it; g_game.getSpectators(list, cylinderMapPos, false, false, 2, 2, 2, 2); //send change to client Player* player = NULL; for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->sendRemoveContainerItem(this, index, item); } //event methods for(it = list.begin(); it != list.end(); ++it) { if((player = (*it)->getPlayer())) player->onRemoveContainerItem(this, index, item); }}ReturnValue Container__queryAdd(int32_t index, const Thing* thing, uint32_t count, uint32_t flags) const{ if(((flags & FLAG_CHILDISOWNER) == FLAG_CHILDISOWNER)) { //a child container is querying, since we are the top container (not carried by a player) //just return with no error. return RET_NOERROR; } const Item* item = thing->getItem(); if(!item) return RET_NOTPOSSIBLE; if(!item->isPickupable()) return RET_CANNOTPICKUP; if(item == this) return RET_THISISIMPOSSIBLE; if(const Container* container = item->getContainer()) { for(const Cylinder* cylinder = getParent(); cylinder; cylinder = cylinder->getParent()) { if(cylinder == container) return RET_THISISIMPOSSIBLE; } } if(index == INDEX_WHEREEVER && !((flags & FLAG_NOLIMIT) == FLAG_NOLIMIT) && full()) return RET_CONTAINERNOTENOUGHROOM; const Cylinder* topParent = getTopParent(); if(topParent != this) return topParent->__queryAdd(INDEX_WHEREEVER, item, count, flags | FLAG_CHILDISOWNER); return RET_NOERROR;}ReturnValue Container__queryMaxCount(int32_t index, const Thing* thing, uint32_t count, uint32_t& maxQueryCount, uint32_t flags) const{ const Item* item = thing->getItem(); if(!item) { maxQueryCount = 0; return RET_NOTPOSSIBLE; } if(((flags & FLAG_NOLIMIT) == FLAG_NOLIMIT)) { maxQueryCount = stdmax((uint32_t)1, count); return RET_NOERROR; } int32_t freeSlots = stdmax((int32_t)(capacity() - size()), (int32_t)0); if(item->isStackable()) { uint32_t n = 0; if(index != INDEX_WHEREEVER) { const Thing* destThing = __getThing(index); const Item* destItem = NULL; if(destThing) destItem = destThing->getItem(); if(destItem && destItem->getID() == item->getID()) n = 100 - destItem->getItemCount(); } maxQueryCount = freeSlots * 100 + n; if(maxQueryCount < count) return RET_CONTAINERNOTENOUGHROOM; } else { maxQueryCount = freeSlots; if(maxQueryCount == 0) return RET_CONTAINERNOTENOUGHROOM; } return RET_NOERROR;}ReturnValue Container__queryRemove(const Thing* thing, uint32_t count, uint32_t flags) const{ int32_t index = __getIndexOfThing(thing); if(index == -1) return RET_NOTPOSSIBLE; const Item* item = thing->getItem(); if(item == NULL) return RET_NOTPOSSIBLE; if(count == 0 || (item->isStackable() && count > item->getItemCount())) return RET_NOTPOSSIBLE; if(!item->isMovable() && !hasBitSet(FLAG_IGNORENOTMOVABLE, flags)) return RET_NOTMOVABLE; return RET_NOERROR;}Cylinder* Container__queryDestination(int32_t& index, const 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; else return this; } else if(index == 255 /*add wherever*/) { index = INDEX_WHEREEVER; *destItem = NULL; return this; } 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; } if(index != INDEX_WHEREEVER) { Thing* destThing = __getThing(index); if(destThing) *destItem = destThing->getItem(); if(Cylinder* subCylinder = dynamic_cast<Cylinder*>(*destItem)) { index = INDEX_WHEREEVER; *destItem = NULL; return subCylinder; } } } return this;}void Container__addThing(Creature* actor, Thing* thing){ return __addThing(actor, 0, thing);}void Container__addThing(Creature*, int32_t index, Thing* thing){ if(index >= (int32_t)capacity()) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__addThing], index:" << index << ", index >= capacity()" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } Item* item = thing->getItem(); if(!item) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__addThing] item == NULL" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; }#ifdef __DEBUG_MOVESYS__ if(index != INDEX_WHEREEVER && size() >= capacity()) { stdclog << "Failure: [Container::__addThing] size() >= capacity()" << stdendl; return /*RET_CONTAINERNOTENOUGHROOM*/; }#endif item->setParent(this); itemlist.push_front(item); totalWeight += item->getWeight(); if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(item->getWeight()); //send change to client if(getParent() && getParent() != VirtualCylindervirtualCylinder) onAddContainerItem(item);}void Container__updateThing(Thing* thing, uint16_t itemId, uint32_t count){ int32_t index = __getIndexOfThing(thing); if(index == -1) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__updateThing] index == -1" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } Item* item = thing->getItem(); if(!item) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__updateThing] item == NULL" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } const ItemType& oldType = Itemitems[item->getID()]; const ItemType& newType = Itemitems[itemId]; const double oldWeight = item->getWeight(); item->setID(itemId); item->setSubType(count); const double diffWeight = -oldWeight + item->getWeight(); totalWeight += diffWeight; if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(diffWeight); //send change to client if(getParent()) onUpdateContainerItem(index, item, oldType, item, newType);}void Container__replaceThing(uint32_t index, Thing* thing){ Item* item = thing->getItem(); if(!item) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__replaceThing] item == NULL" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } uint32_t count = 0; ItemListiterator cit = itemlist.end(); for(cit = itemlist.begin(); cit != itemlist.end(); ++cit) { if(count == index) break; ++count; } if(cit == itemlist.end()) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__updateThing] item not found" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } totalWeight -= (*cit)->getWeight(); totalWeight += item->getWeight(); if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(-(*cit)->getWeight() + item->getWeight()); itemlist.insert(cit, item); item->setParent(this); //send change to client if(getParent()) { const ItemType& oldType = Itemitems[(*cit)->getID()]; const ItemType& newType = Itemitems[item->getID()]; onUpdateContainerItem(index, *cit, oldType, item, newType); } (*cit)->setParent(NULL); itemlist.erase(cit);}void Container__removeThing(Thing* thing, uint32_t count){ Item* item = thing->getItem(); if(!item) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__removeThing] item == NULL" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } int32_t index = __getIndexOfThing(thing); if(index == -1) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__removeThing] index == -1" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } ItemListiterator cit = stdfind(itemlist.begin(), itemlist.end(), thing); if(cit == itemlist.end()) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__removeThing] item not found" << stdendl;#endif return /*RET_NOTPOSSIBLE*/; } if(item->isStackable() && count != item->getItemCount()) { const double oldWeight = -item->getWeight(); item->setItemCount(stdmax(0, (int32_t)(item->getItemCount() - count))); const double diffWeight = oldWeight + item->getWeight(); totalWeight += diffWeight; //send change to client if(getParent()) { if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(diffWeight); const ItemType& it = Itemitems[item->getID()]; onUpdateContainerItem(index, item, it, item, it); } } else { //send change to client if(getParent()) { if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(-item->getWeight()); onRemoveContainerItem(index, item); } totalWeight -= item->getWeight(); item->setParent(NULL); itemlist.erase(cit); }}Thing* Container__getThing(uint32_t index) const{ if(index > size()) return NULL; uint32_t count = 0; for(ItemListconst_iterator cit = itemlist.begin(); cit != itemlist.end(); ++cit) { if(count == index) return *cit; else ++count; } return NULL;}int32_t Container__getIndexOfThing(const Thing* thing) const{ uint32_t index = 0; for(ItemListconst_iterator cit = getItems(); cit != getEnd(); ++cit) { if(*cit == thing) return index; else ++index; } return -1;}int32_t Container__getFirstIndex() const{ return 0;}int32_t Container__getLastIndex() const{ return size();}uint32_t Container__getItemTypeCount(uint16_t itemId, int32_t subType /*= -1*/) const{ uint32_t count = 0; for(ItemListconst_iterator it = itemlist.begin(); it != itemlist.end(); ++it) { if((*it) && (*it)->getID() == itemId && (subType == -1 || subType == (*it)->getSubType())) count += (*it)->getItemCount(); } return count;}stdmap<uint32_t, uint32_t>& Container__getAllItemTypeCount(stdmap<uint32_t, uint32_t>& countMap) const{ for(ItemListconst_iterator it = itemlist.begin(); it != itemlist.end(); ++it) countMap[(*it)->getID()] += (*it)->getItemCount(); return countMap;}void ContainerpostAddNotification(Creature* actor, Thing* thing, const Cylinder* oldParent, int32_t index, CylinderLink_t/* link = LINK_OWNER*/){ Cylinder* topParent = getTopParent(); if(!topParent->getCreature()) { if(topParent == this) { //let the tile class notify surrounding players if(topParent->getParent()) topParent->getParent()->postAddNotification(actor, thing, oldParent, index, LINK_NEAR); } else topParent->postAddNotification(actor, thing, oldParent, index, LINK_PARENT); } else topParent->postAddNotification(actor, thing, oldParent, index, LINK_TOPPARENT);}void ContainerpostRemoveNotification(Creature* actor, Thing* thing, const Cylinder* newParent, int32_t index, bool isCompleteRemoval, CylinderLink_t/* link = LINK_OWNER*/){ Cylinder* topParent = getTopParent(); if(!topParent->getCreature()) { if(topParent == this) { //let the tile class notify surrounding players if(topParent->getParent()) topParent->getParent()->postRemoveNotification(actor, thing, newParent, index, isCompleteRemoval, LINK_NEAR); } else topParent->postRemoveNotification(actor, thing, newParent, index, isCompleteRemoval, LINK_PARENT); } else topParent->postRemoveNotification(actor, thing, newParent, index, isCompleteRemoval, LINK_TOPPARENT);}void Container__internalAddThing(Thing* thing){ __internalAddThing(0, thing);}void Container__internalAddThing(uint32_t#ifdef __DEBUG_MOVESYS__ index#endif , Thing* thing){#ifdef __DEBUG_MOVESYS__ stdclog << "[Container::__internalAddThing] index: " << index << stdendl;#endif if(!thing) return; Item* item = thing->getItem(); if(item == NULL) {#ifdef __DEBUG_MOVESYS__ stdclog << "Failure: [Container::__internalAddThing] item == NULL" << stdendl;#endif return; } itemlist.push_front(item); item->setParent(this); totalWeight += item->getWeight(); if(Container* parentContainer = getParentContainer()) parentContainer->updateItemWeight(item->getWeight());}void Container__startDecaying(){ for(ItemListconst_iterator it = itemlist.begin(); it != itemlist.end(); ++it) (*it)->__startDecaying();}ContainerIterator Containerbegin(){ ContainerIterator cit(this); if(!itemlist.empty()) { cit.over.push(this); cit.current = itemlist.begin(); } return cit;}ContainerIterator Containerend(){ ContainerIterator cit(this); return cit;}ContainerIterator Containerbegin() const{ Container* evil = const_cast<Container*>(this); return evil->begin();}ContainerIterator Containerend() const{ Container* evil = const_cast<Container*>(this); return evil->end();}ContainerIteratorContainerIterator():base(NULL) {}ContainerIteratorContainerIterator(Container* _base):base(_base) {}ContainerIteratorContainerIterator(const ContainerIterator& rhs):base(rhs.base), over(rhs.over), current(rhs.current) {}bool ContainerIteratoroperator==(const ContainerIterator& rhs){ return !(*this != rhs);}bool ContainerIteratoroperator!=(const ContainerIterator& rhs){ assert(base); if(base != rhs.base) return true; if(over.empty() && rhs.over.empty()) return false; if(over.empty()) return true; if(rhs.over.empty()) return true; if(over.front() != rhs.over.front()) return true; return current != rhs.current;}ContainerIterator& ContainerIteratoroperator=(const ContainerIterator& rhs){ this->base = rhs.base; this->current = rhs.current; this->over = rhs.over; return *this;}Item* ContainerIteratoroperator*(){ assert(base); return *current;}Item* ContainerIteratoroperator->(){ return *(*this);}ContainerIterator& ContainerIteratoroperator++(){ assert(base); if(Item* item = *current) { Container* container = item->getContainer(); if(container && !container->empty()) over.push(container); } ++current; if(current == over.front()->itemlist.end()) { over.pop(); if(over.empty()) return *this; current = over.front()->itemlist.begin(); } return *this;}ContainerIterator ContainerIteratoroperator++(int32_t){ ContainerIterator tmp(*this); ++*this; return tmp;}
  5. Olá a todos, gostaria de pedir uma ajuda em um script action, o script trata-se de tirar uma condição se o player estiver em baixo do item especifico. Um Exemplo: o jogador está em cima de uma furniture package, se outro jogador der use nessa furniture package, retirar a condição de muted desse jogador que estava em cima da furniture package. Testei com diversas funções, porém não consegui resultado, apenas dava erro dizendo que a criatura não foi encontrada, ta aqui abaixo o script que eu tentei fazer, se alguém puder me ajudar, fico agradecido. function onUse(cid, item, fromPosition, itemEx, toPosition)doRemoveCondition(getTopCreature(itemEx).uid, CONDITION_MUTED)doRemoveItem(item.uid,1)doSendMagicEffect(toPosition,1)doSendMagicEffect(fromPosition,1)end O erro que aparece. [22:0:36.828] [Error - Action Interface] [22:0:36.880] data/actions/scripts/magicsfurniture.lua:onUse [22:0:36.908] Description: [22:0:36.929] (luaDoRemoveCondition) Creature not found Obs: Trata-se de uma action, caso alguém tiver alguma dúvida, basta mandar alguma mensagem aqui abaixo que eu respondo.
  6. Gostaria de uma ajuda pra remover o autostacking, de preferencia se tiver como fazer pra só remover de item XXXX e item YYYY melhor, se não pode ser de todos Obs: pra que não sabe o que é autostacking, é aquele sistema que junta os itens agrupáveis automaticamente
  7. Bague

    Remover Item

    Bom galera, estou precisando de um script que retire uma pedra do servidor em uma determinada data e hora. Id da pedra:1353 Espero que possam me ajudar..
  8. Ta ai um script muito bom galera, créditos e instruções no próprio script. --[[ Square Skill Trainer made by Arthur aka artofwork 12/1/14, my original account Updated 10/15/2015, to 1.2 based on tfs sources on github by Codex NG This script will train all of a players skills indefintely including magic level It has a small configuration setup where you can set the number of tries per skill The time interval in between each skill try added A storage value to help prevent abuse You can assign any tile you wish to this script that a player can walk on with action id 900 Now removes offline training time for free accounts New in this script? skill tries for both free account & premium accounts mana gain for both free & premium accounts mana multipliers to effect magic level for both free and premium accounts based on percentage experience gain for both free and prem accounts Added optional all skills for free accounts or just the weapons & shield they have equiped add this too movements <!-- Square Trainer --> <movevent event="StepIn" actionid="900" script="squaretrainer.lua"/> <movevent event="StepOut" actionid="900" script="squaretrainer.lua"/> save this file in data\movements\script\ as squaretrainer.lua ]]-- local special = false -- true for vip false for prem -- do not edit local currentTime = os.time() local day = 86400 -- 1 full day in seconds local minimumTime = 0 -- minimum time for vip local addSkillTimer = 1000 -- do not edit - time at which skill tries are added local skills = 5 -- 0 to 5 includes 0:fist, 1:club, 2:sword, 3:axe, 4:distance, 5:shield -- do not edit ------------------------------- local allskills = false -- should free accounts train all their skills local removeOfflineTime = true -- do you want to remove offline training time? -- minutes to remove per minute, should be minimum 2 since they gain a minute for every minute they are not killing something local timeOfOfflineToRemove = 2 -- minimum hours needed to train, set it to 12 if u want to test the tp to temple local minimumTimeNeedToUseTrainers = 1 local useConfigMlRate = false -- do you want to use the config settings rate of Magic in this script local useConfigExpRate = false -- do you want to use the config settings rate of Exp in this script local useConfigSkillRate = true -- do you want to use the config settings rate of Skills in this script -- do not edit local keys = { RATE_SKILL = 6, RATE_MAGIC = 8, RATE_LOOT = 7, RATE_EXPERIENCE = 5 } local tseconds = 1000 local tminute = 60 * tseconds local thour = 60 * tminute local trainingTimeMax = thour * minimumTimeNeedToUseTrainers -- 43200000 default value (12 hours) ----------------- -- used by isSpecial, this allows certain account types to skip the offline time removal local godAccount = 4 -- tile actionid local aid = 900 local p = {} local addskills = { prem = 1000, -- xp to add as vip/prem (depends if special is true) account per interval -- the rate is a percentage of their max mana, this way it scales with their level manaGainPremRate = .10, -- mana to add as vip/prem (depends if special is true) account per interval premSkillTries = 100, -- Number of tries per skill for vip/prem (depends if special is true) account per interval premManaMultiplier = 5, -- when player has full mana multiply how much more mana is used to gain magic level free = 100, manaGainFreeRate = .01, -- mana to add as free account per interval freeSkillTries = 1, -- Number of tries per skill for free account freeManaMultiplier = 1, -- when player has full mana multiply how much more mana is used to gain magic level balanceShield = 3 -- 3 is good, but if shielding goes up too quick then lower it, use only whole numbers e.g. 1, 2, 3 } -- do not edit local weaponTypes = { [0] = { 0, 0 }, -- fist { 1, 2 }, -- Sword { 2, 1 }, -- Club { 3, 3 }, -- Axe { 4, 5 }, -- Shield { 5, 4 }, -- Distance { 6, 0 } -- 6 is rod / wands, 0 is for fists.. } local shieldId = 5 function getSlottedItems(player) local left = pushThing(player:getSlotItem(CONST_SLOT_LEFT)).itemid local right = pushThing(player:getSlotItem(CONST_SLOT_RIGHT)).itemid left = ItemType( left ):getWeaponType() right = ItemType( right ):getWeaponType() return left, right end -------------------------------- -- this function is only effected by free accounts function templeTeleport(p) p.player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) p.player:setStorageValue( 18010, 0) local temple = p.player:getTown():getTemplePosition() p.player:teleportTo(temple) temple:sendMagicEffect(CONST_ME_ENERGYAREA) p.player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, "Sorry, "..p.name.." you don't have enough offline time to train.") end function RemoveOfflineTrainingTime(p) if trainingTimeCheck(p) then p.player:removeOfflineTrainingTime(timeOfOfflineToRemove * 60000) p.seconds = 60000 -- reset the timer end end function trainingTimeCheck(p) local time_ = p.player:getOfflineTrainingTime() if time_ <= (timeOfOfflineToRemove * tminute) then templeTeleport(p) end if time_ >= trainingTimeMax then return true else templeTeleport(p) end end function isSpecial(player) -- this is so i could test the shit right away if player:getAccountType() >= godAccount then return true end if special then return (math.floor((player:getStorageValue(13540) - currentTime) / (day)) > minimumTime) else return player:isPremium() end end function train(p) local player = p.player if player:isPlayer() and player:getStorageValue(18010) == 1 then if isSpecial(player) then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your training session will now begin.") addEvent(trainMe, 1, p) else -- if free account, they have to wait 30 seconds to begin training if p.secondsTime > 0 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your training session will begin in "..(p.secondsTime).." seconds.") end if p.secondsTime <= 0 then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your training session will now begin.") addEvent(trainMe, 1, p) else p.secondsTime = p.secondsTime - 10 addEvent(train, 10000, p) end end end return true end function returnRate(useRate, RATE) return useRate and configManager.getNumber(RATE) - 3300 or 1 end function trainMe(p) local player = p.player local weaponLeft, weaponRight = getSlottedItems(player) if player:isPlayer() and player:getStorageValue(18010) == 1 then if isSpecial(player) then player:addExperience(addskills["prem"] * returnRate(useConfigExpRate, RATE_EXPERIENCE) ) -- add mana to player based on premium mana rate settings player:addManaSpent(addskills["manaGainPremRate"] * player:getMaxMana() ) else player:addExperience(addskills["free"] * returnRate(useConfigExpRate, RATE_EXPERIENCE) ) -- add mana to player based on free mana rate settings player:addManaSpent(addskills["manaGainFreeRate"] * player:getMaxMana() ) end for i = 0, skills do if isSpecial(player) then if i == shieldId then -- shielding, will help balance shield gain player:addSkillTries(i, (addskills["premSkillTries"] * addskills["balanceShield"]) * returnRate(useConfigSkillRate, RATE_SKILL) ) else player:addSkillTries(i, addskills["premSkillTries"] * returnRate(useConfigSkillRate, RATE_SKILL) ) -- all other skills end else if allskills then if i == shieldId then -- shielding, will help balance shield gain player:addSkillTries(i, (addskills["freeSkillTries"] * addskills["balanceShield"]) * returnRate(useConfigSkillRate, RATE_SKILL) ) else player:addSkillTries(i, addskills["freeSkillTries"] * returnRate(useConfigSkillRate, RATE_SKILL) ) -- all other skills end else -- this effects only free accounts for i = 0, #weaponTypes do if weaponTypes[i][2] == shieldId and weaponTypes[i][1] == weaponRight then player:addSkillTries(weaponTypes[i][2], (addskills["freeSkillTries"] * addskills["balanceShield"]) * returnRate(useConfigSkillRate, RATE_SKILL) ) end if weaponTypes[i][2] ~= shieldId and weaponTypes[i][1] == weaponLeft then player:addSkillTries(weaponTypes[i][2], addskills["freeSkillTries"] * returnRate(useConfigSkillRate, RATE_SKILL) ) end end end end -- will increase magic level based on max mana times multiplier local maxMana = player:getMaxMana() if player:getMana() == maxMana then if isSpecial(player) then -- premium account multiplier used to increase level player:addManaSpent(maxMana * (addskills["premManaMultiplier"] * returnRate(useConfigMlRate, RATE_MAGIC)) ) else -- free account multiplier used to increase level player:addManaSpent(maxMana * (addskills["freeManaMultiplier"] * returnRate(useConfigMlRate, RATE_MAGIC)) ) end player:addMana(-maxMana) end end if not isSpecial(player) then p.seconds = p.seconds - addSkillTimer if(p.seconds <= 1000) then -- we want to be fair so we make sure the player gets a whole minute if removeOfflineTime then addEvent(RemoveOfflineTrainingTime, 1, p) end end end addEvent(trainMe, addSkillTimer, p) end return true end function onStepIn(player, item, position, fromPosition) if not player:isPlayer() then return false end p = -- this is table is essential so we can pass it to the other functions { player = player:getPlayer(), item = item, pos = player:getPosition(), soul = player:getSoul(), seconds = 60000, secondsTime = 30, name = player:getName() } if player:isPlayer() then if player:getStorageValue(18010) < 1 then if p.item.actionid == aid then player:setStorageValue(18010, 1) -- if the player is a free acc they will lose offline training time as they train if removeOfflineTime then RemoveOfflineTrainingTime(p) end addEvent(train, 1, p) end else player:teleportTo(fromPos, true) end end return true end function onStepOut(player, item, position, fromPosition) p.secondsTime = 30 stopEvent(train) -- may not work as expected stopEvent(trainMe) -- may not work as expected player:setStorageValue(18010, 0) player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Your training session has now ended.") return true end
  9. Queria um script que determinado horario exemplo 20:00 horas uma parede é removida e as 21:00 ele volta aparecer! meu server é 8.6 TFS 0.3.6
  10. Eae galera do xtibia, eu precisa de uma action que funcionaria assim, voce usa o edo pergaminho (id: 2153) em um corpo de player morto no chao (id: 6022). O pergaminho, e o corpo irão sumir, e sera adicionado outro tipo de pergaminho( id: 2154) na bp do player. PS: Apenas uma vocaçao(varios ids) irá poder usar o pergaminho no corpo de player morto. Espero que possam me ajduar, rep+!
  11. To utilizando o ot azeroth 9.6 que baixei aqui mesmo no forum, estou com alguns problemas primeiro a action de abrir porta com chave, n ta funfanfo 100%, vejam bem, eu configuro pra ser porta fechada 1210 porta aberta 1211 mais quando uso a chave a porta aberta se transforma em uma 17236 e logo depois de fecha virando uma 17235 o script e pra ser temporizado olhem olhem ao meu ponto de vista e pra tar tudo ok certo. ela abri e fecha mais com muda a porta a outra duvida e a seguinte uma alavanca temporizada que ao usar remova uma pedra do seu local e depois de 30 seg ela volte, olhem bom mais quando eu uso nada acontece e tb nao aparece nem um erro no distro nadinha mais n acontece nada com a pedra quando eu puxo a alavanca. me ajudem ae todos esses scriptis eu peguei aq mesmo no forum
  12. Bom, eu usei "Estátua" no titulo, mais pode ser qualquer coisa . Ex : Parede, Pedra ... Ao falar "Algo" a estátua será removida, mais o player tem que está em X posição . (posição configurável) .. Agora chega de papo.. vá em data / talkaction / script .. cria um arquivo.lua , e coloca isso dentro : function onSay(cid, words, param) local second = 10 -- Tempo para a estátua aparecer denovo, em segundos. local trapPos = {x=159, y=55, z=7, stackpos = 1} -- posição da estátua local trap = getThingFromPos(trapPos) local trapId = 3739 -- id da estátua . local player = {x=160, y=54, z=7} -- posição que o player deve estar. function create() doCreateItem(trapId, 1, trapPos) doSendMagicEffect(trapPos, 6) return true end if getThingPos(cid).x ~= player.x or getThingPos(cid).y ~= player.y or getThingPos(cid).z ~= player.z then return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode utilizar este comando fora do SQM correto.") end if trap.itemid == trapId then doRemoveItem(trap.uid, 1) doSendMagicEffect(trapPos, 2) addEvent(create, second*1000) end return true end Agora vá em data / talkaction / talkaction.xml e coloca a tag .. <talkaction words="abra-te" script="NomeDoArquivo.lua"/> words = "abra-te" (coloca o que o player tem que falar) é isso .
  13. Olá, Boa tarde. Então, eu estou precisando de um script que ao matar um monstro ( no meu caso eu vou colocar demon ), automaticamente uma pedra no chão desaparecesse. A ideia é ao matar esses 6 demons, sumir essas 2 pedras ao lado, onde os jogadores vão estar. Espero que alguém possa me ajudar No aguardo.
  14. eaew galera, eu fiz um script action para quando o player clicar no item vericar se tem certa storage, se ele tiver remove ela e adiciona outra storage e da exp, mais tem um problema se o player clicar e depois der logout o player perde a storage. :x script:
  15. E ae rapaziada do Xtibia! Eu baixei um mapa a um tempo atras e comecei o meu próprio mapa do zero, e já estou editando ele a bastante tempo, agora que eu fui notar uma mensagem na distro que informa créditos ao cara que postou o mapa pra download... porém agora o mapa é 100% meu e gostaria de retirar os créditos deste cara do distro, mas não encontro onde retirar. Além dos créditos, gostaria também de saber se alguém consegue me dizer como eu arrumo o erro que aparece na imagem: [10/01/2013 08:20:26] [Error - CreatureEvent::configureEvent] No valid type for creature event.conected [10/01/2013 08:20:26] [Warning - BaseEvents::loadFromXml] Cannot configure an event Segue as imagem da distro: Alguém poderia me auxiliar por favor! Não quero ter o trabalho de migrar tudo o que eu venho desenvolvento para outra distro e tals, pois pode dar problemas de compatibilidade com o que eu venho desenvolvendo. OBS: Não quero remover os créditos do Alissow, apenas do Mayron. Agradeço de coração e com +REP quem puder me ajudar. Abraços!
  16. Olá, gostaria de pedir uma spell que tira-se todos os summon do target, eu tenho um server de naruto que o algumas vocation criam clones com mesma outfit,nome,health e etc.. Para uma vocation se defender deles, gostaria dessa spell que destruisse todos os summons do inmigo ou entao uma spell que identifique o player verdadeiro dos summons. Obs: Esse link: http://www.xtibia.com/forum/topic/197646-spell-remover-summon/ Remove só os meus summons, mas eu nao quero que remova os meus summons, quero que remova os deles (Mas remover só summons, nao os monsters do mapa) OBG e rep+ pra quem conseguir.
  17. Xtibianos, quase nenhum tópico que posto aqui tem uma resposta definitiva, tomara que esse seja diferente. Meu problema: Isso acontece na maioria dos servidores open tibia atuais. Quando o player está com paralyze e usa exura, esse paralyze não sai, a menos que o player esteja parado, isso incomoda muito os players, e atrapalham a fluidez do jogo. Estudando a spell vejo que tem a função "setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)" retirando o paralyze, mas isso só acontece, como já citei acima, quando o player esta parado. Se alguém puder compartilhar uma solução, ficarei muito grato. Script da minha spell (exura): local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.5, 2) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  18. preciso que cada vez que for usada essa magia remova uma assassin star da minha mochila ou slot de munição. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_REDSTAR) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) local condition = createConditionObject(CONDITION_PHYSICAL) setConditionParam(condition, CONDITION_PARAM_DELAYED, 1) addDamageCondition(condition, 1, 3000, -35) addDamageCondition(condition, 3, 3000, -20) addDamageCondition(condition, 2, 3000, -5) setCombatCondition(combat, condition) function onGetFormulaValues(cid, level, skill, attack, factor) local skillTotal, levelTotal = skill + attack, level / 5 return -(skillTotal / 3 + levelTotal), -(skillTotal + levelTotal) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  19. Olá meus amigos, eu instalei o Gesior Extreme Free segue link: http://www.xtibia.co...r-extreme-free/ Quando vamos criar acc, aparece la world type para selecionar o mundo, eu gostaria de remover essa parte, alguem sabe como fazer isso ? desde já agradeço. edit; depois da parte de criar acc e o primeiro char, quando vamos criar um novo char aparece la thais, carlin e yalahar pra escolher, quero retirar tbm, quero deixar td padrão alguem me ajuda a fazer isso pelo amor de Jaga.
×
×
  • Criar Novo...