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

[request] Need 2 scripts

Kaorus

Unleash Dreams Staff
Joined
May 18, 2008
Messages
1,111
Reaction score
41
The first script:
Is the bridge of rookgard sewer (rats)
You touch a lever and this remove the bridge or create this :D
Is a action id

Second:
Only Premium acc can walk in a tile

Please, fast
 
Atention: iam not good in this xd

Remove the bridge:
Code:
-- Script by Ates, Add/Remove Stone!
-- Edited by Gelio (bugs fixed)
-- Help by Colandus
-- Streamside modification xd
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos1 = {x=XXX, y=YYY, z=ZZZ}
local pos2 = {x=XXX, y=YYY, z=ZZZ}
local pos3 = {x=XXX, y=YYY, z=ZZZ}
local tile = "the id of the tile, without the quotes"
local tilepos1 = getThingfromPos(pos1)
local tilepos2 = getThingfromPos(pos2)
local tilepos3 = getThingfromPos(pos3)

if item.itemid == 1945 then -- DO NOT EDIT
doRemoveItem(tilepos1.uid, 1) -- DO NOT EDIT
doRemoveItem(tilepos2.uid, 1)
doRemoveItem(tilepos3.uid, 1)
doTransformItem(item.uid, 1946)  -- It transform switch to id 1946
elseif item.itemid == 1946 then -- DO NOT EDIT
doCreateItem(tile, 1, pos1)
doCreateItem(tile, 1, pos2)
doCreateItem(tile, 1, pos3)
-- DO NOT EDIT THIS
doTransformItem(item.uid, 1945)  -- It transform switch to id 1945
end
end

and premium tile:
Code:
function onStepIn(cid, item, pos) 

local look = getPlayerLookDir(cid) 

 if isPremium(cid) ~= 1 then
        if look == 0 or look == 1 then
          doMoveCreature(cid, look+2)
        elseif look == 2 or look == 3 then
          doMoveCreature(cid, look-2)
        end
  doPlayerSendTextMessage(cid,21, "You need premium to walk through this tile.")
 else
   return FALSE
 end
end
 
Last edited:
Back
Top