local config = { -- 1 sala [2040] = {stone = {x=608, y=646, z=10}, time=20, stoneid=1304, switch=1945}, [2041] = {stone = {x=608, y=645, z=10}, time=20, stoneid=1304, switch=1945}, [2042] = {stone = {x=608, y=644, z=10}, time=20, stoneid=1304, switch=1945}, -- 2 sala [2043] = {stone = {x=649, y=645, z=12}, time=20, stoneid=1304, switch=1945}, [2044] = {stone = {x=650, y=645, z=12}, time=20, stoneid=1304, switch=1945}, [2045] = {stone = {x=651, y=645, z=12}, time=20, stoneid=1304, switch=1945}, -- 3 sale z fioletowymi ogniami [2046] = {stone = {x=660, y=650, z=11}, time=10, stoneid=1304, switch=1945}, [2047] = {stone = {x=662, y=650, z=11}, time=10, stoneid=1304, switch=1945}, [2048] = {stone = {x=664, y=650, z=11}, time=10, stoneid=1304, switch=1945}, [2049] = {stone = {x=666, y=650, z=11}, time=10, stoneid=1304, switch=1945}, -- ostatnia sala 8 kamieni [2050] = {stone = {x=684, y=650, z=12}, time=60, stoneid=1304, switch=1945}, [2051] = {stone = {x=685, y=650, z=12}, time=60, stoneid=1304, switch=1945}, [2052] = {stone = {x=686, y=650, z=12}, time=60, stoneid=1304, switch=1945}, [2053] = {stone = {x=687, y=650, z=12}, time=60, stoneid=1304, switch=1945}, [2054] = {stone = {x=688, y=650, z=12}, time=60, stoneid=1304, switch=1945}, [2055] = {stone = {x=689, y=650, z=12}, time=60, stoneid=1304, switch=1945}, [2056] = {stone = {x=690, y=650, z=12}, time=60, stoneid=1304, switch=1945}, [2057] = {stone = {x=691, y=650, z=12}, time=60, stoneid=1304, switch=1945} } function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = config[item.uid] local stoneCheck = getTileItemById(cfg.stone, cfg.stoneid) if item.itemid == 1945 then doRemoveItem(stoneCheck.uid) doCreatureSay(cid, "You deleted this stone for "..cfg.time.." minutes. Hurry up!", TALKTYPE_ORANGE_1) doTransformItem(item.uid, item.itemid + 1) local function eventCreateItem(a) doCreateItem(a[1], a[2], a[3]) end addEvent(eventCreateItem, cfg.time*60*1000, {cfg.stoneid, 1, cfg.stone}) local function eventDoTransformItem(b) doTransformItem(b[1], b[2]) end addEvent(eventDoTransformItem, cfg.time*60*1000, {item.uid, cfg.switch}) elseif item.itemid == 1946 then doPlayerSendCancel(cid, "The stone is deleted.") end return true end