Pitufo™
InfinityOT.com
Tested and working on TFS 0.3 Beta 2
What this script does?
Well this script will send effects in an area of 3x3, if the player is in that area you will get 20 of Health, every X time, depending on how much interval u put in the creaturescripts.xml.
Script:
Creaturescripts.xml:
My interval is 2 seconds, so i will get 20health every 2 seconds if im in the area
Notice that you can change the area with just adding new positions!
Haifurer/Pitufo <-Same person
Enjoy it, any bug report it here!
Rep?
What this script does?
Well this script will send effects in an area of 3x3, if the player is in that area you will get 20 of Health, every X time, depending on how much interval u put in the creaturescripts.xml.
Script:
PHP:
--Script by Pitufo!
local pos =
{
{{x = 98, y = 132, z = 7}, {x = 98, y = 132, z = 7, stackpos = 253}},
{{x = 98, y = 133, z = 7}, {x = 98, y = 133, z = 7, stackpos = 253}},
{{x = 98, y = 134, z = 7}, {x = 98, y = 134, z = 7, stackpos = 253}},
{{x = 99, y = 132, z = 7}, {x = 99, y = 132, z = 7, stackpos = 253}},
{{x = 99, y = 133, z = 7}, {x = 99, y = 133, z = 7, stackpos = 253}},
{{x = 99, y = 134, z = 7}, {x = 99, y = 134, z = 7, stackpos = 253}},
{{x = 100, y = 132, z = 7}, {x = 100, y = 132, z = 7, stackpos = 253}},
{{x = 100, y = 133, z = 7}, {x = 100, y = 133, z = 7, stackpos = 253}},
{{x = 100, y = 134, z = 7}, {x = 100, y = 134, z = 7, stackpos = 253}}
}
function onThink(cid, interval, lastExecution)
for _, positions in pairs(pos) do
doSendMagicEffect(positions[1], 12)
if getThingFromPos(positions[2]).itemid > 0 then
for _, name in pairs(getOnlinePlayers()) do
local player = getPlayerByName(name)
doCreatureAddHealth(player, 20)
doSendAnimatedText(positions[1], "+20", 18)
end
end
end
return TRUE
end
Creaturescripts.xml:
PHP:
<globalevent name="areahealth" interval="2" script="areahealth.lua"/>
My interval is 2 seconds, so i will get 20health every 2 seconds if im in the area
Notice that you can change the area with just adding new positions!
Haifurer/Pitufo <-Same person
Enjoy it, any bug report it here!
Rep?
Last edited: