Broldosk
New Member
- Joined
- Aug 23, 2019
- Messages
- 31
- Reaction score
- 1
Greetings guys, i need one help.
I recently added the moveitem function to my server, but I can't create the parchment quest with it.
TFS: 0.4
Tibia 8.6
this is my script
<action actionid="60999" script="parchmove.lua" />
and creaturescript. and
login.lua registerCreatureEvent(cid, "parchment")
if anyone can give me a light (=
I recently added the moveitem function to my server, but I can't create the parchment quest with it.
TFS: 0.4
Tibia 8.6
this is my script
<action actionid="60999" script="parchmove.lua" />
Lua:
local cfg = {
playerStorage = 60999,
globalStorage = 60999,
time = 60 * 60 * 24, -- in seconds
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}
}
}
function isCooldownReady()
return os.time() > getGlobalStorageValue(cfg.globalStorage)
end
function onUse(cid, item, frompos, item2, topos)
if not isCooldownReady() then
return true
end
for _, t in pairs(cfg.positions) do
doSummonCreature("Demon", t)
end
setPlayerStorageValue(cid, cfg.playerStorage, 1)
setGlobalStorageValue(cfg.globalStorage, os.time() + cfg.time)
end
and creaturescript. and
login.lua registerCreatureEvent(cid, "parchment")
Lua:
local config = {
str = 60999, --
tempo = 10, --
itemID = 1951, -- id item
tileAID = 1742, -- Actionid tile
monster = {"Demon"} -- monstr
}
function isCooldownReady()
return os.time() > getGlobalStorageValue(config.globalStorage)
end
function onMoveItem(cid, item, count, toContainer, fromContainer, fromPos, toPos)
if getTileItemById(config.pos_item, config.id_item).uid > 0 then
if not isCooldownReady() then
return true
end
for _, t in pairs(config.positions) do
doSummonCreature("Demon", t)
end
setPlayerStorageValue(cid, config.playerStorage, 1)
setGlobalStorageValue(config.globalStorage, os.time() + config.time)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ORANGE, "!")
end
return true
end
if anyone can give me a light (=
Last edited by a moderator: