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

[Action] Statues and doors (inquisition)

Chiracle

New Member
Joined
Jun 3, 2010
Messages
23
Reaction score
0
Hello,
I need help, because I don't know how to do this. I have to make on my ots smth like this:
You are entering to Ushuriel room, and when you click on statue there (you are getting now storage value) and you can open doors:
eecyuzs9dvo1uirbpo7o.jpg
.
I need script on 5 statues and 5 doors ofc.

Thanks for every comment.
Regards,
Chiracle.
 
Try:
Lua:
local UIDs = {
[5555] = "The Dark Path",
[5556] = "The Crystal Caves",
[5557] = "The Blood Halls",
[5558] = "The Vats",
[5559] = "The Arcanum",
[5510] = "The Hive"
}

local AIDs = {
[6666] = {5555,"The Dark Path"},
[6667] = {5556,"The Crystal Caves"},
[6668] = {5557,"The Blood Halls"},
[6669] = {5558,"The Vats"},
[6610] = {5559,"The Arcanum"},
[6611] = {5510,"The Hive"}
}


function onUse(cid, item, fromPosition, itemEx, toPosition)
playerpos = getPlayerPosition(cid)
local v = UIDs[item.uid]
local j = AIDs[item.aid]
         if j then
            if getPlayerStorageValue(cid,j[1]) < 0 then
               setPlayerStorageValue(cid,j[1],1)
               doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have saved " .. j[2] .. " ")
            else
                doPlayerSendCancel(cid, "You have already saved this room")
            end
         end
if v then
   if getPlayerStorageValue(cid,j[1]) > 0 then
      doTransformItem(item.uid,item.itemid+1)
         doorpos = {x = fromPosition.x, y = fromPosition.y, z = fromPosition.z, stackpos = 253}
	             if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then
		        doMoveCreature(cid, 0)
		elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then
			doMoveCreature(cid, 1)
		elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then
			doMoveCreature(cid, 2)
		elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then
			doMoveCreature(cid, 3)
		elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then
			doMoveCreature(cid, 4)
		elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then
			doMoveCreature(cid, 5)
		elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then
			doMoveCreature(cid, 6)
		elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then
			doMoveCreature(cid, 7)
		end
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You must do " .. v[2] .. " room to enter this door.")
        end
end
return true
end

6666 - 6611 = AIDs for statues (See names -> to know what room)
5555 - 5510 = UIDs for doors (Check names to know too)
 
Last edited:
Back
Top