• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Old Thais Quest

TriamerA

The Mystic One.
Joined
Nov 16, 2008
Messages
1,256
Reaction score
17
Location
Poland
So I made new quest on my OTS and I wanted to show that up
39917621kx8.jpg

The Quest is Hidden, and you have to use your Brain To Make It.
46757768ok5.jpg

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>
Now make Ancientone.lua and paste that:
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].
Means Hearth Of Demon

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? :p

last Gravestone:
Code:
You read: CDLNM GNPM.
ItemID: [1409].
Position: [X: 32339] [Y: 32197] [Z: 11].
Means Demon Horn


Now The Spoil of the quest!:
62166604tp1.jpg


Next One:
29543613ci5.jpg

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.
Edit Unique ID Of LEVER and the positions ;]
Also dont remember to add that to actions.xml

19365155in1.jpg

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
81257554oj6.jpg

Here you have also trap levers so if you will touch them 3 demons will arrive, just edit the script I gave you before.

61290040tl6.jpg


And:
33466588lq6.jpg


Did I Forgot about something??
 
Back
Top