Ir para conteúdo

DukeeH

Membro
  • Registro em

  • Última visita

Solutions

  1. DukeeH's post in (Resolvido)Inserir Anúncio was marked as the answer   
    Topo em vermelho não é uma opção, só centro da tela em vermelho, pois são usados os tipos de broadcast do tibia, como eu falei no post acima, pra deixar em vermelho, tira o ,12 no final da linha.
    Mas infelizmente não é possível mudar a posição, apenas cor/estilo.
  2. DukeeH's post in (Resolvido)[AJUDA - SCRIPT] Bug no Target 8.60 + Auto Stack Item was marked as the answer   
    Vamos fixar essa, depois você vai agradecer, quando tiver tudo certo.
     
    data/talkactions/talkactions.xml, apaga as linhas  dos comandos /t e /town. E adiciona como estão abaixo:
    <talkaction log="yes" words="/t" access="3" event="script" value="teleporttown.lua"/> <talkaction log="yes" words="/town" access="3" event="script" value="teleporttown.lua"/> data/talkactions/scripts/teleporttown.lua
    function onSay(cid, words, param, channel) local master = false if(words == '/t') then master = true elseif(param == '') then local str = "" for i, town in ipairs(getTownList()) do str = str .. town.name .. "\n" end doShowTextDialog(cid, 2160, str) return true end local tid, t = cid, string.explode(param, ",") if(t[(master and 1 or 2)]) then tid = getPlayerByNameWildcard(t[(master and 1 or 2)]) if(not tid or (isPlayerGhost(tid) and getPlayerAccess(tid) > getPlayerAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[(master and 1 or 2)] .. " not found.") return true end end local tmp = getPlayerTown(cid) if(not master) then tmp = t[1] if(not tonumber(tmp)) then tmp = getTownId(tmp) if(not tmp) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists.") return true end end end local pos = getTownTemplePosition(tmp) if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Town " .. t[1] .. " does not exists or has invalid temple position.") return true end pos = getClosestFreeTile(tid, pos) if(type(pos) ~= 'table' or isInArray({pos.x, pos.y}, 0)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Destination not reachable.") return true end tmp = getCreaturePosition(tid) if(doTeleportThing(tid, pos) and not isPlayerGhost(tid)) then doSendMagicEffect(tmp, CONST_ME_POFF) doSendMagicEffect(pos, CONST_ME_TELEPORT) end return true end Referente a speed do god, você usa sql ou sqlite? Da pra editar na database a speed acho.
    Mas quando for andar anda com o ctrl apertado, é uma função boa.
  3. DukeeH's post in (Resolvido)Paladin erra muito dano was marked as the answer   
    @DouglasVinicius
    data/items/items.xml
    Procura por exemplo a Spear, e adiciona:
    <attribute key="hitChance" value="80" /> E ai testa vê se muda algo.
  4. DukeeH's post in (Resolvido)Função para adicionar premium points was marked as the answer   
    @matheus1234567
    data/libs/050-function.lua
    function addPoint(uid, count)     local accountPoints = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `name` = '" .. getPlayerAccount(uid) .. "' LIMIT 1;")     local points = tonumber(accountPoints:getDataInt("premium_points"))     db.executeQuery("UPDATE `accounts` SET `premium_points` = " .. points + count .. " WHERE `name`='" .. getPlayerAccount(uid) .. "' LIMIT 1;") end   function removePoint(uid, count)     local accountPoints = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `name` = '" .. getPlayerAccount(uid) .. "' LIMIT 1;")     local points = tonumber(accountPoints:getDataInt("premium_points"))     db.executeQuery("UPDATE `accounts` SET `premium_points` = " .. points - count .. " WHERE `name`='" .. getPlayerAccount(uid) .. "' LIMIT 1;") end
  5. DukeeH's post in (Resolvido)Seria possível criar um sistema de "redeem code" via talkaction ? was marked as the answer   
    Cara, como o @Vodkart falou fica mais bonito e talvez fácil e avançado, mas fiz aqui mais ou menos o que pediu.
    Se você ou ele estiverem dispostos a fazer de outro jeito fiquem a vontade.
    Fiz duas talkactions, mas da pra fazer algo como "!code redeem, código" e no mesmo comando "!code add, código".
    Mas acho mais simples (para os jogadores) botar direto.
     
    (Não tenho 0.4 para testar)

    mysql:
    CREATE TABLE IF NOT EXISTS `redeemcodes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `code` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;  
    resgatarcode.lua
    function onSay(cid, words, param, channel) local paramm = string.upper(param) if (param == '') then doPlayerSendCancel(cid, "Você deve adicionar um code.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) else local resultado = db.getResult("SELECT * FROM redeemcodes WHERE `code` = '" .. paramm .. "';") if(resultado:getID() ~= -1) then doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING, "Você resgatou com sucesso o código: " .. paramm ..".") doPlayerAddItem(cid, ID, QUANTIDADE) db.query("DELETE FROM `redeemcodes` WHERE `code` = '" .. paramm .. "';") else doPlayerSendCancel(cid, "Código invalido.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end end  
    registrarcode.lua
    function onSay(cid, words, param, channel) local paramm = string.upper(param) if (param == '') then doPlayerSendCancel(cid, "Você deve preencher o code para ser adicionado.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) else db.executeQuery("INSERT INTO `redeemcodes` (`id`, `code`) VALUES (NULL, '" .. paramm .. "');") doPlayerSendTextMessage(cid,MESSAGE_STATUS_WARNING, "Você adicionou o código: " .. paramm .." para ser validado.") end end  
  6. DukeeH's post in (Resolvido)Premium Points in-game was marked as the answer   
    Cara, acho que é o que você quer:
    Só editar o XXXX para o id do item.
    function onSay(cid, words, param) local points = getPlayerVipPoints(cid) local iditem = XXXX if param == "" or not tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, use somente numeros.") return true elseif points < tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Desculpe, mas você só possui "..points.." Premium Points.") return true end local item = doPlayerAddItem(cid, iditem, tonumber(param)) doItemSetAttribute(item, "description", "Essa coin foi adquirida pelo jogador ".. getPlayerName(cid) ..".") doPlayerRemoveVipPoints(cid, tonumber(param)) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"Você recebeu "..tonumber(param).." premium coins, você ainda possui "..points.." Premium Points.") return true end Créditos pro @Vodkart porque usei partes do premium paper dele.
  7. DukeeH's post in (Resolvido)Talkaction sai no default was marked as the answer   
    function onSay(cid, words, param, channel) local thisball = getPlayerSlotItem(cid, 8) if param ~= "" then return false end if words == "!revert" then if getItemAttribute(thisball.uid, "ehditto") then doItemSetAttribute(thisball.uid, "poke", "Ditto") doItemSetAttribute(thisball.uid, "ehditto", 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Puxe o ditto para terminar a reversão do ditto.') elseif getItemAttribute(thisball.uid, "ehshinyditto") then doItemSetAttribute(thisball.uid, "poke", "Shiny Ditto") doItemSetAttribute(thisball.uid, "ehshinyditto", 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Puxe o Shiny Ditto para terminar a reversão do Shiny Ditto.') else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não está usando um Ditto ou Shiny Ditto.') end end return true end Só adicionar o return true antes do ultimo end
  8. DukeeH's post in (Resolvido)Player morre e ganha exp! '-' was marked as the answer   
    Quando for postar alguma duvida ou problema, sempre poste a versão do server (0.4, 1.x ou outro) e a do cliente (8.6, 10.x).
    Procura no seu config.lua por:
    rateExperienceFromPlayers e coloca o mesmo em 0.
    Caso não seja isso é um creaturescript.
  9. DukeeH's post in (Resolvido)Onde eu consigo os arquivos originais do tibia 8.6? was marked as the answer   
    Não baixa um global, nele vai ter muito script, item errado, falha. Pois foi criado e mexido por 10 mil pessoas para tentar replicar um otserv global.
    O otserv mais limpo/simples que você vai achar é a base de 80% dos otservers que é o TFS.
    Baixa apenas a distro (base, executável) do TFS, nela vai vim um mapa simples deles, mas os itens, scripts e tal ta tudo igual o global.
    Ai você edita seu mapa, npcs e tudo a partir dali, e os bugs nele são quase nulos, ou são corrigidos sempre pela equipe, ai você só vai colocando essas mudanças no seu server.
    Não sei qual protocolo você pretende usar, mas use sempre a ultima versão do TFS no caso (1.X)
     
    TFS:
    8.6 > https://github.com/ninjalulz/forgottenserver/tree/8.6
    10.X > https://github.com/otland/forgottenserver
     
    Ou até mesmo OTX, que é um "multi-versão" que vai do 7.x até o 11.x usando uma arquitetura recente (Tem como base TFS 1.3).
    https://github.com/mattyx14/otxserver
     
    Boa sorte!
  10. DukeeH's post in (Resolvido)Erro shopping was marked as the answer   
    Vá no globalevents.xml e remova a tag que seja do shop. Ele está tentando achar uma tabela que não existe em sua database.
  11. DukeeH's post in (Resolvido)Anti magebomb was marked as the answer   
    Não funciona muito bem do jeito que quer, porque para banir o ip você tem que banir o char.
     
    creaturescripts/scripts/login.lua
    Logo após: function onLogin(cid)
    cole:
    local a = 0 local limitAM = 15 if getCreatureName(cid):lower() == "account manager" then for _, pid in ipairs(getPlayersOnline()) do if getCreatureName(pid):lower() == "account manager" and pid ~= cid then a = a + 1 end end if a >= limitAM then return false end return true end Só editar o limitAM = 15 para o limite de account manager que pode entrar ao mesmo tempo.
    Após alcançar esse limite ele vai começar a recusar as conexões de account manager, é sem duvidas a melhor solução para isso.
     
  12. DukeeH's post in (Resolvido)Possibilidade desse script? was marked as the answer   
    Sim, é possivel.
    Qual distro você usa? (Tfs, otx e versão 1.x, 0.4...)
     
    Dependendo da sua distro precisaria adicionar a função moveitem, nada muito complicado. Para executar um código ao mover o item.
  13. DukeeH's post in (Resolvido)bug cassino urgente was marked as the answer   
    local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local function delayMoneyRemoval(item, pos) doRemoveItem(getTileItemById(pos, item).uid) return true end local function placeMoney(amount, table_middle_pos) local remain = amount local crystal_coins = 0 local platinum_coins = 0 if (math.floor(amount / 10000) >= 1) then crystal_coins = math.floor(amount / 10000) remain = remain - crystal_coins * 10000 end if ((remain / 100) >= 1) then platinum_coins = remain / 100 end addEvent(doCreateItem, 550, 2152, platinum_coins, table_middle_pos) addEvent(doCreateItem, 600, 2160, crystal_coins, table_middle_pos) end local function rollDice(roll, cc_count, pc_count, table_left_pos, table_middle_pos, npc) local dice_ids = {5792, 5793, 5794, 5795, 5796, 5797} local random_rollval = math.random(1,6) local total_g = (10000 * cc_count) + (100 * pc_count) local prize_percent = 1.0 -- 80% if ((total_g) <= 500000 and (total_g) >= 10000) then doSendMagicEffect(table_left_pos, CONST_ME_CRAPS) for _, itemId in pairs(dice_ids) do if(getTileItemById(table_left_pos, itemId).uid > 0) then doTransformItem(getTileItemById(table_left_pos, itemId).uid, dice_ids[random_rollval]) end end if (roll == 1 and random_rollval <= 3) then placeMoney(total_g + (total_g * prize_percent), table_middle_pos) addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doCreatureSay, 500, npc, "Acertou mizeravi!", TALKTYPE_SAY, false, 0) elseif (roll == 2 and random_rollval >= 4) then placeMoney(total_g + (total_g * prize_percent), table_middle_pos) addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_SOUND_GREEN) addEvent(doCreatureSay, 500, npc, "You win!", TALKTYPE_SAY, false, 0) else addEvent(doSendMagicEffect, 400, table_left_pos, CONST_ME_BLOCKHIT) addEvent(doSendMagicEffect, 700, table_left_pos, CONST_ME_BLOCKHIT) addEvent(doCreatureSay, 500, npc, "Errou mizeravi!", TALKTYPE_SAY, false, 0) end doCreatureSay(npc, string.format("%s rolled a %d.", getCreatureName(npc), random_rollval), TALKTYPE_ORANGE_1, false, 0, table_left_pos) else addEvent(doCreateItem, 100, 2160, cc_count, table_middle_pos) addEvent(doCreateItem, 150, 2152, pc_count, table_middle_pos) doCreatureSay(npc, "The minimum wager is 10K and the maximum wager is 500K.", TALKTYPE_SAY, false, 0) end return true end function creatureSayCallback(cid, type, msg) -- NPC userdata instance local npc = getNpcCid() -- Game table position userdata instances local table_left_pos = {x = 147, y = 57, z = 7} -- Pos da frente do Npc onde gira o dado local table_middle_pos = {x = 148, y = 57, z = 7} -- Pos do meio onde vai o dinheiro -- Search for coins on the left and middle tables and create item userdata instances local table_middle_cc = getTileItemById(table_middle_pos, 2160) local table_middle_pc = getTileItemById(table_middle_pos, 2152) -- Other variables local cc_count = 0 local pc_count = 0 local ROLL, LOW, HIGH = 0, 1, 2 posplayer = {x=149, y=56, z=7} -- Pos onde o player precisa estar local ppos = getPlayerPosition(cid) if ppos.x == posplayer.x and ppos.y == posplayer.y then if isInArray({"H", "HIGH", "high", "h"}, msg) then ROLL = HIGH elseif isInArray({"L", "LOW", "l", "low"}, msg) then ROLL = LOW else return false end if (table_middle_cc.uid ~= 0) then cc_count = table_middle_cc.type doTeleportThing(table_middle_cc.uid, table_left_pos) addEvent(delayMoneyRemoval, 300, 2160, table_left_pos) end if (table_middle_pc.uid ~= 0) then pc_count = table_middle_pc.type doTeleportThing(table_middle_pc.uid, table_left_pos) addEvent(delayMoneyRemoval, 300, 2152, table_left_pos) end addEvent(rollDice, 500, ROLL, cc_count, pc_count, table_left_pos, table_middle_pos, npc) else return false end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())  
     
  14. DukeeH's post in (Resolvido)Spear Infinita was marked as the answer   
    weapons.xml procure o id da spear e remova o seguinte: action="removecount"
  15. DukeeH's post in (Resolvido)Addon Flor Druid was marked as the answer   
    Caso não dê certo, desculpa, estou tentando aprender. E vou voltar aqui pra ajudar com qualquer erro.
    Vamos por partes...
     
    Items/Items.xml, Procurar por 5687:
    Adicionar o seguinte:
    <attribute key="decayTo" value="5689"/> <attribute key="duration" value="21600"/> Procurar por 5689 e Adicionar o seguinte:
    <attribute key="decayTo" value="5687"/> <attribute key="duration" value="21600"/> Com isso os itens alternaram entre os 2 quando a duration acabar (21600 segundos).
     
    actions/actions.xml
    <action itemid="4869" event="script" value="addonflor.lua"/>  
    actions/scripts/addonflor.lua
    function onUse(cid, item, fromPosition, itemEx, toPosition) local successo = "You got druid addon." --mensagem caso ganhe local falha = "Sorry, you don't got the addon." --mensagem de falha if itemEx.itemid == 5659 then local chance = math.random(1,100) if chance == 1 then doPlayerSendTextMessage(cid, 22, successo) doTransformItem(item.uid, 5937) else doTransformItem(item.uid, 4870) doPlayerSendTextMessage(cid, 22, falha) end doTransformItem(itemEx.uid,5687) end return true end #Edit.
    Tinha lido errado, estava adicionando o addon, agora adiciona/remove os itens como pediu.
  16. DukeeH's post in (Resolvido)Soft Boots was marked as the answer   
    Isso acontece porque tem alguma função OnLogin que está removendo as condições do player, incluindo regeneração e cura.
    Pelo que eu conheço, normalmente são eventos que fazem isso... Eventos de luta normalmente (teambattle, battlefield)
    Procura em creaturescripts do tipo login se existe a função: 
    doRemoveConditions(cid, false) Mude para: 
    doRemoveConditions(cid) (Se não tiver em creaturescripts pode estar em mod)
  17. DukeeH's post in (Resolvido)Nao consigo combar was marked as the answer   
    Assim:
    local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 214) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -40.2, 1, -40.2, 1) local combat2 = createCombatObject() setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatParam(combat2, COMBAT_PARAM_EFFECT, 214) setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -40.2, 1, -40.2, 1) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 3, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, } arr2 = { {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0}, {1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1}, {0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0}, {0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, } local area1 = createCombatArea(arr1) local area2 = createCombatArea(arr2) setCombatArea(combat1, area1) setCombatArea(combat2, area2) local function onCastSpell1(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var) end local function onCastSpell2(parameters) return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} if getPlayerStorageValue(cid, 3200) <= 0 then setPlayerStorageValue(cid, 3200, os.time()+10000) addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 630, parameters) else doPlayerSendCancel(cid, "You are exhausted.") end return TRUE end Agora vou explicar para caso dê certo você fazer nas outras:
    function onCastSpell(cid, var) local parameters = { cid = cid, var = var} if getPlayerStorageValue(cid, 3200) <= 0 then setPlayerStorageValue(cid, 3200, os.time()+10000) addEvent(onCastSpell1, 100, parameters) addEvent(onCastSpell2, 630, parameters) else doPlayerSendCancel(cid, "You are exhausted.") end return TRUE end Basicamente eu alterei só essa parte, a função onCastSpell, como a magia tem 2 efeitos, e 2 danos, ela fica com os 2 addevents ali, como já tinha antes.
    As partes que mudam são if getPlayerstorage 3200 <= então deixa o cara dar a skill e adiciona o storage 3200 por 10segundos (10000).
    Caso contrario (storage 3200 > 0) da a mensagem do exhaust.
    Em spells.xml você põem exhaustion 0 em todas as spells que mudar isso (o exhaust vai ficar dentro dela)
    Caso queira que não possa dar 2 spells juntas coloque o mesmo storage nas duas (3200 no exemplo) caso contrario vá aumentando/diminuindo o numero 3201, 3202 para spells diferentes.
    Parece que vai demorar, mas é rapido, mesmo se tiver bastante spells. Só editar a onCastSpell cuidando para quantos efeitos/fases a spell tem, e tirar o exhaust dela no spells.xml
     
  18. DukeeH's post in (Resolvido)sistema vip ou premium por item was marked as the answer   
    Vacilo meu, acabei de adicionar pro item ser removido no uso.
    function onUse(cid, item, frompos, item2, topos) doPlayerAddPremiumDays(cid, 7) doPlayerSendTextMessage(cid, 22, "You have been credited with 7 premium account days.") doRemoveItem(item.uid, 1) return TRUE end
  19. DukeeH's post in (Resolvido)Erro Movevent was marked as the answer   
    Tenta assim, a tag que você coloca é indiferente, só pra organização mesmo, então criei uma pra você saber onde estão, ai coloca ela em qualquer lugar do arquivo.
    No exemplo fiz pra sorcerer/druid, mas só alterar os ids.
    Os vocation ids de baixo são as promotions, e o showindescription 0 é pra não aparecer as promotions quando dar look no item.
    <!-- Itens Vocações --> <movevent type="Equip" itemid="3983" slot="legs" event="function" value="onEquipItem"> <vocation id="1"/> <vocation id="5" showInDescription="0"/> <vocation id="2"/> <vocation id="6" showInDescription="0"/> </movevent> <movevent type="DeEquip" itemid="3983" slot="legs" event="function" value="onDeEquipItem"/> <movevent type="Equip" itemid="12392" slot="armor" event="function" value="onEquipItem"> <vocation id="1"/> <vocation id="5" showInDescription="0"/> <vocation id="2"/> <vocation id="6" showInDescription="0"/> </movevent> <movevent type="DeEquip" itemid="12392" slot="armor" event="function" value="onDeEquipItem"/> <movevent type="Equip" itemid="12617" slot="helmet" event="function" value="onEquipItem"> <vocation id="1"/> <vocation id="5" showInDescription="0"/> <vocation id="2"/> <vocation id="6" showInDescription="0"/> </movevent> <movevent type="DeEquip" itemid="12617" slot="helmet" event="function" value="onDeEquipItem"/> <movevent type="Equip" itemid="2644" slot="feet" event="function" value="onEquipItem"> <vocation id="1"/> <vocation id="5" showInDescription="0"/> <vocation id="2"/> <vocation id="6" showInDescription="0"/> </movevent> <movevent type="DeEquip" itemid="2644" slot="feet" event="function" value="onDeEquipItem"/> <movevent type="Equip" itemid="7460" slot="shield" event="function" value="onEquipItem"> <vocation id="1"/> <vocation id="5" showInDescription="0"/> <vocation id="2"/> <vocation id="6" showInDescription="0"/> </movevent> <movevent type="DeEquip" itemid="7460" slot="shield" event="function" value="onDeEquipItem"/>
  20. DukeeH's post in (Resolvido)[PEDIDO] Quarta Moeda was marked as the answer   
    lib/000-constant.lua, procure por:
    ITEM_CRYSTAL_COIN = 2160
    Após, adicione:
    ITEM_GOLD_INGOT = 9971  
    actions.xml
    <action itemid="9971" script="other/changegold.lua"/> changegold.lua
    local scarabid = 2157 local scarabtext = TEXTCOLOR_DARKORANGE function onUse(cid, item, fromPosition, itemEx, toPosition)     if item.itemid == ITEM_GOLD_COIN and item.type == ITEMCOUNT_MAX then         doChangeTypeItem(item.uid, item.type - item.type)         doPlayerAddItem(cid, ITEM_PLATINUM_COIN, 1)         doSendAnimatedText(fromPosition, "$$", TEXTCOLOR_LIGHTBLUE)     elseif item.itemid == ITEM_PLATINUM_COIN and item.type == ITEMCOUNT_MAX then         doChangeTypeItem(item.uid, item.type - item.type)         doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, 1)         doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)     elseif item.itemid == ITEM_CRYSTAL_COIN and item.type == ITEMCOUNT_MAX then         doChangeTypeItem(item.uid, item.type - item.type)         doPlayerAddItem(cid, scarabid, 1)         doSendAnimatedText(fromPosition, "$$$$", scarabtext)     elseif item.itemid == scarabid and item.type == ITEMCOUNT_MAX then         doChangeTypeItem(item.uid, item.type - item.type)         doPlayerAddItem(cid, ITEM_GOLD_INGOT, 1)         doSendAnimatedText(fromPosition, "$$$$$", scarabtext)     elseif item.itemid == ITEM_PLATINUM_COIN and item.type < ITEMCOUNT_MAX then         doChangeTypeItem(item.uid, item.type - 1)         doPlayerAddItem(cid, ITEM_GOLD_COIN, ITEMCOUNT_MAX)         doSendAnimatedText(fromPosition, "$", TEXTCOLOR_YELLOW)     elseif item.itemid == ITEM_CRYSTAL_COIN and item.type < ITEMCOUNT_MAX then         doChangeTypeItem(item.uid, item.type - 1)         doPlayerAddItem(cid, ITEM_PLATINUM_COIN, ITEMCOUNT_MAX)         doSendAnimatedText(fromPosition, "$$", TEXTCOLOR_LIGHTBLUE)     elseif item.itemid == scarabid and item.type < ITEMCOUNT_MAX then         doChangeTypeItem(item.uid, item.type - 1)         doPlayerAddItem(cid, ITEM_CRYSTAL_COIN, ITEMCOUNT_MAX)         doSendAnimatedText(fromPosition, "$$$", TEXTCOLOR_TEAL)     elseif item.itemid == ITEM_GOLD_INGOT then         doChangeTypeItem(item.uid, item.type - 1)         doPlayerAddItem(cid, scarabid, ITEMCOUNT_MAX)         doSendAnimatedText(fromPosition, "$$$$", TEXTCOLOR_TEAL)     else         return FALSE     end     return TRUE end Items.xml procurar por: 9971 e adicionar:
    <attribute key="worth" value="1000000000" />  
  21. DukeeH's post in (Resolvido)Não poder entrar em TAL Area com tal ITEM was marked as the answer   
    Crie um arquivo na pasta movements/scripts com o nome: questitem.lua
    Segue o script:
    function onStepIn(cid, item, pos, slot) local item = 1234 -- ID do item que o player não pode ter if getPlayerItemCount(cid,item) >= 1 then doTeleportThing(cid,fromPosition) doSendMagicEffect(getPlayerPosition(cid), 2) doPlayerSendTextMessage(cid, 19, "Você não pode passar por possuir o item.") else doPlayerSendTextMessage(cid, 19, "Bem vindo.") end end Altere 1234 para o id do item.
    Registre ele no movements.xml
    <movevent type="StepIn" actionid="ACTIONID DO PISO" event="script" value="questitem.lua"/> Altere ACTIONID DO PISO para o action id que você colocar no piso pelo mapeditor.
     
     
     
  22. DukeeH's post in (Resolvido)[DUVIDA] Monstros se atacam como remover? was marked as the answer   
    Se souber mexer em sources (pode ser possivel fazer através de creaturescripts, mas ficaria ruim acredito eu...)
    Existem vários tutoriais de como compilar e boas sources para download.
     
    monster.cpp
    trocar:
    void Monster::drainHealth(Creature* attacker, CombatType_t combatType, int32_t damage) { Creature::drainHealth(attacker, combatType, damage); if(isInvisible()) removeCondition(CONDITION_INVISIBLE); } por:
    void Monster::drainHealth(Creature* attacker, CombatType_t combatType, int32_t damage) { bool effect = true; if(g_config.getBool(ConfigManager::MONSTER_DAMAGED_BY_PLAYER_ONLY)) { if(!isPlayerSummon()) //Player summons can be damaged by players and monsters { if(attacker->getPlayer() || attacker->isPlayerSummon()) //Make sure it is a player making damage effect = true; else effect = false; } else effect = true; } else effect = true; if(effect) { Creature::drainHealth(attacker, combatType, damage); if(isInvisible()) removeCondition(CONDITION_INVISIBLE); } else Creature::drainHealth(attacker, combatType, 0); }  
    configmanager.cpp
    Embaixo de: 
    m_confBool[SHOW_HEALING_DAMAGE_MONSTER] = getGlobalBool("showHealingDamageForMonsters", false); Adicionar:
    m_confBool[MONSTER_DAMAGED_BY_PLAYER_ONLY] = getGlobalBool("monsterDamagedByPlayerOnly", false);  
    configmanager.h
    Embaixo de:
    SHOW_HEALING_DAMAGE_MONSTER, Adicionar:
    MONSTER_DAMAGED_BY_PLAYER_ONLY, então compilar....
     
    config.lua
    Embaixo de:
    showHealingDamageForMonsters = false Adicionar:
    monsterDamagedByPlayerOnly = true  

Informação Importante

Confirmação de Termo