1 //this script fills life up, touch_damage must be set to -1. (run script mode)
2 
main()3 void main( )
4 {
5         sp_pseq(&current_sprite, 178);
6         sp_frame(&current_sprite, 4); //so the seq will start
7    //     sp_brain(&current_sprite, 6);
8         sp_touch_damage(&current_sprite, -1);
9         sp_nohit(&current_sprite, 1);
10 
11 
12 //create shiny thingie
13 &save_x = sp_x(&current_sprite, -1);
14 &save_y = sp_y(&current_sprite, -1);
15 &save_y += random(5,1);
16 int &startframe = random(5,1);
17 int &spark = create_sprite(&save_x, &save_y, 15, 165, 1);
18 sp_seq(&spark, 165);
19 sp_nohit(&spark, 1);
20 sp_frame(&spark, &startframe);
21 sp_brain_parm(&spark, &current_sprite);
22 
23 }
24 
touch(void)25 void touch( void )
26 {
27 int &mcrap = random(50,50);
28 &gold += &mcrap;
29 say("I found &mcrap gold.",1);
30 sp_brain_parm(&current_sprite, 10);
31 sp_brain(&current_sprite, 12);
32 sp_touch_damage(&current_sprite, 0);
33 sp_timing(&current_sprite, 0);
34 
35   //kill this item so it doesn't show up again for this player
36   int &hold = sp_editor_num(&current_sprite);
37   if (&hold != 0)
38   editor_type(&hold, 1);
39 
40 }
41 
42