• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Demon-Oak Room

bomba

Member
Joined
Feb 26, 2008
Messages
635
Reaction score
7
Location
Brazil
I made one script but don't work normal:
My char have storage: 20000, 20001, 20002.
Don't have 20003 and is teleported...

Script(room of demon-oak quest):
Code:
 local roomPos  = 
{
x = 424, 
y = 493, 
z = 8
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.uid == 30330 then 
	if getPlayerStorageValue(cid, 20000) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	 elseif getPlayerStorageValue(cid, 20000) == FALSE then
	   doPlayerSendCancel(cid, "Sorry, not possible.")
	if getPlayerStorageValue(cid, 20001) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	 elseif getPlayerStorageValue(cid, 20001) == FALSE then
	   doPlayerSendCancel(cid, "Sorry, not possible.")
	if getPlayerStorageValue(cid, 20002) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	 elseif getPlayerStorageValue(cid, 20002) == FALSE then
	   doPlayerSendCancel(cid, "Sorry, not possible.")
	if getPlayerStorageValue(cid, 20003) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	 elseif getPlayerStorageValue(cid, 20003) == FALSE then
	   doPlayerSendCancel(cid, "Sorry, not possible.")
     end
    end
   end
  end
 end
     return TRUE
end

Please fix!
 
Last edited by a moderator:
1. Please use code tags, not php tags
2. use local roomPos = {{x=424, y493, z=8}}

then it will look like this
Code:
local roomPos = {{x=424, y493, z=8}}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.uid == 30330 then
 
Code:
 local roomPos  = 
{
x = 424, 
y = 493, 
z = 8
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 30330 then 
	if getPlayerStorageValue(cid, 20000) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	else
	   doPlayerSendCancel(cid, "Sorry, not possible.")
        end
	if getPlayerStorageValue(cid, 20001) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	else
	   doPlayerSendCancel(cid, "Sorry, not possible.")
        end
	if getPlayerStorageValue(cid, 20002) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	else
	   doPlayerSendCancel(cid, "Sorry, not possible.")
        end
	if getPlayerStorageValue(cid, 20003) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	else
	   doPlayerSendCancel(cid, "Sorry, not possible.")
        end
     end
     return TRUE
end

btw moker is nb
 
Code:
 local roomPos  = 
{
x = 424, 
y = 493, 
z = 8
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 30330 then 
	if getPlayerStorageValue(cid, 20000) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	else
	   doPlayerSendCancel(cid, "Sorry, not possible.")
        end
	if getPlayerStorageValue(cid, 20001) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	else
	   doPlayerSendCancel(cid, "Sorry, not possible.")
        end
	if getPlayerStorageValue(cid, 20002) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	else
	   doPlayerSendCancel(cid, "Sorry, not possible.")
        end
	if getPlayerStorageValue(cid, 20003) == TRUE then
	   doTeleportThing(cid, roomPos, TRUE)
	   doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
	else
	   doPlayerSendCancel(cid, "Sorry, not possible.")
        end
     end
     return TRUE
end

btw moker is nb

Are you herassing me? i just saw that small thingy i never checked the rest of the script.
 
Back
Top