Histórico de Curtidas
-
xwarlleyx deu reputação a Tofames em Sistema de transformaçãoHi,
Para devolver o que recebi aqui, colocarei para si um sistema de transformação a trabalhar na TFS 1.X.
(Testei em 1.4.2)
MUDANÇA DE SOURCE NECESSÁRIA PARA O BOM FUNCIONAMENTO!
Havia algo dentro do código TFS (e provavelmente outras distros) que não estava funcionando corretamente e depois que eu informei, eles se fundiram em tfs principais, então já está dentro do TFS 1.5, mas não está em versões mais antigas.
Trata-se de refrescar a velocidade do jogador após a transformação, se você não tiver isso, então sua velocidade do vocations.xml baseSpeed não é refrescada.
Você precisa adicionar isto às sources:
https://github.com/otland/forgottenserver/pull/4215/files
se você não tem acesso às sources, eu tenho um meio de contornar isso, mas não vou inundar este posto, então escreva em pv.
Créditos:
Erexo (guião original)
Itutorial (TFS 1.X),
Tofame (alteração: talkaction --> spell; source mudanças; correções do scripts)
transform system.mp4
no final do global.lua:
--[[ voc = from vocation newVoc = to vocation looktype = new outfit revertLooktype = current outfit level = lvl needed to transform rage = soul needed to transform (you can disable it, just type 0) kiToTrans = mana to transform addHp = maxHp added when you transform addKi = maxMana added effectOn = magic effect when you use transform aura = magic effect when you have current transform (can be disabled, just type 0). type nil in this version constant = if transform is constant (when it is, player dont lose transform/outfit and maxHp/Mana, and cannot use revert) --]] exhaust_transform = {} -- [1-8] naruto, transform = { [1] = {voc = 1, newVoc = 2, from_looktype = 2, looktype = 3, level = 50, rage = 0, mana = 50, addHealth = 450, addMana = 450, effect = 76, aura = nil, constant = false}, [2] = {voc = 2, newVoc = 3, from_looktype = 3, looktype = 4, level = 100, rage = 0, mana = 50, addHealth = 500, addMana = 500, effect = 76, aura = nil, constant = false}, [3] = {voc = 3, newVoc = 4, from_looktype = 4, looktype = 5, level = 150, rage = 0, mana = 50, addHealth = 650, addMana = 650, effect = 76, aura = nil, constant = false}, [4] = {voc = 4, newVoc = 5, from_looktype = 5, looktype = 6, level = 200, rage = 0, mana = 50, addHealth = 800, addMana = 800, effect = 76, aura = nil, constant = false}, [5] = {voc = 5, newVoc = 6, from_looktype = 6, looktype = 7, level = 250, rage = 0, mana = 50, addHealth = 900, addMana = 900, effect = 76, aura = nil, constant = false}, [6] = {voc = 6, newVoc = 7, from_looktype = 7, looktype = 8, level = 300, rage = 0, mana = 50, addHealth = 1000, addMana = 1000, effect = 76, aura = nil, constant = false}, [7] = {voc = 7, newVoc = 8, from_looktype = 8, looktype = 9, level = 400, rage = 0, mana = 50, addHealth = 1500, addMana = 1500, effect = 76, aura = nil, constant = false}, [8] = {voc = 8, newVoc = 9, from_looktype = 9, looktype = 10, level = 500, rage = 0, mana = 50, addHealth = 1500, addMana = 1500, effect = 76, aura = nil, constant = false} -- end naruto transforms } spells/scripts/revert.lua
local combat = Combat() combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) function onCastSpell(player, variant) local pid = player:getId() local TRANS = transform[player:getVocation():getId() - 1] -- - [player:getVocation():getId() - 4] domyslnie, should be -1. if not TRANS then player:sendCancelMessage("You cannot revert.") return false end local outfit = player:getOutfit() outfit.lookType = TRANS.from_looktype if TRANS.constant then player:setOutfit(outfit) else player:setOutfit(outfit, false) end exhaust_transform[pid] = 1 player:setMaxHealth(player:getMaxHealth() - TRANS.addHealth) player:setMaxMana(player:getMaxMana() - TRANS.addMana) player:setVocation(TRANS.voc) player:save() return combat:execute(player, variant) end spells/scripts/transform.lua
local combat = Combat() combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) function onCastSpell(player, variant) local effectPosition = Position(player:getPosition().x, player:getPosition().y, player:getPosition().z) local pid = player:getId() local TRANS = transform[player:getVocation():getId()] if not TRANS then player:sendCancelMessage("You cannot transform.") return false end if TRANS.effect == 76 then effectPosition = Position(player:getPosition().x + 2, player:getPosition().y, player:getPosition().z) end if player:getLevel() < TRANS.level then player:sendCancelMessage("You must reach level "..TRANS.level.." to transform.") return false end if player:getSoul() < TRANS.rage then player:sendCancelMessage("You need "..TRANS.rage.." to transform.") return false end if player:getMana() < TRANS.mana then player:sendCancelMessage("You need "..TRANS.mana.." to transform.") return false end local outfit = player:getOutfit() outfit.lookType = TRANS.looktype if TRANS.constant then player:setOutfit(outfit) else player:setOutfit(outfit, false) end player:addSoul(-TRANS.rage) player:setMaxHealth(player:getMaxHealth() + TRANS.addHealth) player:setMaxMana(player:getMaxMana() + TRANS.addMana) effectPosition:sendMagicEffect(TRANS.effect) player:setVocation(TRANS.newVoc) player:save() return combat:execute(player, variant) end spells.xml:
<instant group="support" spellid="175" name="Revert" words="revert" level="1" mana="10" aggressive="0" selftarget="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="revert.lua" /> <instant group="support" spellid="175" name="Transform" words="transform" level="1" mana="10" aggressive="0" selftarget="1" cooldown="1000" groupcooldown="1000" needlearn="0" script="transform.lua" />
As coisas abaixo são opcionais, adicione-as se você quiser ter aura. Se você não estiver usando, deixe a aura = nil em global.lua
Também observei que isso poderia causar atrasos/screen freeze, por isso não recomendo o uso de aura.
globalevents.xml adicionar linha:
<globalevent name="TransformEffects" interval="2000" script="TransformEffects.lua"/> TransformEffects.lua (data/globalevents/scripts/TransformEffects.lua):
function onThink(interval) for _, player in pairs(Game.getPlayers()) do if player then TRANS = transform[player:getVocation():getId()] if TRANS then if TRANS.aura ~= nil then player:getPosition():sendMagicEffect(TRANS.aura) end end end end return true end
edit:
só consigo falar um pouco de espanhol e muito bem em inglês, por isso uso DEEPL para falar portugês.
-
xwarlleyx deu reputação a luanluciano93 em Novo Sistema de TrainerOlá, tudo bom? Peguei um sistema que o lobão criou e modifiquei para TFS 1.x (eu uso o 1.3 e funcionou certinho).
Lembrando que todos os créditos são do @xWhiteWolf.
Explicação:
O sistema escolhe automáticamente, entre todas as salas de trainers, aquela que está vazia pra te alocar.
Fiz em dois scripts de movements, um o action id no teleport para entrar na sala e outro no teleport para sair:
trainer_entrar.lua:
trainer_sair.lua:
É isso pessoal, para melhor entendimento de como funciona ou como instalar veja o tópico do lobão: http://www.tibiaking.com/forum/forums/topic/68031-novo-sistema-de-trainer-036~04/
-
xwarlleyx deu reputação a QuebradaZN em Aura System por Equip [TFS 1.3]Boa Tarde, Hoje venho trazer a vocês um Sistema de Aura!
Feito pelo @bielzinhocrazy [Fakezim/BielzinhoCrazy/GMLeal]
Mudanças que Foram feitas...
Retirei a ativação da Aura por Talk e coloquei por Equip
Fixei o Bug que a aura Não Girava em torno do Player
Fixei o Bug que o Player Parava de receber a aura assim que Tinha o Efeito da Cura!
Em Movements/scripts/ Crie um Arquivo com nome de aura.lua
-- CONFIGURAÇÕES aurastr = 25950 -- storage da aura estr = 25951 -- storage para o exhaust porcentagem = 50 -- chance de curar em cada volta da aura, em porcentagem quantheal = 20 -- porcentagem do hp máximo que cada cura irá curar. (No caso, irá curar 10% do hp máximo cada cura) tempo = 1180 -- tempo para dar uma volta no player (este tempo foi o que achei mais agradável visualmente, é recomendável não mudar) tipoaura = 31 -- número do efeito da aura (efeito de distância, pode ser identificado com /x no jogo) efeitocura = 54 -- número do efeito quando a cura chega ao player (efeito de posição fixa, pode ser identificado com /z no jogo) -- Função que chama a aura function efeitosAura(i,tm,cid) if(isCreature(cid)) then local atual = getCreaturePosition(cid) local posaura = { {x=(atual.x)-1, y=(atual.y)-1, z=atual.z}, {x=atual.x, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=atual.y, z=atual.z}, {x=(atual.x)+1, y=(atual.y)+1, z=atual.z}, {x=atual.x, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=atual.y, z=atual.z}, } local chances = math.random(100) if(chances<=porcentagem/8 and getCreatureHealth(cid)<getCreatureMaxHealth(cid)) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid)/quantheal) if(i<=8 and i>1) then doSendDistanceShoot({x=posaura[i].x, y=posaura[i].y, z=posaura[i].z}, atual, tipoaura) else doSendDistanceShoot({x=posaura[1].x, y=posaura[1].y, z=posaura[1].z}, atual, tipoaura) end doSendMagicEffect(atual, efeitocura) end if(i==8) then doSendDistanceShoot({x=posaura[i].x, y=posaura[i].y, z=posaura[i].z}, {x=posaura[1].x, y=posaura[1].y, z=posaura[1].z}, tipoaura) elseif(i<8) then doSendDistanceShoot({x=posaura[i].x, y=posaura[i].y, z=posaura[i].z}, {x=posaura[i+1].x, y=posaura[i+1].y, z=posaura[i+1].z}, tipoaura) end if(i<=8 and getPlayerStorageValue(cid, aurastr)==2) then i = i+1 tm = tempo/8 return addEvent(efeitosAura,tm,i,tm,cid) elseif(i>8 and getPlayerStorageValue(cid, aurastr)==2) then return efeitosAura(1,0,cid) else return TRUE end else return TRUE end end function onEquip(player, item, slot, isCheck) local slot_ = player:getSlotItem(CONST_SLOT_RING) if slot_ and slot_.itemid == item.itemid then return false end doPlayerSendCancel(player,"Você Ativou a Aura!") setPlayerStorageValue(player, aurastr, 2) efeitosAura(1,tempo/8,player.uid) return true end function onDeEquip(player, item, slot, isCheck) if(getPlayerStorageValue(player, aurastr)==2) then setPlayerStorageValue(player, estr, os.time()+2) setPlayerStorageValue(player, aurastr, -1) doPlayerSendCancel(player,"Você Desativou a Aura!") return true end end
Feito Isso Vamos Registrar esse Script
Em Movements/movements.xml
<movevent event="Equip" itemid="9003" slot="ring" script="aura.lua" /> <movevent event="DeEquip" itemid="9003" slot="ring" script="aura.lua" /> OBS: Usei o Golden Falcon como Item
Agora em Creaturescripts/scripts crie um Arquivos Chamado aura.lua
function onLogin(cid) if(getPlayerStorageValue(cid, 25950)==2) then return efeitosAura(1,tempo/8,cid.uid) end return TRUE end Caso o Player Deslogue com a Aura Ativa, Quando retornar Online Continuará com a Aura!
Registrando no Login.lua
player:registerEvent("AuraLogin")
Em Creaturescripts/creaturescripts.xml
<event type="login" name="AuraLogin" script="others/aura.lua" /> Nesse Caso minha Aura.lua está na Pasta others!
Então é isso Pessoal, Qualquer problema Tentarei ajudar todos por Aqui
Espero ter ajudado!
-
xwarlleyx deu reputação a ITALOx em Skin System por comando !skin [8.6]Olá rapaziada.
Hoje tô trazendo sistema de skin por comando.
Já vi muita gente pedindo por aqui e nunca teve resultado.
Então vamos lá!
Lib:
Crie um arquivo lua com o nome
210-skins
Actions.xml
<action itemid="11225" event="script" value="skin.lua"/>
Actions/scripts
Crie um arquivo com o nome skin.lua e coloque isso aqui dentro:
local skin = { [11204] = 1, -- [itemid] = skinid, } function onUse(cid, item, frompos, item2, topos) if not skin[item.itemid] then return false end if doPlayerAddSkin(cid, skin[item.itemid]) then doRemoveItem(item.uid,1) end return true end
Agora vá em talkactions.xml e coloque isso aqui lá:
<talkaction words="!skin" event="script" value="skin.lua"/>
Em talkactions/scripts crie um arquivo com o nome skin.lua
e coloquei isso aqui:
function onSay(cid, words, param, channel) if param ~= "remover" or param ~= "remove" then doPlayerUseSkin(cid, tonumber(param)) elseif param == "remover" or param == "remove" then doPlayerRemoveSkin(cid) end return true end
-
xwarlleyx deu reputação a Cat em Lista completa de Magic Effects e Shoot TypeMagicEffects CONST_ME_FIRST = 1, CONST_ME_DRAWBLOOD = CONST_ME_FIRST, CONST_ME_LOSEENERGY = 2, CONST_ME_POFF = 3, CONST_ME_BLOCKHIT = 4, CONST_ME_EXPLOSIONAREA = 5, CONST_ME_EXPLOSIONHIT = 6, CONST_ME_FIREAREA = 7, CONST_ME_YELLOW_RINGS = 8, CONST_ME_GREEN_RINGS = 9, CONST_ME_HITAREA = 10, CONST_ME_TELEPORT = 11, CONST_ME_ENERGYHIT = 12, CONST_ME_MAGIC_BLUE = 13, CONST_ME_MAGIC_RED = 14, CONST_ME_MAGIC_GREEN = 15, CONST_ME_HITBYFIRE = 16, CONST_ME_HITBYPOISON = 17, CONST_ME_MORTAREA = 18, CONST_ME_SOUND_GREEN = 19, CONST_ME_SOUND_RED = 20, CONST_ME_POISONAREA = 21, CONST_ME_SOUND_YELLOW = 22, CONST_ME_SOUND_PURPLE = 23, CONST_ME_SOUND_BLUE = 24, CONST_ME_SOUND_WHITE = 25, CONST_ME_BUBBLES = 26, CONST_ME_CRAPS = 27, CONST_ME_GIFT_WRAPS = 28, CONST_ME_FIREWORK_YELLOW = 29, CONST_ME_FIREWORK_RED = 30, CONST_ME_FIREWORK_BLUE = 31, CONST_ME_STUN = 32, CONST_ME_SLEEP = 33, CONST_ME_WATERCREATURE = 34, CONST_ME_GROUNDSHAKER = 35, CONST_ME_HEARTS = 36, CONST_ME_FIREATTACK = 37, CONST_ME_ENERGYAREA = 38, CONST_ME_SMALLCLOUDS = 39, CONST_ME_HOLYDAMAGE = 40, CONST_ME_BIGCLOUDS = 41, CONST_ME_ICEAREA = 42, CONST_ME_ICETORNADO = 43, CONST_ME_ICEATTACK = 44, CONST_ME_STONES = 45, CONST_ME_SMALLPLANTS = 46, CONST_ME_CARNIPHILA = 47, CONST_ME_PURPLEENERGY = 48, CONST_ME_YELLOWENERGY = 49, CONST_ME_HOLYAREA = 50, CONST_ME_BIGPLANTS = 51, CONST_ME_CAKE = 52, CONST_ME_GIANTICE = 53, CONST_ME_WATERSPLASH = 54, CONST_ME_PLANTATTACK = 55, CONST_ME_TUTORIALARROW = 56, CONST_ME_TUTORIALSQUARE = 57, CONST_ME_MIRRORHORIZONTAL = 58, CONST_ME_MIRRORVERTICAL = 59, CONST_ME_SKULLHORIZONTAL = 60, CONST_ME_SKULLVERTICAL = 61, CONST_ME_ASSASSIN = 62, CONST_ME_STEPSHORIZONTAL = 63, CONST_ME_BLOODYSTEPS = 64, CONST_ME_STEPSVERTICAL = 65, CONST_ME_YALAHARIGHOST = 66, CONST_ME_BATS = 67, CONST_ME_SMOKE = 68, CONST_ME_INSECTS = 69, CONST_ME_DRAGONHEAD = 70, CONST_ME_ORCSHAMAN = 71, CONST_ME_ORCSHAMAN_FIRE = 72, CONST_ME_THUNDER = 73, CONST_ME_FERUMBRAS = 74, CONST_ME_CONFETTI_HORIZONTAL = 75, CONST_ME_CONFETTI_VERTICAL = 76, // 77-157 are empty CONST_ME_BLACKSMOKE = 158, CONST_ME_LAST = CONST_ME_BLACKSMOKE, // 159-166 are empty CONST_ME_REDSMOKE = 167, CONST_ME_YELLOWSMOKE = 168, CONST_ME_GREENSMOKE = 169, CONST_ME_PURPLESMOKE = 170, CONST_ME_EARLY_THUNDER = 171, CONST_ME_RAGIAZ_BONECAPSULE = 172, CONST_ME_CRITICAL_DAMAGE = 173, // 174 is empty CONST_ME_PLUNGING_FISH = 175, ShootTypes CONST_ANI_NONE = 0, CONST_ANI_FIRST = 1, CONST_ANI_SPEAR = CONST_ANI_FIRST, CONST_ANI_BOLT = 2, CONST_ANI_ARROW = 3, CONST_ANI_FIRE = 4, CONST_ANI_ENERGY = 5, CONST_ANI_POISONARROW = 6, CONST_ANI_BURSTARROW = 7, CONST_ANI_THROWINGSTAR = 8, CONST_ANI_THROWINGKNIFE = 9, CONST_ANI_SMALLSTONE = 10, CONST_ANI_DEATH = 11, CONST_ANI_LARGEROCK = 12, CONST_ANI_SNOWBALL = 13, CONST_ANI_POWERBOLT = 14, CONST_ANI_POISON = 15, CONST_ANI_INFERNALBOLT = 16, CONST_ANI_HUNTINGSPEAR = 17, CONST_ANI_ENCHANTEDSPEAR = 18, CONST_ANI_REDSTAR = 19, CONST_ANI_GREENSTAR = 20, CONST_ANI_ROYALSPEAR = 21, CONST_ANI_SNIPERARROW = 22, CONST_ANI_ONYXARROW = 23, CONST_ANI_PIERCINGBOLT = 24, CONST_ANI_WHIRLWINDSWORD = 25, CONST_ANI_WHIRLWINDAXE = 26, CONST_ANI_WHIRLWINDCLUB = 27, CONST_ANI_ETHEREALSPEAR = 28, CONST_ANI_ICE = 29, CONST_ANI_EARTH = 30, CONST_ANI_HOLY = 31, CONST_ANI_SUDDENDEATH = 32, CONST_ANI_FLASHARROW = 33, CONST_ANI_FLAMMINGARROW = 34, CONST_ANI_SHIVERARROW = 35, CONST_ANI_ENERGYBALL = 36, CONST_ANI_SMALLICE = 37, CONST_ANI_SMALLHOLY = 38, CONST_ANI_SMALLEARTH = 39, CONST_ANI_EARTHARROW = 40, CONST_ANI_EXPLOSION = 41, CONST_ANI_CAKE = 42, CONST_ANI_TARSALARROW = 44, CONST_ANI_VORTEXBOLT = 45, CONST_ANI_PRISMATICBOLT = 48, CONST_ANI_CRYSTALLINEARROW = 49, CONST_ANI_DRILLBOLT = 50, CONST_ANI_ENVENOMEDARROW = 51, CONST_ANI_GLOOTHSPEAR = 53, CONST_ANI_SIMPLEARROW = 54, fonte: https://github.com/otland/forgottenserver/blob/master/src/const.h
Lista com Gif
CONST_ME_DRAWBLOOD = 0
CONST_ME_LOSEENERGY = 1
CONST_ME_POFF = 2
CONST_ME_BLOCKHIT = 3
CONST_ME_EXPLOSIONAREA = 4
CONST_ME_EXPLOSIONHIT = 5
CONST_ME_FIREAREA = 6
CONST_ME_YELLOW_RINGS = 7
CONST_ME_GREEN_RINGS = 8
CONST_ME_HITAREA = 9
CONST_ME_TELEPORT = 10
CONST_ME_ENERGYHIT = 11
CONST_ME_MAGIC_BLUE = 12
CONST_ME_MAGIC_RED = 13
CONST_ME_MAGIC_GREEN = 14
CONST_ME_HITBYFIRE = 15
CONST_ME_HITBYPOISON = 16
CONST_ME_MORTAREA = 17
CONST_ME_SOUND_GREEN = 18
CONST_ME_SOUND_RED = 19
CONST_ME_POISONAREA = 20
CONST_ME_SOUND_YELLOW = 21
CONST_ME_SOUND_PURPLE = 22
CONST_ME_SOUND_BLUE = 23
CONST_ME_SOUND_WHITE = 24
CONST_ME_BUBBLES = 25
CONST_ME_CRAPS = 26
CONST_ME_GIFT_WRAPS = 27
CONST_ME_FIREWORK_YELLOW = 28
CONST_ME_FIREWORK_RED = 29
CONST_ME_FIREWORK_BLUE = 30
CONST_ME_STUN = 31
CONST_ME_SLEEP = 32
CONST_ME_WATERCREATURE = 33
CONST_ME_GROUNDSHAKER = 34
CONST_ME_HEARTS = 35
CONST_ME_FIREATTACK = 36
CONST_ME_ENERGYAREA = 37
CONST_ME_SMALLCLOUDS = 38
CONST_ME_HOLYDAMAGE = 39
CONST_ME_BIGCLOUDS = 40 (OBS: são as nuvens do exevo gran mas vis)
CONST_ME_ICEAREA = 41
CONST_ME_ICETORNADO = 42
CONST_ME_ICEATTACK = 43
CONST_ME_STONES = 44
CONST_ME_SMALLPLANTS = 45
CONST_ME_CARNIPHILA = 46
CONST_ME_PURPLEENERGY = 47
CONST_ME_YELLOWENERGY = 48
CONST_ME_HOLYAREA = 49
CONST_ME_BIGPLANTS = 50 (é quase igual, só que cresce mais, não consegui gif)
CONST_ME_CAKE = 51
CONST_ME_GIANTICE = 52
CONST_ME_WATERSPLASH = 53
CONST_ME_PLANTATTACK = 54
CONST_ME_TUTORIALARROW = 55
CONST_ME_TUTORIALSQUARE = 56
CONST_ME_MIRRORHORIZONTAL = 57
CONST_ME_MIRRORVERTICAL = 58
CONST_ME_SKULLHORIZONTAL = 59
CONST_ME_SKULLVERTICAL = 60
CONST_ME_ASSASSIN = 61
CONST_ME_STEPSHORIZONTAL = 62 (Ignorado)
CONST_ME_BLOODYSTEPS = 63 (Ignorado)
CONST_ME_STEPSVERTICAL = 64 (Ignorado)
CONST_ME_YALAHARIGHOST = 65
CONST_ME_BATS = 66
CONST_ME_SMOKE = 67
CONST_ME_INSECTS = 68