The Dink Network

A monster that can assault...but nothing happend...

December 18th 2009, 05:40 AM
knights.gif
pathfinder
Peasant He/Him China
I love hanging ON LINE without doing anything... 
I used a bonca's sketelon,and that bonca just be that normal bonca!
I want the bonca can launch am assault(speed up to 5) when hit,and back to normal then it attacks...
This is my script.
//Bonca..medium strength

void main( void )
{
int &mcounter;
int &mtarget; //I add this!
int &mcrap; //I add this!
int &assault; //I add this!
int &mdamage; //I add this!
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 1);
sp_distance(&current_sprite, 50);
sp_timing(&current_sprite, 33);
sp_exp(&current_sprite, 30);
sp_base_walk(&current_sprite, 530);
sp_base_death(&current_sprite, 550);
sp_base_attack(&current_sprite, 540);
sp_defense(&current_sprite, 3);
sp_strength(&current_sprite, 8);
sp_touch_damage(&current_sprite, 4);
sp_hitpoints(&current_sprite, 20);
preload_seq(531);
preload_seq(533);
preload_seq(537);
preload_seq(539);
preload_seq(551);
preload_seq(553);
preload_seq(557);
preload_seq(559);

preload_seq(542);
preload_seq(544);
preload_seq(546);
preload_seq(548);
loop: //I add this!
&mtarget = sp_target(&current_sprite,-1);
if (&assault = 1)
{
if (&mtarget > 0)
{
assault();
goto loop;
}
}
sp_speed(&current_sprite,1);

} //I add this!

void hit( void )
{
playsound(29, 22050,0,&current_sprite, 0);

sp_target(&current_sprite, &enemy_sprite);
&assault = 1; //I add this!
//lock on to the guy who just hit us
//playsound

}

void die( void )
{
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
editor_type(&hold, 6);

&save_x = sp_x(&current_sprite, -1);
&save_y = sp_y(&current_sprite, -1);
external("emake","medium");
}

void attack( void )
{
playsound(31, 22050,0,&current_sprite, 0);
&assault = 0; //I add this!
&mcounter = random(4000,0);
sp_attack_wait(&current_sprite, &mcounter);
}
//I add this!
void assault(void)
{
say("<Quick raid>",&current_sprite);
sp_speed(&current_sprite,5);
&mcrap = random(7,1);
if (&mcrap < 4)
{
&mdamage = sp_defense(&current_sprite,-1);
&mdamage += 1;
hurt(&current_sprite,&mdamage);
}
return;
}
December 18th 2009, 06:24 AM
knights.gif
pathfinder
Peasant He/Him China
I love hanging ON LINE without doing anything... 
Do I have to use that loop in the main procedure?
maybe not...
December 18th 2009, 08:25 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
Why don't you just run what's necessary in void hit and void attack?

Like change his attack and speed in void hit and change it back again in void attack?