- Joined
- Feb 14, 2015
- Messages
- 5,643
- Solutions
- 559
- Reaction score
- 3,950
TFS 0.4
I've tried the positions with and without stackpos and when it tries to create the item, it still returns Tile not found when I use the item for this script.
Solution is probably something super easy, I might be retarded.
pls help =/
I've tried the positions with and without stackpos and when it tries to create the item, it still returns Tile not found when I use the item for this script.
Solution is probably something super easy, I might be retarded.
pls help =/
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local dir = getCreatureLookDirection(cid)
local pos = getThingPos(cid)
local id = 2111
local r = {
[0] = {{pos.x, pos.y-1, pos.z, stackpos = 253}},
[1] = {{pos.x+1, pos.y, pos.z, stackpos = 253}},
[2] = {{pos.x, pos.y+1, pos.z, stackpos = 253}},
[3] = {{pos.x-1, pos.y, pos.z, stackpos = 253}}
}
if dir == NORTH then
doSendDistanceShoot(pos, r[0], 35)
doCreateItem(id, 1, r[0])
elseif dir == EAST then
doSendDistanceShoot(pos, r[1], 35)
doCreateItem(id, 1, r[1])
elseif dir == SOUTH then
doSendDistanceShoot(pos, r[2], 35)
doCreateItem(id, 1, r[2])
elseif dir == WEST then
doSendDistanceShoot(pos, r[3], 35)
doCreateItem(id, 1, r[3])
end
return true
end