The Dink Network

Reply to Re: New/Updated Dev Files: DraconicDink releases a bunch of stuff.

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
December 22nd 2005, 08:29 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Percentages:

//This adds 50% of the life, change to 75 for 75% etc.
int &percentage = 50;
int &crap = &lifemax;
&crap * &percentage;
&crap / 100;
//&crap is now 50% of lifemax
&life += &crap;
if (&life > &lifemax)
{
&life = &lifemax;
}

Temp stat boost (example: strength):

//not sure if it will work when used multiple times, on screenchanges, deaths, sword-equips, etc, but it's the base and it should work if you stay on one screen idling...

//5 seconds boosted stat (50*100 millisecond = 5 second)
//A value of 55 is 5 and a half second.
int &strboosttimer = 50;
//increase stat by 4
int &strboostamount = 4;
script_attach(1000);
&strength += &strboostamount;
strboostloop:
wait(100);
&strboosttimer -= 1;
if (&strboosttimer == 0)
{
&strength -= &strboostamount;
kill_this_task();
}
goto strboostloop;