Ostatnio mi się strasznie nudziło, tak więc zrobiłem sobie funkcję potęgowania.
Wszystko jest opisane (po angielsku, ponieważ ludzie zza granicy także tutaj uczęszczają), tak więc nie powinno być pytań. A z resztą, funkcja działa, była testowana liczbami 2^3 oraz 40^5, wszystko działa rewelacyjnie.
X = liczba do wymnożenia
Y = potęga
UWAGA!!!: Gothic nie pokaże wam poprawnego wyniku, jeśli wynosi on więcej niż 999 999 999 (to chyba wiecie).
Jeśli czegoś nie zrozumiecie z mojego słabego inglisza, to można pytać.

func int e^ (var int x, var int y) // Why the name is "e^"? Simple, exponentiation is for example 2^2
{
var int PotatoRotations; PotatoRotations = 0;
var int EndCount;
if (x == 0) { return false; }; // 0*0 = 0...
if (x == 1) { return true; }; // 1*1*1*1*1*1*1*1*1*1*1*1*1*1 = 1...
if (y == 1)
{
return x;
}
else if (y == 0)
{
return false;
}
else
{
EndCount = x * x;
};
var int stckpos; stckpos = MEM_StackPos.position;
if ((PotatoRotations) < (y-2)) /*NOTE: EndCount is soon x*x, and if it'd be y-1, the EndCount would be x^(y+1)
if x would be 2, and y 3, this'd be: EndCount = 4; and then if (0 < 1) [PotatoRotations < y] { EndCount = EndCount*x }
and now y == PotatoRotations, so the EndCount is now 8 (2^3) :)*/
{
EndCount = EndCount * x;
PotatoRotations += 1;
MEM_StackPos.position = stckpos;
};
return EndCount;
};