edit variables for your needs ,
put it in a prim, and touch it…
still needs some edits (insert TABs), but can be helpful ;)
// change this to your needs
integer dots=24;
integer radius=7;
integer height=54;
integer pause=0;
integer mid_x=188;
integer mid_y=148;
// only change if you know what you do...
integer i;
integer x;
integer y;
float angel;
default
{
state_entry()
{
angel = 2*PI/dots;
llSay(0, "Hello, Avatar!");
}
touch_start(integer total_number)
{
for (i=0;i<dots;i++)
{
float xKoord = llCos(i*angel) *radius + mid_x;
float yKoord = llSin(i*angel) *radius + mid_y;
llOwnerSay("move" + (string)llRound(xKoord) + "," + (string)llRound(yKoord) + "," + (string)height + "\npause" + (string)pause);
}
}
}
Same code in PHP:
<?php
$fd=fopen("sub_pearl-ROBOT.txt", w);
fwrite($fd, "start\tNORDDEUTSCHLAND/100/109/21\r\n");
$dots=24;
$mid_x=102;
$mid_y=107;
$radius=6;
$angel=(2*pi()/$dots);
$height=21;
for ($i=0; $i<$dots; $i++)
{
$xKoord = cos($i*$angel) * $radius + $mid_x;
$yKoord = sin($i*$angel) * $radius + $mid_y;
fwrite($fd, "move\t" . round($xKoord) . "," . round($yKoord) . "," . $height . "\r\n");
fwrite($fd, "pause\t" . $pause . "\r\n");
}
fclose($fd);
?>