Ir para conteúdo

Dwarfer

Membro
  • Registro em

  • Última visita

Tudo que Dwarfer postou

  1. Verifique se o actionid do piso já não está sendo utilizado por outro script.Como disse, está tudo certo aí. Esse último não tem nenhum efeito e mensagem. Você pode estar se confundindo.
  2. local newpos, effect = {x=1,y=1,z=1}, CONST_ME_TELEPORT function onUse(cid, item, fromPosition, itemEx, toPosition) doTeleportThing(cid, newpos) doSendMagicEffect(newpos, effect) end <action actionid="ACTIONID_DA_ESTATUA" script="NOMEDOARQUIVO.lua" /> Edite a posição e o efeito como queira.
  3. Dwarfer postou uma resposta no tópico em Suporte Tibia OTServer
    Nessa parte, configure o level e a rate: {level = {1, 30}, rate = 1.0}, --- Do skill 1 até o 30, será adicionado 1.0*config.trys = 30 {level = {31,60}, rate = 0.5}, -- Do skill 31 até o 60: 0.5*30 = 15 {level = {61,100}, rate = 0.1}} -- Do skill 61 até o 100: 0.1*30 = 3
  4. Em creaturescripts/scripts crie um arquivo: limitskill.lua No login.lua, adicione: registerCreatureEvent(cid, "LimitSkill") Crie outro arquivo.lua em creaturescripts/scripts: checklimit.lua function onLogin(cid) for i = 0, 5 do if getPlayerStorageValue(cid, 19870 + i) == 1 then doPlayerSetRate(cid, i, 0.0) end end return true end Adicione as tags no creaturescripts.xml: <event type="advance" name="LimitSkill" event="script" value="limitskill.lua"/> <event type="login" name="CheckLimit" event="script" value="checklimit.lua"/>
  5. Veja se você não configurou algo errado, acabei de testar aqui e está funcionando corretamente.
  6. local t = { skills = {club = 25, sword = 25, axe = 25, distance = 25, shield = 25}, mp = 2000, interval = 15, duration = 30} local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, t.duration*1000) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, t.skills.club) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, t.skills.sword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, t.skills.axe) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, t.skills.distance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, t.skills.shield) setConditionParam(condition, CONDITION_PARAM_BUFF, true) setCombatCondition(combat, condition) local conditionReg = createConditionObject(CONDITION_REGENERATION) setConditionParam(conditionReg, CONDITION_PARAM_MANAGAIN, t.mp) setConditionParam(conditionReg, CONDITION_PARAM_MANATICKS, (t.interval-3)*1000) setConditionParam(conditionReg, CONDITION_PARAM_TICKS, t.duration*1000) function onCastSpell(cid, var) if exhaustion.check(cid, 13251) == TRUE then doPlayerSendCancel(cid, "Podera usar novamente dentro de "..t.duration.." segundos.") doSendMagicEffect(getCreaturePosition(cid), 2) return false end doAddCondition(cid, conditionReg) for k = 1, 100 do addEvent(function() if isCreature(cid) then local pos1 = {x = getPlayerPosition(cid).x + 1, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z} doSendMagicEffect(pos1, 81) end end, 1 + ((k-1) * 500)) end exhaustion.set(cid, 13251, t.duration) return doCombat(cid, combat, var) end
  7. Ring Em movements/scripts, crie um arquivo.lua: Adicione a tag no movements.xml: <movevent type="Equip" itemid="ID_DO_RING slot="ring" event="script" value="NOME_DO_ARQUIVO.lua"/> Piso Em movements/scripts, crie um arquivo.lua: Adicione a tag no movements.xml: <movevent type="StepIn" actionid="ACTION_ID_DO_PISO" event="script" value="NOME_DO_ARQUIVO.lua"/>
  8. Em movements/scripts, crie um arquivo e coloque: function onStepIn(creature, item, position, fromPosition) if position.z == fromPosition.z then creature:teleportTo(fromPosition, false) end return true end Adicione a tag no movements.xml: <movevent event="StepIn" itemid="ID_DO_POT" script="NOMEDOARQUIVO.lua" />
  9. Aqui: local t = {id = 13176, time = 2 } function onStepIn(creature, item, position, fromPosition) if not creature:isPlayer() then return false end item:remove(1) creature:setItemOutfit(t.id, t.time*1000) mayNotMove(creature, 1) addEvent(function() if creature:isPlayer() then mayNotMove(creature, 0) end end, t.time*1000) return true end function mayNotMove(cid, type) pos = getCreaturePosition(cid) if(type == 0) then pos.x = FALSE end function check() if(pos.x ~= FALSE) then if(getCreaturePos(cid)~=pos) then doTeleportThing(cid, pos) end addEvent(check, 100) end end check() end
  10. Ok, consertei e aproveitei para retirar algumas partes que ao meu ver eram desnecessárias.
  11. Dwarfer postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    Valeu Espero que seja útil ao pessoal.
  12. Ah sim, você não tinha destacado que era para remover o item rsrsrs. Tranquilo
  13. Ah sim, pior que tinha colado e não alterei. Já editei lá, pode pegar.
  14. local t = { [1111] = {stor = 11111, voc_id = 1}, -- [ID_DO_ITEM] = STORAGE [2222] = {stor = 11112, voc_id = 2}, [3333] = {stor = 11113, voc_id = 3}, [4444] = {stor = 11114, voc_id = 4} } function onUse(cid, item, fromPosition, itemEx, toPosition) for _, k in pairs(t) do if getPlayerStorageValue(cid, k.stor) > 0 then doPlayerSendCancel(cid, "You already have an outfit.") return true end end setPlayerStorageValue(cid, t[item.itemid].stor, 1) doPlayerSetVocation(cid, t[item.itemid].voc_id) doCreatureSay(cid, "You received your outfit and vocation.", TALKTYPE_ORANGE_1) return true end Edite os ids dos itens e vocações, além dos storages.
  15. Você pode utilizar como base. Em movements/scripts: itemtransform.lua local t = { outfit_id = 1111, --id do item para o qual será transformado tempo = 2 -- tempo em segundos } function onStepIn(cid, item, frompos, itemEx, topos) doRemoveItem(item.uid) local outfit = {lookType = 0, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = t.outfit_id, lookAddons = 0} doCreatureSetNoMove(cid, true) doSetCreatureOutfit(cid, outfit, t.tempo*1000) addEvent(function() if isPlayer(cid) then doCreatureSetNoMove(cid, false) end end, t.tempo*1000) return true end Em movements.xml: <movevent type="StepIn" itemid="ID_DO_ITEM" event="script" value="itemtransform.lua"/>
  16. @megazx What code is this error for? Magic or guild? I saw a silly error in magic top effect that you ordered separated. I edited right now, you can take there.
  17. Crie um arquivo em actions/scripts: outfitstorage.lua local t = { [1111] = 11111, -- [ID_DO_ITEM] = STORAGE [2222] = 11112, [3333] = 11113, [4444] = 11114 } function onUse(cid, item, fromPosition, itemEx, toPosition) for _, k in pairs(t) do if getPlayerStorageValue(cid, k) > 0 then doPlayerSendCancel(cid, "You already have an outfit.") return true end end setPlayerStorageValue(cid, t[item.itemid], 1) doCreatureSay(cid, "You received your outfit.", TALKTYPE_ORANGE_1) return true end Em actions.xml: <action itemid="1111;2222;3333;4444" script="outfitstorage.lua" /> Edite os ids dos itens na tag acima.
  18. Registrou o creatureevent no login.lua?
  19. Is this error for magic or guild? Actually, for topguild i realized an error maybe when i copied and pasted. local t = {effect = 30, text = "HOT GUILD", time = 10, color = COLOR_LIGHTBLUE} function onLogin(cid) query = db.getResult("SELECT `g`.`id` AS `id`, `g`.`name` AS `name`, COUNT(`g`.`name`) as `frags` FROM `killers` k LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id` LEFT JOIN `players` p ON`pk`.`player_id` = `p`.`id` LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id` LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id` WHERE `k`.`unjustified` = 1 AND `k`.`final_hit`= 1 GROUP BY `name` ORDER BY `frags` DESC, `name` ASC LIMIT 1") if query:getID() ~= -1 then name = query:getDataString("name") if getPlayerGuildName(cid) == name then SendEffect(cid, t.effect, t.text, t.time, t.color) end end return true end function SendEffect(cid, effect, text, time, color) if isPlayer(cid) then doSendMagicEffect(getPlayerPosition(cid), effect) doSendAnimatedText(getPlayerPosition(cid), text, color) addEvent(SendEffect, time*1000, cid, effect, text, time, color) end return true end You can use for magic that i did before. You can talk to the owner's script about modifications.
  20. local t = { lookType = 200, -- lookType para o qual será trocado tempo = 2 -- quanto tempo durará } function onCastSpell(cid, var) local outfit = getCreatureOutfit(cid) local target = getCreatureTarget(cid) if target == nil then return true end outfit.lookType = t.lookType doCreatureSetNoMove(target, true) doSetCreatureOutfit(target, outfit, t.tempo*1000) addEvent(function() if isPlayer(target) then doCreatureSetNoMove(target, false) end end, t.tempo*1000) return true end
  21. Procure no seu login.lua na pasta creaturescripts : if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end Altere o CONST_ME_TELEPORT para o desejado.
  22. local id, charges = 8584, 250 function onStepIn(cid, item, frompos, itemEx, topos) if getPlayerStorageValue(cid, 17743) ~= -1 then return true end if doPlayerRemoveItem(cid, id, 1) then local necklace = doPlayerAddItem(cid, id, 1) doItemSetAttribute(necklace, "charges", charges) setPlayerStorageValue(cid, 17743, 1) end return true end <movevent type="StepIn" actionid="ACTIONID" event="script" value="NOMEDOARQUIVO.lua"/> Lembrando que o item deve ter o atributo <attribute key="charges" value="0" /> no items.xml.
  23. Substituir um item por outro e adicionar cargas ou adicionar cargas a item que está com o player?
  24. Hi. I had made a point of testing this code before sending it to you and worked correctly. It's not because they are "together" in only one script. Are you sure does your server have a guild with kills, right? Anyway, as you said, you can try them separated. Use them in addition to the first.

Informação Importante

Confirmação de Termo