Djowz
Djowz's Style
- Joined
- Dec 29, 2011
- Messages
- 47
- Reaction score
- 1
Good people, I wonder if someone could rephrase my scirpt with the following things.
1° - I would like that when the time is over 30 minutes, the four demons summoned were removed.
2° - that when the player makes the quest appears msg "You Found a Bag"
3° - player and when someone is doing the quest after another msg appears that the 30 minutes it has not passed in any case he can only do the quest after 30 minutes.
and here is the script.
Hugs Djowzs
1° - I would like that when the time is over 30 minutes, the four demons summoned were removed.
2° - that when the player makes the quest appears msg "You Found a Bag"
3° - player and when someone is doing the quest after another msg appears that the 30 minutes it has not passed in any case he can only do the quest after 30 minutes.
and here is the script.
Code:
local cfg = { playerStorage = 60666,
globalStorage = 60664,
minutes = 30,
positions = {
{x=33060, y=31623, z=15},
{x=33066, y=31623, z=15},
{x=33060, y=31627, z=15},
{x=33066, y=31627, z=15}
},
bagItems = {
{2165}, {2151, 2}, {2230}, {2229}, {1951}, {2091, 1, 6010}
}
}
function onUse(cid, item, frompos, item2, topos)
if getGlobalStorageValue(cfg.globalStorage) < 1 and getPlayerStorageValue(cid, cfg.playerStorage) < 1 then
for _, t in pairs(cfg.positions) do
doSummonCreature("Demon", t)
end
local bag = doPlayerAddItem(cid, 1987, 1)
for _, t in pairs(cfg.bagItems) do
local newItem = doAddContainerItem(bag, t[1], t[2] or 1)
if t[3] then
doItemSetAttribute(newItem, "aid", t[3])
end
end
setPlayerStorageValue(cid, cfg.playerStorage, 1)
setGlobalStorageValue(cfg.globalStorage, 1)
addEvent(setGlobalStorageValue, cfg.minutes * 60000, 60664, -1)
end
end
Hugs Djowzs