mirror of
https://github.com/Jusctsch5/ironsphererpg.git
synced 2026-07-16 08:55:31 +00:00
T2RPG: Initial commit of ironsphererpg directory
Taking everything obtained from http://ironsphererpg2.webs.com/ and dumping it in a git repo
This commit is contained in:
parent
fe9e2d05d1
commit
a5143b67f7
1730 changed files with 186051 additions and 0 deletions
39
scripts/helpers.cs
Normal file
39
scripts/helpers.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
//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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue