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

is it Possible to Change ground While server is running?

dunnish

New Member
Joined
Jun 18, 2009
Messages
268
Solutions
1
Reaction score
2
Hello!

is it possible to Change ground while players are in the game
like after 3 min when the server have been up its will change the ground on "some Sqm" Like Change ground id '724' to 407
 
im thinking like this.
im just testing so the code is not working yet ofc.

if a event start then add item 407 where itemid 724 exist

its working in demon helmet with a leaver if you look.
dhq.lua
Lua:
local gatepos = {x=33314, y=31592, z=15, stackpos=1}

function onUse(cid, item, frompos, item2, topos)
local getgate = getThingfromPos(gatepos)

    if item.itemid == 1945 and getgate.itemid == 1355 then
        doRemoveItem(getgate.uid, 1)
        doTransformItem(item.uid, item.itemid+1)
    elseif item.itemid == 1946 and getgate.itemid == 0 then
        doCreateItem(1355, 1, gatepos)
        doTransformItem(item.uid, item.itemid-1)
    else
        doPlayerSendCancel(cid,"Sorry, not possible.")
    end
return 1
end


my new event
Lua:
local gatepos = {x=33314, y=31592, z=15, stackpos=1}

function onUse(cid, item, frompos, item2, topos)
local getgate = getThingfromPos(gatepos)

    if  getgate.itemid == 724 then
        doCreateItem(407, 1, gatepos)
        doTransformItem(item.itemid, item.itemid-1)
    else
        doPlayerSendCancel(cid,"Sorry, not possible.")
    end
return 1
end
 
Lua:
local gatepos = {x = 33314, y = 31592, z = 15, stackpos = 0}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local getTile = getThingfromPos(gatepos)
    if getTile.itemid == 724 then
        doTransformItem(getTile.uid, 407)
    else
        doTransformItem(getTile.uid, 724)
    end
    return true
end
 
Back
Top