So I made new quest on my OTS and I wanted to show that up
The Quest is Hidden, and you have to use your Brain To Make It.
First of all is the Mystic Man
Now make Ancientone.lua and paste that:
Make the Place With Lever As ME (UID OF Lever in this case is 9909)
So make new lua file in your actions/scripts and paste:
Remember to add uitem id 9909 to actions.xml!!edit player pos and item positions.
Now the gravestones:
First Gravestone:
Means Hearth Of Demon
Second gravestone:
Means Hat Of The Kings of the demons?
last Gravestone:
Means Demon Horn
Now The Spoil of the quest!:
Next One:
Aff I know you want the script!!
From Ates Thread!!
Edit Unique ID Of LEVER and the positions ;]
Also dont remember to add that to actions.xml
This Lever Opens the Wall
Here you have also trap levers so if you will touch them 3 demons will arrive, just edit the script I gave you before.
And:
Did I Forgot about something??
The Quest is Hidden, and you have to use your Brain To Make It.
First of all is the Mystic Man
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="A mystic man" script="data/npc/scripts/AncientOne.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100" />
<look type="153" head="38" body="114" legs="39" feet="39" addons="3"/>
<parameters>
<parameter key="message_greet" value="I have waited for you |PLAYERNAME|." />
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="quest" />
<parameter key="keyword_reply1" value="Say the secret word!!." />
</parameters>
</npc>
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
-- OTServ event handling functions end
-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
local travelNode = keywordHandler:addKeyword({'coffin'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Uahaha, so you know the secret word of the ancients buhuhuhuhaha... are you realy ready to hear this?'})
travelNode:addChildKeyword({'yes'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = false, text = 'The way is that to every single letter add +1... A is B, B is C.'})
travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'I will be waiting for you.'})
-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())
Make the Place With Lever As ME (UID OF Lever in this case is 9909)
So make new lua file in your actions/scripts and paste:
Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 9909 then
playerpos = {x=32337, y=32195, z=11, stackpos=253}
player = getThingfromPos(playerpos)
if player.itemid == 1 then
item1pos = {x=32336, y=32195, z=11, stackpos=2}
item1 = getThingfromPos(item1pos)
item2pos = {x=32337, y=32196, z=11, stackpos=2}
iten2 = getThingfromPos(item2pos)
item3pos = {x=32338, y=32195, z=11, stackpos=2}
item3 = getThingfromPos(item3pos)
if item1.itemid == 5943 and iten2.itemid == 5903 and item3.itemid == 5954 then
doRemoveItem(item1.uid,1)
doRemoveItem(iten2.uid,1)
doRemoveItem(item3.uid,1)
telepos = {x=32329, y=32202, z=11}
doTeleportThing(player.uid,telepos)
doSendMagicEffect(telepos,10)
doSendMagicEffect(playerpos,2)
lever = {[1945]=1946,[1946]=1945}
doTransformItem(item.uid,lever[item.itemid])
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
else
return 0
end
return 1
end
Remember to add uitem id 9909 to actions.xml!!edit player pos and item positions.
Now the gravestones:
First Gravestone:
Code:
You read: FDWPSG NE CDLNM.
ItemID: [1409].
Position: [X: 32335] [Y: 32197] [Z: 11].
Second gravestone:
Code:
You read: GZS NE SGD JHMF NE SGD CDLNL.
ItemID: [1409].
Position: [X: 32337] [Y: 32198] [Z: 11].
Means Hat Of The Kings of the demons?
last Gravestone:
Code:
You read: CDLNM GNPM.
ItemID: [1409].
Position: [X: 32339] [Y: 32197] [Z: 11].
Now The Spoil of the quest!:
Next One:
Aff I know you want the script!!
From Ates Thread!!
Code:
local monsters = {
{"Demon", {x=32325, y=32202, z=11}},
{"Demon", {x=32326, y=32202, z=11}},
{"Demon", {x=32327, y=32202, z=11}}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 and getPlayerStorageValue(cid, 9988) ~= TRUE then -- Checks the itemID of the lever and if the players storagevalue is correct.
for _, v in ipairs(monsters) do -- Table, so it doesn't summon only 1 demon.
doSummonCreature(unpack(v)) -- Summons the demons.
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You opened the Hell.") -- Gives text message.
setPlayerStorageValue(cid, 9988, TRUE) -- Sets the storagevalue of the player to 1.
doTransformItem(item.uid, item.itemid + 1) -- Transforms the lever to ID 1946.
elseif item.itemid == 1946 then -- Checks the itemID of the lever.
doTransformItem(item.uid, item.itemid - 1) -- Transforms the lever back to ID 1945.
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot open it more!.") -- Gives text message.
end -- Ends the if.
end -- Ends the function.
Also dont remember to add that to actions.xml
This Lever Opens the Wall
Code:
function onUse(cid, item, frompos, item2, topos)
gatepos = {x=32304, y=32197, z=11, stackpos=1}
getgate = getThingfromPos(gatepos)
if item.uid == 9999 and item.itemid == 1945 and getgate.itemid == 1025 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 9999 and item.itemid == 1946 and getgate.itemid == 0 then
doCreateItem(1025,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry not possible.")
end
return 1
end
Here you have also trap levers so if you will touch them 3 demons will arrive, just edit the script I gave you before.
And:
Did I Forgot about something??