bpm91
Advanced OT User
- Joined
- May 23, 2019
- Messages
- 1,021
- Solutions
- 7
- Reaction score
- 163
- Location
- Brazil
- YouTube
- caruniawikibr
Bug 1
Shovel using the shovel on creatures or even stones that are on top of the sand number 231
and 2
attempt to fix the poff in new id.
hello, I was trying to configure my shovel to "poff" the new id sand "area free" so that players could not scarab. however I am not able to make the synthase, however when trying this I discovered that I can use the shovel on top of anything on top of id 231 sand.
how do i block the shovel on creatures for example, and only work on top of sand 231.
and second: how do I make the shovel hit the sand at id 5581 but nothing happens. just the const me poff.
Actions: tools/shovel
Lib Actions shovel
local groundIds = {354, 355} -- pick usable ground
local sandIds = {231,5581} -- desert sand
Shovel using the shovel on creatures or even stones that are on top of the sand number 231
and 2
attempt to fix the poff in new id.
hello, I was trying to configure my shovel to "poff" the new id sand "area free" so that players could not scarab. however I am not able to make the synthase, however when trying this I discovered that I can use the shovel on top of anything on top of id 231 sand.
how do i block the shovel on creatures for example, and only work on top of sand 231.
and second: how do I make the shovel hit the sand at id 5581 but nothing happens. just the const me poff.
Actions: tools/shovel
LUA:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local tile = Tile(toPosition)
if not tile then
return false
end
local ground = tile:getGround()
if not ground then
return false
end
local groundId = ground:getId()
if table.contains(holes, groundId) then
ground:transform(groundId + 1)
ground:decay()
toPosition.z = toPosition.z + 1
tile:relocateTo(toPosition)
elseif groundId == 231 then
local randomValue = math.random(1, 100)
if target.actionid == 100 and randomValue <= 20 then
target:transform(489)
target:decay()
elseif randomValue < 3 then
Game.createItem(2159, 1, toPosition)
elseif randomValue > 90 then
Game.createMonster("Scarab", toPosition)
end
toPosition:sendMagicEffect(CONST_ME_POFF)
else
return false
end
return true
end
local groundIds = {354, 355} -- pick usable ground
local sandIds = {231,5581} -- desert sand
LUA:
function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey)
local tile = Tile(toPosition)
if not tile then
return false
end
local ground = tile:getGround()
if not ground then
return false
end
local groundId = ground:getId()
if table.contains(holes, groundId) then
ground:transform(groundId + 1)
ground:decay()
toPosition.z = toPosition.z + 1
tile:relocateTo(toPosition)
elseif table.contains(sandIds, groundId) then
local randomValue = math.random(1, 100)
if target.actionid == actionIds.sandHole and randomValue <= 20 then
ground:transform(489)
ground:decay()
elseif randomValue == 1 then
Game.createItem(2159, 1, toPosition)
elseif randomValue > 95 then
Game.createMonster("Scarab", toPosition)
end
toPosition:sendMagicEffect(CONST_ME_POFF)
else
return false
end
return true
end