quais foram os ajustes que vc fez?
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- [action] Blessed Wooden Stake E Obsidian Knife
XV
action
[action] Blessed Wooden Stake E Obsidian Knife
Por XvX, 24 de jun. de 2009 em Actions e Talkactions
script
5
2.1k
info
Grupo: Conde
Registrado: 07/05/08
Posts: 612
Reputação: +12
Char no Tibia: leviana luciferiana

27 de junho de 2009 às 13:23
29 de junho de 2009 às 16:45
quais foram os ajustes que vc fez?
Eu alterei a animação ao vc usar os itens, até hoje só vi no meu Ot o sistema idêntico ao global!
info
Grupo: Conde
Registrado: 07/05/08
Posts: 612
Reputação: +12
Char no Tibia: leviana luciferiana

29 de junho de 2009 às 19:49
se esse e o sistema igual ao global ja faz tempo que ta aqui no meu ot.
01 de julho de 2009 às 10:42
se esse e o sistema igual ao global ja faz tempo que ta aqui no meu ot.
Repare no efeito da animação ao vc tirar as leathers e as dust e quando vc da use! Depois vou adicionar fotos, têm gente que só acretida vendo. Vou botar o antes e o depois!



info
Grupo: Artesão
Registrado: 13/12/08
Posts: 122
Reputação: 0
Char no Tibia: Soul Vegas
Essas actions são da base de dados do Projeto Forgoten Server, porém até hoje não consertaram essa action, então adaptei para ficarem com os efeitos de animação igual ao do global!
1º Passo:
Crie um arquivo em data\actions\scripts\tools com nome: blessed_wooden_stake.lua
Depois cole isso dentro do arquivo:
local DUSTS = { -- Demons [2956] = {25000, 5905}, -- Vampires [2916] = {25000, 5906} } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerLevel(cid) <= 1) then doPlayerSendCancel(cid, "You have to be at least Level 2 to use this tool.") return TRUE end local dust = DUSTS[itemEx.itemid] if(dust == nil) then doPlayerSendCancel(cid, "Sorry, not possible.") return TRUE end local random = math.random(1, 100000) if(random <= dust[1]) then doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_MAGIC_RED[/color]) doPlayerAddItem(cid, dust[2], 1) elseif(dust[3] and random >= dust[3]) then doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_MAGIC_RED[/color]) doPlayerAddItem(cid, dust[4], 1) else doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_BLOCKHIT[/color]) end doTransformItem(itemEx.uid, itemEx.itemid + 1) return TRUE end2º Passo:
Crie um arquivo em data\actions\scripts\tools com nome: obsidian_knife.lua
Depois cole isso dentro do arquivo:
local SKINS = { -- Minotaurs [2830] = {25000, 5878}, [2871] = {25000, 5878}, [2866] = {25000, 5878}, [2876] = {25000, 5878}, [3090] = {25000, 5878}, -- Lizards [4259] = {25000, 5876}, [4262] = {25000, 5876}, [4256] = {25000, 5876}, -- Dragons [3104] = {25000, 5877}, [2844] = {25000, 5877}, -- Dragon Lords [2881] = {25000, 5948}, -- Behemoths [2931] = {25000, 5930, 90000, 5893}, -- Bone Beasts [3031] = {25000, 5925} } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerLevel(cid) <= 1) then doPlayerSendCancel(cid, "You have to be at least Level 2 to use this tool.") return TRUE end local skin = SKINS[itemEx.itemid] if(skin == nil) then doPlayerSendCancel(cid, "Sorry, not possible.") return TRUE end local random = math.random(1, 100000) if(random <= skin[1]) then doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_MAGIC_GREEN[/color]) doPlayerAddItem(cid, skin[2], 1) elseif(skin[3] and random >= skin[3]) then doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_MAGIC_GREEN[/color]) doPlayerAddItem(cid, skin[4], 1) else doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_BLOCKHIT[/color]) end doTransformItem(itemEx.uid, itemEx.itemid + 1) return TRUE end3º Passo:
Abra o arquivo: \data\actions\actions.xml com seu bloco de notas e adicione isso:
Créditos 99% ao team do Forgotten pelo script e 1 % para mim que modifiquei os MagicEffect para funcionar igual ao global!
Segue Spoil do sistema antigo ( Em Vermelho as partes que modifiquei):
local SKINS = { -- Minotaurs [2830] = {25000, 5878}, [2871] = {25000, 5878}, [2866] = {25000, 5878}, [2876] = {25000, 5878}, [3090] = {25000, 5878}, -- Lizards [4259] = {25000, 5876}, [4262] = {25000, 5876}, [4256] = {25000, 5876}, -- Dragons [3104] = {25000, 5877}, [2844] = {25000, 5877}, -- Dragon Lords [2881] = {25000, 5948}, -- Behemoths [2931] = {25000, 5930, 90000, 5893}, -- Bone Beasts [3031] = {25000, 5925} } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerLevel(cid) <= 1) then doPlayerSendCancel(cid, "You have to be at least Level 2 to use this tool.") return TRUE end local skin = SKINS[itemEx.itemid] if(skin == nil) then doPlayerSendCancel(cid, "Sorry, not possible.") return TRUE end local random = math.random(1, 100000) if(random <= skin[1]) then doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_GROUNDSHAKER[/color]) doPlayerAddItem(cid, skin[2], 1) elseif(skin[3] and random >= skin[3]) then doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_GROUNDSHAKER[/color]) doPlayerAddItem(cid, skin[4], 1) else doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_POFF[/color]) end doTransformItem(itemEx.uid, itemEx.itemid + 1) return TRUE endBlessed Wooden Stake:
local DUSTS = { -- Demons [2956] = {25000, 5905}, -- Vampires [2916] = {25000, 5906} } function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerLevel(cid) <= 1) then doPlayerSendCancel(cid, "You have to be at least Level 2 to use this tool.") return TRUE end local dust = DUSTS[itemEx.itemid] if(dust == nil) then doPlayerSendCancel(cid, "Sorry, not possible.") return TRUE end local random = math.random(1, 100000) if(random <= dust[1]) then doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_GROUNDSHAKER[/color]) doPlayerAddItem(cid, dust[2], 1) elseif(dust[3] and random >= dust[3]) then doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_GROUNDSHAKER[/color]) doPlayerAddItem(cid, dust[4], 1) else doSendMagicEffect(toPosition, [color="#FF0000"]CONST_ME_POFF[/color]) end doTransformItem(itemEx.uid, itemEx.itemid + 1) return TRUE endEditado Junho 29 por XvX