Code: Select all
on movePone
--numdice1 refers to the current number of box location
--sdice referes to the number of dice
put (numdice1+sdice) into sdice
put setofLocations(sdice) into pMoveOneLoc
getTheLocation "plyrOne"
if sdice > 36 then
put (36-sdice) into sdice
put setofLocations(sdice) into pMoveOneLoc
move btn "plyrOne" from theCurrentLocation to pMoveOneLoc in 100 ticks
else
move btn "plyrOne" from theCurrentLocation to pMoveOneLoc in 100 ticks
end if
put sdice into numdice1
end movePone
on getTheLocation theplayer
put the location of btn theplayer into theCurrentLocation
end getTheLocation
function setofLocations thesum
put "1-458,681*2-554,681*3-651,681*4-748,681*5-842,681*6-932,673*7-931,567*8-841,558*9-747,558*10-650,558*11-553,558*12-458,552*13-458,446*14-553,441*15-650,441*16-749,440*17-842,440*18-932,443*19-932,328*20-841,321*21-748,322*22-650,322*23-554,322*24-458,315*25-458,207*26-553,201*27-650,201*28-748,201*29-842,202*30-932,194*31-932,81*32-842,74*33-748,74*34-651,74*35-553,74*36-458,76" into locationlist
set the itemDel to "*"
put the item thesum of locationlist into holder
set the itemDel to "-"
return the item 2 of holder
end setofLocations
on getTheLocation theplayer
put the location of btn theplayer into theCurrentLocation
end getTheLocation