Use xright = sprite x(1) + sprite width(1)
example
box 0,0,32,32
get image 1,0,0,32,32,1
sprite 1,50,50,1
sync rate 100
do
if leftkey() then sprite 1,sprite x(1)-1, sprite y(1), sprite image (1)
if rightkey() then sprite 1,sprite x(1)+1, sprite y(1), sprite image (1)
if upkey() then sprite 1,sprite x(1), sprite y(1)-1, sprite image (1)
if downkey() then sprite 1,sprite x(1), sprite y(1)+1, sprite image (1)
y = 0
text 0,y,"Top left of sprite: " + str$(sprite x(1)) + "," + str$(sprite y(1)) : inc y,10
text 0,y,"Bottom right of sprite: " + str$(sprite x(1) + sprite width(1)) + "," + str$(sprite y(1) + sprite height(1))
loop
Quote: "this is not a quote"