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

Quest

dinodrain

New Member
Joined
Sep 22, 2009
Messages
31
Reaction score
0
Hello,
I don't know is my quest possible but I tried to make this script and I can't.

I want to do quest where ppl have to write sth in scroll, then pull lever and go to next room. That what they have to write must be correct.

This is what I can't fix:
PHP:
function onUse(cid, item, frompos, item2, topos)

if item.uid == 10185 then 
	if item.uid == 10186 and doSetItemText(uid,358) then
	queststatus = getPlayerStorageValue(cid,10184)
	if queststatus < 1 then
	doPlayerSendTextMessage(cid,22,"Correct answer.")
	   setPlayerStorageValue(cid,10185,1)
	else
	   doPlayerSendTextMessage(cid,22,"Wrong answer.")
	end
else
   doPlayerSendTextMessage(cid,22,"You already did this, just go through these doors.")
end
return 1
end
end

I'm not sure if with function doSetItemText it is possible...

if I am pulling lever I se message 19:25 You already did this, just go through these doors.

but I don't write anything in scroll yet

Pla help cuz I'm freaking out ; d I was tried everything and it still don't work

Sry for my english

TFS 0.3.5
 
Lua:
function onUse(cid, item, frompos, item2, topos)
	local text = getItemText(item.uid)
	local storageValue = 10185
	
	if item.actionid == storageValue then 
		local queststatus = getPlayerStorageValue(cid,storageValue)

		if queststatus < 1 then
			if text == "answer" then
				doPlayerSendTextMessage(cid,22,"Correct answer.")
				setPlayerStorageValue(cid,storageValue,1)
			else
				doPlayerSendTextMessage(cid,22,"Wrong answer.")
			end
		else
			doPlayerSendTextMessage(cid,22,"You already did this, just go through these doors.")
		end
	end
	return 1
end

^__^
 
Back
Top