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