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

Simple Script (Help)

jpkulik

New Member
Joined
Mar 15, 2008
Messages
208
Reaction score
2
Hello!
Im doing one quest, and is like.. I need a script like this;

If player have storageId=5555 and Try to open a use a lever, then remove stone {x=100,y=100,x=7}
Else, if player DO NOT have storageid=5555
Send mensage: Sorry, you cannot open this!

Can someone help me with this?
Cya
 
Hello!
Im doing one quest, and is like.. I need a script like this;

If player have storageId=5555 and Try to open a use a lever, then remove stone {x=100,y=100,x=7}
Else, if player DO NOT have storageid=5555
Send mensage: Sorry, you cannot open this!

Can someone help me with this?
Cya

I dont know i will try ;)
 
Im not sure if its work :S msg me if not!

PHP:
-- Script by Ates

local stone = getThingfromPos(pos)
local pos = {x=1000, y=1000, z=7, stackpos=1}
local storage = 5555
local msg = "YOUR_MSG" -- 'MSG' When you removing the item.
local cant = "YOUR_MSG" -- 'MSG' if you cant.
local added = "YOUR_MSG" -- 'MSG' when stone added
local stoneid = ITEM_ID -- Write your id/number of stone.

function onUse(cid, item, fromPosition, itemEx, toPosition)

if item.itemid == 1945 and getPlayerStorageValue(cid, storage) == TRUE then
     doCreatureSay(cid, msg, TALKTYPE_ORANGE_1)
	 doRemoveItem(stone, uid, 1)
	 doTransformItem(item.uid,item.id+)
else
     doPlayerSendCancel(cid, cant)
elseif item.itemid == 1946 and getPlayerStorageValue(cid, storage) == TRUE then
     doCreatureSay(cid, added, TALKTYPE_ORANGE_1)
	 doCreateItem(stoneid, 1, pos)
	 	 doTransformItem(item.uid,item.id-)
else
     doPlayerSendCancel(cid, cant)
     end
     return TRUE
end
end

Edit: Fixed Bugs!
Edit2: Fixed more understandable.
Edit3: Bug fix 'doTransformItem'
 
Last edited:
Back
Top