if ( %minute% >= 60 ) then {
dec <minute; 60>
inc <hour; 1>
}
if ( %hour% >= 24 ) then {
dec <hour; 24>
inc <day; 1>
}
if ( %hour% < 6 ) or ( %hour% >= 18 ) then flag on <night> else flag off <night>
Hit points: %hp%/%max.hp%. Mana: %mana%/%maxmana%
gold: %gold%
' "Weather/Clock/StatsDEMO"
' Created with QDK 3.53 - UNREGISTERED VERSION
define game <Weather/Clock/StatsDEMO>
asl-version <350>
gametype singleplayer
start <Start>
game author <>
game version <1.0>
game copyright <© Artistic Productions 2005>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
default fontname <Cuckoo>
default fontsize <12>
background <black>
foreground <yellow>
startscript {
msg <|jc>
exec <about>
wait <Press any key to continue...>
clear
msg <|s17In this |bDEMO|xb, there is the following:|n|n|i***A clock|n|n***The weather randomly changes every 5 seconds|n|n***You pick stats, and can view them by entering the command "stats." Originally, I had them displayed in the variables window, but for some reason Quest displays string variables first, and also doesn't display them in the proper order, so it looked horrible. So in the meantime, this DEMO only has stats able to be viewed by entering that command.|n|n***You can reset time by typing in "t." However, I would not recommend this in a normal game, because if you have stores that open at a certain time, it will mess them up, unless you tweak the code|xi|n|n|jcEnjoy!!|n|jl>
wait <Press any key to begin...>
msg <|s00>
clear
choose <armor>
}
command <t> {
msg <What would you like the hour to be? (ENTER A NUMBER FROM 1-12)|n|n>
enter <hour>
if ( #hour# = 1 ) or ( #hour# = 2 ) or ( #hour# = 3 ) or ( #hour# = 4 ) or ( #hour# = 5 ) or ( #hour# = 6 ) or ( #hour# = 7 ) or ( #hour# = 8 ) or ( #hour# = 9 ) or ( #hour# = 10 ) or ( #hour# = 11 ) or ( #hour# = 12 ) then {
set <hours; #hour#>
msg <Ok, the hour is now: %hours%.|n>
pause <1500>
msg <Would would you like the minute(s) to be? (PLEASE ENTER A NUMBER FROM 1-59)|n>
enter <minute>
if ( #minute# >= 1 ) and ( #minute# <= 59 ) then {
set <minutes; #minute#>
msg <The minute(s) is/are now: %minutes%.|n>
pause <1500>
msg <Would you like it to be A.M., or P.M.? (PLEASE ENTER "1" FOR A.M., OR "2" FOR P.M.)|n>
enter <a or p>
if ( #a or p# = 1 ) or ( #a or p# = 2 ) then {
if ( #a or p# = 1 ) then {
set <A.M.; 1>
set <P.M.; 0>
msg <It is now: A.M.|n>
pause <1500>
msg <Your new settings: |nHour: %hours%.|nMinute(s): %minutes%.|nM: A.M.|n>
}
if ( #a or p# = 2 ) then {
set <P.M.; 1>
set <A.M.; 0>
msg <It is now: P.M.|n>
pause <1500>
msg <Your new settings: |nHour: %hours%.|nMinute(s): %minutes%.|nM: P.M.|n>
}
}
else msg <I'm sorry, but you chose an invalid selection. Please try again later.|n>
}
else msg <I'm sorry, but that number is not valid. Please try again later.|n>
}
else msg <I'm sorry, but that number is not valid. Please try again later.|n>
}
command <stats> msg <Your stats are as follows:|n|nRace: #race#|nArmor: #armor#|nHP: %hp%|nMP: %mp%|n|nType in "stats" at any time to view them, or just look in the variable window.|n>
define variable <A.M.>
type numeric
value <1>
display nozero < A.M.>
end define
define variable <P.M.>
type numeric
value <0>
display nozero < P.M.>
end define
define variable <hours>
type numeric
value <12>
display <Hour: !>
end define
define variable <minutes>
type numeric
value <00>
display <Minute*s*: !>
onchange {
if ( %minutes% = 60 ) then {
dec <minutes; 60>
do <Increment Hour>
}
if ( %minutes% = 59 ) then do <A.M. and P.M.>
}
end define
define variable <weather>
type string
value <Sunny>
display <It is [ ! ] outside>
onchange msg <It is |cr#weather#|cb outside.|n>
end define
define variable <race>
type string
end define
define variable <armor>
type string
end define
define variable <hp>
type numeric
value <0>
end define
define variable <mp>
type numeric
value <0>
end define
end define
define synonyms
end define
define room <Start>
look <This is the room you start off in.>
description {
msg <You are in the |crStarting|cb room.|n>
msg <#quest.lookdesc#|n>
}
end define
define procedure <Increment Hour>
if ( %hours% = 12 ) then dec <hours; 11> else inc <hours; 1>
end define
define procedure <Kol Tuv Open?>
if got <Kol Tuv Open> then {
msg <You enter Kol Tuv.|n>
goto <Kol Tuv(The Room)>
create exit out <Kol Tuv(The Room); Start>
}
else msg <A sign on the door says |cl"CLOSED." |cb Oh well.|n>
end define
define procedure <A.M. and P.M.>
if ( %hours% = 11 ) and ( %A.M.% = 1 ) then {
dec <A.M.; 1>
inc <P.M.; 1>
}
else {
if ( %hours% = 11 ) and ( %P.M.% = 1 ) then {
dec <P.M.; 1>
inc <A.M.; 1>
}
}
end define
define timer <minutes>
interval <1>
action set <minutes; %minutes%+1>
disabled
end define
define timer <Weather Changer>
interval <5>
action {
set numeric <weather2; $rand(1;6)$>
if ( %weather2% = 1 ) then set <weather; #weather#> else {if ( %weather2% = 2 ) then set <weather; Raining> else {if ( %weather2% = 3 ) then set <weather; Chilly> else {if ( %weather2% = 4 ) then set <weather; Extremely Hot> else {if ( %weather2% = 5 ) then set <weather; Windy> else {if ( %weather2% = 6 ) then set <weather; Sunny>}}}}}
}
disabled
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
define selection <armor>
info <Please choose your armor:>
choice <Metal of Heroes> {
set <armor; Metal of Heroes>
choose <race>
}
choice <Cloak of Magic> {
set <armor; Cloak of Magic>
choose <race>
}
choice <HELP> {
msg <In this particular demo, it makes no difference, (I'm just using it for the sake of what appears in stats) but in a real game, I'd set a "Defense" variable based on the chosen armor.|n>
pause <4000>
choose <armor>
}
end define
define selection <race>
info <Please choose a race. NOTE: Each race has a different MP and HP>
choice <Elvish> {
set <race; Elvish>
set <hp; 100>
set <mp; 200>
msg <Your stats are as follows:|n|nRace: #race#|nArmor: #armor#|nHP: %hp%|nMP: %mp%|n|nType in "stats" at any time to view them, or just look in the variable window.|n>
wait <Press any key to continue...>
timeron <minutes>
timeron <Weather Changer>
}
choice <Ogre> {
set <race; Ogre>
set <hp; 200>
set <mp; 100>
msg <Your stats are as follows:|n|nRace: #race#|nArmor: #armor#|nHP: %hp%|nMP: %mp%|n|nType in "stats" at any time to view them, or just look in the variable window.|n>
wait <Press any key to continue...>
timeron <minutes>
timeron <Weather Changer>
}
choice <HELP> {
msg <|cgELVISH: |cr100 HP |cl200 MP|n|n|cgOGRE: |cr200 HP |cl100 MP|cb|n>
pause <4000>
choose <race>
}
end define
' "TBC"
' Created with QDK 3.52 - UNREGISTERED VERSION
!include <Typelib.qlb>
define game <TBC>
asl-version <350>
gametype singleplayer
start <Astnia, traven>
game author <elexxorine>
game version <1.00 pre-alpha>
game info <Created with QDK 3.52 - UNREGISTERED EVALUATION VERSION.>
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.|nyou are |i#align#|xi .|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.>
define variable <race>
type string
value <elf>
end define
define variable <class>
type string
value <peasant>
end define
define variable <gold>
type numeric
value <90>
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 <1>
end define
define variable <dex>
type numeric
value <1>
end define
define variable <agl>
type numeric
value <1>
end define
define variable <int>
type numeric
value <1>
end define
define variable <align>
type string
end define
define variable <mins>
type numeric
value <0>
end define
define variable <hrs>
type numeric
value <4>
end define
define variable <day>
type numeric
value <1>
end define
define variable <weather>
type string
onchange msg <It is #weather# outside.>
end define
define variable <weather2>
type numeric
value <6>
end define
define variable <hp>
type numeric
value <100>
end define
define variable <mhp>
type numeric
value <50>
end define
define variable <sta>
type numeric
value <50>
end define
define variable <msta>
type numeric
value <50>
end define
define variable <align2>
type numeric
value <70>
end define
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...>
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>
end define
end define
define procedure <hrschange>
if ( %mins% >= 60 ) then {
set <hrs; %hrs%+1>
set <mins; 0>
}
if ( hrs >= 24 ) then {
set <hrs; 0>
set <day; %day%+1>
}
end define
define procedure <alignment>
if ( align2 >= 1 ) and ( align2 <= 20 ) then set <align; PURE EVIL!!!> else {if ( align2 >= 21 ) and ( align2 <= 40 ) then set <align; evil> else {if ( align2 >= 41 ) and ( align2 <= 60 ) then set <align; neutral/evil> else {if ( align2 >= 61 ) and ( align2 <= 80 ) then set <align; neutral> else {if ( align2 >= 81 ) and ( align2 <= 100 ) then set <align; neutral/good> else {if ( align2 >= 101 ) and ( align2 <= 120 ) then set <align; good> else {if ( align2 >= 121 ) and ( align2 <= 140 ) then set <align; PURE GOOD!!!>}}}}}}
end define
define procedure <mhit>
set <mhp; %str%+%str%+4>
end define
define procedure <mstam>
inc <msta; %agl%+%agl%+4>
end define
define procedure <mhit2>
if ( hp > mhp ) then set <hp; %mhp%>
end define
define procedure <mstam2>
if ( sta > msta ) then set <sta; %sta%>
end define
define timer <minutes>
interval <1>
action set <mins; %mins%+1>
enabled
end define
define timer <weatherchanger>
interval <15>
action {
set <weather2; $rand(1;10)$>
if ( weather2 = 1 ) or ( weather2 = 2 ) or ( weather2 = 3 ) or ( weather2 = 4 ) or ( 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>}}}}}
}
enabled
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>
choice <Buy_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