Fix to get some scripts to compile
Posted: Wed Jul 05, 2006 6:13 pm
I am starting this thread for those interested.
Add the following functions taken from the 96 Distro damage.inc file to \Distro 97\Distro\pkg\mobiles\damage\include\damage.inc
Add the following functions taken from the 96 Distro damage.inc file to \Distro 97\Distro\pkg\mobiles\damage\include\damage.inc
Code: Select all
/*
* ResistancePercentToMult(percent)
*
* Purpose
* Turns a percentage into a resistance multiplier.
*
* Parameters
* percent
*
* Return value
* Double resistance multiplier
*
*/
function ResistancePercentToMult(percent)
if ( percent > 0 )
//print("% to mult: "+percent+" is: "+(CDbl(100 - percent) * 0.010));
return CDbl(100 - percent) * 0.010;
else
//print("% to mult: "+percent+" is: "+(CDbl(100 + percent) * 0.010));
return CDbl(100 + percent) * 0.010;
endif
endfunction
/*
* ResistancePercentToMult(percent)
*
* Purpose
* Turns a resistance multiplier into a percentage.
*
* Parameters
* mult
*
* Return value
* Int percentage
*
*/
function ResistanceMultToPercent(mult)
if ( mult > 0 )
//print("mult to %: "+mult+" is: "+CInt(100 - (mult * 100)));
return CInt(100 - (mult * 100));
else
//print("mult to %: "+mult+" is: "+CInt(100 + (mult * 100)));
return CInt(100 + (mult * 100));
endif
endfunction