Ir para conteúdo

DukeeH

Membro
  • Registro em

  • Última visita

Tudo que DukeeH postou

  1. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Estranho. local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatArea(combat, createCombatArea(AREA_SQUARE1X1)) function onGetFormulaValues(cid, level, skill, attack, factor) local levelTotal = level * 0.3 local skillTotal = skill * attack local min = levelTotal + (skillTotal * 0.03) + 13 local max = levelTotal + (skillTotal * 0.08) + 27 return -math.ceil(min), -math.ceil(max) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) getPlayerStorageValue(cid, 13540) - os.time() > 0 then return doCombat(cid, combat, var) end doPlayerSendCancel(cid, "Essa magia só pode ser usada por jogadores Vips!") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) return LUA_ERROR end
  2. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Não posso testar agora, mas acho que assim vai: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatArea(combat, createCombatArea(AREA_SQUARE1X1)) function onGetFormulaValues(cid, level, skill, attack, factor) local levelTotal = level * 0.3 local skillTotal = skill * attack local min = levelTotal + (skillTotal * 0.03) + 13 local max = levelTotal + (skillTotal * 0.08) + 27 return -math.ceil(min), -math.ceil(max) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then doPlayerSendCancel(cid, "Essa magia só pode ser usada por jogadores Vips!") and doSendMagicEffect(getThingPos(cid), 2) return false end function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  3. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Isso, um exemplo de como ficaria o exori gran. spells/scripts/attack/fierce berserk.lua local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITAREA) setCombatParam(combat, COMBAT_PARAM_USECHARGES, true) setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, true) setCombatArea(combat, createCombatArea(AREA_SQUARE1X1)) function onGetFormulaValues(cid, level, skill, attack, factor) local levelTotal = level * 0.3 local skillTotal = skill * attack local min = levelTotal + (skillTotal * 0.03) + 13 local max = levelTotal + (skillTotal * 0.08) + 27 return -math.ceil(min), -math.ceil(max) end setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues") function onCastSpell(cid, var) if getPlayerStorageValue(cid, 13540) - os.time() <= 0 then return doPlayerSendCancel(cid, "Essa magia só pode ser usada por jogadores Vips!") and doSendMagicEffect(getThingPos(cid), 2) end return doCombat(cid, combat, var) end Ps: O meu exori gran pode ter dano diferente, apenas entenda como eu adicionei o check da vip, e use o mesmo em outras magias/runas. Após o onCastSpell você adiciona aquelas 3 linhas (do if ao end)
  4. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Pode explicar melhor? Isso é uma magia? Uma potion? Mais quanto? Quanto esse item/magia daria de vida/mana?
  5. Para criar um "monstro"/clone com o nome igual seria necessário edit nas sources.
  6. creaturescripts.xml <event type="PrepareDeath" name="PorcentDeath" event="script" value="porcenthp.lua"/> <event type="login" name="PorcentLogin" event="script" value="porcenthp.lua"/> creaturescripts/scripts/porcenthp.lua function onPrepareDeath(cid, deathList, lastHitKiller, mostDamageKiller) if isPlayer(cid) then setPlayerStorageValue(cid, 329406, 1) end return true end function doPlayerRemoveHealthPercent(cid, percent) local health = getCreatureMaxHealth(cid) doPlayerRemoveHealth(cid, (health / 100) * percent) return TRUE end function onLogin(cid) registerCreatureEvent(cid, "PorcentDeath") if getPlayerStorageValue(cid, 329406) == 1 then doRemoveHealthPercent(cid,70) setPlayerStorageValue(cid, 329406, 0) end return true end
  7. function onSay(cid, words, param, channel) local exstorage = 45714 -- any empty storage local time = 5*60 -- h*m*s (5 min = 5*60) if exhaustion.check(cid, exstorage) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sorry, you need to wait 6 minutes before changing outfit again.") return TRUE end if not isInParty(cid) or getPlayerParty(cid) ~= cid then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não é líder de uma party") end local outfit = getCreatureOutfit(cid) local addons = outfit. for _, cid2 in ipairs(getPartyMembers(cid)) do outfit.lookAddons = 0 doCreatureChangeOutfit(cid2, outfit) doPlayerSendTextMessage(cid2, MESSAGE_STATUS_CONSOLE_BLUE, "Outfit da party trocado.") if canPlayerWearOutfit(cid2, outfit.lookType, addons) then outfit.lookAddons = addons doCreatureChangeOutfit(cid2, outfit) doSendMagicEffect(getCreaturePosition(cid2), 66) exhaustion.set(cid, exstorage, time) return true elseif addons == 3 then outfit.lookAddons = (canPlayerWearOutfit(cid2, outfit.lookType, 1) and 1) or (canPlayerWearOutfit(cid2, outfit.lookType, 2) and 2) or 0 doCreatureChangeOutfit(cid2, outfit) doSendMagicEffect(getCreaturePosition(cid2), 66) exhaustion.set(cid, exstorage, time) end end return true end
  8. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Manda o movement que esta registrado nesse uniqueid.
  9. Qual sistema de vip você usa e distro? É necessário saber pra saber como passar a vip de um char para o outro, storage, função, query.
  10. Procure algum tutorial de como adicionar a função moveitem, não é complicado. Só precisa saber compilar, ai com ela da pra fazer exatamente o que quer.
  11. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Por isso eu perguntei qual vip system você usa, provavelmente não tem a função que usei. Me mande o link ou o piso que vê se o jogador é ou não vip, ai posso arrumar pra você.
  12. 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 postou uma resposta no tópico em Suporte Tibia OTServer
    Pode mandar seu script de exori gran? O meu pode ter dano diferente. Precisava saber também qual vip system você usa, iria mudar o storage ou function dependendo de qual seja. Basicamente seria assim: Logo depois de: function onCastSpell(cid, var) Colar: if (getPlayerVipDays(cid) < 1) then return doPlayerSendCancel(cid, "Essa magia só pode ser usada por jogadores Vips!") and doSendMagicEffect(getThingPos(cid), 2) end Ou se seu vip system for storage, checar pelo storage ao invés da função.
  14. Porque eles estão usando uma hotkey "auto X attack target" que faz o char atacar e desetacar o bixo a cada X milisegundo, causando um bug que parece que o char esta em um sqm e ele esta levando dano no outro. Qual distro você usa?
  15. Não tenho muita expêriencia com 1.0+... Tenta assim... Tem certeza que se por lasthit ali na função ele funciona de boa e não da erro? function onKill(creature, target) if target:isPlayer() or target:getMaster() then return true end local targetName, startedTasks, taskId = target:getName():lower(), player:getStartedTasks() for i = 1, #startedTasks do taskId = startedTasks if isInArray(tasks[taskId].creatures, targetName) then local killAmount = player:getStorageValue(KILLSSTORAGE_BASE + taskId) if killAmount < tasks[taskId].killsRequired then player:setStorageValue(KILLSSTORAGE_BASE + taskId, killAmount + 1) end end end return true end
  16. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Não precisa de site para mysql, você só teria vantagens. Embora você vai ver um milhão de tutoriais de xampp, e todo mundo usando ele. Te aconselho o uniform server, é mais leve, seguro e simples. Funciona perfeitamente. Tenta seguir o tutorial, qualquer parte que der problema posta aqui nesse tópico mesmo, que vou te ajudar.
  17. Tfs 1. qual? Tenta assim: function onKill(cid, target) if target:isPlayer() or target:getMaster() then return true end local targetName, startedTasks, taskId = target:getName():lower(), player:getStartedTasks() for i = 1, #startedTasks do taskId = startedTasks if isInArray(tasks[taskId].creatures, targetName) then local killAmount = player:getStorageValue(KILLSSTORAGE_BASE + taskId) if killAmount < tasks[taskId].killsRequired then player:setStorageValue(KILLSSTORAGE_BASE + taskId, killAmount + 1) end end end return true end
  18. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Ali ele fala que uma tabela não existe e logo após cria duas tabelas relacionadas a guild rank. Se você fechar o server e abrir de novo ele volta a criá-las? Parece que isso só vai acontecer uma vez. Aconselho você usar mysql, é mais rapido, e em caso de problemas fica bem mais facil arrumar. Tem bastante tutoriais usando o xampp ou o que eu recomendaria seria o Uniserver.
  19. Você reiniciou o server ou deu /reload config depois de alterar as configurações? Não vejo como esse problema acontecer. OTX 2 ou 3? OTX 2: -- Red Skull Config fragsToRedSkull = 20 fragsSecondToRedSkull = 80 fragsThirdToRedSkull = 200 redSkullLength = 1 * 24 * 60 * 60 pushCreatureDelay = 100
  20. Em weapons.xml vá no id dar arma e ache action="removecount" remova isso e vai ficar infinito. Qual acc maker você usa que o shop não está entregando? Gesior (globalevents/scripts/shop.lua) -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 18 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.storeQuery("SELECT * FROM z_ots_comunication") if(result_plr ~= false) then repeat local id = tonumber(result.getDataInt(result_plr, "id")) local action = tostring(result.getDataString(result_plr, "action")) local delete = tonumber(result.getDataInt(result_plr, "delete_it")) local cid = getPlayerByName(tostring(result.getDataString(result_plr, "name"))) if(cid) then local itemtogive_id = tonumber(result.getDataInt(result_plr, "param1")) local itemtogive_count = tonumber(result.getDataInt(result_plr, "param2")) local container_id = tonumber(result.getDataInt(result_plr, "param3")) local container_count = tonumber(result.getDataInt(result_plr, "param4")) local add_item_type = tostring(result.getDataString(result_plr, "param5")) local add_item_name = tostring(result.getDataString(result_plr, "param6")) local received_item = 0 local full_weight = 0 if(add_item_type == 'container') then container_weight = getItemWeight(container_id, 1) if(isItemRune(itemtogive_id)) then items_weight = container_count * getItemWeight(itemtogive_id, 1) else items_weight = container_count * getItemWeight(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeight(itemtogive_id, itemtogive_count) if(isItemRune(itemtogive_id)) then full_weight = getItemWeight(itemtogive_id, 1) else full_weight = getItemWeight(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if(full_weight <= free_cap) then if(add_item_type == 'container') then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while(iter ~= container_count) do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if(type(received_item) == "number" and received_item == RETURNVALUE_NOERROR) then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end until not result.next(result_plr) result.free(result_plr) end return true end
  21. Falta alguma parte ou algum outro script, o que você passou não tem a parte de matar o monstro ou algo relacionado. Vai ser um OnDeath ou um OnKill provavelmente.
  22. DukeeH postou uma resposta no tópico em Suporte Tibia OTServer
    Algum erro no console?
  23. Desculpa, tenta agora. function onLogin(cid) registerCreatureEvent(cid, "MorteDeath") return true end function onDeath(cid, corpse, deathList) if not isPlayer(cid) then return true end local killer = deathList[1] if isMonster(killer) then doBroadcastMessage(getCreatureName(cid).." [Level: "..getPlayerLevel(cid).."] foi morto pelo monstro "..getCreatureName(killer).."." , MESSAGE_STATUS_CONSOLE_RED) elseif isPlayer(killer) then doBroadcastMessage(getCreatureName(cid).." [Level: "..getPlayerLevel(cid).."] foi morto por "..getCreatureName(killer).." [Level: "..getPlayerLevel(killer).."].", MESSAGE_STATUS_CONSOLE_RED) end return true end
  24. O Ubuntu é baseado no Debian, vão existir poucas diferenças, até mesmo na hora de compilar, que muda apenas algumas partes de comandos, mas se olhar de forma geral são parecidos e ambos funcionam bem para a finalidade que queremos, otserv... Se você não tiver expêriencia com nenhum dos dois pode ir com qualquer um que vai dar certo, como ja falei, eu sempre usei o Debian e nunca tive problemas, se você não tiver noção de linux todos os tutoriais se encaixam nele e você vai compilar e rodar sem problemas.
  25. Dependendo de fast attack, experiencia do servidor (mais exp, mais danos, mais cálculos) e isso pesa dependendo dos jogadores on, não aconselho pegar 1gb de ram, mesmo se eu mapa for pequeno, pois o save/clean pode travar um pouco entre outros problemas. Você dificilmente (quase impossível) vai saber quantos jogadores exatamente um vps suporta, porque depende dos scripts que você tem no servidor (global events pesam dependendo do intervalo (novamente levando em consideração os players on)), e muitos outros fatores a dica mais inteligente sempre vai ser pegar o melhor que você conseguir com o dinheiro que possui, mesmo que pra começar não seja muito, depois todos os vps são expansíveis, podendo melhora-los conforme precise.

Informação Importante

Confirmação de Termo