Hello,
This script should work, not tested yet!
What its that script for ?:
1. Its can be for questes/hunt places
2. When you 'use' a lever then a stone will be removed at the location you used (If you click again then the stone adds)
"lever (stone).lua"
<action uniqueid="10000" script="lever (stone).lua"/>[/CODE]
and in Remere Map Editor higher click a lever with id 1945 and write in UNIQUE ID 10000
/REPORT BUGS!
This script should work, not tested yet!
What its that script for ?:
1. Its can be for questes/hunt places
2. When you 'use' a lever then a stone will be removed at the location you used (If you click again then the stone adds)
"lever (stone).lua"
Code:
-- Script by Ates, Add/Remove Stone!
-- Edited by Gelio (bugs fixed)
-- Help by Colandus
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = {X=XXX, Y=YYY, Z=ZZZ} -- The Pos [EDIT HERE][Example: X=1000, Y=1000, Z=7]
local stone = 1304 -- ID of the stone [DO NOT EDIT]
local stoneFromPos = getThingfromPos(pos) -- It get item uid
if item.itemid == 1945 then -- DO NOT EDIT
doRemoveItem(stoneFromPos.uid, 1) -- DO NOT EDIT
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You removed the Stone.") -- DO NOT EDIT
doTransformItem(item.uid, 1946) -- It transform switch to id 1946
elseif item.itemid == 1946 then -- DO NOT EDIT
doCreateItem(stone, 1, pos) -- DO NOT EDIT
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You added the Stone.") -- DO NOT EDIT
doTransformItem(item.uid, 1945) -- It transform switch to id 1945
end
end
and in Remere Map Editor higher click a lever with id 1945 and write in UNIQUE ID 10000
/REPORT BUGS!
Last edited: