View Single Post
Old 25th June 2009, 23:11   #3 (permalink)
darkhaos
Needing ideas for scripts
 
darkhaos's Avatar
 
Join Date: Apr 2008
Location: Venezuela
Posts: 791
Reputation: darkhaos is a name known to alldarkhaos is a name known to alldarkhaos is a name known to alldarkhaos is a name known to alldarkhaos is a name known to alldarkhaos is a name known to all



Lua Code:
function onStepIn(cid, item, position, fromPosition)

        if getPlayerStorageValue(cid, x) == nil then
                doTeleportThing(cid, fromPosition)
                doCreatureSay(cid, "You cannot enter here.", TALKTYPE_ORANGE_1)
        end
        return TRUE
end
The other script (the thing of the level)...
Lua Code:
local levelLimit = 100
local fromPosition = { x = 100, y = 100, z = 7 }
local toPosition = { x = 150, y = 150, z = 7 }
local newPosition = { x = 50, y = 50, z = 7 }


function onAdvance(cid, skill, oldlevel, newlevel)

        if(skill == SKILL__LEVEL) then
                if(getPlayerLevel(cid) >= levelLimit and isInArea(getCreaturePosition(cid), fromPosition, toPosition)) then
                        doTeleportThing(cid, newPosition)
                end
        end
        return TRUE
end
__________________

darkhaos is online now   Reply With Quote