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

TP In brush help with script!

Clorens

New Member
Joined
Oct 5, 2011
Messages
89
Reaction score
0
So I want to do a quest where you have to think some by using diffrent clues which you obtain around the map, but the problem is that this script won't work?
It will be a quest where you have to click on a brush/tree or something likewise, but when you click on it nothing happens?
This is the code I'm using...


I also tried using this script but dunno how I can set it up properly..

Code:
  function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=1001, y=858, 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

- - - Updated - - -

New Script and the actions line!
Code:
  function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=1001, y=858, z=8} -- reward room
                doTeleportThing(cid, position)
                doSendMagicEffect(position, CONST_ME_TELEPORT)
                return false
        end

Code:
    <action uniqueid="9877" event="script" value="quests/custom/dreamers.lua" />
K so I changed the script...

And got this error!

Working now!

But if I want the player to stand on a specific pos, how do I do that?
For example I want the script to work while you stand on X1000 Y1001 Z7, but it shouldn't work when you stand on X1000 Y1000 Z7?
 
Last edited:
Well I don't want the storage pos since it's the start of a quest..
Ye it should only work with a required pos, the tp will tp you to a specific pos to start the quest..
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x=1001, y=858, z=8} -- reward room
local rpos = {x=1000, y=1001, z=7} -- position where your character must stand
local ppos = getPlayerPosition(cid)

                if(ppos.x == rpos.x and ppos.y == rpos.y and ppos.z == rpos.z)then
                        doTeleportThing(cid, position)
                        doSendMagicEffect(position, CONST_ME_TELEPORT)
                        return false
                else
                        return false

        end

end

I don't know if it is what you want, i understood it like this
 
Back
Top