tenta ae
Vá em Data/spells/scripts copie qualquer arquivo .lua e renomeie para prision.lua apague tudo e cole o seguinte code.
local remove_time = 5
local item_id = 1050
function onCastSpell(cid, var)
local pos = getThingPosition(getCreatureTarget(cid))
posTile1 = {x=pos.x+1,y=pos.y+1,z=pos.z,stackpos=1}
posTile2 = {x=pos.x+1,y=pos.y,z=pos.z,stackpos=1}
posTile3 = {x=pos.x+1,y=pos.y-1,z=pos.z,stackpos=1}
posTile4 = {x=pos.x,y=pos.y-1,z=pos.z,stackpos=1}
posTile5 = {x=pos.x-1,y=pos.y-1,z=pos.z,stackpos=1}
posTile6 = {x=pos.x-1,y=pos.y,z=pos.z,stackpos=1}
posTile7 = {x=pos.x-1,y=pos.y+1,z=pos.z,stackpos=1}
posTile8 = {x=pos.x,y=pos.y+1,z=pos.z,stackpos=1}
posAll = {posTile1,posTile2,posTile3,posTile4,posTile5,posTile6,posTile7,posTile8}
for i=1, #posAll do
if isWalkable(posAll) then
doCreateItem(item_id, 1, posAll)
end
end
addEvent(removeItem, remove_time*1000, posAll)
return true
end
function isWalkable(pos, creature, pz, proj)
if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
local creature = getTopCreature(pos)
if creature.type > 0 then return false end
if getTilePzInfo(pos) and not pz then return false end
local n = not proj and 3 or 2
for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
return false
end
end
end
return true
end
function removeItem(posAll)
for i=1, #posAll do
for j=0, 255 do
pos_stack = {x=posAll.x,y=posAll.y,z=posAll.z,stackpos=j}
removeTile = getThingfromPos(pos_stack)
if removeTile.itemid == item_id then
doRemoveItem(removeTile.uid)
end
end
end
end
Adicione a seguinte tag em spells.xml
<instant name="Prision" words="prision" lvl="100" mana="100" aggressive="1" range="5" blockwalls="1" needtarget="1" exhaustion="1000" needlearn="0" event="script" value="prision.lua">
<vocation id="1"/>
<vocation id="2"/>
<vocation id="3"/>
<vocation id="4"/>
<vocation id="5"/>
<vocation id="6"/>
<vocation id="7"/>
<vocation id="8"/>
</instant>
Ve se da certo ai qualquer coisa avisa ae ^^.






info
Grupo: Campones
Registrado: 22/07/12
Posts: 22
Reputação: +2
Quero uma spell que faz uma barreira em volta do seu personagem e que suma em 5 segundos! REP+
Informações adicionais:
barreira feita com o item 1050.
OTserv TSF.
versao: 8.6
Editado Junho 6 por Flash001