Create monster with exhtaush
Data/Actions/Scripts.NAME.LUA
Actions.xml added:
Data/Actions/Scripts.NAME.LUA
Lua:
local positions = {
{"Demon", {x = 1000, y = 1000, z = 7}},
{"Demon", {x = 2000, y = 2000, z = 7}},
{"Demon", {x = 3000, y = 3000, z = 7}},
{"Demon", {x = 4000, y = 4000, z = 7}},
{"Demon", {x = 5000, y = 5000, z = 7}}
}
local exh = 30
local storage = 1905
function onUse(cid, item, frompos, item2, topos)
for i = 1, #positions do
doCreateMonster(positions[i][1], positions[i][2])
end
if(getPlayerStorageValue(cid, storage) <= os.time()) then
setPlayerStorageValue(cid, storage, os.time()+ exh)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Fight awaits you Demons!")
else
doPlayerSendCancel(cid, "You have to wait ".. exh .." in order to use this again!")
end
return true
end
Actions.xml added:
Lua:
<action itemid="XXXX" event="script" value="NAME.lua"/>