
Tudo que WooX postou
- Como fixar os itens nos slots corretos? - Tibia 8.60.
-
(Resolvido)Script Regeneration com Randon Min Max
local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, 95) setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 1) function onCastSpell(cid, var) local min, max = 30000, 40000 doCreatureAddHealth(cid, math.random(min, max)) return doCombat(cid, combat, var) end
-
(Resolvido)[HELP-ME] Arma aparecer na sprite?
O sistema chama-se paperdoll, alguns projetos que nunca saíram do papel desenvolveram algo parecido. A mais de 2 anos atrás eu fiz algumas sprites pra uma equipe que pretendia usar este sistema num servidor atual de tibia 10.x (não lembro exatamente). Me lembro que por ser 10.x eram muitos frames, cheguei a fazer sprites para o crown e demon helmet. Vou postar aqui para você ter 1 ideia de quantos sprites eram necessários. Obs: isso somente para 2 helmets e outfit citizen, imagine combinações de sets inteiros com outfits diferentes?? Enfim... é um sistema bem complexo, que para funcionar corretamente vai exigir mais sprites do que linhas de codigos rs.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Agora que fui perceber, eu cometi 1 erro no script anterior, tenta agora. --<globalevent name="rmvpz" interval="3000" event="script" value="rmvpz.lua"/>-- XML function onThink(interval, lastExecution, thinkInterval) local players = getPlayersOnline() for _, pid in ipairs(players) do if getTilePzInfo(getThingPos(pid)) and isPlayerPzLocked(pid) and getPlayerStorageValue(pid, 16700) ~= -1 then doPlayerSetPzLocked(pid, false) doCreatureSetSkullType(pid, 0) end end return true end
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Foi o que falei de inicio, mas você preferiu o caminho mais curto, agora não vou voltar atrás. Para remover em todos os casos basta usar o script anterior sem a verificação da storage.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Então era pra funcionar, tenta assim. --<globalevent name="rmvpz" interval="3000" event="script" value="rmvpz.lua"/>-- XML function onThink(interval, lastExecution, thinkInterval) local players = getPlayersOnline() for _, pid in ipairs(players) do if getTilePzInfo(getThingPos(pid)) and isPlayerPzLocked(pid) and getPlayerStorageValue(cid, 16700) > 0 then doPlayerSetPzLocked(pid, false) doCreatureSetSkullType(pid, 0) end end return true end Se não funcionar, quando termina o evento ele não está atualizando o valor da storage.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Confirma pra mim se a storage do seu evento é mesmo 16700.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Fiz a alteração, agora sim, só vai remover pz de players que estão dentro do evento. --<globalevent name="rmvpz" interval="3000" event="script" value="rmvpz.lua"/>-- XML function onThink(interval, lastExecution, thinkInterval) local players = getPlayersOnline() for _, pid in ipairs(players) do if getTilePzInfo(getThingPos(pid)) and isPlayerPzLocked(pid) and getPlayerStorageValue(cid, 16700) ~= -1 then doPlayerSetPzLocked(pid, false) doCreatureSetSkullType(pid, 0) end end return true end
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Ele faz 1 verificação em todos players online que estão em protect zone, verifica se está com pz, se tiver remove, se não tiver, nada é feito. --<globalevent name="rmvpz" interval="3000" event="script" value="rmvpz.lua"/>-- XML function onThink(interval, lastExecution, thinkInterval) local players = getPlayersOnline() for _, pid in ipairs(players) do if getTilePzInfo(getThingPos(pid)) and isPlayerPzLocked(pid) and getPlayerStorageValue(cid, 16700) ~= -1 then doPlayerSetPzLocked(pid, false) doCreatureSetSkullType(pid, 0) end end return true end --[[ Capture The Flag System Author: Maxwell Denisson(MaXwEllDeN) Version: 2.0 Contact: maxwellmda@gmail.com ]] local CTF = CTF_LIB function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, 16700) ~= -1 and type == 1 and getCreatureHealth(cid) - value <= 0 then if getPlayerStorageValue(cid, 16702) ~= -1 then CTF.returnFlag(cid, 1) end if isPlayerPzLocked(cid) then doPlayerSetPzLocked(cid, false) doCreatureSetSkullType(cid, 0) end doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) return false end return true end function onLogout(cid) if getPlayerStorageValue(cid, 16700) ~= -1 then CTF.removePlayer(cid) end return true end function onCombat(cid, target) if getPlayerStorageValue(cid, 16700) ~= -1 then if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then return false end end return true end function onAttack(cid, target) if getPlayerStorageValue(cid, 16700) ~= -1 then if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then return false end end return true end
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Acredito que não, mas por precaução deixa o tempo de execução do script alto, entre 10~15 segundos. Se preferir também posso fazer ele tirar o pz somente de quem está no evento, da maneira como está ele está removendo de todos os players online. (quem estiver pz em proctect zone ele remove).
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Foi outro erro que cometi, editei o post anterior, tenta novamente.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Cometi 1 erro bobo, tenta agora. --<globalevent name="rmvpz" interval="3000" event="script" value="rmvpz.lua"/>-- XML function onThink(interval, lastExecution, thinkInterval) local players = getPlayersOnline() for _, pid in ipairs(players) do if getTilePzInfo(getThingPos(pid)) then doPlayerSetPzLocked(pid, false) end end return true end
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Não, tem que ficar em suas devidas pastas mesmo, Globalevents e Movements. No caso deste script do erro, Globalevents.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Esse erro ta dizendo que não conseguiu carregar o script, verifica se o nome do arquivo na pasta está igual ao do XML.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
GlobalEvents --<globalevent name="rmvpz" interval="3000" event="script" value="rmvpz.lua"/>-- XML function onThink(interval, lastExecution, thinkInterval) local players = getPlayersOnline() for _, pid in ipairs(players) do if getTilePzInfo(getThingPos(pid) then doPlayerSetPzLocked(cid, false) end end return true end Movements --<movevent type="StepIn" actionid="10990" event="script" value="rmvpz.lua"/>-- XML function onStepIn(cid, item, position, fromPosition) if item.actionid == 10990 then if getTilePzInfo(getThingPos(cid)) and isPlayerPzLocked(cid) then doPlayerSetPzLocked(cid, false) end return true end end
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Não tem como fazer isso sem alterações na source, enquanto o alvo estiver com poison o atacante vai estar pz. Vou fazer 2 scripts para remover o pz caso o player esteja em protect zone, já já posto aqui.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Para fazer isso terei que usar onThink o que pode causar aumento do uso de cpu, a solução correta seria não pegar pz na área do evento, mas se ainda assim quiser só dizer que eu faço.
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Algum erro na distro?
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
--[[ Capture The Flag System Author: Maxwell Denisson(MaXwEllDeN) Version: 2.0 Contact: maxwellmda@gmail.com ]] local CTF = CTF_LIB function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(attacker, 16700) then doPlayerSetPzLocked(cid, false) doPlayerSetPzLocked(attacker, false) end if getPlayerStorageValue(cid, 16700) ~= -1 and type == 1 and getCreatureHealth(cid) - value <= 0 then if getPlayerStorageValue(cid, 16702) ~= -1 then CTF.returnFlag(cid, 1) end if isPlayerPzLocked(cid) then doPlayerSetPzLocked(cid, false) end doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) return false end return true end function onLogout(cid) if getPlayerStorageValue(cid, 16700) ~= -1 then CTF.removePlayer(cid) end return true end function onCombat(cid, target) if getPlayerStorageValue(cid, 16700) ~= -1 then if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then return false end end return true end function onAttack(cid, target) if getPlayerStorageValue(cid, 16700) ~= -1 then if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then return false end end return true end
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
--[[ Capture The Flag System Author: Maxwell Denisson(MaXwEllDeN) Version: 2.0 Contact: maxwellmda@gmail.com ]] local CTF = CTF_LIB function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, 16700) ~= -1 and type == 1 and getCreatureHealth(cid) - value <= 0 then if getPlayerStorageValue(cid, 16702) ~= -1 then CTF.returnFlag(cid, 1) end if isPlayerPzLocked(cid) then doPlayerSetPzLocked(cid, false) end doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) return false end return true end function onLogout(cid) if getPlayerStorageValue(cid, 16700) ~= -1 then CTF.removePlayer(cid) end return true end function onCombat(cid, target) if getPlayerStorageValue(cid, 16700) ~= -1 then doPlayerSetPzLocked(cid, false) if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then return false end end return true end function onAttack(cid, target) if getPlayerStorageValue(cid, 16700) ~= -1 then doPlayerSetPzLocked(cid, false) if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then return false end end return true end
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
--[[ Capture The Flag System Author: Maxwell Denisson(MaXwEllDeN) Version: 2.0 Contact: maxwellmda@gmail.com ]] local CTF = CTF_LIB function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, 16700) ~= -1 and type == 1 and getCreatureHealth(cid) - value <= 0 then if getPlayerStorageValue(cid, 16702) ~= -1 then CTF.returnFlag(cid, 1) end if isPlayerPzLocked(cid) then doPlayerSetPzLocked(cid, false) end doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doCreatureAddMana(cid, getCreatureMaxMana(cid)) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) return false end return true end function onLogout(cid) if getPlayerStorageValue(cid, 16700) ~= -1 then CTF.removePlayer(cid) end return true end function onCombat(cid, target) if getPlayerStorageValue(cid, 16700) ~= -1 then if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then return false end end return true end function onAttack(cid, target) if getPlayerStorageValue(cid, 16700) ~= -1 then if getPlayerStorageValue(cid, 16700) == getPlayerStorageValue(target, 16700) then return false end end return true end
-
Poder anda no PROTECTION zone com Pk / Batle vermelho
Não tem necessidade de fazer isso, pode ser feito um simples script para remover o pz caso o player esteja em protect zone, acredito que isso deva resolver seu problema. Posso fazer o script pra você, mas é estranho que o player morra e não perca pz, então na verdade ele não está morrendo mas somente tendo a vida restaurada e sendo teleportado para o templo do evento. Verifica se tem algum script com a função onPrepareDeath e posta aqui.
-
Add exhaust na action
local Exausted = 5 -- Tempos em segundos function onUse(cid, item, fromPosition, itemEx, toPosition) if exhaustion.get(cid, 1800) then doPlayerSendCancel(cid, "Wait".. Exausted .."seconds to use again.") return true end if getPlayerLevel(cid) >= 1 then doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1) doCreatureAddHealth(cid, math.random(1,5)) doCreatureAddMana(cid, math.random(1,5)) doSendMagicEffect(fromPosition, 12) return true else doCreatureSay(cid, "Only lvl 1 or higher.", TALKTYPE_ORANGE_1) end end
-
[Duvida] Como arrumar para ler as vocations
function onUse(cid, item, fromPosition, target, toPosition, isHotkey) if isDruid(cid) then if item.uid == 7528 then PlayerLearnInstantSpell(cid, "Gran Nature") doPlayerRemoveItem(cid, item.uid, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ganhou a nova magia") end else doPlayerSendCancel(cid, "Voce nao e druida") end return true end
-
[Duvida] Como arrumar para ler as vocations
function onUse(cid, item, fromPosition, target, toPosition, isHotkey) if (getPlayerVocation(cid) == 2) or (getPlayerVocation(cid) == 6) then if item.uid == 7528 then PlayerLearnInstantSpell(cid, "Gran Nature") doPlayerRemoveItem(cid, item.uid, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce ganhou a nova magia") end return true else doPlayerSendCancel(cid, "Voce nao e druida") end return true end