Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main(void)
- {
- //This checks if the player has perk 12, the Speech perk.
- external("perks", "getPerk", 12);
- int &speech = &return;
- //&text(s) are for the actual choices
- int &text;
- int &text2;
- int &text3;
- int &text4;
- int &text5;
- int &text6;
- int &text7;
- int &title;
- int &title2;
- int &ch;
- &ch = 1;
- //This is to get your companion. Not important.
- int &kara = get_sprite_with_this_brain(16, ¤t_sprite);
- }
- void talk(void)
- {
- //If they don't have the speech perk, automatically start them on choice 2
- if(&speech > 0)
- {
- &ch = 1;
- }
- if(&speech < 1)
- {
- &ch = 2;
- }
- freeze(1);
- freeze(¤t_sprite);
- say_stop("`4Well hello, there!",¤t_sprite);
- wait(100);
- //Left, Mid/Mid2, and Right create the choice box
- int &left = create_sprite(151, 286, 0, 30, 2);
- sp_que(&left, 9000);
- int &mid = create_sprite(325, 270, 0, 30, 3);
- sp_que(&mid, 9000);
- int &mid2 = create_sprite(383, 270, 0, 30, 3);
- sp_que(&mid, 9000);
- int &right = create_sprite(525, 285, 0, 30, 4);
- sp_que(&right, 9000);
- //1a, 1b, etc. are the wooden arrows that point at the current choice. They are invisible by default.
- int &1a = create_sprite(155, 222, 6, 456, 1);
- sp_nodraw(&1a, 1);
- sp_seq(&1a, 456);
- sp_que(&1a, 9001);
- int &1b = create_sprite(525, 222, 6, 457, 1);
- sp_nodraw(&1b, 1);
- sp_seq(&1b, 457);
- sp_que(&1b, 9001);
- int &2a = create_sprite(155, 245, 6, 456, 1);
- sp_nodraw(&2a, 1);
- sp_seq(&2a, 456);
- sp_que(&2a, 9001);
- int &2b = create_sprite(525, 245, 6, 457, 1);
- sp_nodraw(&2b, 1);
- sp_seq(&2b, 457);
- sp_que(&2b, 9001);
- int &3a = create_sprite(155, 265, 6, 456, 1);
- sp_nodraw(&3a, 1);
- sp_seq(&3a, 456);
- sp_que(&3a, 9001);
- int &3b = create_sprite(525, 265, 6, 457, 1);
- sp_nodraw(&3b, 1);
- sp_seq(&3b, 457);
- sp_que(&3b, 9001);
- int &4a = create_sprite(155, 202, 6, 456, 1);
- sp_nodraw(&4a, 1);
- sp_seq(&4a, 456);
- sp_que(&4a, 9001);
- int &4b = create_sprite(525, 202, 6, 457, 1);
- sp_nodraw(&4b, 1);
- sp_seq(&4b, 457);
- sp_que(&4b, 9001);
- int &5a = create_sprite(155, 205, 6, 456, 1);
- sp_nodraw(&5a, 1);
- sp_seq(&5a, 456);
- sp_que(&5a, 9001);
- int &5b = create_sprite(525, 205, 6, 457, 1);
- sp_nodraw(&5b, 1);
- sp_seq(&5b, 457);
- sp_que(&5b, 9001);
- int &6a = create_sprite(155, 162, 6, 456, 1);
- sp_nodraw(&6a, 1);
- sp_seq(&6a, 456);
- sp_que(&6a, 9001);
- int &6b = create_sprite(525, 162, 6, 457, 1);
- sp_nodraw(&6b, 1);
- sp_seq(&6b, 457);
- sp_que(&6b, 9001);
- int &7a = create_sprite(155, 285, 6, 456, 1);
- sp_nodraw(&7a, 1);
- sp_seq(&7a, 456);
- sp_que(&7a, 9001);
- int &7b = create_sprite(525, 285, 6, 457, 1);
- sp_nodraw(&7b, 1);
- sp_seq(&7b, 457);
- sp_que(&7b, 9001);
- //////CHOICES
- //We aren't using an actual choice menu, so we have to make the title ourselves.
- &title = say_xy("`3What can I do for you?", 25, 115);
- //Title never dies (it's just missing in action)
- sp_kill(&title, 0);
- //Loop to draw text in correct colors
- loop:
- freeze(1);
- wait(1);
- //nodraw ALL the arrows
- sp_nodraw(&1a, 1);
- sp_nodraw(&1b, 1);
- sp_nodraw(&2a, 1);
- sp_nodraw(&2b, 1);
- sp_nodraw(&3a, 1);
- sp_nodraw(&3b, 1);
- sp_nodraw(&4a, 1);
- sp_nodraw(&4b, 1);
- sp_nodraw(&5a, 1);
- sp_nodraw(&5b, 1);
- sp_nodraw(&6a, 1);
- sp_nodraw(&6b, 1);
- sp_nodraw(&7a, 1);
- sp_nodraw(&7b, 1);
- sp_active(&text, 0);
- //The choice is 1, so we nodraw(0) the arrows and create some standard text (In White, since it's selected)
- if(&ch == 1)
- {
- sp_nodraw(&5a, 0);
- sp_nodraw(&5b, 0);
- &text = say_xy("`%Can you read me a book?",25,190);
- }
- external("perks", "getPerk", 12);
- int &speech = &return;
- if(&ch != 1)
- {
- if(&speech > 0)
- {
- &text = say_xy("`0Can you read me a book?",25,190);
- }
- if(&speech < 1)
- {
- &text = say_xy("`7Can you read me some of these books?",25, 190);
- }
- }
- sp_kill(&text, 0);
- sp_que(&text, 9001);
- sp_active(&text2, 0);
- if(&ch == 2)
- {
- sp_nodraw(&1a, 0);
- sp_nodraw(&1b, 0);
- &text2 = say_xy("`%Who are you?",25, 210);
- }
- if(&ch != 2)
- {
- &text2 = say_xy("`!Who are you?",25, 210);
- }
- sp_kill(&text2, 0);
- sp_active(&text3, 0);
- if(&ch == 3)
- {
- sp_nodraw(&2a, 0);
- sp_nodraw(&2b, 0);
- &text3 = say_xy("`%Do you like it here?",25, 230);
- }
- if(&ch != 3)
- {
- &text3 = say_xy("`!Do you like it here?", 25, 230);
- }
- sp_kill(&text3, 0);
- sp_que(&text3, 9001);
- sp_active(&text4, 0);
- if(&ch == 4)
- {
- sp_nodraw(&3a, 0);
- sp_nodraw(&3b, 0);
- if(&wellq == 0)
- {
- &text4 = say_xy("`%Do you need help with anything?",25, 250);
- }
- if(&wellq == 1)
- {
- &text4 = say_xy("`%What did you want me to do, again?",25, 250);
- }
- if(&wellq == 3)
- {
- &text4 = say_xy("`%Here's your spoiler.",25, 250);
- }
- if(&wellq == 4)
- {
- &text4 = say_xy("`%Anything else?",25, 250);
- }
- }
- if(&ch != 4)
- {
- if(&wellq == 0)
- {
- &text4 = say_xy("`!Do you need help with anything?",25, 250);
- }
- if(&wellq == 1)
- {
- &text4 = say_xy("`!What did you want me to do, again?",25, 250);
- }
- if(&wellq == 3)
- {
- &text4 = say_xy("`!Here's your spoiler.",25, 250);
- }
- if(&wellq == 4)
- {
- &text4 = say_xy("`!Anything else?",25, 250);
- }
- }
- sp_kill(&text4, 0);
- sp_active(&text5, 0);
- if(&ch == 5)
- {
- sp_nodraw(&7a, 0);
- sp_nodraw(&7b, 0);
- &text5 = say_xy("`%Leave",25, 270);
- }
- if(&ch != 5)
- {
- &text5 = say_xy("`!Leave",25, 270);
- }
- sp_kill(&text5, 0);
- //18 is up, 12 is down
- wait_for_button();
- if(&result == 14)
- {
- goto down;
- }
- if(&result == 16)
- {
- goto up;
- }
- if(&result == 1)
- {
- playsound(17,22050,0,0,0);
- sp_active(&text, 0);
- sp_active(&text2, 0);
- sp_active(&text3, 0);
- sp_active(&text4, 0);
- sp_active(&text5, 0);
- sp_active(&left, 0);
- sp_active(&mid, 0);
- sp_active(&mid2, 0);
- sp_active(&right, 0);
- sp_active(&title, 0);
- sp_active(&title2, 0);
- sp_active(&1a, 0);
- sp_active(&1b, 0);
- sp_active(&2a, 0);
- sp_active(&2b, 0);
- sp_active(&3a, 0);
- sp_active(&3b, 0);
- sp_active(&4a, 0);
- sp_active(&4b, 0);
- sp_active(&5a, 0);
- sp_active(&5b, 0);
- sp_active(&6a, 0);
- sp_active(&6b, 0);
- sp_active(&7a, 0);
- sp_active(&7b, 0);
- if(&ch == 1)
- {
- say_stop("Can you read me some of these books?",1);
- wait(100);
- say_stop("`4Spoilers.",¤t_sprite);
- say_stop("`4Spoilers.",¤t_sprite);
- wait(100);
- choice_start();
- set_y 240
- set_title_color 4
- title_start();
- "Spoiler Title?"
- title_end();
- "Sure!"
- "Not right now."
- choice_end();
- int &newres = &result;
- if(&newres == 1)
- {
- say_stop("`4Spoilers.",¤t_sprite);
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- if(&newres == 2)
- {
- say_stop("Spoilers.",1);
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- }
- if(&ch == 2)
- {
- say_stop("Spoilers.",1);
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- if(&ch == 3)
- {
- say_stop("Spoilers.",1);
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- if(&ch == 4)
- {
- if(&wellq == 0)
- {
- say_stop("Do you need help with anything?",1);
- wait(100);
- say_stop("`4Hmm...yes, I suppose I could use your help with something.",¤t_sprite);
- say_stop("`4I accidentally dropped one of my most treasured items, the statue of King Anatidae,",¤t_sprite);
- say_stop("`4down the well outside my house.",¤t_sprite);
- say_stop("`4If you retrieve it for me, I'm sure I have something good lying around that will be valuable to you.",¤t_sprite);
- wait(100);
- choice_start();
- set_y 240
- set_title_color 4
- title_start();
- "Start 'Gravity Most Fowl'?"
- title_end();
- "Yes"
- "No"
- choice_end();
- if(&result == 1)
- {
- say_stop("Spoilers.",1);
- &wellq += 1;
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- if(&result == 2)
- {
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- }
- if(&wellq == 1)
- {
- say_stop("Spoilers.",1);
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- if(&wellq == 3)
- {
- say_stop("Spoiler.",1);
- &wellq += 1;
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- if(&wellq == 4)
- {
- say_stop("spoiler.",1);
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- }
- if(&ch == 5)
- {
- unfreeze(1);
- unfreeze(¤t_sprite);
- return;
- }
- }
- if(&result == 12)
- {
- down:
- playsound(11,22050,0,0,0);
- freeze(1);
- if(&ch == 1)
- {
- &ch = 2;
- goto loop;
- }
- if(&ch == 2)
- {
- &ch = 3;
- goto loop;
- }
- if(&ch == 3)
- {
- &ch = 4;
- goto loop;
- }
- if(&ch == 4)
- {
- &ch = 5;
- goto loop;
- }
- if(&ch == 5)
- {
- if(&speech > 0)
- {
- &ch = 1;
- }
- if(&speech < 1)
- {
- &ch = 2;
- }
- goto loop;
- }
- }
- if(&result == 18)
- {
- up:
- freeze(1);
- playsound(11,22050,0,0,0);
- if(&ch == 1)
- {
- &ch = 5;
- goto loop;
- }
- if(&ch == 2)
- {
- if(&speech > 0)
- {
- &ch = 1;
- }
- if(&speech < 1)
- {
- &ch = 5;
- }
- goto loop;
- }
- if(&ch == 3)
- {
- &ch = 2;
- goto loop;
- }
- if(&ch == 4)
- {
- &ch = 3;
- goto loop;
- }
- if(&ch == 5)
- {
- &ch = 4;
- goto loop;
- }
- else
- {
- goto loop;
- }
- //unfreeze(1);
- //unfreeze(&doc);
- //say("Not right now, thanks.",1);
- //return;
- }
- goto loop;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement