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

The demon oak quest gravestone

Sheriff

New Member
Joined
Mar 13, 2009
Messages
68
Reaction score
0
Location
Spain
In the gravestone i've put 55100 but not working :S

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=240, y=62, z=8} -- reward room
        if getPlayerStorageValue(cid, 35700) > 1 then
                doTeleportThing(cid, position)
                doSendMagicEffect(position, CONST_ME_TELEPORT)
        else
                return false
        end
        return true
end
 
Try this:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
newPosition  = {x=32718, y=32396, z=8} --- pos to prize room
winner = getPlayerStorageValue(cid,8585)
	if item.itemid == 1406 and winner == 1 then
		doTeleportThing(cid, newPosition, TRUE)
		doSendMagicEffect(newPosition, 10)
		setPlayerStorageValue(cid,8585,-1)
        else
                return false
        end
    return true
end

Rep if it worked =)
 
Try this with uniqueID.
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=240, y=62, z=8} -- reward room
        if getPlayerStorageValue(cid, 35700) >= 1 and item.uid == 666 then
                doTeleportThing(cid, position)
                doSendMagicEffect(position, CONST_ME_TELEPORT)
        else
                return false
        end
        return true
end
 
ryandometal script is working but there is not a storage, i can go many times.. :S

Thanks :D helped me again

Oh yeah, use this xD
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=240, y=62, z=8} -- reward room
        if getPlayerStorageValue(cid, 35700) == 1 and item.uid == 666 then
                doTeleportThing(cid, position)
                doSendMagicEffect(position, CONST_ME_TELEPORT)
                setPlayerStorageValue(cid, 35700, 2)
        else
        if getPlayerStorageValue(cid, 35700) > 1
        doPlayerSendCancel(cid, "Sorry, not possible.")
        end
	end
        return true
end
 
Oh yeah, use this xD
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=240, y=62, z=8} -- reward room
        if getPlayerStorageValue(cid, 35700) == 1 and item.uid == 666 then
                doTeleportThing(cid, position)
                doSendMagicEffect(position, CONST_ME_TELEPORT)
                setPlayerStorageValue(cid, 35700, 2)
        else
        if getPlayerStorageValue(cid, 35700) > 1
        doPlayerSendCancel(cid, "Sorry, not possible.")
        end
	end
        return true
end

You use 2 if? that cant be working? Anyway, if mine didnt work, you made something wrong with actions.xml i think.
 
Sorry, fixed ><
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=240, y=62, z=8} -- reward room
        if getPlayerStorageValue(cid, 35700) == 1 and item.uid == 666 then
            doTeleportThing(cid, position)
            doSendMagicEffect(position, CONST_ME_TELEPORT)
            setPlayerStorageValue(cid, 35700, 2)
        elseif getPlayerStorageValue(cid, 35700) == 2 and item.uid == 666 then
            doPlayerSendCancel(cid, "Sorry, not possible.")
        end
        return true
end
@spice
I wrote it wrong '-'
 
Last edited:
Back
Top