• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Parchment

Rafacin

New Member
Joined
Jun 9, 2007
Messages
21
Reaction score
0
Location
Brazil
[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:
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:
Back
Top