Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 RPG Starter...
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
decon1985




PostPosted: Wed Jun 08, 2005 10:16 am   Post subject: RPG Starter...

code:

var que1, que2, que3, que4, que5, que6, que7 : string

drawfillbox (0, 0, maxx, maxy, black)
colour (11)
colourback (black)

var font1, font2 : int
font1 := Font.New ("Comic Sans MS:50")
font2 := Font.New ("serif:20")
Font.Draw ("RPG ADVENTURE", 30, 230, font1, 11)
Font.Draw ("By : Devin Foulds", 190, 180, font2, 11)
Font.Free (font1)
Font.Free (font2)

delay (2200)

drawfillbox (0, 0, maxx, maxy, black)
colour (11)
colourback (black)

put "The end will spark a new begining...after the world has ended only a few will"
put "in there normal form and bring a new age."
put "The others have become monsters; goblins, orcs, trolls and gools."
put "The few survivors are now bounty hunters and they must kill to survive."
put "this is where your story begins..."
delay (7000)
cls

put "THE GUIDE ASKS: What do you see yourself as?"
put "1)Mighty"
put "2)Intelligent"
put "3)Sneaky"
put "4)Religious"
get que1




delay (1100)
cls
put "I see..."
delay (1100)
cls


put "THE PRIEST ASKS: What do you believe in?"
put "1)Good"
put "2)Evil"
put "3)A Balance"
put "4)Nothing..."
get que2

delay (1100)
cls

put "Interesting Choice..."
delay (1100)
cls

put "THE BEGINING ASKS: What path will you choose?"
put "1)Honour"
put "2)Strength"
put "3)Cunning"
put "4)Construtive"
put "5)Anger"
put "6)Corruptness"
get que3

delay (1100)
cls

put "Alright, it is all done..."

cls

delay (1100)

if que1 = "1"
        then
    put "You are a Warrior by heart"


else
    if que1 = "2"
            then
        put "You are a Mage by heart"

    else
        if que1 = "3"
                then
            put "You are a Thief by heart"

        else
            if que1 = "4"
                    then
                put "You are a Priest by heart"
            end if
        end if
    end if
end if


if que2 = "1"
        then
    put "Your Alliance is Good"

else
    if que2 = "2"
            then
        put "Your Alliance is Evil"

    else
        if que2 = "3"
                then
            put "Your Alliance is Neutral"

        else
            if que2 = "4"
                    then
                put "You have no Alliance"


            end if
        end if
    end if
end if

if que3 = "1"
        then
    put "Your Race is Elf"

else
    if que3 = "2"
            then
        put "Your Race is Dwarf"

    else
        if que3 = "3"
                then
            put "Your Race is Gnome"

        else
            if que3 = "4"
                    then
                put "Your Race is Human"

            else
                if que3 = "5"
                        then
                    put "Your Race is Orc"

                else
                    if que3 = "6"
                            then
                        put "Your Race is Undead"

                    end if
                end if
            end if
        end if
    end if
end if


If you have any suggestions please post them and I will incorperate them. Wink
Sponsor
Sponsor
Sponsor
sponsor
jamonathin




PostPosted: Wed Jun 08, 2005 11:46 am   Post subject: (No subject)

Well, if all this program does it decide which class and crap your rpg character is, and it would be used for a different rpg program, then dont add any delays. Get rid of all the delay's and the "i see . . " 's. Nice lil proggy tho. Wink

P.S., have you heard of
code:
elsif


There's another way where you're program can be about 1/5th the size, where you use arrays, but here's a simpler version of your program, same style. If you want I can show you what I mean by using arrays.
code:
var que1, que2, que3, que4, que5, que6, que7 : string

drawfillbox (0, 0, maxx, maxy, black)
colour (11)
colourback (black)

var font1, font2 : int
font1 := Font.New ("Comic Sans MS:50")
font2 := Font.New ("serif:20")
Font.Draw ("RPG ADVENTURE", 30, 230, font1, 11)
Font.Draw ("By : Devin Foulds", 190, 180, font2, 11)
Font.Free (font1)
Font.Free (font2)

%delay (2200)

drawfillbox (0, 0, maxx, maxy, black)
colour (11)
colourback (black)

put "The end will spark a new begining...after the world has ended only a few will"
put "in there normal form and bring a new age."
put "The others have become monsters; goblins, orcs, trolls and gools."
put "The few survivors are now bounty hunters and they must kill to survive."
put "this is where your story begins..."
%delay (7000)
cls

put "THE GUIDE ASKS: What do you see yourself as?"
put "1)Mighty"
put "2)Intelligent"
put "3)Sneaky"
put "4)Religious"
get que1




%delay (1100)
%cls
%put "I see..."
%delay (1100)
cls


put "THE PRIEST ASKS: What do you believe in?"
put "1)Good"
put "2)Evil"
put "3)A Balance"
put "4)Nothing..."
get que2

%delay (1100)
%cls

%put "Interesting Choice..."
%delay (1100)
cls

put "THE BEGINING ASKS: What path will you choose?"
put "1)Honour"
put "2)Strength"
put "3)Cunning"
put "4)Construtive"
put "5)Anger"
put "6)Corruptness"
get que3

%delay (1100)
%cls

%put "Alright, it is all done..."

cls

%delay (1100)

if que1 = "1" then
    put "You are a Warrior by heart"
elsif que1 = "2" then
    put "You are a Mage by heart"
elsif que1 = "3" then
    put "You are a Thief by heart"
elsif que1 = "4" then
    put "You are a Priest by heart"
end if


if que2 = "1" then
    put "Your Alliance is Good"
elsif que2 = "2" then
    put "Your Alliance is Evil"
elsif que2 = "3" then
    put "Your Alliance is Neutral"
elsif que2 = "4" then
    put "You have no Alliance"
end if

if que3 = "1" then
    put "Your Race is Elf"
elsif que3 = "2" then
    put "Your Race is Dwarf"
elsif que3 = "3" then
    put "Your Race is Gnome"
elsif que3 = "4" then
    put "Your Race is Human"
elsif que3 = "5" then
    put "Your Race is Orc"
elsif que3 = "6" then
    put "Your Race is Undead"
end if
decon1985




PostPosted: Wed Jun 08, 2005 3:45 pm   Post subject: WOW!

Holy crap man, thanks so much! This makes everything so much easier! Razz
fehrge




PostPosted: Wed Jun 08, 2005 4:10 pm   Post subject: (No subject)

Neat little program. You should add graphics to make it more exciting.
decon1985




PostPosted: Thu Jun 09, 2005 12:31 pm   Post subject: Thank You Very Much

Thank you for the complement, your posts are much appreciated, if you have any suggestions I would like to hear them. Very Happy
1of42




PostPosted: Thu Jun 09, 2005 1:29 pm   Post subject: (No subject)

jamonathin wrote:


P.S., have you heard of
code:
elsif


I'm pretty sure a switch would work nciely there too. Smile
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: