;Alan's Move Picture and Person in Path script ;Set the parameters where specified. ;Place the following script in a spot: ON ENTER { 0 ME SETSPOTSTATELOCAL { "@222,212Follow me." LOCALMSG index GLOBAL 0 index = 300 ME SETALARM } 600 ALARMEXEC ; patharray GLOBAL [ ;***Set path parameters*** [ 200 275 ] [ 220 249 ] [ 238 223 ] [ 249 197 ] [ 262 168 ] [ 271 138 ] [ 309 115 ] [ 353 90 ] [ 395 62 ] [ 437 30 ] [ 475 1 ] [ 512 0 ] ;***End of data*** ] patharray = } ON OUTCHAT { ;***Set spot x,y*** 197 xspot = 296 yspot = ;***End of data*** ;position the targets patharray GLOBAL { { 0 i = { i ME SETSPOTSTATE "Setting picture: " i ITOA & LOGMSG patharray i GET temparray = temparray 0 GET xspot - temparray 1 GET yspot - ME SETPICLOC i ++ } { i patharray LENGTH < } WHILE 0 ME SETSPOTSTATE "" CHATSTR = } "$1" GREPSUB ATOI ME == IF } CHATSTR "^setpictures ([0-9]+)" GREPSTR ISWIZARD AND IF } ON ALARM { index GLOBAL patharray GLOBAL ;***Set parameters here*** 0 xoffset = ;x offset from picture 0 yoffset = ;y offset from picture -2 ioffset = ;difference between person and picture state 60 dt = ;delay time between moves. Each multiple of 60 is one second. ;*** end of parameters *** index ioffset + index2 = { patharray index2 GET DUP 0 GET x = SWAP 1 GET y = x xoffset + y yoffset + SETPOS } index2 0 > IF index ME SETSPOTSTATELOCAL ;first position { } index 0 == IF ;third position { "@250,160!Don't make me ask you twice!" LOCALMSG } index 2 == IF ;last position { { 348 GOTOROOM } dt ALARMEXEC } index patharray LENGTH 1 - == IF ;every time { index ++ dt ME SETALARM } index patharray LENGTH 1 - < IF }