The Dink Network

Reply to Re: upgrading script prevents monster spawning.

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:
 
 
June 10th 2012, 06:26 AM
knights.gif
merder
Peasant He/Him Netherlands
The Voice in the back of your head! 
updates syntax highlithging for notepad++ and the new feature of collapsing helped tons so fixed bracket error and th missed &
and it is fixed

so her is the fixed code and doubt i've missed anything now (as usual feel free too use in your mods with proper credits and if used i recommend adding new sectiosns like i will ofr when i have new bosses scripted for the other dungeons and don't forget to chage counter names or add the globals i've used(bet you can tell their names by just looking at script .

Also Kyle the script i set up so it works only once per chosen dungeon floor so don't think the initiating should be that much of a problem.

// guess what i spawn monsters in the dungeons

void main(void)
{
if (&dungeon == 1)
{
if (&special == 0)
{
//ok just arrived so letsspawn some pillbugs

int &temp = create_sprite(295,160,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill");

int &temp = create_sprite(295,230,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill");

int &temp = create_sprite(511,160,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill");

int &temp = create_sprite(511,230,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill");

if (random(2,1) == 1)
{
int &temp = create_sprite(332,139,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill");

}

if (random(2,1) == 1)
{
int &temp = create_sprite(332,220,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill");

}
&special += 1;
//tells the mod you've been here so the monsters won't respawn again after you've left the screen

}
}

if (&dungeon == 3)
{

if (&special == 0)
{
//ok just arrived so lets choose what to spawn via randomness

int &who = random(3,1);

if (&who == 1)
// pillies won so lets spawn them
{
int &temp = create_sprite(295,160,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

int &temp = create_sprite(295,230,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

int &temp = create_sprite(511,160,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

int &temp = create_sprite(511,230,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

if (random(2,1) == 1)
{
int &temp = create_sprite(332,139,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

}

if (random(2,1) == 1)
{
int &temp = create_sprite(332,220,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

}
}
if (&who == 2)
// half pillies and purple bonca's won so lets spawn them
{
int &temp = create_sprite(295,160,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

int &temp = create_sprite(295,230,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

int &temp = create_sprite(511,160,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

int &temp = create_sprite(511,230,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

if (random(2,1) == 1)
{
int &temp = create_sprite(332,139,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pill1");

}

if (random(2,1) == 1)
{
int &temp = create_sprite(332,220,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

}
}

if (&who == 3)
// bonca's won so lets spawn them
{
int &temp = create_sprite(295,160,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

int &temp = create_sprite(295,230,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

int &temp = create_sprite(511,160,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

int &temp = create_sprite(511,230,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

if (random(2,1) == 1)
{
int &temp = create_sprite(332,139,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

}

if (random(2,1) == 1)
{
int &temp = create_sprite(332,220,9,131,1);

sp_dir(&temp,1);

sp_script(&temp,"en-pbon");

}
}

&special += 1;
//tells the mod you've been here so the monsters won't respawn again after you've left the screen

}