Hello, i made very easy script for practice.
Is that possible to change distance between character and target item?
i'm trying to make script with 2 squares target.
I want to use item on target in this distance. Example on photo below.
Something like this:
Lua:
function onUseRope2(player, item, target)
if target:hasAttribute(ITEM_ATTRIBUTE_UNIQUEID) and target.uid == pickaxeUid then
if player:getStorageValue(pickaxeUid) ~= 10000 then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Oh i got pick")
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Oh i got pick")
player:setStorageValue(pickaxeUid, 10000)
player:addItem(2553)
else
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "I already got this pick")
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "I already got this pick")
end
end
end
Is that possible to change distance between character and target item?
i'm trying to make script with 2 squares target.
I want to use item on target in this distance. Example on photo below.
Something like this: