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

Demon Helmet Quest Request!!

Johannes10

New Member
Joined
Mar 10, 2010
Messages
181
Reaction score
1
Can Some give me all script and tell me how to do steb by step please?

my version is: The Forgotten Server version 0.3.6 (Crying Damson)
Compiled with GNU C + + version 3.4.5
 
go to actions > scripts > make a new folder called DHQ

once you have created a folder copy these scripts into it.

name this DHQ.lua
Lua:
local gatepos = {x=95, y=105, z=8, stackpos=1} <!-- THIS IS THE POSITION OF THE PINK STONE -->

function onUse(cid, item, frompos, item2, topos)
local getgate = getThingfromPos(gatepos)

	if item.itemid == 1945 and getgate.itemid == 1355 then
		doRemoveItem(getgate.uid, 1)
		doTransformItem(item.uid, item.itemid+1)
	elseif item.itemid == 1946 and getgate.itemid == 0 then
		doCreateItem(1355, 1, gatepos)
		doTransformItem(item.uid, item.itemid-1)
	else
		doPlayerSendCancel(cid,"Sorry, not possible.")
	end
return 1
end


Name this dhqchest.lua

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   	if item.uid == 3001 then
		queststatus = getPlayerStorageValue(cid,6076)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have a demon helmet.")
   			doPlayerAddItem(cid,2493,1)
   			setPlayerStorageValue(cid,6076,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
   		end
   	elseif item.uid == 3002 then
		queststatus = getPlayerStorageValue(cid,6077)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found steel boots.")
   			doPlayerAddItem(cid,2645,1)
   			setPlayerStorageValue(cid,6077,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
   		end
   	elseif item.uid == 3003 then
		queststatus = getPlayerStorageValue(cid,6078)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a demon shield.")
   			doPlayerAddItem(cid,2520,1)
   			setPlayerStorageValue(cid,6078,1)
   		else
   			doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
		end
	end
   	return 1
end

with them scripts you edit the position of the stone and set a lever id picture below.

wrxhqa.jpg



with that all set up the last thing you need to add is in actions.xml copy paste this somwhere in there and it should work for you :)

Lua:
<!-- DHQ -->	
	<action uniqueid="4560" script="dhq/dhq.lua"/>
 	<action uniqueid="3001" script="dhq/dhqchest.lua"/>
	<action uniqueid="3002" script="dhq/dhqchest.lua"/>
	<action uniqueid="3003" script="dhq/dhqchest.lua"/>
 
The lever dosent work but the chests work... here is the error

[23/04/2010 00:17:11] [Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/dhq.lua:1: unexpected symbol near '!'
[23/04/2010 00:17:11] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/dhq.lua)
[23/04/2010 00:17:11] data/actions/scripts/quests/dhq.lua:1: unexpected symbol near '!'


Can someone help?
 
The lever dosent work but the chests work... here is the error

[23/04/2010 00:17:11] [Error - LuaScriptInterface::loadFile] data/actions/scripts/quests/dhq.lua:1: unexpected symbol near '!'
[23/04/2010 00:17:11] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/quests/dhq.lua)
[23/04/2010 00:17:11] data/actions/scripts/quests/dhq.lua:1: unexpected symbol near '!'


Can someone help?
you copied it wrong?
 
Last edited:
Look here is the script i took


local gatepos = {x=1193, y=1154, z=10, stackpos=1} <!-- THIS IS THE POSITION OF THE PINK STONE -->

function onUse(cid, item, frompos, item2, topos)
local getgate = getThingfromPos(gatepos)

if item.itemid == 1945 and getgate.itemid == 1355 then
doRemoveItem(getgate.uid, 1)
doTransformItem(item.uid, item.itemid+1)
elseif item.itemid == 1946 and getgate.itemid == 0 then
doCreateItem(1355, 1, gatepos)
doTransformItem(item.uid, item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
 
Cykotitan i took this script for the lever ---> http://otland.net/f81/demon-helmet-quest-v2-0-a-72205/#post739978

evertything work but when the wall going back and all is back then i got error

[23/04/2010 00:48:34] [Error - Action Interface]
[23/04/2010 00:48:34] In a timer event called from:
[23/04/2010 00:48:34] data/actions/scripts/quests/dhq.lua:eek:nUse
[23/04/2010 00:48:34] Description:
[23/04/2010 00:48:34] (luaDoTransformItem) Item not found

Sorry for my bad english i hope you understand me
 
Look here is the script i took


local gatepos = {x=1193, y=1154, z=10, stackpos=1} <!-- THIS IS THE POSITION OF THE PINK STONE -->

function onUse(cid, item, frompos, item2, topos)
local getgate = getThingfromPos(gatepos)

if item.itemid == 1945 and getgate.itemid == 1355 then
doRemoveItem(getgate.uid, 1)
doTransformItem(item.uid, item.itemid+1)
elseif item.itemid == 1946 and getgate.itemid == 0 then
doCreateItem(1355, 1, gatepos)
doTransformItem(item.uid, item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
Code:
local pos = {x=1193, y=1154, z=10}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1945 then
		doRemoveItem(getTileItemById(pos, 1355).uid)
	else
		doCreateItem(1355, 1, pos)
	end
	return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Cykotitan i took this script for the lever ---> http://otland.net/f81/demon-helmet-quest-v2-0-a-72205/#post739978

evertything work but when the wall going back and all is back then i got error

[23/04/2010 00:48:34] [Error - Action Interface]
[23/04/2010 00:48:34] In a timer event called from:
[23/04/2010 00:48:34] data/actions/scripts/quests/dhq.lua:eek:nUse
[23/04/2010 00:48:34] Description:
[23/04/2010 00:48:34] (luaDoTransformItem) Item not found

Sorry for my bad english i hope you understand me
FFFFFFFFFFFFUUUUUUUUUUUUUUUUUU-
 
Back
Top