- Joined
- Nov 17, 2010
- Messages
- 6,832
- Solutions
- 586
- Reaction score
- 5,414
0.3.7
Whenever I restart server and attempt a simple wall break using "doCleanTile(pos[1])", it will not remove items that started on the map originally.
If I delete the wall and spawn it using my god it will then start to work normally.
Is there another command I should be using instead of doCleanTile?
Also, Another thing I can't seem to get to work is setting an actionID to a tile after using a lever or switch for instance.
When attempting to use this I get this error.
Thanks everyone in advance! I appreciate any comment/feedback/criticism/help that anyone offers.
Xikini
A small script that uses the function is below.
Whenever I restart server and attempt a simple wall break using "doCleanTile(pos[1])", it will not remove items that started on the map originally.
If I delete the wall and spawn it using my god it will then start to work normally.
Is there another command I should be using instead of doCleanTile?
Also, Another thing I can't seem to get to work is setting an actionID to a tile after using a lever or switch for instance.
Code:
addEvent(doSetItemActionId, time * 10010, config.actionID, pos[3])
Code:
[19:3:56.648] [Error - Action Interface]
[19:3:56.649] In a timer event called from:
[19:3:56.649] data/actions/scripts/explosivebarrel.lua:onUse
[19:3:56.650] Description:
[19:3:56.650] (luaDoItemSetAttribute) Invalid data type
Xikini
A small script that uses the function is below.
Code:
local time = 6
local config = {
rock1 = 5622, -- rock 1 (left)
rock2 = 5621, -- rock 2 (right)
barrel = 8059, -- barrel
actionID = 45151
}
local pos = {
[1] = {x = 1536, y = 1499, z = 7}, -- rock 1 (left)
[2] = {x = 1537, y = 1499, z = 7}, -- rock 2 (right)
[3] = {x = 1533, y = 1500, z = 7} -- barrel
}
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 8059 then -- if using correct item. (barrel)
doCleanTile(pos[1])
doCleanTile(pos[2])
doCleanTile(pos[3])
addEvent(doCreateItem,time * 10000, config.rock1, 1, pos[1])
addEvent(doCreateItem,time * 10000, config.rock2, 1, pos[2])
addEvent(doCreateItem,time * 10000, config.barrel, 1, pos[3])
--addEvent(doSetItemActionId, time * 10010, config.actionID, pos[3])
end
return true
end