Rufo
New Member
- Joined
- Jan 9, 2008
- Messages
- 251
- Reaction score
- 1
I made this a lot ago, it just can be used 1 time per reset, if your server doesnt save the global storage.
to make sure on TFS go to config.lua and search for:
if its false its ok
Just put the actionid that you want on x tile. After puting the item on it the monster appear on X position. And it cant appear until server reset
movements.xml
BY NARHUTO (u can this every time u configure it, not like mine every reset)
I have modified it a little bit, if doesnt work tell me cuz i havent tested it after the modifications.
to make sure on TFS go to config.lua and search for:
Code:
saveGlobalStorage = false
Just put the actionid that you want on x tile. After puting the item on it the monster appear on X position. And it cant appear until server reset
Lua:
function onAddItem(moveitem, tileitem, position, cid)
local monsterpos = {x=491, y=1168, z=7} -- position of the monster
local storage = 54697 -- The global storage used
local itemid = 2136 -- itemid you need to put on the tile.
local monster = "Demon" -- Monster
local globalstorage = getGlobalStorageValue(storage) -- No touch plx :)
if moveitem.itemid == itemid then
if globalstorage == -1 then
doRemoveItem(moveitem.uid, 1)
doSummonCreature(monster, monsterpos)
doSendMagicEffect(monsterpos,12)
setGlobalStorageValue(globalstorage, 1)
end
end
return TRUE
end
Code:
<movevent type="AddItem" tileitem="1" actionid="54697" event="script" value="scriptname.lua"/>
BY NARHUTO (u can this every time u configure it, not like mine every reset)
Lua:
local last, pid = 0, 0
local monsterpos = {x = 491, y = 1168, z = 7}
local itemid = 2136
local monster = "Demon"
local delay = 60 * 60 -- 1 hour
function onAddItem(moveitem, tileitem, position, cid)
if ((os.time() - last) < delay) or isCreature(pid) then
return true
end
if (moveitem.itemid == itemid) then
doRemoveItem(moveitem.uid)
local summon = doSummonCreature(monster, monsterpos)
doSendMagicEffect(monsterpos, 12)
last, pid = os.time(), summon
end
return true
end
I have modified it a little bit, if doesnt work tell me cuz i havent tested it after the modifications.
Last edited: