The Dink Network

Attacking Knights

December 4th 2005, 02:58 PM
dragon.gif
Does anyone know where some good scripts for the knights from the main game are? Ones that get them to attack?
December 4th 2005, 03:14 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
The source scripts for the game are in source.zip in the develop directory. I dunno the names but the knights near King Daniel's castle attack you when you hit them, and his castle is somewhere in the middle of the map, so if you check that mapscreen in the editor, you've got the scriptnames and as such, the scripts
December 4th 2005, 03:31 PM
dragon.gif
Yeah, but I want ones that act like enemies by default, not just when you attack them, but I'll look into it to see if I can edit them to act as such. I should of thought of that myself actually. I've already taken end edited quite a few scripts from the source for the game.
December 4th 2005, 04:06 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
i have a sample script for an enemy knight in my dev file rabidwolf9's dev toychest
December 4th 2005, 04:14 PM
dragon.gif
Okay, thanks, I'll look into that too. I hope it's too my liking.
December 4th 2005, 04:20 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
you'll have to change the base_walk and base_hit though

270 - red walk
280 - blue walk
290 - silver walk
300 - gold walk

710 - red attack
720 - silver attack
730 - blue attack
740 - gold attack
December 4th 2005, 04:22 PM
dragon.gif
I just looked into it and it's not really what I'm looking for. It's mainly that I don't like the colour of the knights.
December 4th 2005, 04:27 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
You realise you can easily fix that by changing the preload_seq, sp_base_walk and sp_base_attack to the values rabidwolf9 listed in the post you answered to?
December 4th 2005, 04:28 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
h/o, i'll fix the script for you
December 4th 2005, 04:30 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
this should work for a red knight from dink(if you wanted a different color, all you have to do is change a couple of numbers):

void main( void )
{
int &mcounter;
sp_brain(&current_sprite, 9);
sp_speed(&current_sprite, 2);
sp_distance(&current_sprite, 60);
sp_timing(&current_sprite, 33);
sp_exp(&current_sprite, 30);
sp_base_walk(&current_sprite, 270);
sp_base_death(&current_sprite, -1);
sp_base_attack(&current_sprite, 710);
sp_defense(&current_sprite, 10);
sp_strength(&current_sprite, 10);
sp_touch_damage(&current_sprite, 1);
sp_hitpoints(&current_sprite, 100);
preload_seq(271);
preload_seq(273);
preload_seq(275);
preload_seq(277);
preload_seq(279);
preload_seq(712);
preload_seq(714);
preload_seq(716);
preload_seq(718);
}

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

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(36, 22050,0,&current_sprite, 0);
&mcounter = random(4000,0);
sp_attack_wait(&current_sprite, &mcounter);
}

December 4th 2005, 04:45 PM
dragon.gif
Ok, thankyou, I'll use an edited version of that (one with the stats as I want them to be). You've saved me a lot of hassle. Thankyou.