[Movement] Parchment
Note - I've not tested, so I don't know if its working or not, but I think its working fine.
The script:
Movements.xml
NOTE: I'm not sure if the movements.xml thing is right. If someone know the right way to write that, or anything wrong with the script write a reply in this thread.
Note - I've not tested, so I don't know if its working or not, but I think its working fine.
The script:
Code:
function onAddItem(moveitem, tileitem, pos)
-- By Rafacin
Monsters = {"Monster","Monster","Monster","Monster"}
Position = {{x=111, y=222, z=3}, {x=111, y=222, z=3}, {x=111, y=222, z=3}, {x=111, y=222, z=3}}
if moveitem.actionid == 8768 then
Summon = 1
Location = 1
while Summon < table.getn(Monsters) and Location < table.getn(Position) do
doSummonCreature(Monsters[Summon], Position[Location])
Summon = Summon+1
Location = Location+1
end
doSetItemActionId(moveitem.uid, 8769)
end
return 1
end
function onRemoveItem(moveitem, tileitem, pos)
Monsters = {"Monster","Monster","Monster","Monster"}
Position = {{x=111, y=222, z=3}, {x=111, y=222, z=3}, {x=111, y=222, z=3}, {x=111, y=222, z=3}}
if moveitem.actionid == 8768 then
Summon = 1
Location = 1
while Summon < table.getn(Monsters) and Location < table.getn(Position) do
doSummonCreature(Monsters[Summon], Position[Location])
Summon = Summon+1
Location = Location+1
end
doSetItemActionId(moveitem.uid, 8769)
end
return 1
end
Movements.xml
Code:
<movevent event="AddItem" actionid="8768" script="parchment.lua" />
<movevent event="RemoveItem" actionid="8768" script="parchment.lua" />
NOTE: I'm not sure if the movements.xml thing is right. If someone know the right way to write that, or anything wrong with the script write a reply in this thread.
Last edited: