mirror of
https://github.com/Jusctsch5/ironsphererpg.git
synced 2026-01-19 19:44:45 +00:00
Taking everything obtained from http://ironsphererpg2.webs.com/ and dumping it in a git repo
40 lines
683 B
C#
40 lines
683 B
C#
//helpers.cs
|
|
//function libs for addition and assist functioning
|
|
//Phantom139
|
|
|
|
function GetRandomPosition(%mult,%nz) {
|
|
%x = getRandom()*%mult;
|
|
%y = getRandom()*%mult;
|
|
%z = getRandom()*%mult;
|
|
|
|
%rndx = getrandom(0,1);
|
|
%rndy = getrandom(0,1);
|
|
%rndz = getrandom(0,1);
|
|
|
|
if(%nz) {
|
|
%z = 0;
|
|
}
|
|
|
|
if (%rndx == 1){
|
|
%negx = -1;
|
|
}
|
|
if (%rndx == 0){
|
|
%negx = 1;
|
|
}
|
|
if (%rndy == 1){
|
|
%negy = -1;
|
|
}
|
|
if (%rndy == 0){
|
|
%negy = 1;
|
|
}
|
|
if (%rndz == 1){
|
|
%negz = -1;
|
|
}
|
|
if (%rndz == 0){
|
|
%negz = 1;
|
|
}
|
|
|
|
%rand = %negx * %x SPC %negy * %y SPC %Negz * %z;
|
|
return %rand;
|
|
}
|