FeLiPe-Eduardo
New Member
- Joined
- Jun 3, 2015
- Messages
- 38
- Solutions
- 1
- Reaction score
- 3
Hello guys.
i trying to do something like that :
i can check the item inside the Box. but i cant do the item keep creating runes while have duration. someone have some ideia how i can do this ?
at onThink dont find something to find all items with ID. and i dont want to use getSpectators at entire map.
the code above was just a test.
At "onAddItem" dont work too and after sever save will stop to work =/
Thanks.
FLP
i trying to do something like that :
i can check the item inside the Box. but i cant do the item keep creating runes while have duration. someone have some ideia how i can do this ?
Lua:
function sdbox.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item:getItemCountById(2260) < 15 then --blank rune
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Insufficient materials.blank')
fromPosition:sendMagicEffect(CONST_ME_POFF)
return false
end
if item:getItemCountById(2152) < 20 then -- money/gold
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Insufficient materials.money')
fromPosition:sendMagicEffect(CONST_ME_POFF)
return false
end
if item:getItemCountById(2667) < 15 then --food/fish/ham/meat
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Insufficient materials.food')
fromPosition:sendMagicEffect(CONST_ME_POFF)
return false
end
player:say('WORK WORK', TALKTYPE_MONSTER_SAY, false, player, fromPosition)
item:transform(41120)
return true
end
sdbox:id(41116)
sdbox:register()
at onThink dont find something to find all items with ID. and i dont want to use getSpectators at entire map.
Lua:
local sdbox = MoveEvent()
function runecreate()
tileitem:addItem(2268, 1)
addEvent(runecreate, 60 * 200)
end
function sdbox.onAddItem(moveitem, tileitem, position)
if moveitem.itemid ~= 2268 then
return true
end
-- tileitem:say('WORK WORK', TALKTYPE_MONSTER_SAY, false, player, fromPosition)
addEvent(runecreate, 60 * 200)
end
sdbox:type("additem")
sdbox:id(41120)
sdbox:register()
At "onAddItem" dont work too and after sever save will stop to work =/
Thanks.
FLP
Last edited: