mmheo
New Member
- Joined
- Sep 14, 2017
- Messages
- 157
- Reaction score
- 1
i have this cod its work like 1 items 7762 change for 4>> 7761
i need to edite this code to work like if one items 7762 change for 4 7761 and 4 of 7761 change for 1 items 7762
tfs 0.4
i need to edite this code to work like if one items 7762 change for 4 7761 and 4 of 7761 change for 1 items 7762
Code:
if getTileItemById({x=buff_pos.x, y=buff_pos.y, z=buff_pos.z},7762).itemid then
local g7 = getTileItemById({x=buff_pos.x, y=buff_pos.y, z=buff_pos.z}, 7762)
local counts = g7.type
local need_to_give = counts *4
doCreateItem(7761, need_to_give, {x=977, y=996, z=6})
doSendMagicEffect({x=977, y= 996, z=6}, CONST_ME_TELEPORT)
doSendDistanceShoot(getThingPosition(other_item.uid), {x=977, y= 996, z=6}, CONST_ANI_ENERGY)
doRemoveItem(other_item.uid)
end
end