darkmu
Well-Known Member
Warning:
NO PERMISSION FOR POSTING THIS SCRIPT IN ANOTHER FORUMS
FOR PERMISSION/HELP: MSN: [email protected]
Pretext:
Hello, this is my first topic in OtLand (this account was inative), and I decided to bring you a script from my own.
I'll not explain the script too much, there's a video which explain better what's the script que explica melhor o que o script faz.
Explaining:
The script is basically an attack that has a route controlled by yourself, using ctrl + arrows, to direct the attack.
• Limited control time
• No protection-zone effect
• Damages are: player's level (min) / player's level x 3 (max)
• Spend mana: player's level x 6
Script:
[data/actions/scripts/cattack.lua]
"velocidade = 150": speed in milliseconds
"tempo = 3": time in seconds
Tag:
[data/actions/actions.xml]
Ps. xxx is equal to the utilized item id
Vídeo:
[video=youtube;919fCAxFYfY]http://www.youtube.com/watch?v=919fCAxFYfY&feature=channel_video_title[/video]
And yes, I'm brazilian
NO PERMISSION FOR POSTING THIS SCRIPT IN ANOTHER FORUMS
FOR PERMISSION/HELP: MSN: [email protected]
Pretext:
Hello, this is my first topic in OtLand (this account was inative), and I decided to bring you a script from my own.
I'll not explain the script too much, there's a video which explain better what's the script que explica melhor o que o script faz.
Explaining:
The script is basically an attack that has a route controlled by yourself, using ctrl + arrows, to direct the attack.
• Limited control time
• No protection-zone effect
• Damages are: player's level (min) / player's level x 3 (max)
• Spend mana: player's level x 6
Script:
[data/actions/scripts/cattack.lua]
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
minMana = getPlayerLevel(cid) * 6
onoff = 4956
quantx = 0
quanty = 0
function setAxis()
o = getPlayerPosition(cid)
xe = o.x
ye = o.y
ze = o.z
tempo = 3
velocidade = 150
end
function doEffect()
pos = {x=xe+quantx,y=ye+quanty,z=ze}
if getPlayerMana(cid) < minMana then
setPlayerStorageValue(cid,work,0)
setPlayerStorageValue(cid,onoff,0)
elseif getTilePzInfo(pos) == FALSE then
local ef = 6
of = 2
doAreaCombatHealth(cid, COMBAT_FIREDAMAGE, pos, 0, -getPlayerLevel(cid), -getPlayerLevel(cid) * 3, ef)
-- doPlayerSendCancel(cid,"x = "..xe+quantx..", y = "..ye+quanty..", z = "..ze.."")
else
doSendMagicEffect(pos,of)
-- doPlayerSendCancel(cid,"x = "..xe+quantx..", y = "..ye+quanty..", z = "..ze.."")
end
addEvent(checkDir,velocidade)
end
function checkPer()
if getPlayerStorageValue(cid,work) == 1 then
checkTime()
end
end
function checkTime()
if tempo > 0 then
doEffect()
else
stop()
end
end
function stop()
posi = {x=xe+quantx,y=ye+quanty,z=ze}
doSendMagicEffect(posi,49)
doSendAnimatedText(posi,"...",TEXTCOLOR_YELLOW)
setPlayerStorageValue(cid,onoff,0)
doPlayerSetNoMove(cid,0)
addEvent(doPlayerSendCancel,800,cid,"Tempo restante: 0.")
end
function minusTime()
if getPlayerStorageValue(cid,onoff) == 0 then
elseif tempo > 0 then
doPlayerSendCancel(cid,"Tempo restante: "..tempo..".")
tempo = tempo - 1
addEvent(minusTime,1000)
elseif tempo == 0 then
stop()
end
end
function checkDir()
po = getCreatureLookDirection(cid)
if po == NORTH then
quanty = quanty - 1
elseif po == SOUTH then
quanty = quanty + 1
elseif po == WEST then
quantx = quantx - 1
elseif po == EAST then
quantx = quantx + 1
end
checkPer()
end
if getTilePzInfo(getPlayerPosition(cid)) == TRUE then
doSendAnimatedText(getPlayerPosition(cid),"PZ!",TEXTCOLOR_YELLOW)
setPlayerStorageValue(cid,work,0)
setPlayerStorageValue(cid,onoff,0)
elseif getPlayerMana(cid) < minMana then
doSendAnimatedText(getPlayerPosition(cid),"MANA",TEXTCOLOR_LIGHTBLUE)
doPlayerSendCancel(cid,"Você precisa de "..minMana.." de mana para isso.")
setPlayerStorageValue(cid,work,0)
setPlayerStorageValue(cid,onoff,0)
elseif getPlayerStorageValue(cid,onoff) == 0 then
setPlayerStorageValue(cid,work,1)
setPlayerStorageValue(cid,onoff,1)
doPlayerAddMana(cid,-minMana)
doPlayerSetNoMove(cid,1)
setAxis()
minusTime()
checkDir()
else
doPlayerSendCancel(cid,"Contagem cancelada.")
setPlayerStorageValue(cid,work,0)
setPlayerStorageValue(cid,onoff,0)
doPlayerSetNoMove(cid,0)
end
return TRUE
end
"velocidade = 150": speed in milliseconds
"tempo = 3": time in seconds
Tag:
[data/actions/actions.xml]
Code:
<action itemid="xxx" script="cattack.lua"/>
Vídeo:
[video=youtube;919fCAxFYfY]http://www.youtube.com/watch?v=919fCAxFYfY&feature=channel_video_title[/video]
And yes, I'm brazilian
Last edited: