17 lines
596 B
Lua
17 lines
596 B
Lua
local mename = 'whostand'
|
|
local player = core.get_player_by_name(mename)
|
|
if not player then
|
|
print('player not found')
|
|
return
|
|
end
|
|
local item = player:get_wielded_item()
|
|
local meta = item:get_meta()
|
|
local def = item:get_definition()
|
|
local ii = def.inventory_image
|
|
--local texture = "shields_shield_crystal.png^farming_tomato.png"
|
|
--local texture = "farming_tomato.png^default_stick.png"
|
|
local texture = "[combine:32x32:0,0=" .. ii .. "\\^[resize\\:32x32:8,8=farming_tomato.png"
|
|
meta:set_string('inventory_image', texture)
|
|
meta:set_string('wielded_image', texture)
|
|
player:set_wielded_item(item)
|