;Alan's authoring script. ;The following borg scripts are useful when you're authoring rooms. ;Add this to the ON OUTCHAT section of your borg. ;author - put up box saying "Authoring" { save_props EXEC "^Authoring" awaystr = "^Authoring" SAY 1 away = "" CHATSTR = } CHATSTR "author" == IF ;movepic where picture# is 1 through N ;Move a picture in a spot to another position { "$1" GREPSUB ATOI spotID = "$2" GREPSUB ATOI picture = "$3" GREPSUB ATOI x = "$4" GREPSUB ATOI y = picture 1 - spotID SETSPOTSTATE x y spotID SETPICLOC "" CHATSTR = } CHATSTR LOWERCASE "^movepic ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)$" GREPSTR IF ;movespot - move upper left corner of spot to mouse position ;move a spot to another position { MOUSEPOS "$1" GREPSUB ATOI SETLOC "" CHATSTR = } CHATSTR "^movespot (.*)" GREPSTR IF ;mp - get the current mouse position { MOUSEPOS y = x = "@" x ITOA & " " & y ITOA & " x = " & x ITOA & ", y = " & y ITOA & LOCALMSG "" CHATSTR = } CHATSTR "mp" == IF ;Setpictures spot - Position multiple pictures in a spot so they appear to 'slide' across the room { "$1" GREPSUB ATOI spotID = ;************************************************* ;Set the picture location parameters. ;Door numbers are 1 through N. ;Start and stop positions are pixels relative to the door. ;You must be an Owner/Operator for the script to work. 1 start_pic_nbr = 9 stop_pic_nbr = -200 start_x = -200 start_y = 0 stop_x = 0 stop_y = ;************************************************* stop_pic_nbr start_pic_nbr - steps = stop_x start_x - range_x = stop_y start_y - range_y = ; ;Move the pictures. Multiply before divide to reduce error! ; start_pic_nbr 1 - i = { i spotID SETSPOTSTATE start_x range_x i * steps / + start_y range_y i * steps / + spotID SETPICLOC i ++ } { i stop_pic_nbr 1 - <= } WHILE 0 ME SETSPOTSTATE "" CHATSTR = } CHATSTR "setpictures spot ([0-9]+)" GREPSTR IF ;RoomInfo - get all the info available for this room { "\x0dServer: " SERVERNAME & " Room: " & ROOMNAME & " ID: " & ROOMID ITOA & LOGMSG "There are " NBRDOORS ITOA & " doors, " & NBRSPOTS NBRDOORS - ITOA & " spots and " & NBRROOMUSERS ITOA & " users." & LOGMSG { "Door/Spot #" i 1 + ITOA & ": ID = " & i SPOTIDX ITOA & " State = " & i SPOTIDX GETSPOTSTATE ITOA & { " Name = \"" & i SPOTIDX SPOTNAME & "\"" & } i SPOTIDX SPOTNAME "" == NOT IF { " Dest = " & i SPOTIDX SPOTDEST ITOA & } i SPOTIDX SPOTDEST 0 <> IF { " " & } i SPOTIDX ISLOCKED IF { " " & } i SPOTIDX INSPOT IF LOGMSG i ++ } { i NBRSPOTS < } WHILE "" CHATSTR = } CHATSTR "roominfo" == IF