ia ser bem interessante, se aparecer alguem que possa nos passar também me interesso.
- Fórum
- xTibia - Notícias e Suporte
- Soluções
- Archived
- Pedido De Script Para Monstro
3
886
7 meses depois...
info
Grupo: Visconde
Registrado: 17/01/11
Posts: 343
Reputação: +46
Char no Tibia: Zodriac

03 de fevereiro de 2011 às 11:41
06 de fevereiro de 2011 às 13:36
crie um arquivo fireball.lua
function onSay(cid, words, param)
local configs = {
level = 10 -- level para usar
efeitodistance = 3 -- efeito de distancia
typedamage = COMBAT_FIREDAMAGE -- tipo de dano
min = 10 -- atk minino
max = 20 -- atk maximo
exhausted = 1 -- exaustão em segundos
}
local summonuse = {"Dragon", "Dragon Lord", "Demon"} -- summons ki pode usar
if #getCreatureSummons(cid) == 0 then
return doPlayerSendCancel(cid, "You do not have any summon.")
end
if not isInArray(summonuse, getCreatureName(getCreatureSummons(cid)[1])) then
return doPlayerSendCancel(cid, "This summon not use fire ball.")
end
if getCreatureTarget(cid) == 0 then
return doPlayerSendTextMessage(cid, 19, "This Attack need any target.")
end
if getPlayerLevel(cid) < configs.level then
return doPlayerSendTextMessage(cid, 19, "You need level "..configs.level.." to use fire ball.")
end
function getTime(s)
local n = math.floor(s / 60)
s = s - (60 * n)
return n, s
end
if os.time()-getPlayerStorageValue(cid, 23231) <= configs.exhausted then
minutes,seconds = getTime(configs.exhausted-(os.time()-getPlayerStorageValue(cid, 23231)))
return doPlayerSendCancel(cid, "Summon exhausted")
end
doSendDistanceShoot(getCreaturePosition(getCreatureSummons(cid)[1]), getCreaturePosition(getCreatureTarget(cid)), configs.efeitodistance)
doAreaCombatHealth(getCreatureSummons(cid)[1], configs.typedamage, getThingPos(getCreatureTarget(cid)), 0, -configs.min, -configs.max, 3)
doPlayerSay(cid, getCreatureName(getCreatureSummons(cid)[1])..", Fireball", 1)
setPlayerStorageValue(cid, 23231, os.time()+configs.exhausted)
return true
end
tag :
<talkaction words="!fireball" hide="yes" event="script" value="fireball.lua"/>
Editado Fevereiro 6 por xotservx

info
Grupo: Campones
Registrado: 12/12/06
Posts: 3
Reputação: 0
Gostaria de um script em que eu falasse alguma palavra e o monstro sumonado usasse a magia...
Exemplo:
eu falo !fireball
e o monstro que tiver sumonado usa uma respectiva spell...
Estou no aguardo...
Obrigado