The Dink Network

help with magic

March 3rd 2005, 01:14 PM
death.gif
sirakn
Peasant He/Him
 
i can get fireball and when i do for my dmod i push shift to use it and nothing happens also i dont see one of those little green loading things around the fireball icon help plz i probly ask alot of questions so sorry guys
March 3rd 2005, 04:19 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
What command did you use to add the magic?
March 3rd 2005, 04:21 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
make sure there's:

&update_status = 1;
draw_status();

in the start-1.c and &magic_cost isn't 0. I've heard things of that 100 is the minimum, but I'm not sure yet. To be safe, use at least 100.
March 3rd 2005, 04:21 PM
death.gif
sirakn
Peasant He/Him
 
i added it in start-1 and i did it right i equip it and everything but when i press shift nothing happens so help plz
March 3rd 2005, 05:15 PM
spike.gif
Two likely reasons:

There is no &update_status = 1;

You have zero magic

Are you using the original fireball spell or have you modified it yourself? In the first case you should propably post the command line you used to add the magic here... in the latter the modified script.
March 3rd 2005, 05:52 PM
death.gif
sirakn
Peasant He/Him
 
where do i add the status thing and which script the one with the person givin me the magic or the item
March 3rd 2005, 06:09 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
The status thing belongs in start-1.c

Original Dink start-1.c click proc:

void click ( void )
{
//lets start a new game
Say_xy("`%Creating new game...", 0, 390);
wait(1);
sp_x(1, 334);
sp_y(1, 161);
sp_base_walk(1, 70);
sp_base_attack(1, 100);
set_mode(2); //turn game on
reset_timer();
sp_dir(1, 4);
sp_brain(1, 1);
sp_que(1, 0);
sp_noclip(1, 0);
//lets give him fists to start out with
add_item("item-fst",438, 1);
&cur_weapon = 1;
&update_status = 1;
draw_status();

//arm them for him too
// initfont("SWEDISH");
arm_weapon();
//need this too
kill_this_task();
}

Really really, really make sure these lines are in the start-1.c. Your other spell-problem and the treasure-chest problem could have this same cause.
March 3rd 2005, 06:28 PM
death.gif
sirakn
Peasant He/Him
 
i put that in and guess what it tottaly frozze my whole comp i had to reset my computer
March 3rd 2005, 07:22 PM
death.gif
sirakn
Peasant He/Him
 
ok i got it so i can have magic it worked the sound was on 57 hahahahaha i feel stupid but now only with firball magic when i push enter after i get it it shuts down now what
March 3rd 2005, 07:29 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
So you get the fireball, then you press enter, then you crash? Or is it like: you get the fireball, you press enter, you arm fireball, you press enter again, crash?

Also, do you see the correct fireball-icon?

The pressing enter-stuff might have something to do with the line you gave it with.
March 3rd 2005, 07:32 PM
death.gif
sirakn
Peasant He/Him
 
as soon as i push enter to go into my inventory it crashes
March 3rd 2005, 07:56 PM
death.gif
sirakn
Peasant He/Him
 
this is what adds fireball to my inventory i named the file item-fireball

add_magic("item-fireball", 437, 1); playsound(43, 22050, 0, 0, 0); say_stop_xy("`% - YOU LEARN *FIREBALL MAGIC* -", 10, 60); &havefb += 1; goto mgchoice; } if (&result == 2)
March 3rd 2005, 08:20 PM
spike.gif
Item names shouldn't be more than 3 letters long... you should name it item-fb1 or item-fbl or anything at all, as long as it's only three letters. More may cause problems. So this part of your script should look like something below:

add_magic("item-fb1", 437, 1);
playsound(43, 22050, 0, 0, 0);
say_stop_xy("`% - YOU LEARN *FIREBALL MAGIC* -", 10, 60);
&havefb += 1;
goto mgchoice;
}
if (&result == 2)

EDIT: It's all about 8 letters maximum (like dos) so alternatively you could name the fireball just fireball, but having the item- and s1- s2- etc. for the story greatly helps in keeping the story folder organized.

EDIT: I wonder if it were possible to do item-zabaglionepie and then add it with add_item("item-z~1", 453, 1);

Most propably not.
March 3rd 2005, 09:01 PM
death.gif
sirakn
Peasant He/Him
 
it works now ty