AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Really shitty RPG

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
h4xx0r n00bl37



Joined: 14 Mar 2008
Posts: 56

PostPosted: Sat May 24, 2008 6:48 am    Post subject: Really shitty RPG Reply with quote

The gameplay and graphics suck but maybe someone else can use the concept. I just got bored and made this:

Code:

asdf:
Gui, Show, x195 y264 h293 w725, DiceQuest
Gui, Add, Text, x556 y217 w140 h50 , Player2:10/10
Gui, Add, Text, x76 y217 w140 h50 , Player1:10/10
Gui, Add, Button, x76 y157 w20 h50 , leftleg1
Gui, Add, Button, x136 y157 w20 h50 , rightleg1
Gui, Add, Button, x76 y77 w80 h80 , body1
Gui, Add, Button, x156 y77 w60 h30 , rightarm1
Gui, Add, Button, x16 y77 w60 h30 , leftarm1
Gui, Add, Button, x86 y27 w60 h50 , O_O
Gui, Add, Button, x506 y77 w60 h30 , leftarm2
Gui, Add, Button, x566 y77 w80 h80 , body2
Gui, Add, Button, x646 y77 w60 h30 , rightarm2
Gui, Add, Button, x576 y27 w60 h50 , O_O
Gui, Add, Button, x626 y157 w20 h50 , rightleg2
Gui, Add, Button, x566 y157 w20 h50 , leftleg2
Gui, Add, Text, x226 y77 w270 h30 ,
Gui, Add, Button, x236 y217 w100 h30 g1, Punch
Gui, Add, Button, x336 y217 w100 h30 g2, Kick
Gui, Add, Button, x436 y217 w100 h30 g3, Shoot
Gui, Add, Button, x236 y247 w100 h30 g4, Heal
Gui, Add, Button, x336 y247 w100 h30 g5, Magic
Gui, Add, Button, x436 y247 w100 h30 g6, Shoop Da Whoop
Return

1:
Random, rand1, 1, 3
Random, rand2, 0, 10
Gui, Add, Text, x556 y217 w140 h50 , Player2:%rand1%/10
Gui, Add, Text, x76 y217 w140 h50 , Player1:%rand2%/10
if %rand2% = 0
    Goto, 7
Return

2:
Random, rand2, 0, 10
Gui, Add, Text, x556 y217 w140 h50 , Player2:1/10
Gui, Add, Text, x76 y217 w140 h50 , Player1:%rand2%/10
if %rand2% = 0
    Goto, 7
Return

3:
Random, rand2, 0, 10
Gui, Add, Text, x556 y217 w140 h50 , Player2:0.0001/10
Gui, Add, Text, x76 y217 w140 h50 , Player1:%rand2%/10
if %rand2% = 0
    Goto, 7
Return

4:
Random, rand2, 0, 10
Gui, Add, Text, x76 y217 w140 h50 , Player1:10/10
Gui, Add, Text, x76 y217 w140 h50 , Player1:%rand2%/10
if %rand2% = 0
    Goto, 7
Return

5:
Random, rand2, 0, 10
Gui, Add, Button, x576 y27 w60 h50 , -_-
Gui, Add, Text, x76 y217 w140 h50 , Player1:%rand2%/10
if %rand2% = 0
    Goto, 7
Return

6:
Random, rand2, 0, 10
Gui, Add, Text, x556 y217 w140 h50 , Player2:Pwned
if %rand2% = 0
    Goto, 7
Return

7:
MsgBox, Your instincts tell you that you are going to die next turn so you go home.
Gui, Show, x336 y337 h129 w477, DiceQuest
Gui, Add, Text, x156 y7 w140 h30 , You at are your house
Gui, Add, Button, x6 y87 w100 h30 g8, Go and fight
Gui, Add, Button, x366 y87 w100 h30 g9, Quit
Return

8:
Goto,asdf
Return

9:
Exitapp
Return

GuiClose:
ExitApp
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Wed May 28, 2008 12:37 am    Post subject: Reply with quote

instead of gui, add, text on every action , you should use GuiControl to change the existing text.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
TheIrishThug



Joined: 19 Mar 2006
Posts: 364

PostPosted: Wed May 28, 2008 2:47 pm    Post subject: Reply with quote

1) If you give your labels names that mean something, the code will be easier to work with.
2) Using buttons to draw the players is confusing because the buttons don't do anything.
3) In label 7, since you are using the same gui, parts of the first player are still visible when you resize and add the other buttons. Create a second qui for this and hide the first gui.
4) asdf is your gui building label, it only needs to run once. So the Go and Fight button just needs to show the first gui again.
Back to top
View user's profile Send private message Visit poster's website AIM Address
imapow



Joined: 13 Mar 2008
Posts: 162
Location: Trøndelag, Norway

PostPosted: Wed May 28, 2008 4:50 pm    Post subject: Reply with quote

cool concept. keep working on it and it wil be "shitty" no more
_________________
-._.-¨¯¨-._.-IM@PΩW-._.-¨¯¨-._.-
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group