missing end define!!!!!!! :cry:
Elexxorine
14 Mar 2005, 13:49ok i have searched my code time and time again, placed end defines where i think they should go, yet NOTHING WORKS. heres the code:
' "TBC"
' Created with QDK 3.53 - UNREGISTERED VERSION
!include <Typelib.qlb>
define game <TBC>
asl-version <350>
gametype singleplayer
start <start_room>
game author <elexxorine>
game version <0.0.03>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
default fontname <Garamond>
default fontsize <12>
background <black>
foreground <green>
command <stats> msg <GENERAL:|nYou are #race#, #class# .|nhit points: %hp% / %mhp%.|nstamina: %sta% / %msta%.|nyou have %gold% pieces of gold.|n|nSTATS:|nstrength: %str%.|ndexterity: %dex%.|nagility: %agl%.|nintelligence: %int%.|nyou are level %level% with %exp% experience points.|nyour alignment is %align2%.|n|nOUTSIDE WORLD:|nit is |i%hrs%|xi hours and |i%mins%|xi minutes of the clock, on day |i%day%|xi .|nit is |i#weather#|xi outside.>
command <updates> msg <~version 0.0.03 (current)~|nshops, stats, money, weather, and time all working perfectly. alignment redone, but untest, yet.|n|n~version 0.0.02~|ntime now half-works. shops, money, weather stats and alignment still need fixing.|n|n~version 0.0.01~|ngame created, nothing works write, rehaulling everything...|n|nthanx to everyone who has helped me make this game:|n*Computer whizz (clocks + weather).|n*MaDbRiT (for the typelib).|n*Zelimos (for some prgramming hints - lol).>
use <ale> if ( hp < %mhp%-8 ) and got <ale> then {if ask <do you with to drink this ale and gain 9 hp?> then set <hp; %hp%+9>} else msg <there would be no point drinking it....>
use <sweetbeer> if ( hp < %mhp%-14 ) and got <sweetbeer> then {if ask <do you with to drink this sweetbeer and gain 15 hp?> then set <hp; %hp%+15>} else msg <there would be no point drinking it....>
define variable <race>
type string
value <notpicked>
end define
define variable <class>
type string
value <peasant>
end define
define variable <gold>
type numeric
value <90>
display <gold:!>
end define
define variable <hunger>
type string
value <not hungery>
end define
define variable <hunger2>
type numeric
value <0>
end define
define variable <level>
type numeric
value <1>
end define
define variable <exp>
type numeric
value <0>
end define
define variable <str>
type numeric
value <0>
onchange set <mhp; 7 * %str% - 4>
end define
define variable <dex>
type numeric
value <1>
end define
define variable <agl>
type numeric
value <0>
onchange set <msta; 7 * %agl% - 4>
end define
define variable <int>
type numeric
value <1>
end define
define variable <cor>
type numeric
value <0>
end define
define variable <align>
type string
onchange msg <you are now #align#.>
end define
define variable <day>
type numeric
value <1>
end define
define variable <hrs>
type numeric
value <5>
end define
define variable <mins>
type numeric
value <0>
display <hours: %hrs%:%mins%, day%day%>
onchange if ( %mins% = 60 ) then {
set numeric <mins; 0> set numeric <hrs; %hrs%+1>
set numeric <hrs; %hrs%+1>
}
end define
define variable <weather>
type string
value <sunny>
display <it is ! outside.>
onchange msg <The time is %hrs%:%mins%, and it is #weather# outside.>
end define
define variable <weather2>
type numeric
value <6>
end define
define variable <hp>
type numeric
value <100>
onchange if ( %hp% > %mhp% ) then set numeric <hp; %mhp%>
end define
define variable <mhp>
type numeric
value <50>
onchange if ( %hp% > %mhp% ) then set numeric <hp; %mhp%>
end define
define variable <sta>
type numeric
value <50>
onchange if ( %sta% > %msta% ) then set numeric <sta; %msta%>
end define
define variable <msta>
type numeric
value <50>
onchange if ( %sta% > %msta% ) then set numeric <sta; %msta%>
end define
define variable <align2>
type numeric
value <0>
onchange {
if ( align2 >= 1 ) and ( align2 <= 20 ) then set <align; PURE EVIL!!!>
if ( align2 >= 21 ) and ( align2 <= 40 ) then set <align; evil>
if ( align2 >= 41 ) and ( align2 <= 60 ) then set <align; neutral/evil>
if ( align2 >= 61 ) and ( align2 <= 80 ) then set <align; neutral>
if ( align2 >= 81 ) and ( align2 <= 100 ) then set <align; neutral/good>
if ( align2 >= 101 ) and ( align2 <= 120 ) then set <align; good>
if ( align2 >= 121 ) and ( align2 <= 140 ) then set <align; PURE GOOD!!!>
}
end define
define synonyms
end define
define room <Astnia, traven>
alias <Drunken Druid Inn>
prefix <The>
look <A typical pub. People are sitting at tables drinking ale and sweet beer while sharing tales and swapping legonds. A fire is crakling in the corner warming every corner of the room, smoke and the smells of liquer waft in the air and calm you, it feels like home...>
out <Astnia, west street>
define object <barkeep>
alt <barman; bar man; barkeeper; bar keeper; barkeep; bar keep>
look <The bar keeper is standing behind the counter, serving drinks.>
examine <He has short black hair, light brown eyes, greesy dark blue skin and a scowl. He is wearing an apron over his normal clothes and is quite short but tough looking.>
prefix <the>
displaytype <shop owner>
article <him>
gender <he>
type <TLTactor>
properties <not named>
action <speak> choose <shop_bar>
end define
define object <fireplace>
alt <fire; fire place>
look <the fire place is crakling in the corner.>
displaytype <scenery>
article <it>
gender <it>
type <TLTscenery>
end define
define object <people>
look <there are many people sitting, drinking, chatting.>
displaytype <people>
article <them>
gender <they>
end define
define object <stranger>
look <he is sitting a the very back of the room, with his hood up consealing his face.>
displaytype <person>
article <him>
gender <he>
type <TLTactor>
properties <not named>
end define
end define
define room <store_room>
define object <ale>
look <it's warm and frothy.>
speak <your not that depressed are you?>
displaytype <food>
article <it>
gender <it>
type <TLTobject>
end define
define object <sweetbeer>
look <it's bubbling away in its bottle.>
displaytype <food>
article <it>
gender <it>
type <TLTobject>
end define
define object <raggedtop>
alt <top>
look <it is a piece of scrawny cloth made into a top, it is the lowest form of clothing.>
displaytype <clothing (top)>
article <it>
gender <it>
type <TLTobject>
type <TLTvest>
properties <topcover=2; sex=0; worn>
end define
define object <raggedbottoms>
alt <bottoms>
look <it is a piece of scrawny cloth made into a pair of trousers, it is the lowest form of clothing.>
displaytype <clothing (bottoms)>
article <it>
gender <it>
type <TLTobject>
type <TLTundies>
properties <botcover=2; sex=0; worn>
end define
define object <fur>
look <it is a piece of carefully cut animal fur.>
article <it>
gender <it>
type <TLTobject>
properties <noWear=that would just look silly....>
end define
define object <bag o' furs>
look <it is a specially made bag, designed to carry fur. it is full to the brim with furs.>
type <TLTobject>
end define
end define
define room <Astnia, temple>
alias <Astnia Temple>
prefix <the>
look <a large room with high walls and a glass doom, filled with riches and decorations. in the middle is a raised platform on which is a eight-pointed star carved into the floor, with burning candles at the tip of each point, the lines glow faintly purple and the smell of leechgrass wofts through the air.|n|b~if you have just started please talk to the archpriest~|xb>
out <Astnia, east street>
script if ( race = none ) then {
clear
msg <you hit the stone hard fall beneath you and the air is knocked out of you. you slowly open your eyes and try to sit up, yet find that all is blurry and your arms are weak....>
wait <>
msg <you eyes start to focus on the silluette of some one standing over you. they reach down and pull you to your feet.|n"|clwhe-where am i?|cb"you manage to say.|n"|cyyou are in the Astnia temple, we have used summoned you from the Outer Plains.|cb"|nyou loss your balance and fall as he lets go of you, "|clwhy?|cb"|n"|crit was for-told, your coming, you would come and save us. ALL OF US.|cb" he hands you some basic clothes and you put them on with help. "|cri really am getting to old from this, i can't quite see you clearly, please tell me what you look like...."|cb>
wait <>
choose <racepick>
}
define object <star>
look <it was carved into the floor hundreds of years ago by the great godess Fanati.>
displaytype <magic>
article <it>
gender <it>
type <TLTscenery>
end define
define object <archpriest>
alt <headpriest; arch priest; head priest>
look <he is wearing tranditional robes, his head is bowed and he is mumbling something under his breath.>
speak if ( race = notpicked ) then {
clear
msg <you hit the stone hard fall beneath you and the air is knocked out of you. you slowly open your eyes and try to sit up, yet find that all is blurry and your arms are weak....>
wait <>
msg <you eyes start to focus on the silluette of some one standing over you. they reach down and pull you to your feet.|n"|clwhe-where am i?|cb"you manage to say.|n"|cyyou are in the Astnia temple, we have used summoned you from the Outer Plains.|cb"|nyou loss your balance and fall as he lets go of you, "|clwhy?|cb"|n"|crit was for-told, your coming, you would come and save us. ALL OF US.|cb" he hands you some basic clothes and you put them on with help. "|cri really am getting to old from this, i can't quite see you clearly, please tell me what you look like...."|cb>
wait <>
choose <racepick>
}
prefix <the>
displaytype <person>
article <him>
gender <he>
type <TLTactor>
properties <not named>
end define
end define
define room <Astnia, marketplace>
alias <marketplace>
prefix <the>
look <people are bussleing round the stalls, as tenders call out '|ionce in a life time|xi' offers. rich smells of all kinds zoom up your nose and the noise is deafening.>
east <Astnia, east street>
west <Astnia, west street>
define object <furman>
alt <fur man; fur trader; furtrader>
look <he is standing next to his stall, which has various animals skins on display.>
examine <he has light golden brown hair and eyes, he skin is a deep purply colour.>
displaytype <shop owner>
article <him>
gender <he>
type <TLTactor>
properties <not named>
action <speak> choose <shop_fur1>
end define
define object <furstall>
alt <fur stall>
look <it is has various animal skins on display: fox, wolf, rabbit, wig-wig, any many more...>
displaytype <shop stall>
article <it>
gender <it>
type <TLTobject>
type <TLTscenery>
properties <not takeable; noTake=that implies stealing....>
end define
end define
define room <Astnia, west street>
alias <west street>
look <a long and twisty road leading from the central market place to the outer city gates.>
indescription <You are on:>
east <Astnia, marketplace>
northwest <Astnia, citygates1>
place <Astnia, traven>
end define
define room <Astnia, east street>
alias <east street>
look <a stort and well built road in the good part of town.>
indescription <You are on:>
west <Astnia, marketplace>
place <Astnia, temple>
end define
define room <start_room>
alias <start room>
description {
msg <|s22|bWELCOME TO TBC.|xb |iElexxorine's first rpg adventure game.|xi|n|nIn this game you can do what ever you wish: get loads of money, kill the bigest boss, steal your way to glory, build a house...... |bANYTHING!|xb|n|nwhen you are ready to enter this enormous world, full of monsters, people of all shapes and sizes, cities so massive, quiet little hamlets, and rolling plains stretching as far as the eye can see.....|n|n|ipress any key....|xi>
wait <>
msg <you will now be loaded in to the game....|nyou will start in |iAstnia|xi, the free race city, all races can go here. you will arrive in the temple and start the character creation process....>
wait <>
choose <racepick>
}
end define
define room <Astnia, citygates1>
alias <city gates>
prefix <the>
look <The arch way is quite petty and unipressive, a few guards stend by the opening in the outer wall.>
indescription <You are at:>
southeast <Astnia, west street>
define object <gates>
alt <citygates; city gates>
look <there not much to look at.>
article <it>
gender <it>
type <TLTscenery>
end define
define object <guard>
look <the guard is standing, and well guarding.>
examine <the guard is tall, wearing full armour you can not see his face.>
type <TLTactor>
properties <not named; noSpeak="I'm on duty kid.">
end define
end define
define timer <minutes>
interval <1>
action set <mins; %mins%+2>
disabled
end define
define timer <weatherchanger>
interval <15>
action {
set <weather2; $rand(1;10)$>
if ( %weather2% <= 5 ) then set <weather; #weather#> else {
if ( %weather2% = 6 ) then set <weather; sunny> else {
if ( %weather2% = 7 ) then set <weather; raining> else {
if ( %weather2% = 8 ) then set <weather; windy> else {
if ( %weather2% = 9 ) then set <weather; snowing> else if ( %weather2% = 10 ) then set <weather; very hot>
}
}
}
}
}
disabled
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
define selection <shop_bar>
info <What would you like to buy?>
choice <Buy_Ale> {
if not got <ale> then {
msg <this ale costs 6 gold pieces.>
wait <press any key....>
if ask <this ale costs 6 gold pieces. are you sure you wish to buy?> then {
if ( %gold% > 5 ) then {
msg <you buy the ale....>
set <gold; %gold%-6>
give <ale>
}
else msg <you do not have enough gold....>
}
}
else msg <you already have some ale.....>
}
choice <Buy_Sweetbeer> {
if not got <sweetbeer> then {
msg <this sweetbeer costs 9 gold pieces.>
wait <press any key....>
if ask <this sweetbeer costs 9 gold pieces. are you sure you wish to buy?> then {
if ( %gold% > 8 ) then {
msg <you buy the sweetbeer....>
give <sweetbeer>
set <gold; %gold%-9>
}
else msg <you do not have enough gold....>
}
}
else msg <you already have some sweetbeer....>
}
choice <?_Ale> {
msg <ALE:|n this bitter drink is served in almost every pub, it is dark brown, frothy and very alcoholic.|n USUAL PRICE: 6 gold pieces.>
wait <press any key....>
choose <shop_bar>
}
choice <?_Sweetbeer> {
msg <SWEETBEER:|n this refreshing drink is served in almost every pub, it is a teacle colour and favoured by most for its relaxing effects.|n USUAL PRICE: 9 gold pieces.>
wait <press any key....>
choose <shop_bar>
}
choice <Buy_Nothing>
end define
define selection <talk_general1>
info <what would you like to ask about?>
choice <gossip> msg <"i hear that omething funny's happening down in the plains...">
choice <rumours> msg <"they say there's an evil traveling from the south. towards Kelonyon forest...">
choice <nothing>
end define
define selection <shop_fur1>
info <what would you like?>
choice <buy_fur> {
if not got <fur> then {
background <this fur costs 3 gold pieces.>
wait <press any key....>
if ask <this fur costs 3 gold pieces. are you sure you wish to buy?> then {
if ( %gold% > 29 ) then {
background <you buy the bag o' furs....>
set <gold; %gold%-30>
give <bag o' furs>
}
else msg <you do not have enough gold....>
}
else msg <it is a shame you choose not to buy this luxurious fur!>
}
else msg <you already have some fur....>
}
choice <buy_bag o' furs> if not got <bag o' furs> then {
if ask <this bag o' fur costs 30 gold pieces. are you sure you wish to buy?> then {
if ( %gold% > 29 ) then {
background <you buy the bag o' furs....>
set <gold; %gold%-30>
give <bag o' furs>
}
else msg <you do not have enough gold....>
}
else msg <it is a shame you choose not to buy this luxurious fur!>
}
else msg <you already have a bag o' furs....>
choice <?_fur> {
msg <FUR:|na piece of animal skin that has been carefully cut and shaped for whatever purposes it is needed for.|nUSUAL PRICE: 3 gold pieces.>
wait <press any key....>
choose <shop_fur1>
}
choice <?_bag o' furs> {
msg <BAG O' FURS:|na bag of animal skins,the animal skin has been carefully cut and shaped for whatever purposes it is needed for..|nUSUAL PRICE: 30 gold pieces.>
wait <press any key....>
choose <shop_fur1>
}
choice <buy_nothing> msg <"suit yourself....">
end define
define selection <racepick>
info <which race would you like to be?>
choice <?_general help> {
msg <each race is different with different stats, skills, advantages and disadvantages. the flasodri are the easiest to play, being good at everything, and are suggested for first time players. but you can pick any.|nBEST RACE FOR PLAYING STYLE:|n* kill em' all!!: pnoflo.|n* i like spells: ytomim.|n* stealth: addeol.|n* fghting with bit of magic: truzhe.|n* i like everything: flasodri.|n|nyou pick....>
wait <>
choose <racepick>
}
choice <pick_truzhe> {
set string <race; truzhe>
wait <press any key....>
set <str; 5>
wait <press any key....>
set <agl; 1>
wait <press any key....>
set <align2; 90>
wait <press any key....>
set <cor; 3>
wait <press any key....>
set <dex; 2>
wait <press any key....>
set <int; 4>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <pick_ytomim> {
set string <race; ytomim>
wait <press any key....>
set <str; 1>
wait <press any key....>
set <agl; 2>
wait <press any key....>
set <align2; 50>
wait <press any key....>
set <cor; 5>
wait <press any key....>
set <dex; 3>
wait <press any key....>
set <int; 5>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <pick_pnoflo> {
set string <race; pnoflo>
wait <press any key....>
set <str; 4>
wait <press any key....>
set <agl; 5>
wait <press any key....>
set <align2; 70>
wait <press any key....>
set <cor; 2>
wait <press any key....>
set <dex; 3>
wait <press any key....>
set <int; 1>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <pick_flosodri> {
set string <race; flasodri>
wait <press any key....>
set <str; 3>
wait <press any key....>
set <agl; 3>
wait <press any key....>
set <align2; 70>
wait <press any key....>
set <cor; 3>
wait <press any key....>
set <dex; 3>
wait <press any key....>
set <int; 3>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <pick_addeol> {
set string <race; addeol>
wait <press any key....>
set <str; 2>
wait <press any key....>
set <agl; 4>
wait <press any key....>
set <align2; 50>
wait <press any key....>
set <cor; 4>
wait <press any key....>
set <dex; 3>
wait <press any key....>
set <int; 2>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <?_truzhe> {
msg <|bTRUZHE:|xb|nBIO:|nthe truzhe were once part of the Ytomim, but broke off many generations ago. they now differ greatly, but still share some traits.|nthey are tall and strong, with long pointy ears, red eyes and usuallt short hair, either crimson and black.>
wait <press any key....>
msg <STATS:|nthey are good fighters, but sometimes slow and clumsy.|nstrength: 5.|nagility: 1.|ndexerity: 2.|nintelligence: 4.|ncorage: 3.>
wait <press any key....>
msg <~advantages:|n*higher hitpoints and attacks.|n*can see in dark.|n|n~disadvantages:|n*evil (.'. disliked).|n|n~they are the 2nd easiest race to play....>
wait <press any key....>
choose <racepick>
}
choice <?_ytomim> {
msg <|bYTOMIM:|xb|nBIO:|nthis stuningly beautiful creatures are said to have desended from the gods themselves! they live in harmony with the world and are deadly rivals with the Truzhe.>
wait <press any key....>
msg <STATS:|nthey are exellent magic casters, but very weak in fighting which they make up with their dexerity, allows them to duel weild and almost alway hit, if not doing much damage.|nstrength: 1.|nagility: 2.|ndexerity: 4.|nintelligence: 5.|ncorage: 3.>
wait <press any key....>
msg <~advantages:|n*can learn all spells in game.|n*can befriend animals.|n|n~disadvantages:|n*very poor fighter, and low hp.|n|n~they are a medium difficultly race....>
wait <press any key....>
choose <racepick>
}
choice <?_pnoflo> {
msg <|bPNOFLO:|xb|nBIO:|nthis cute feline-like race, are the creations of the Truzhe. THey were designed to be fierce unstopable monsters. they turned against theit creators and fled to the desert, were they live like giant cats, hunting their prey of Addeol.>
wait <press any key....>
msg <STATS:|nthey are uncredably fast and good fighters even without weapons. they are agile and can evade most attacks, yet are not very intelligent and tend to flee more than other races.|nstrength: 4.|nagility: 5.|ndexerity: 3.|nintelligence:1.|ncorage:2.>
wait <press any key....>
msg <~advantages:|n*very fast and hard hittings.|n*can see in dark.|n*can attack without weapons.|n|n~disadvantages:|n*can only eat corpses.|n*cannot learn spells.|n|n~they are a medium difficultly race....>
wait <press any key....>
choose <racepick>
}
choice <?_flasodri> {
msg <|bFLASODRI:|xb|nBIO:|nthis race is very similar to humans, yet they have slightly pointy ears. they live in Nifeod city, the biggest city in the whole of Zhuebai.>
wait <press any key....>
msg <STATS:|nthey are an all round average race.|nstrength: 3.|nagility: 3.|ndexerity: 3.|nintelligence: 3.|ncorage: 3.>
wait <press any key....>
msg <~advantages:|n*good at haggling (half cost).|n*can learn most spells.|n*can learn quickly (even with low inteligencel).|n|n~they are the easiest race to play....>
wait <press any key....>
choose <racepick>
}
choice <?_addeol> {
msg <|bADDEOL:|xb|nBIO:|nthe Addeol are small monkey-like beings that live in Etta forest. they have small tails and are covered in lush fur. theyare preyed apon by the Pnoflo, along with all other animals of the forest.>
wait <press any key....>
msg <|nSTATS:|nthey are very fast and agile, but have low strength. they have corage and will not back down from a fight.|nstrength: 2.|nagility: 4.|ndexerity: 3.|nintelligence: 2.|ncorage: 4.>
wait <press any key....>
msg <~advantages:|n*very fast and can dodge easily.|n*can forage for food.|n*can climb trees and move other tough terran earily.|n|n~disadvantages:|n*cannot eat meat.|n*can only learn a few simple spells.|n|n~they are the hardest race to play....>
wait <press any key....>
choose <racepick>
}
end define
please help......
' "TBC"
' Created with QDK 3.53 - UNREGISTERED VERSION
!include <Typelib.qlb>
define game <TBC>
asl-version <350>
gametype singleplayer
start <start_room>
game author <elexxorine>
game version <0.0.03>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
default fontname <Garamond>
default fontsize <12>
background <black>
foreground <green>
command <stats> msg <GENERAL:|nYou are #race#, #class# .|nhit points: %hp% / %mhp%.|nstamina: %sta% / %msta%.|nyou have %gold% pieces of gold.|n|nSTATS:|nstrength: %str%.|ndexterity: %dex%.|nagility: %agl%.|nintelligence: %int%.|nyou are level %level% with %exp% experience points.|nyour alignment is %align2%.|n|nOUTSIDE WORLD:|nit is |i%hrs%|xi hours and |i%mins%|xi minutes of the clock, on day |i%day%|xi .|nit is |i#weather#|xi outside.>
command <updates> msg <~version 0.0.03 (current)~|nshops, stats, money, weather, and time all working perfectly. alignment redone, but untest, yet.|n|n~version 0.0.02~|ntime now half-works. shops, money, weather stats and alignment still need fixing.|n|n~version 0.0.01~|ngame created, nothing works write, rehaulling everything...|n|nthanx to everyone who has helped me make this game:|n*Computer whizz (clocks + weather).|n*MaDbRiT (for the typelib).|n*Zelimos (for some prgramming hints - lol).>
use <ale> if ( hp < %mhp%-8 ) and got <ale> then {if ask <do you with to drink this ale and gain 9 hp?> then set <hp; %hp%+9>} else msg <there would be no point drinking it....>
use <sweetbeer> if ( hp < %mhp%-14 ) and got <sweetbeer> then {if ask <do you with to drink this sweetbeer and gain 15 hp?> then set <hp; %hp%+15>} else msg <there would be no point drinking it....>
define variable <race>
type string
value <notpicked>
end define
define variable <class>
type string
value <peasant>
end define
define variable <gold>
type numeric
value <90>
display <gold:!>
end define
define variable <hunger>
type string
value <not hungery>
end define
define variable <hunger2>
type numeric
value <0>
end define
define variable <level>
type numeric
value <1>
end define
define variable <exp>
type numeric
value <0>
end define
define variable <str>
type numeric
value <0>
onchange set <mhp; 7 * %str% - 4>
end define
define variable <dex>
type numeric
value <1>
end define
define variable <agl>
type numeric
value <0>
onchange set <msta; 7 * %agl% - 4>
end define
define variable <int>
type numeric
value <1>
end define
define variable <cor>
type numeric
value <0>
end define
define variable <align>
type string
onchange msg <you are now #align#.>
end define
define variable <day>
type numeric
value <1>
end define
define variable <hrs>
type numeric
value <5>
end define
define variable <mins>
type numeric
value <0>
display <hours: %hrs%:%mins%, day%day%>
onchange if ( %mins% = 60 ) then {
set numeric <mins; 0> set numeric <hrs; %hrs%+1>
set numeric <hrs; %hrs%+1>
}
end define
define variable <weather>
type string
value <sunny>
display <it is ! outside.>
onchange msg <The time is %hrs%:%mins%, and it is #weather# outside.>
end define
define variable <weather2>
type numeric
value <6>
end define
define variable <hp>
type numeric
value <100>
onchange if ( %hp% > %mhp% ) then set numeric <hp; %mhp%>
end define
define variable <mhp>
type numeric
value <50>
onchange if ( %hp% > %mhp% ) then set numeric <hp; %mhp%>
end define
define variable <sta>
type numeric
value <50>
onchange if ( %sta% > %msta% ) then set numeric <sta; %msta%>
end define
define variable <msta>
type numeric
value <50>
onchange if ( %sta% > %msta% ) then set numeric <sta; %msta%>
end define
define variable <align2>
type numeric
value <0>
onchange {
if ( align2 >= 1 ) and ( align2 <= 20 ) then set <align; PURE EVIL!!!>
if ( align2 >= 21 ) and ( align2 <= 40 ) then set <align; evil>
if ( align2 >= 41 ) and ( align2 <= 60 ) then set <align; neutral/evil>
if ( align2 >= 61 ) and ( align2 <= 80 ) then set <align; neutral>
if ( align2 >= 81 ) and ( align2 <= 100 ) then set <align; neutral/good>
if ( align2 >= 101 ) and ( align2 <= 120 ) then set <align; good>
if ( align2 >= 121 ) and ( align2 <= 140 ) then set <align; PURE GOOD!!!>
}
end define
define synonyms
end define
define room <Astnia, traven>
alias <Drunken Druid Inn>
prefix <The>
look <A typical pub. People are sitting at tables drinking ale and sweet beer while sharing tales and swapping legonds. A fire is crakling in the corner warming every corner of the room, smoke and the smells of liquer waft in the air and calm you, it feels like home...>
out <Astnia, west street>
define object <barkeep>
alt <barman; bar man; barkeeper; bar keeper; barkeep; bar keep>
look <The bar keeper is standing behind the counter, serving drinks.>
examine <He has short black hair, light brown eyes, greesy dark blue skin and a scowl. He is wearing an apron over his normal clothes and is quite short but tough looking.>
prefix <the>
displaytype <shop owner>
article <him>
gender <he>
type <TLTactor>
properties <not named>
action <speak> choose <shop_bar>
end define
define object <fireplace>
alt <fire; fire place>
look <the fire place is crakling in the corner.>
displaytype <scenery>
article <it>
gender <it>
type <TLTscenery>
end define
define object <people>
look <there are many people sitting, drinking, chatting.>
displaytype <people>
article <them>
gender <they>
end define
define object <stranger>
look <he is sitting a the very back of the room, with his hood up consealing his face.>
displaytype <person>
article <him>
gender <he>
type <TLTactor>
properties <not named>
end define
end define
define room <store_room>
define object <ale>
look <it's warm and frothy.>
speak <your not that depressed are you?>
displaytype <food>
article <it>
gender <it>
type <TLTobject>
end define
define object <sweetbeer>
look <it's bubbling away in its bottle.>
displaytype <food>
article <it>
gender <it>
type <TLTobject>
end define
define object <raggedtop>
alt <top>
look <it is a piece of scrawny cloth made into a top, it is the lowest form of clothing.>
displaytype <clothing (top)>
article <it>
gender <it>
type <TLTobject>
type <TLTvest>
properties <topcover=2; sex=0; worn>
end define
define object <raggedbottoms>
alt <bottoms>
look <it is a piece of scrawny cloth made into a pair of trousers, it is the lowest form of clothing.>
displaytype <clothing (bottoms)>
article <it>
gender <it>
type <TLTobject>
type <TLTundies>
properties <botcover=2; sex=0; worn>
end define
define object <fur>
look <it is a piece of carefully cut animal fur.>
article <it>
gender <it>
type <TLTobject>
properties <noWear=that would just look silly....>
end define
define object <bag o' furs>
look <it is a specially made bag, designed to carry fur. it is full to the brim with furs.>
type <TLTobject>
end define
end define
define room <Astnia, temple>
alias <Astnia Temple>
prefix <the>
look <a large room with high walls and a glass doom, filled with riches and decorations. in the middle is a raised platform on which is a eight-pointed star carved into the floor, with burning candles at the tip of each point, the lines glow faintly purple and the smell of leechgrass wofts through the air.|n|b~if you have just started please talk to the archpriest~|xb>
out <Astnia, east street>
script if ( race = none ) then {
clear
msg <you hit the stone hard fall beneath you and the air is knocked out of you. you slowly open your eyes and try to sit up, yet find that all is blurry and your arms are weak....>
wait <>
msg <you eyes start to focus on the silluette of some one standing over you. they reach down and pull you to your feet.|n"|clwhe-where am i?|cb"you manage to say.|n"|cyyou are in the Astnia temple, we have used summoned you from the Outer Plains.|cb"|nyou loss your balance and fall as he lets go of you, "|clwhy?|cb"|n"|crit was for-told, your coming, you would come and save us. ALL OF US.|cb" he hands you some basic clothes and you put them on with help. "|cri really am getting to old from this, i can't quite see you clearly, please tell me what you look like...."|cb>
wait <>
choose <racepick>
}
define object <star>
look <it was carved into the floor hundreds of years ago by the great godess Fanati.>
displaytype <magic>
article <it>
gender <it>
type <TLTscenery>
end define
define object <archpriest>
alt <headpriest; arch priest; head priest>
look <he is wearing tranditional robes, his head is bowed and he is mumbling something under his breath.>
speak if ( race = notpicked ) then {
clear
msg <you hit the stone hard fall beneath you and the air is knocked out of you. you slowly open your eyes and try to sit up, yet find that all is blurry and your arms are weak....>
wait <>
msg <you eyes start to focus on the silluette of some one standing over you. they reach down and pull you to your feet.|n"|clwhe-where am i?|cb"you manage to say.|n"|cyyou are in the Astnia temple, we have used summoned you from the Outer Plains.|cb"|nyou loss your balance and fall as he lets go of you, "|clwhy?|cb"|n"|crit was for-told, your coming, you would come and save us. ALL OF US.|cb" he hands you some basic clothes and you put them on with help. "|cri really am getting to old from this, i can't quite see you clearly, please tell me what you look like...."|cb>
wait <>
choose <racepick>
}
prefix <the>
displaytype <person>
article <him>
gender <he>
type <TLTactor>
properties <not named>
end define
end define
define room <Astnia, marketplace>
alias <marketplace>
prefix <the>
look <people are bussleing round the stalls, as tenders call out '|ionce in a life time|xi' offers. rich smells of all kinds zoom up your nose and the noise is deafening.>
east <Astnia, east street>
west <Astnia, west street>
define object <furman>
alt <fur man; fur trader; furtrader>
look <he is standing next to his stall, which has various animals skins on display.>
examine <he has light golden brown hair and eyes, he skin is a deep purply colour.>
displaytype <shop owner>
article <him>
gender <he>
type <TLTactor>
properties <not named>
action <speak> choose <shop_fur1>
end define
define object <furstall>
alt <fur stall>
look <it is has various animal skins on display: fox, wolf, rabbit, wig-wig, any many more...>
displaytype <shop stall>
article <it>
gender <it>
type <TLTobject>
type <TLTscenery>
properties <not takeable; noTake=that implies stealing....>
end define
end define
define room <Astnia, west street>
alias <west street>
look <a long and twisty road leading from the central market place to the outer city gates.>
indescription <You are on:>
east <Astnia, marketplace>
northwest <Astnia, citygates1>
place <Astnia, traven>
end define
define room <Astnia, east street>
alias <east street>
look <a stort and well built road in the good part of town.>
indescription <You are on:>
west <Astnia, marketplace>
place <Astnia, temple>
end define
define room <start_room>
alias <start room>
description {
msg <|s22|bWELCOME TO TBC.|xb |iElexxorine's first rpg adventure game.|xi|n|nIn this game you can do what ever you wish: get loads of money, kill the bigest boss, steal your way to glory, build a house...... |bANYTHING!|xb|n|nwhen you are ready to enter this enormous world, full of monsters, people of all shapes and sizes, cities so massive, quiet little hamlets, and rolling plains stretching as far as the eye can see.....|n|n|ipress any key....|xi>
wait <>
msg <you will now be loaded in to the game....|nyou will start in |iAstnia|xi, the free race city, all races can go here. you will arrive in the temple and start the character creation process....>
wait <>
choose <racepick>
}
end define
define room <Astnia, citygates1>
alias <city gates>
prefix <the>
look <The arch way is quite petty and unipressive, a few guards stend by the opening in the outer wall.>
indescription <You are at:>
southeast <Astnia, west street>
define object <gates>
alt <citygates; city gates>
look <there not much to look at.>
article <it>
gender <it>
type <TLTscenery>
end define
define object <guard>
look <the guard is standing, and well guarding.>
examine <the guard is tall, wearing full armour you can not see his face.>
type <TLTactor>
properties <not named; noSpeak="I'm on duty kid.">
end define
end define
define timer <minutes>
interval <1>
action set <mins; %mins%+2>
disabled
end define
define timer <weatherchanger>
interval <15>
action {
set <weather2; $rand(1;10)$>
if ( %weather2% <= 5 ) then set <weather; #weather#> else {
if ( %weather2% = 6 ) then set <weather; sunny> else {
if ( %weather2% = 7 ) then set <weather; raining> else {
if ( %weather2% = 8 ) then set <weather; windy> else {
if ( %weather2% = 9 ) then set <weather; snowing> else if ( %weather2% = 10 ) then set <weather; very hot>
}
}
}
}
}
disabled
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
define selection <shop_bar>
info <What would you like to buy?>
choice <Buy_Ale> {
if not got <ale> then {
msg <this ale costs 6 gold pieces.>
wait <press any key....>
if ask <this ale costs 6 gold pieces. are you sure you wish to buy?> then {
if ( %gold% > 5 ) then {
msg <you buy the ale....>
set <gold; %gold%-6>
give <ale>
}
else msg <you do not have enough gold....>
}
}
else msg <you already have some ale.....>
}
choice <Buy_Sweetbeer> {
if not got <sweetbeer> then {
msg <this sweetbeer costs 9 gold pieces.>
wait <press any key....>
if ask <this sweetbeer costs 9 gold pieces. are you sure you wish to buy?> then {
if ( %gold% > 8 ) then {
msg <you buy the sweetbeer....>
give <sweetbeer>
set <gold; %gold%-9>
}
else msg <you do not have enough gold....>
}
}
else msg <you already have some sweetbeer....>
}
choice <?_Ale> {
msg <ALE:|n this bitter drink is served in almost every pub, it is dark brown, frothy and very alcoholic.|n USUAL PRICE: 6 gold pieces.>
wait <press any key....>
choose <shop_bar>
}
choice <?_Sweetbeer> {
msg <SWEETBEER:|n this refreshing drink is served in almost every pub, it is a teacle colour and favoured by most for its relaxing effects.|n USUAL PRICE: 9 gold pieces.>
wait <press any key....>
choose <shop_bar>
}
choice <Buy_Nothing>
end define
define selection <talk_general1>
info <what would you like to ask about?>
choice <gossip> msg <"i hear that omething funny's happening down in the plains...">
choice <rumours> msg <"they say there's an evil traveling from the south. towards Kelonyon forest...">
choice <nothing>
end define
define selection <shop_fur1>
info <what would you like?>
choice <buy_fur> {
if not got <fur> then {
background <this fur costs 3 gold pieces.>
wait <press any key....>
if ask <this fur costs 3 gold pieces. are you sure you wish to buy?> then {
if ( %gold% > 29 ) then {
background <you buy the bag o' furs....>
set <gold; %gold%-30>
give <bag o' furs>
}
else msg <you do not have enough gold....>
}
else msg <it is a shame you choose not to buy this luxurious fur!>
}
else msg <you already have some fur....>
}
choice <buy_bag o' furs> if not got <bag o' furs> then {
if ask <this bag o' fur costs 30 gold pieces. are you sure you wish to buy?> then {
if ( %gold% > 29 ) then {
background <you buy the bag o' furs....>
set <gold; %gold%-30>
give <bag o' furs>
}
else msg <you do not have enough gold....>
}
else msg <it is a shame you choose not to buy this luxurious fur!>
}
else msg <you already have a bag o' furs....>
choice <?_fur> {
msg <FUR:|na piece of animal skin that has been carefully cut and shaped for whatever purposes it is needed for.|nUSUAL PRICE: 3 gold pieces.>
wait <press any key....>
choose <shop_fur1>
}
choice <?_bag o' furs> {
msg <BAG O' FURS:|na bag of animal skins,the animal skin has been carefully cut and shaped for whatever purposes it is needed for..|nUSUAL PRICE: 30 gold pieces.>
wait <press any key....>
choose <shop_fur1>
}
choice <buy_nothing> msg <"suit yourself....">
end define
define selection <racepick>
info <which race would you like to be?>
choice <?_general help> {
msg <each race is different with different stats, skills, advantages and disadvantages. the flasodri are the easiest to play, being good at everything, and are suggested for first time players. but you can pick any.|nBEST RACE FOR PLAYING STYLE:|n* kill em' all!!: pnoflo.|n* i like spells: ytomim.|n* stealth: addeol.|n* fghting with bit of magic: truzhe.|n* i like everything: flasodri.|n|nyou pick....>
wait <>
choose <racepick>
}
choice <pick_truzhe> {
set string <race; truzhe>
wait <press any key....>
set <str; 5>
wait <press any key....>
set <agl; 1>
wait <press any key....>
set <align2; 90>
wait <press any key....>
set <cor; 3>
wait <press any key....>
set <dex; 2>
wait <press any key....>
set <int; 4>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <pick_ytomim> {
set string <race; ytomim>
wait <press any key....>
set <str; 1>
wait <press any key....>
set <agl; 2>
wait <press any key....>
set <align2; 50>
wait <press any key....>
set <cor; 5>
wait <press any key....>
set <dex; 3>
wait <press any key....>
set <int; 5>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <pick_pnoflo> {
set string <race; pnoflo>
wait <press any key....>
set <str; 4>
wait <press any key....>
set <agl; 5>
wait <press any key....>
set <align2; 70>
wait <press any key....>
set <cor; 2>
wait <press any key....>
set <dex; 3>
wait <press any key....>
set <int; 1>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <pick_flosodri> {
set string <race; flasodri>
wait <press any key....>
set <str; 3>
wait <press any key....>
set <agl; 3>
wait <press any key....>
set <align2; 70>
wait <press any key....>
set <cor; 3>
wait <press any key....>
set <dex; 3>
wait <press any key....>
set <int; 3>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <pick_addeol> {
set string <race; addeol>
wait <press any key....>
set <str; 2>
wait <press any key....>
set <agl; 4>
wait <press any key....>
set <align2; 50>
wait <press any key....>
set <cor; 4>
wait <press any key....>
set <dex; 3>
wait <press any key....>
set <int; 2>
wait <press any key....>
timeron <minutes>
timeron <weatherchanger>
msg <|s00>
clear
goto <Astnia, temple>
}
choice <?_truzhe> {
msg <|bTRUZHE:|xb|nBIO:|nthe truzhe were once part of the Ytomim, but broke off many generations ago. they now differ greatly, but still share some traits.|nthey are tall and strong, with long pointy ears, red eyes and usuallt short hair, either crimson and black.>
wait <press any key....>
msg <STATS:|nthey are good fighters, but sometimes slow and clumsy.|nstrength: 5.|nagility: 1.|ndexerity: 2.|nintelligence: 4.|ncorage: 3.>
wait <press any key....>
msg <~advantages:|n*higher hitpoints and attacks.|n*can see in dark.|n|n~disadvantages:|n*evil (.'. disliked).|n|n~they are the 2nd easiest race to play....>
wait <press any key....>
choose <racepick>
}
choice <?_ytomim> {
msg <|bYTOMIM:|xb|nBIO:|nthis stuningly beautiful creatures are said to have desended from the gods themselves! they live in harmony with the world and are deadly rivals with the Truzhe.>
wait <press any key....>
msg <STATS:|nthey are exellent magic casters, but very weak in fighting which they make up with their dexerity, allows them to duel weild and almost alway hit, if not doing much damage.|nstrength: 1.|nagility: 2.|ndexerity: 4.|nintelligence: 5.|ncorage: 3.>
wait <press any key....>
msg <~advantages:|n*can learn all spells in game.|n*can befriend animals.|n|n~disadvantages:|n*very poor fighter, and low hp.|n|n~they are a medium difficultly race....>
wait <press any key....>
choose <racepick>
}
choice <?_pnoflo> {
msg <|bPNOFLO:|xb|nBIO:|nthis cute feline-like race, are the creations of the Truzhe. THey were designed to be fierce unstopable monsters. they turned against theit creators and fled to the desert, were they live like giant cats, hunting their prey of Addeol.>
wait <press any key....>
msg <STATS:|nthey are uncredably fast and good fighters even without weapons. they are agile and can evade most attacks, yet are not very intelligent and tend to flee more than other races.|nstrength: 4.|nagility: 5.|ndexerity: 3.|nintelligence:1.|ncorage:2.>
wait <press any key....>
msg <~advantages:|n*very fast and hard hittings.|n*can see in dark.|n*can attack without weapons.|n|n~disadvantages:|n*can only eat corpses.|n*cannot learn spells.|n|n~they are a medium difficultly race....>
wait <press any key....>
choose <racepick>
}
choice <?_flasodri> {
msg <|bFLASODRI:|xb|nBIO:|nthis race is very similar to humans, yet they have slightly pointy ears. they live in Nifeod city, the biggest city in the whole of Zhuebai.>
wait <press any key....>
msg <STATS:|nthey are an all round average race.|nstrength: 3.|nagility: 3.|ndexerity: 3.|nintelligence: 3.|ncorage: 3.>
wait <press any key....>
msg <~advantages:|n*good at haggling (half cost).|n*can learn most spells.|n*can learn quickly (even with low inteligencel).|n|n~they are the easiest race to play....>
wait <press any key....>
choose <racepick>
}
choice <?_addeol> {
msg <|bADDEOL:|xb|nBIO:|nthe Addeol are small monkey-like beings that live in Etta forest. they have small tails and are covered in lush fur. theyare preyed apon by the Pnoflo, along with all other animals of the forest.>
wait <press any key....>
msg <|nSTATS:|nthey are very fast and agile, but have low strength. they have corage and will not back down from a fight.|nstrength: 2.|nagility: 4.|ndexerity: 3.|nintelligence: 2.|ncorage: 4.>
wait <press any key....>
msg <~advantages:|n*very fast and can dodge easily.|n*can forage for food.|n*can climb trees and move other tough terran earily.|n|n~disadvantages:|n*cannot eat meat.|n*can only learn a few simple spells.|n|n~they are the hardest race to play....>
wait <press any key....>
choose <racepick>
}
end define
please help......
francisstokes
14 Mar 2005, 17:47I looked hard for half an hour convinced i would find your error...i didn't.Sorry.Your best bet is probably to send the file to alex and ask him about it.Have you tried taking away the last few things you did to the game?Try that.
Reading through your game,its looking really good.
Reading through your game,its looking really good.
Cryophile
14 Mar 2005, 18:51Unless I'm reading this incorrectly you're missing an end define for the define game block. This should appear after the last end define of your variables.
Alex
14 Mar 2005, 18:52There's an "end define" after the definition of the status variable "align2" before the first room definition. That closes the status variable block, but then the "define game" block doesn't get closed at that point as it should be.
Did you edit this code by hand or did QDK generate it?
If you add another "end define" after the "end define" for the align2 definition, the game should load.
Did you edit this code by hand or did QDK generate it?
If you add another "end define" after the "end define" for the align2 definition, the game should load.
francisstokes
14 Mar 2005, 21:37That worked for me alex,but theres another error.When you attempt to buy the bag of fur,there is a "missmatch"?
could anyone interpret this?
could anyone interpret this?
Elexxorine
16 Mar 2005, 10:59thanx so much!!!!! 