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

[Action] Parchment Room Quest Script (TFS 0.3b3 CryingDamson)

Pentagratta

ancientwars.servegame.com
Joined
Mar 15, 2009
Messages
76
Reaction score
0
Location
São Paulo - Brazil
HAS BEEN RESOLVED!!!


Greetings,

I come here to ask if someone have a script like that Parchment Room Quest: "When player clicks on X coffin 4 Demons are spawned in X coordinates and player gets a bag with X itens".
I will be glad if you have and could share it with me. I will rep++ ofc!
Thanks for attention :)!
-sorry for bad english-

Regards,
Pentagratta.
 
Last edited:
I found this one, maybe it is what you want I don't know.

Here is the script:
Lua:
--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

PHP:
<action uniqueid="8970" script="YOURSCRIPTNAME.lua" />

I have not tested it so I don't know if it will work for you but try :D
 
Lua:
local demonPosition =
{
	{x = 155, y = 372, z = 9},
 	{x = 157, y = 372, z = 9},
	{x = 156, y = 376, z = 9},
	{x = 158, y = 376, z = 9}
}

local items =
{
        2091,
	2151,
	2168
}

local storagevalue = 34345
local container = 0 -- do not change ! (:

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerStorageValue(cid, storagevalue) == -1 then
        doPlayerSendTextMessage(cid, 22, "You have found a backpack.")
	for i = 1, 4 do
        	doSummonCreature("Demon", demonPosition[i])
	end
	container = doPlayerAddItem(cid, 1988, 1)
	for i = 1, 3 do
		doAddContainerItem(container, items[i])
        end
	setPlayerStorageValue(cid, storagevalue, 1)	
    else
        doPlayerSendCancel(cid, "Already done")	
    end
    return TRUE
end

EDIT: added cancel msg.
 
Last edited:
@josejunior23
Thanks it works perfectly!
Well have how to put a Cancel Message if player try do again the quest but him already did?
Without wanting to be boring ^^


@arminfific
Thanks! :)
 
Last edited:
Back
Top