Hi guys!
I've got this script:
Can you add there a function which change player HP to 15%? Also, is doSummonCreature works with NPC too?
I've got this script:
LUA:
-- idea by frankfarmer/fragdonut and script by cykotitan
-- step on tile and summon monster
local t = {
storage = 32000, --storageid
interval = 60, --how many seconds until next
monster = {"Demon", {x=100, y=100, z=7}}, -- monster and coords
msg = "It's too quiet here..." -- message players get
}
function onStepIn(cid, item, position, fromPosition)
if os.difftime(os.time(), getGlobalStorageValue(t.storage)) >= t.interval then
doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
doSummonCreature(t.monster[1], t.monster[2])
setGlobalStorageValue(t.storage, os.time())
end
end
Can you add there a function which change player HP to 15%? Also, is doSummonCreature works with NPC too?