1
[Actions] Invocar monstruo con item el Sáb Feb 17, 2018 3:51 pm
Simon Marin

Miembro

Porfavor
Tfs 0.4 // server 8.60
Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...
function onUse(cid, item, frompos, item2, topos)
local charges = 3
local mob = "Demon"
local maxSummons = 1
if(getPlayerStorageValue(cid, item.itemid) < charges) then
if(getTilePzInfo(getCreaturePosition(cid)) == false) then
if(table.maxn(getCreatureSummons(cid)) < maxSummons) then
doSummonMonster(cid, mob)
setPlayerStorageValue(cid, item.itemid, getPlayerStorageValue(cid, item.itemid) + 1)
doPlayerSendTextMessage(cid, 19, "You successfully summoned a ".. mob .."!")
else
doPlayerSendCancel(cid, "You can only summon up to ".. maxSummons .." ".. mob .."s.")
return false
end
else
doPlayerSendCancel(cid, "You cannot summon in protecting zone.")
return false
end
else
doPlayerSendCancel(cid, "You have used all charges this lamp contains.")
return false
end
return true
end
function onUse(cid, item, frompos, item2, topos)
local mob = "Demon"
if(getTilePzInfo(getCreaturePosition(cid)) == false) then
doSummonMonster(cid, mob)
doPlayerSendTextMessage(cid, 19, "You successfully summoned a ".. mob .."!")
else
doPlayerSendCancel(cid, "You cannot summon in protecting zone.")
return false
end
return true
end
function onUse(cid, item, frompos, item2, topos)
local mob = "Demon"
local position = getCreaturePosition(cid)
local effect = CONST_ME_POFF
if(getTilePzInfo(getCreaturePosition(cid)) == false) then
doSummonCreature(mob, frompos)
doSendMagicEffect(frompos, effect)
doRemoveItem(item.uid)
doPlayerSendTextMessage(cid, 19, "You successfully summoned a ".. mob .."!")
else
doPlayerSendCancel(cid, "You cannot summon in protecting zone.")
return false
end
return true
end
tema solucionado |
Permisos de este foro:
No puedes responder a temas en este foro.
|
|