Versão do servidor? TFS?
- Fórum
- OTServ
- Pedidos
- Resolvidos
- [Resolvido] Item explode ao clicar nele
info
Grupo: Conde
Registrado: 21/04/16
Posts: 831
Reputação: +271
Gênero: Masculino

local SOUNDS = {"Fchhhhhh!", "Zchhhhhh!", "Grooaaaaar*cough*", "Aaa... CHOO!", "You... will.... burn!!"}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local random = math.random(1, table.maxn(SOUNDS))
if(fromPosition.x ~= CONTAINER_POSITION) then
doCreatureSay(cid, SOUNDS[random], TALKTYPE_MONSTER, false, 0, fromPosition)
else
doCreatureSay(cid, SOUNDS[random], TALKTYPE_MONSTER)
end
if(random == 5) then -- "You... will.... burn!!"
doTargetCombatHealth(0, cid, COMBAT_PHYSICALDAMAGE, -5000, -5000, CONST_ME_EXPLOSIONHIT)
end
return true
end
info
Grupo: Visconde
Registrado: 09/05/18
Posts: 267
Reputação: +9
Gênero: Feminino
Char no Tibia: Merascylla

16 horas atrás, lazarocp disse:Versão do servidor? TFS?
1.0
13 horas atrás, Marshmello disse:local SOUNDS = {"Fchhhhhh!", "Zchhhhhh!", "Grooaaaaar*cough*", "Aaa... CHOO!", "You... will.... burn!!"}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local random = math.random(1, table.maxn(SOUNDS))
if(fromPosition.x ~= CONTAINER_POSITION) then
doCreatureSay(cid, SOUNDS[random], TALKTYPE_MONSTER, false, 0, fromPosition)
else
doCreatureSay(cid, SOUNDS[random], TALKTYPE_MONSTER)
endif(random == 5) then -- "You... will.... burn!!"
doTargetCombatHealth(0, cid, COMBAT_PHYSICALDAMAGE, -5000, -5000, CONST_ME_EXPLOSIONHIT)
endreturn true
end
o Item some?
info
Grupo: Conde
Registrado: 21/04/16
Posts: 831
Reputação: +271
Gênero: Masculino

21 minutos atrás, R e d disse:1.0
o Item some?
Não, mais você quer que suma?
info
Grupo: Visconde
Registrado: 09/05/18
Posts: 267
Reputação: +9
Gênero: Feminino
Char no Tibia: Merascylla

5 horas atrás, Marshmello disse:Não, mais você quer que suma?
Sim ;-;
info
Grupo: Conde
Registrado: 21/04/16
Posts: 831
Reputação: +271
Gênero: Masculino

@R e d Testa
local SOUNDS = {"Fchhhhhh!", "Zchhhhhh!", "Grooaaaaar*cough*", "Aaa... CHOO!", "You... will.... burn!!"}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local random = math.random(1, table.maxn(SOUNDS))
doCreatureSay(cid, SOUNDS[random], TALKTYPE_MONSTER, false, 0, fromPosition)
doTargetCombatHealth(0, cid, COMBAT_PHYSICALDAMAGE, -5000, -5000, CONST_ME_EXPLOSIONHIT)
doRemoveItem(item.uid, 1)
return true
end
info
Grupo: Conde
Registrado: 21/04/16
Posts: 831
Reputação: +271
Gênero: Masculino





info
Grupo: Visconde
Registrado: 09/05/18
Posts: 267
Reputação: +9
Gênero: Feminino
Char no Tibia: Merascylla
Preciso de um script de actions, que ao clicar em um determinado item ele exploda ( e cause um efeito da explosao) com um pouco de dano.