Author Topic: (no subject)  (Read 2673 times)

Anonymous

  • Member
  • *
  • Posts: 545
    • View Profile
(no subject)
« on: December 18, 2003, 01:32:02 PM »
This is the program, can you try to debug it. When I open quest 2, and when I been send to the elf board, the start program runs again from the quest cooshing. Why?  I dont know whats wrong but I hope that you can try to change it. Maybe I have to many of these { or }, or I dont know. But please try.... I want to have 3 quests...
**  Basic Startup Program.
**  ----------------------
:starting
#BorderColor(0,0,0)
#bitmap("loading.JPG")
#MidiPlay("wewish.mid")
#Fontsize(20)
#walkspeed("slow")
#SmartStep("off")
#characterspeed(1)
#BattleSpeed(8)
#color(299)
#drawtitle()
}
#method drawtitle()
{
    #delay(1.5)
    #Bitmap("title.BMP")
    #WinGraphic("mwin.jpg")
    #setbutton("new_quest.bmp", 0,248,135,128,30)
    #setbutton("load_quest.bmp",1,248,170,128,30)
    #setbutton("credits.bmp",2,248,205,128,30)
    #setbutton("quit_game.bmp",3,248,275,128,30)
    #setbutton("information-button.bmp",4,248,240,128,30)
}
#done!=0
#While(done!=0)
{
    #MouseClick(x!,y!)          
    #CheckButton(x!,y!,opt!)
    #if (opt!=4)
    {
#wav(click.wav)
#bitmap("information.BMP") ***************************************************
#Text(3.5,4,"Battle:")
#Text(3.5,5,"If you want to make a snowball in battle, press S. If you want to")
#Text(3.5,6,"throw the snowball, press D. If you blow up tree's or something els,")
#Text(3.5,7,"dont stand on the tree's position when the battle end's. If you stand")
#Text(3.5,8,"on a tree that you blow up before and the battle ends, then you cant")
#Text(3.5,9,"walk, you are stuck on that position. The penugiens have different HP.")
#Text(3.5,10,"Some is strong and some have great attack. So you should watch up for")
#Text(3.5,11,"theier hits. When a penguien is dead, defeated, you can walk on him,")
#Text(3.5,12,"BUT, the enemy cant walk on it. So thats a bug, or a cheat for you.")
#Text(3.5,13,"You can use that bug, and sand behind the defeated enemy, and throw")
#Text(3.5,14,"and pick up snowballs if you like to, because the enemy cant reach you.")
#Text(3.5,15,"The picture in the battle is changing if you lose or gain HP.")
#system.pause()
#bitmap("information.BMP") ***************************************************
#Text(3.5,4,"Items and Menu:")
#Text(3.5,5,"The items that you pick up have different skills. Some help you to fight")
#Text(3.5,6,"against penguins, like snowballs and other stuffs.")
#Text(3.5,7,"You can read about the items in the menu.")
#Text(3.5,8,"You can save the game, load the game, read about things in the menu.")
#Text(3.5,9,"The music restarting when you  open the menu. To open the menu, press")
#Text(3.5,10,"ENTER. The picture in the menu is changing if you lose or gain HP.")
#Text(3.5,11,"theier hits. When a penguien is dead, defeated, you can walk on him,")
#system.pause()
#bitmap("information.BMP") ***************************************************
#Text(3.5,4,"Need to know:")
#Text(3.5,5,"That you shall look in the town after some stuffs like, gingers, cookies,")
#Text(3.5,6,"candies and glue gum. You can find all that things in the town, and you will")
#Text(3.5,7,"need them to finish this quest.")
#Text(3.5,8,"")
#Text(3.5,9,"")
#Text(3.5,10,"")
#Text(3.5,11,"More information is coming.")
#system.pause()
#Branch(:starting)
    }  
    #if (opt!=3)
    {
#wav(click.wav)
#dos
    }  
    #if (opt!=2)
    {
#wav(click.wav)
#MidiPlay("wewish.mid")
#bitmap("empty1.BMP")
#Text (13,13,Credits)
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,12,"Credits")
#Text (5,13,"Game created by Björn Johansson, finished 2003-12-13.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,11,"Credits")
#Text (5,12,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,13,"A thanks to my greate friends that gives me ideas.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,10,"Credits")
#Text (5,11,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,12,"A thanks to my greate friends that gives me ideas.")
#Text (6,13,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,14,"special permission from Sophia.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,9,"Credits")
#Text (5,10,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,11,"A thanks to my greate friends that gives me ideas.")
#Text (6,12,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,13,"special permission from Sophia.")
#Text (4.3,14,"Battle system created by Mr.G, speciall edition by Björn Johansson.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,8,"Credits")
#Text (5,9,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,10,"A thanks to my greate friends that gives me ideas.")
#Text (6,11,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,12,"special permission from Sophia.")
#Text (4.3,13,"Battle system created by Mr.G, speciall edition by Björn Johansson.")
#Text (8.6,14,"Story written by Björn Johansson.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,7,"Credits")
#Text (5,8,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,9,"A thanks to my greate friends that gives me ideas.")
#Text (6,10,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,11,"special permission from Sophia.")
#Text (4.3,12,"Battle system created by Mr.G, speciall edition by Björn Johansson.")
#Text (8.6,13,"Story written by Björn Johansson.")
#Text (8.6,14,"Programming by Björn Johansson.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,6,"Credits")
#Text (5,7,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,8,"A thanks to my greate friends that gives me ideas.")
#Text (6,9,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,10,"special permission from Sophia.")
#Text (4.3,11,"Battle system created by Mr.G, speciall edition by Björn Johansson.")
#Text (8.6,12,"Story written by Björn Johansson.")
#Text (8.6,13,"Programming by Björn Johansson.")
#Text (7,14,"Menu system created by Björn Johansson.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,5,"Credits")
#Text (5,6,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,7,"A thanks to my greate friends that gives me ideas.")
#Text (6,8,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,9,"special permission from Sophia.")
#Text (4.3,10,"Battle system created by Mr.G, speciall edition by Björn Johansson.")
#Text (8.6,11,"Story written by Björn Johansson.")
#Text (8.6,12,"Programming by Björn Johansson.")
#Text (7,13,"Menu system created by Björn Johansson.")
#Text (7,14,"Some ideas taken from Rudolph's Adventure.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,4,"Credits")
#Text (5,5,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,6,"A thanks to my greate friends that gives me ideas.")
#Text (6,7,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,8,"special permission from Sophia.")
#Text (4.3,9,"Battle system created by Mr.G, speciall edition by Björn Johansson.")
#Text (8.6,10,"Story written by Björn Johansson.")
#Text (8.6,11,"Programming by Björn Johansson.")
#Text (7,12,"Menu system created by Björn Johansson.")
#Text (7,13,"Some ideas taken from Rudolph's Adventure.")
#Text (5,14,"The Quest is made/created/written by Björn Johansson.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,3,"Credits")
#Text (5,4,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,5,"A thanks to my greate friends that gives me ideas.")
#Text (6,6,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,7,"special permission from Sophia.")
#Text (4.3,8,"Battle system created by Mr.G, speciall edition by Björn Johansson.")
#Text (8.6,9,"Story written by Björn Johansson.")
#Text (8.6,10,"Programming by Björn Johansson.")
#Text (7,11,"Menu system created by Björn Johansson.")
#Text (7,12,"Some ideas taken from Rudolph's Adventure.")
#Text (5,13,"The Quest is made/created/written by Björn Johansson.")
#Text (6,14,"A thanks to Christopher B Metthews for Toolkit 2.")
#delay(2)
******
#bitmap("empty1.BMP")
#Text (13,2,"Credits")
#Text (5,3,"Game created by Björn Johansson, finished 2003-12-13.")
#Text (6,4,"A thanks to my greate friends that gives me ideas.")
#Text (6,5,"Graphic taken from Rudolph's Adventure game with")
#Text (8.6,6,"special permission from Sophia.")
#Text (4.3,7,"Battle system created by Mr.G, speciall edition by Björn Johansson.")
#Text (8.6,8,"Story written by Björn Johansson.")
#Text (8.6,9,"Programming by Björn Johansson.")
#Text (7,10,"Menu system created by Björn Johansson.")
#Text (7,11,"Some ideas taken from Rudolph's Adventure.")
#Text (5,12,"The Quest is made/created/written by Björn Johansson.")
#Text (6,13,"A thanks to Christopher B Metthews for Toolkit 2.")
#Text (5,14,"Also to everybody who supported me from www.rpgtoolkit.com")
#delay(6)*******last delay********
#Branch(:starting)
}  
******************************************
#if (opt!=1)
{
#wav(click.wav)
*'load game' clicked
#dirsav(dest$)
#if(dest$~="CANCEL")
{
#load(dest$)
#done!=1
#end
}
#Branch(:starting)
}
******************************************
#if (opt!=0)
    {
#wav(click.wav)
:quest
#bitmap("quest.BMP")
#setbutton("quest-presents.BMP", 1,60,150,152,141)
#setbutton("quest-presents.BMP",2,230,150,152,141)
*#setimage("quest-1.BMP",230,150,152,141)
*#setbutton("quest3.jpg",3,400,150,150,150)
#setimage("quest-1.BMP",400,150,152,141)
#MouseClick(x!,y!)
#checkButton(x!,y!,quest!)
#if(quest!~=1)
{
#branch(:quest)
}
**************************************************q1
#if(quest!=1)
{
#wav(click.wav)
#bitmap("empty1.BMP")
#fontsize(35)
#Text(7,2,"Quest options")
#setimage(quest-presents.BMP,60,150,152,141)
#fontSize(18)
#text(16,10,"You have selected")
#fontSize(24)
#text(10.5,9,"The case of the stolen presents"
#fontSize(18)
#Text(16,14,"Loading Map...")
#text(16,15,"Loading Item...")
***
#delay(0.5)
#Text(22,14,"Done!")
***end***
#delay(0.Cool
#Text(22,15,"Done!")
#delay(0.Cool
#text(17.5,17,"Click")
:continute
#setbutton("b_next.BMP",0,340,280,32,32)
#text(22,17,"to continute!")
#mouseclick(x!,y!)
#checkbutton(x!,y!,button!)
#if(button!=0)
{
#wav(click.wav)
#open()
}
}
#if(quest!~=1)
{
#wav(click.wav)
#branch(:quest)
}
}
#Method open()
{
*******
#done!=0
#While(done!=0)
{
#bitmap("empty1.BMP")
#Text(9.5,5,"Select what game level you want?")
#Text(10,7,"1- Easy.")
#Text(10,8,"2- Normal.")
#Text(10,9,"3- Hard.")
#Wait(we$)
#If (we$=="1")
{
#wav(click.wav)
#done!=1
#cookie!=cookie!+3
#snowball!=snowball!+3
#easy!=1
#random(3,result!)
#if(result!=1)
{
#sak1!=1
}
#if(result!=2)
{
#sak2!=2
}
#if(result!=3)
{
#sak3!=3
}
#random(2,result!)
#if(result!=1)
{
#varld!=1
}
#if(result!=2)
{
#varld!=2
}
#startup()
}
#If (we$=="2")
{
#wav(click.wav)
#done!=1
#cookie!=cookie!+2
#snowball!=snowball!+2
#normal!=1
#random(3,result!)
#if(result!=1)
{
#sak1!=1
}
#if(result!=2)
{
#sak2!=2
}
#if(result!=3)
{
#sak3!=3
}
#random(2,result!)
#if(result!=1)
{
#varld!=1
}
#if(result!=2)
{
#varld!=2
}
#startup()
}
#If (we$=="3")
{
#wav(click.wav)
#cookie!=cookie!+1
#snowball!=snowball!+1
#done!=1
#hard!=1
#random(3,result!)
#if(result!=1)
{
#sak1!=1
}
#if(result!=2)
{
#sak2!=2
}
#if(result!=3)
{
#sak3!=3
}
#random(2,result!)
#if(result!=1)
{
#varld!=1
}
#if(result!=2)
{
#varld!=2
}
#startup()
}
********
#Method startup()
{
#done!=0
#While(done!=0)
{
#bitmap("empty1.BMP")
#Text(5,5,"Do you like to see the movie thats kalled -Steeling of the presents- ?")
#Text(10,7,"1- Yes, I like to see the movie.")
#Text(10,8,"2- No, i skipp the movie.")
#Text(10,9,"3- Back to main menu, dont play yet.")
      #Wait(opt$)
      #If (opt$=="1")
      {
#wav(click.wav)
  #done!=1
   #Send("santa-house",6,11,1)
   #LayerPut (6,11,1,"town.tst55")
   #Stance(10,"Rudolph")
   #delay(0.Cool
   #LayerPut (6,11,1,"town.tst55")
   #delay(0.1)
   #Push("N","Rudolph")
   #delay(0.1)
   #Push("N","Rudolph")
   #delay(0.1)
   #Push("E","Rudolph")
   #delay(0.1)
   #Push("E","Rudolph")
   #delay(0.1)
   #Push("E","Rudolph")
   #delay(0.1)
   #Push("E","Rudolph")
   #delay(0.1)
   #Push("N","Rudolph")
   #delay(0.1)
   #Push("N","Rudolph")
   #delay(0.1)
   #Push("E","Rudolph")
   #delay(0.1)
   #Push("E","Rudolph")
   #delay(0.1)
   #Push("E","Rudolph")
   #delay(0.1)
   #Push("N","Rudolph")
   #delay(0.7)
   #SetImage("sleep.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep1.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep2.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep3.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep4.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep5.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep6.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep7.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep-presents6.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep-presents5.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep-presents4.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep-presents3.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep-presents2.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep-presents1.BMP", 0, 32, 448, 320)
   #delay(1)
   #SetImage("sleep-presents.BMP", 0, 32, 448, 320)
   #delay(1)
   #stance(38,"Rudolph")
   #delay(1)
   #stance(39,"Rudolph")
   #delay(0.5)
   #fontsize(20)
   #Send("santa-house1",13,6,1)
#Fontsize(20)
#MidiPlay("wewish.mid")
      }
#If (opt$=="2")
      {
#wav(click.wav)
#Send("santa-house1",13,6,1)
#Fontsize(20)
  #done!=1
      }
      #If (opt$=="3")
      {
#wav(click.wav)
#Branch(:starting)
      }
}
}
}
**************************************************q2
#if(quest!=2)
{
#wav(click.wav)
#bitmap("empty1.BMP")
#fontsize(35)
#Text(7,2,"Quest options")
#setimage(quest-presents.BMP,60,150,152,141)
#fontSize(18)
#text(16,10,"You have selected")
#fontSize(24)
#text(10.5,9,"The case of the ???"
#fontSize(18)
#Text(16,14,"Loading Map...")
#text(16,15,"Loading Item...")
#Send("elf-house",7,9,1)
#done!=1
}
**************************************************q3
#if(quest!=3)
{
}
}
}

*Thank you for reading this...
« Last Edit: December 31, 1969, 06:00:00 PM by Anonymous »

Cesque

  • Member
  • *
  • Posts: 2178
    • View Profile
    • http://cesque.mysticsoftware.net
(no subject)
« Reply #1 on: December 18, 2003, 01:55:19 PM »
Hmm, built on Sophia's code, I see Smile

Anyway... I guess you should put #end after #done! = 1 in case of quest 2 choice.

It's not a program fault, I guess, it's fault of how branches work in tk. I've used branches for a long time (actually, I've started to learn using #while several days ago) and they cause real problems. Xorlak knows much about it, but in short... How to say that? Well, branches stack up. That's the word Xorlak used for it Smile They also tend to run the program from start sometimes (I don't know exact mechanics).

Because you're a beginner, as I see... Hmm. Try putting this #end. You propably won't get, how to use #while effectively here... since even I have problems with that.
« Last Edit: December 31, 1969, 06:00:00 PM by Cesque »
TKGB cancelled Spyder.

Bastard.

Schrinzo

  • Member
  • *
  • Posts: 11
    • View Profile
    • http://www.cornalien.tk
(no subject)
« Reply #2 on: December 21, 2003, 12:40:40 PM »
What does the } after #DrawTitle() do? I don't know where it went wrong but maybe it was there? <_< maybe......
« Last Edit: December 31, 1969, 06:00:00 PM by Schrinzo »
HuHu

Check <a href=\'http://cornalien.proboards25.com/\' target=\'_blank\'>CornAlien.tk</a>, k? -- i know it suck

William

  • Member
  • *
  • Posts: 138
    • View Profile
    • http://www.rpgstudio.mysticsoftware.net
(no subject)
« Reply #3 on: December 26, 2003, 05:12:03 AM »
it's okey, I dont need that program. I will do everything on my own now....I think so at least...
« Last Edit: December 31, 1969, 06:00:00 PM by William »