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

Blue Legs-quest door (reward room)

Exchange

New Member
Joined
Feb 9, 2010
Messages
4
Reaction score
0
I'm using TFS 0.3.6 (latest build). After using the amulet on kosheis body, when i try to go in the door to the quest room it says that I'm not allowed in.
Not sure what script I'd put this in so whichever script is needed I can post it.
I've tried to fix it but no prevail any help would be great :D
 
blegs_chest.lua :

Lua:
  function onUse(cid, item, frompos, item2, topos)


if item.uid == 7517 then
queststatus = getPlayerStorageValue(cid,7616)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found Blue Legs.")
doPlayerAddItem(cid,7730,1)
setPlayerStorageValue(cid,7616,1)
else
doPlayerSendTextMessage(cid,22,"You have already done this quest.")
end
else
return 0
end

return 1
end


door.lua :

Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local charpos = getPlayerPosition(cid)
    if item.uid == 36205 and charpos.x == 33270 and (charpos.y == 32446 or charpos.y == 32447 or charpos.y == 32445) and charpos.z == 12 then
        if getPlayerStorageValue(cid,36203) == -1 then
            doPlayerSendTextMessage(cid,25,'You haven\'t completed this quest!')
        else
          local newPos = {x=33268, y=32446, z=12}
        doTeleportThing(cid, newPos)
        doSendMagicEffect(newPos, 10)
        end
		
	    elseif item.uid == 36205 and charpos.x == 33268 and (charpos.y == 32445 or charpos.y == 32446 or charpos.y ==32447) and charpos.z == 12 then
          local newPos = {x=33270, y=32446, z=12}
		 doSendMagicEffect(getPlayerPosition(cid), 2)
        doTeleportThing(cid, newPos)

        doSendMagicEffect({x=33270,y=32446,z=12}, 10)
        end
    return 1
end

kosheiamulet.lua :
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local newPos = {x=33261, y=32446, z=12}
    if itemEx.itemid == 6028 then
        if getPlayerStorageValue(cid, 36203) == -1 then
	    doTeleportThing(cid, newPos, TRUE)
           doCreatureSay(cid, 'At least I have it back, my precious amulet. I am glad you didn\'t use it! I allow you to ...ahh....enter door.... ahh')
	    doRemoveItem(cid, item.uid, 1)
           setPlayerStorageValue(cid, 36203, 1)
        end
    end
end


Not 100% sure that it will work, but I think it does.
 
Thanks Bilmattan! It works fine =]

EDIT: Doesnt remove the amulet, I think I can figure it out though.
 
Last edited:
Back
Top