up e.e
Efeito saindo do chao que tira life do player
By Drk Shadow, 21 de abr. de 2015 in Scripts
info
Group: Visconde
Joined: 07/01/12
Posts: 495
Reputation: +48
Gender: Masculino
Tibia Character: Nem Tenho

info
Group: Visconde
Joined: 26/01/13
Posts: 266
Reputation: +174

Momento algum você está chamando a função "DamageInRectangle"
info
Group: Visconde
Joined: 07/01/12
Posts: 495
Reputation: +48
Gender: Masculino
Tibia Character: Nem Tenho

Sim mais esse é um caso a parte, o problema msm é com o primeiro codigo (q inclusive foi você q fez .-.) q fica com esse problema ;/
info
Group: Visconde
Joined: 26/01/13
Posts: 266
Reputation: +174

AUHEAHUEHUAE
Preguiça wins
info
Group: Visconde
Joined: 26/08/12
Posts: 318
Reputation: +118
Gender: Masculino

isso ai é pra fazer tipo uma "cyber quest" ou alguma coisa do tipo?
info
Group: Visconde
Joined: 07/01/12
Posts: 495
Reputation: +48
Gender: Masculino
Tibia Character: Nem Tenho

Sim e.e
info
Group: Visconde
Joined: 26/08/12
Posts: 318
Reputation: +118
Gender: Masculino

Pera um pouquinho que to fazendo uma parada ake mas qd acabar tento ver isso pra vc ;p
info
Group: Visconde
Joined: 07/01/12
Posts: 495
Reputation: +48
Gender: Masculino
Tibia Character: Nem Tenho

Fmz vlw ;p
info
Group: Conde
Joined: 03/01/12
Posts: 884
Reputation: +233
Tibia Character: Segredo

veja se isso te ajudaria http://www.xtibia.com/forum/topic/233879-estatua-que-joga-raio-by-notle/
info
Group: Visconde
Joined: 07/01/12
Posts: 495
Reputation: +48
Gender: Masculino
Tibia Character: Nem Tenho

PQP CARA FINALMENTE!!
Mano vlw mesmo, você não sabe o quanto você me salvou cara mds, obrigado msm!
Obrigado de vdd *-* VLW \O



info
Group: Visconde
Joined: 07/01/12
Posts: 495
Reputation: +48
Gender: Masculino
Tibia Character: Nem Tenho
Então galera, eu estou com um script aqui, que basicamente seria um efeito saindo numa pos que tira life do player. Ta meio que uma gambiarra u.u
em globalevents/start.lua está assim:
local posesH = {
{x=229, y=1144, z=15},
{x=226, y=1186, z=15},
{x=226, y=1187, z=15},
{x=226, y=1189, z=15},
{x=226, y=1192, z=15},
{x=226, y=1193, z=15},
{x=263, y=1147, z=15},
{x=263, y=1148, z=15},
{x=279, y=1192, z=15},
{x=281, y=1187, z=15},
{x=323, y=1200, z=15},
{x=322, y=1190, z=15},
{x=322, y=1188, z=15},
{x=322, y=1167, z=15},
{x=322, y=1165, z=15},
{x=322, y=1163, z=15},
{x=322, y=1161, z=15},
{x=322, y=1130, z=15},
{x=322, y=1133, z=15},
{x=322, y=1136, z=15},
{x=322, y=1139, z=15},
{x=328, y=1107, z=15},
{x=328, y=1106, z=15},
{x=330, y=1102, z=15},
}
local posesV = {
{x=318, y=1121, z=15},
{x=314, y=1121, z=15},
{x=310, y=1121, z=15},
{x=300, y=1120, z=15},
{x=298, y=1121, z=15},
{x=296, y=1121, z=15},
{x=294, y=1121, z=15},
{x=261, y=1155, z=15},
{x=234, y=1138, z=15},
{x=298, y=1171, z=15},
{x=299, y=1171, z=15},
{x=303, y=1168, z=15},
{x=305, y=1168, z=15},
{x=306, y=1168, z=15},
{x=308, y=1168, z=15},
}
local function sendDmgPos()
for i,v in pairs(posesH) do
local pos = v
for x=1, 5 do
doSendMagicEffect(pos, 56)
doDamageInPos(pos, 14455, 57)
pos.x = pos.x + 1
end
end
for i,v in pairs(posesV) do
local pos = v
for x=1, 5 do
doSendMagicEffect(pos, 58)
doDamageInPos(pos, 14456, 59)
pos.y = pos.y + 1
end
end
addEvent(sendDmgPos, 5000)
end
sendDmgPos()
return true
end
function doDamageInPos(pos, damage, eff)
local cid = getTopCreature(pos).uid
if eff and eff ~= 0 and type(eff) == "number" then
local itemPos = getTileThingByPos(pos)
local can = true
if itemPos.uid ~= 0 then
can = (not hasProperty(itemPos.uid, CONST_PROP_BLOCKSOLID) and not hasProperty(itemPos.uid, CONST_PROP_BLOCKPROJECTILE))
end
if can then
doSendMagicEffect(pos, eff)
end
end
if cid and isCreature(cid) then
setPlayerStorageValue(cid, 117879, 1)
doCreatureAddHealth(cid, -damage)
end
return true
end
function DamageInRectangle(pos, h, v, dmg, eff)
local tempPos = pos
local poses = {tempPos}
for x=1, h do
tempPos.x = tempPos.x + 1
table.insert(poses, tempPos)
end
for y=1, v do
tempPos.y = tempPos.y + 1
table.insert(poses, tempPos)
end
for i,v in pairs(poses) do
print('['..(i)..'] = {x='..(v.x).. ', y='..(v.y)..', z='..(v.z)..'}')
doDamageInPos(v, dmg, eff)
end
end
Edited Abril 21 by Pokemonultimatetwo