1 //this script is for 200 gold
2 
main(void)3 void main(void )
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 //create shiny thingie
12 &save_x = sp_x(&current_sprite, -1);
13 &save_y = sp_y(&current_sprite, -1);
14 &save_y += random(5,1);
15 int &startframe = random(5,1);
16 int &spark = create_sprite(&save_x, &save_y, 15, 165, 1);
17 sp_seq(&spark, 165);
18 sp_nohit(&spark, 1);
19 sp_frame(&spark, &startframe);
20 sp_brain_parm(&spark, &current_sprite);
21 
22 }
23 
touch(void)24 void touch( void )
25 {
26 int &ncrap = random(150,50);
27 &gold += &ncrap;
28 say("I found &ncrap gold.",1);
29 sp_brain_parm(&current_sprite, 10);
30 sp_brain(&current_sprite, 12);
31 sp_touch_damage(&current_sprite, 0);
32 sp_timing(&current_sprite, 0);
33 
34   //kill this item so it doesn't show up again for this player
35   int &hold = sp_editor_num(&current_sprite);
36   if (&hold != 0)
37   editor_type(&hold, 1);
38 
39 }
40 
41