Ir para conteúdo

Pedrosass

Campones
  • Total de itens

    2
  • Registro em

  • Última visita

Tudo que Pedrosass postou

  1. Salve galera, tenho um OT 8.6 | 0.4_DEV (rev 3777) | Compilado por mim mesmo Preciso de um creaturescript que impeça o dano em área em outros jogadores(permitir dano somente em target), até tentei editar os script nas próprias spells, porém (acredito eu) que não tenha nenhuma função que detecte se existe um players na área da spell... Alguem consegue dar uma luz?
  2. OT 8.6(TFS 0.4.0 rev 3777). Boa dia/tarde/noite galera do Xtibia, estou com um problema não muito critico, mas que atrapalha muito qualquer jogador. Como o titulo ja diz, quando vc vai vender seu loot (da backpack) e o item que vc for vender for o mesmo ID do que tiver equipado em um dos slots de equips, o NPC acaba levando o que ta equipado. Eu mesmo fiz uma gabiarra para evitar esse tipo de transtorno porém não é de fato a solução. Se alguém que manje um pouco mais puder ajudar eu agradeço. Segue UMA PARTE do script de sistema do NPC : -- Callback onSell() function. If you wish, you can change certain Npc to use your onSell(). function ShopModule:callbackOnSell(cid, itemid, subType, amount, ignoreCap, inBackpacks) local shopItem = nil for _, item in ipairs(self.npcHandler.shopItems) do if(item.id == itemid and item.subType == subType) then shopItem = item break end end if(shopItem == nil) then print('[Warning - ' .. getCreatureName(getNpcId()) .. '] NpcSystem:', 'ShopModule.onSell - Item not found on shopItems list') return false end if(shopItem.sell == -1) then print('[Warning - ' .. getCreatureName(getNpcId()) .. '] NpcSystem:', 'ShopModule.onSell - Attempt to sell an item which is only buyable') return false end local parseInfo = { [TAG_PLAYERNAME] = getPlayerName(cid), [TAG_ITEMCOUNT] = amount, [TAG_TOTALCOST] = amount * shopItem.sell, [TAG_ITEMNAME] = shopItem.name } function GetEquippedItems(cid,itemid) items = {} for i = CONST_SLOT_FIRST, CONST_SLOT_LAST do item = getPlayerSlotItem(cid, i).itemid table.insert(items, item) end return items end -- GAMBIARRA -- if isInArray(GetEquippedItems(cid,itemid), itemid) then doPlayerSendTextMessage(cid, 22, "Guarde seus equips no depot antes de realizar a venda do loot.") return true end if(doPlayerRemoveItem(cid, itemid, amount, subType)) then local msg = self.npcHandler:getMessage(MESSAGE_SOLD) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, self.npcHandler:parseMessage(msg, parseInfo)) doPlayerAddMoney(cid, amount * shopItem.sell) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return true end local msg = self.npcHandler:getMessage(MESSAGE_NEEDITEM) doPlayerSendCancel(cid, self.npcHandler:parseMessage(msg, parseInfo)) if(NPCHANDLER_CONVBEHAVIOR ~= CONVERSATION_DEFAULT) then self.npcHandler.talkStart[cid] = os.time() else self.npcHandler.talkStart = os.time() end return false end
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...