• 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 quest

Tsson

New Member
Joined
Nov 4, 2007
Messages
76
Reaction score
0
Hello, i would love if someone could edit this parchment room quest script for me =)

it should be great if a player only can use it once or every 15 minutes etc
the problem now is that you can spam demons

im using tfs 0.3.5 Thanks

--parchment by peonso (edited by Tenaria) donation House by Tenaria

function onUse(cid, item, frompos, item2, topos)
playerpos = getPlayerPosition(cid)
demon1pos = {x=XXXX, y=XXXX, z=X} -- change it too the corect position of the monster
demon2pos = {x=XXXX, y=XXXX, z=X} -- change it too the corect position of the monster
demon3pos = {x=XXXX, y=XXXX, z=X} -- change it too the corect position of the monster
demon4pos = {x=XXXX, y=XXXX, z=X} -- change it too the corect position of the monster
paperpos = {x=XXXX, y=XXXX, z=X, stackpos=2} -- the position the parchment need to are to make the quest change it
checkpaper = getThingfromPos(paperpos)
if item.uid == 8970 then
queststatus = getPlayerStorageValue(cid,6030) --leave it as it is
if queststatus == -1 or queststatus == 0 then
doPlayerSendTextMessage(cid,22,"You have found a backpack.")
doSummonCreature("Demon", demon1pos)
doSummonCreature("Demon", demon2pos)
doSummonCreature("Demon", demon3pos)
doSummonCreature("Demon", demon4pos)
doTeleportThing(cid,playerpos)
doSendMagicEffect(topos,12)
end
else
if item.uid == 8970 then
queststatus = getPlayerStorageValue(cid,6030)
if queststatus == -1 or queststatus == 0 then
if checkpaper.itemid == 1953 and checkpaper.uid == 8870 then

doPlayerSendTextMessage(cid,22,"You broke the secret code, now fight or run away! ")
doSummonCreature("Demon", demon1pos)
doSummonCreature("Demon", demon2pos)
doSummonCreature("Demon", demon3pos)
doSummonCreature("Demon", demon4pos)
doTeleportThing(cid,playerpos)
doSendMagicEffect(topos,12)
container = doPlayerAddItem(cid, 2091, 1)
doContainerAddItem(container, 2091, 1) --golden key
doContainerAddItem(container, 2151, 3) --talon
doContainerAddItem(container, 2168, 1) --life ring
key_uid = doContainerAddItem(container, 2091, 1)
doSetItemActionId(2091,155)
setPlayerStorageValue(cid,6030,1)
else
doPlayerSendTextMessage(cid,22,"Parchment has to be ontop of the coffin.")
end
else
doSetItemText(uid,"You deafeated us once, but now the Demons army come maybe with morgaroth run run...")
end

return 0
end
end
return 1
end

Rep ++ for help:$
 
Last edited:
Lua:
local 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 },
	{ x = 33063, y = 31624, z = 15 }
}
local done = FALSE

function onRemoveItem(moveitem, tileitem, pos)
	if comparePositions(pos, positions[5]) == TRUE then
		if done ~= TRUE then
			for i = 1, 4 do
				doCreateMonster("Demon", positions[i])
			end
			
			done = TRUE
		end
	end
	return TRUE
end

Code:
	<!-- Parchment Room -->
	<movevent event="RemoveItem" itemid="1969" script="parchment room.lua"/>
 
Back
Top