
execute store result score #items sgrave run data get entity @s data.Inventory

execute if score #items sgrave matches 1.. run function snapgrave:response/retrieve/inventory

function snapgrave:response/retrieve/equipment

data modify storage sgrave:temp XpPoint set from entity @n[type=marker,tag=sgrave,tag=sgrave.marker] data.XpPoint
data modify storage sgrave:temp pid set from entity @n[type=marker,tag=sgrave,tag=sgrave.marker] data.pid
function snapgrave:response/retrieve/xp/init with storage sgrave:temp

execute store result storage sgrave:temp gid int 1 run scoreboard players get @s sgrave

function snapgrave:response/retrieve/remove_storage with storage sgrave:temp

function snapgrave:response/retrieve/kill with storage sgrave:temp

#function snapgrave:response/set_day with storage sgrave:temp

data remove storage sgrave:temp gid
data remove storage sgrave:temp pid
data remove storage sgrave:temp XpPoint