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

Solved Join all parts of the HOTA ??

Status
Not open for further replies.

xitos

New Member
Joined
Oct 14, 2008
Messages
213
Reaction score
1
Hiho ...

I finished setting up hota quest and I am the last part of Ashmunrah

there you play the 7 parts of hota and he rides

can someone help me make this script?

pull the lever for hota join

Thanks! :thumbup:
 
function onStepIn(cid, item, position, fromPosition)
local ids = {2349, 2348, 2351, 2350, 2353, 2352, 2354}

local piece1 = getPlayerItemCount(cid, ids[1])
local piece2 = getPlayerItemCount(cid, ids[2])
local piece3 = getPlayerItemCount(cid, ids[3])
local piece4 = getPlayerItemCount(cid, ids[4])
local piece5 = getPlayerItemCount(cid, ids[5])
local piece6 = getPlayerItemCount(cid, ids[6])
local piece7 = getPlayerItemCount(cid, ids[7])

if (getPlayerStorageValue(cid, 4449) == -1) then
if (piece1 == 0 or piece2 == 0 or piece3 == 0 or piece4 == 0 or piece5 == 0 or piece6 == 0 or piece7 == 0) then
doPlayerSendCancel(cid, "You don\'t have items.")
else
for i = 1, #ids do
doPlayerRemoveItem(cid, ids, 1)
end
local pos = getCreaturePosition(cid)
doCreateItem(2342, 1, {x = pos.x, y = pos.y-1, z = pos.z})
setPlayerStorageValue(cid, 4449, 1)
end
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You already done this quest.")
end
end


Here you are.
 
aa plZ loOp he
Code:
local config = {
	ids = {from=2335, to=2341},
	storage = 4449,
	item = 2342
}
function onStepIn(cid, item, position, fromPosition)
	if getPlayerStorageValue(cid, config.storage) < 1 then
		for i = config.ids.from, config.ids.to do
			if getPlayerItemCount(cid, i) < 1 then
				failed = true
				break
			end
		end
		if not failed then
			for i = config.ids.from, config.ids.to do
				doPlayerRemoveItem(cid, i, 1)
			end
			local pos = getCreaturePosition(cid)
			doCreateItem(config.item, 1, {x=pos.x, y=pos.y-1, z=pos.z})
			setPlayerStorageValue(cid, config.storage, 1)
		else
			doPlayerSendCancel(cid, "You don't have all the required items.")
		end
	else
		doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You already done this quest.")
	end
end
#up
movements.xml, not actions
 
how to put in movements.xml :confused:

example:

<movement type="StepIn" uniqueid="10230" event="script" value="PitsOfInferno/TP5.lua" />

Thanks :peace::peace:
 
7. Put all 7 pieces of the Helmet of the Ancients on the small stone table to the north to get your reward.

Code:
<movevent type="StepIn" uniqueid="[COLOR="Red"]xxxx[/COLOR]" event="script" value="[COLOR="Blue"]zzzz[/COLOR].lua" />


xxxx = uniqueid of the stone table

zzzz = name of the script
 
Status
Not open for further replies.
Back
Top