- Does not require Unimod or patch files
- Max value: 9999
- Open Digits.ns to see code
- - Usage: HandleDigits(123);
- - Requires: 5 named waypoints

float FloatTable(int num)
{
float arr[28];
int k;
float count;
if (num < 0)
{
count = 27.0;
for (k = 27 ; k >= 0 ; k --)
{
arr[k] = count;
count -= 1.0;
}
return AnyIntToFloat(0);
}
return arr[num];
}
NumberOrb(int wp)
{
int ptr;
int k;
if (wp)
{
ptr = CreateObject("InvisibleLightBlueHigh", wp) + 1;
for (k = 0 ; k < 28 ; k ++)
{
CreateObject("ManaBombOrb", wp);
MoveWaypoint(wp, GetWaypointX(wp) + 1.0, GetWaypointY(wp));
}
Raise(ptr - 1, AnyIntToFloat(wp));
}
return ptr;
}
int NumberData(int num)
{
int data[10];
if (!data[0])
{
data[0] = 110729622; data[1] = 239354980; data[2] = 252799126; data[3] = 110643350; data[4] = 143194521;
data[5] = 126382367; data[6] = 110719382; data[7] = 71583903; data[8] = 110717334; data[9] = 110684566;
return 0;
}
return data[num];
}
void DisplayNumber(int ptr, int loc, int bytes)
{
float pos_x = GetWaypointX(loc);
float pos_y = GetWaypointY(loc);
int idx = 0;
int k;
int wp = AnyFloatToInt(GetObjectZ(ptr - 1));
for (k = 1 ; !(k & 0x10000000) ; k <<= 1)
{
if (bytes & k)
MoveObject(ptr + idx, pos_x, pos_y);
else
MoveObject(ptr + idx, GetWaypointX(wp) + FloatTable(idx), GetWaypointY(wp));
if (idx % 4 == 3)
{
pos_x = GetWaypointX(loc);
pos_y += 2.0;
}
else
pos_x += 2.0;
idx ++;
}
}
int NUM_FST;
int NUM_SCD;
void MapInitialize()
{
FloatTable(-1);
NUM_FST = NumberOrb(59);
NUM_SCD = NumberOrb(3);
NumberData(0);
}
void Function()
{
int num;
DisplayNumber(NUM_FST, 25, NumberData(num));
num = (num + 1) % 10;
}
panic wrote:did you use another program for make number form?
or make by hand?
panic wrote:as another issue, 'WhiteMoveOrb' will does destroyed when out the sight. so i recommend using 'ManaBombOrb' instead of it.
Users browsing this forum: No registered users and 1 guest