Wars of Ancardia - the text based strategy game
francisstokes
06 May 2005, 19:10Ok.this is my new game.
There are a few things i probably cant do myself, such as writh a moving NPC army procedure.If you can help please reply and i would be very grateful.
heres my to do list:
http://www.geocities.com/francis.stokes14@btinternet.com/todolist.zip
define game <Wars of Ancardia>
asl-version <350>
gametype singleplayer
start <Decidence>
game author <Francis Robert Stokes>
game info <Unfinished.>
startscript msg <|b|s27|jcWars Of Ancardia|s00|jl|xb>
properties <Non Fight=1>
command <Travel> choose <Travel>
define variable <Race>
type string
value <no race>
display <Race = !>
end define
define variable <Army>
type numeric
value <0>
display nozero <You have ! #Race# #class#s>
end define
define variable <wood>
type numeric
value <0>
display nozero <You have !wood peices.>
end define
define variable <gold>
type numeric
value <0>
display nozero <You have ! gold peices.>
end define
define variable <Class>
type string
value <no class>
end define
define variable <Army LVL>
type numeric
value <1>
display <Army Lvl !>
end define
define variable <Army EXP>
type numeric
value <100>
display <Army exp = !>
end define
define variable <current army>
type string
end define
end define
define synonyms
end define
define room <Orc Camp>
look <You stand in your camp with your leading general.All of you %Army% are resting.>
command <build a fort> choose <Fort>
properties <Non Fight=1>
end define
define room <Elven Camp>
properties <Non Fight=1>
end define
define room <Men Camp>
end define
define room <Decidence>
description <It is time to decide your race, young one.|nElf, Human or Orc?>
command <Orc> {
set string <Race; Orc>
set string <Class; Warriors>
msg <You have an army of 1500 orcs.You must do battle and build it up to become the most feared race in the whole of Ancardia!>
inc <Army; 1500>
goto <Orc Camp>
}
command <Elf> {
set string <Race; Elven>
set string <Class; Archer>
set numeric <Army; 1000>
msg <You have an army of 1000 Elves.You must do battle and build it up to become the most respected race in the whole of Ancardia!>
goto <Elf Camp>
}
command <Human> {
set string <Race; Men>
set string <Class; Barbarian>
set numeric <Army; 1700>
msg <You have an army of 1700 Men.You must do battle and build it up to become the most powerfull race in the whole of Ancardia!>
goto <Men Camp>
}
end define
define room <Fort Room>
look <This room is required by the program to execute the "build a fort" command.If you are here then there is an error with the game.Please contact Francis Stokes with all the details of the errror at francis.stokes14@btinternet.com.>
define object <Wooden Fort>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <It currently has %woodenfortdef% defence.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
end define
end define
define room <Ganaroth>
look <You and your recrutier stand in the city.You can employ warriors for 1000 gold for every 100 warriors.>
define object <Dwarven Army>
look <This is an elite army of 200 dwarves.>
examine <This army is lvl 1.>
type <army>
properties <lvl=1; army=200>
end define
end define
define procedure <NPC army move>
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
define selection <Fort>
info <What kind of Fort do you wish to build?>
choice <Wood> if ask <It costs 10000 gold and 10000 wood peices to build a wooden fort.Are you sure?> then {
if ( %gold% >= 10000 ) and ( %wood% >= 10000 ) and ( %Army% >= 1000 ) then {
msg <You build a wooden fort.>
dec <gold; 10000>
dec <wood; 10000>
clone <Wooden Fort; Wooden Fort2; #quest.currentroom#>
}
else msg <You either didnt have enough gold, wood or men to build this fort.>
}
end define
define selection <Travel>
info <Travel to where?>
choice <Ganaroth, capital of Ancardia> goto <Ganaroth>
choice <#Race# Camp> goto <#Race# Camp>
end define
There are a few things i probably cant do myself, such as writh a moving NPC army procedure.If you can help please reply and i would be very grateful.
heres my to do list:
http://www.geocities.com/francis.stokes14@btinternet.com/todolist.zip
METALGod32
07 May 2005, 01:20Hey.
Is this going to be single player or Multiplayer in the final version?.
I Like the Organization of your To do List, very easy to follow.
I Have a Huge project of my own, so there is noway i can spend anytime helping you, but once you hit beta/alpha, let me know, i'd like to test it.
Is this going to be single player or Multiplayer in the final version?.
I Like the Organization of your To do List, very easy to follow.

I Have a Huge project of my own, so there is noway i can spend anytime helping you, but once you hit beta/alpha, let me know, i'd like to test it.
francisstokes
07 May 2005, 12:38Grrrrrrrrr.Ive been trying to make a menu based build a town system so the player can make money from it, but i keep getting errors.If you muck about with it, the commands for building towns/forts is "build".To ytravel , well, type travel.Oh and be orcs because its the only race ive tested on.ok heres the code:
The error is invalid propery value of something like that.Error 368.
' "Wars of Ancardia"
' Created with QDK 3.53 - UNREGISTERED VERSION
define game <Wars of Ancardia>
asl-version <350>
gametype singleplayer
start <Decidence>
game author <Francis Robert Stokes>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
startscript msg <|b|s27|jcWars Of Ancardia|s00|jl|xb>
command <Travel> choose <Travel>
command <Build> choose <Build>
define variable <Race>
type string
value <no race>
display <Race = !>
end define
define variable <Army>
type numeric
value <0>
display nozero <You have ! #Race# #class#s>
end define
define variable <wood>
type numeric
value <10000>
display nozero <You have !wood peices.>
end define
define variable <gold>
type numeric
value <10000>
display nozero <You have ! gold peices.>
end define
define variable <Class>
type string
value <no class>
end define
define variable <Army LVL>
type numeric
value <1>
display <Army Lvl !>
onchange if ( %Army LVL% = 2 ) then inc <Credits; 5>
end define
define variable <Army EXP>
type numeric
value <100>
display <Exp till next lvl = !>
onchange if ( %Army LVL% = 1 ) and ( %Army EXP% = 0 ) then {
inc <Army LVL; 1>
inc <Army EXP; 158>
}
end define
define variable <current army>
type string
end define
define variable <Army Atk>
type numeric
value <1>
display <Army Atk = ! >
end define
define variable <Army Def>
type numeric
value <1>
display <Army Def = !>
end define
define variable <Credits>
type numeric
value <0>
display <You have ! Training Credit*s*>
end define
end define
define synonyms
end define
define room <Orc Camp>
look <You stand in your camp with your leading general.All of your warriors are resting here.>
command <build a fort> choose <Fort>
end define
define room <Elven Camp>
end define
define room <Men Camp>
end define
define room <Decidence>
description <It is time to decide your race, young one.|nElf, Human or Orc?>
command <Orc> {
set string <Race; Orc>
set string <Class; Warriors>
msg <You have an army of 1500 orcs.You must do battle and build it up to become the most feared race in the whole of Ancardia!>
inc <Army; 1500>
goto <Orc Camp>
}
command <Elf> {
set string <Race; Elven>
set string <Class; Archer>
set numeric <Army; 1000>
msg <You have an army of 1000 Elves.You must do battle and build it up to become the most respected race in the whole of Ancardia!>
goto <Elf Camp>
}
command <Human> {
set string <Race; Men>
set string <Class; Barbarian>
set numeric <Army; 1700>
msg <You have an army of 1700 Men.You must do battle and build it up to become the most powerfull race in the whole of Ancardia!>
goto <Men Camp>
}
end define
define room <Storeage Room>
look <This room is required by the program to execute the "build a fort" command.If you are here then there is an error with the game.Please contact Francis Stokes with all the details of the errror at francis.stokes14@btinternet.com.>
define object <Wooden Fort>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <It currently has %woodenfortdef% defence.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
end define
define object <Small Town Deed>
look <This shows you own a small town.>
take
examine <This shows you own a small town.>
drop nowhere <You cannot just drop you town deed!>
end define
end define
define room <Ganaroth>
look <You and your recrutier stand in the city.You can employ warriors for 1000 gold for every 100 warriors.>
end define
define room <Railthor>
look <"welcome" says a gnome.|n"You may train here for 500 gold.">
command <train> if ( %gold% >= 500 ) and ( %Army% >= 1 ) then {
if ask <are you sure that you want to train 100 exp of your army for 500 gold?> then {
dec <gold; 500>
dec <Army EXP; 100>
}
}
command <money> dec <gold>
end define
define procedure <NPC army move>
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
define selection <Fort>
info <What kind of Fort do you wish to build?>
choice <Wood> if ask <It costs 10000 gold and 10000 wood peices to build a wooden fort.Are you sure?> then {
if ( %gold% >= 10000 ) and ( %wood% >= 10000 ) and ( %Army% >= 1000 ) then {
msg <You build a wooden fort.>
dec <gold; 10000>
dec <wood; 10000>
clone <Wooden Fort; Wooden Fort2; #quest.currentroom#>
}
else msg <You either didnt have enough gold, wood or men to build this fort.>
}
end define
define selection <Travel>
info <Travel to where?>
choice <Ganaroth, capital of Ancardia> goto <Ganaroth>
choice <#Race# Camp> goto <#Race# Camp>
choice <Railthor - City of Training> goto <Railthor>
end define
define selection <Build>
info <What do you want to build?>
choice <A Fort - Adds 100 def to your army defence lvl> choose <Fort>
choice <A Town - Makes you up to 1000 gold a day> choose <Build town>
end define
define selection <Build Town>
info <What kind of town would you like to build?>
choice <Small Town - Makes 300 gold a day & adds 10 defence> if ( %wood% >= 10000 ) and ( %gold% >= 10000 ) then {
{if ask <Are you sure you want to build a small town for 10000 wood peices and 10000 gold?> then msg <Your small town has been built!To collect your money, use the "bank" command.|nNote: You can only do this every 50 turns.> inc <Army Def; 10> give <Small Town Deed> else msg <You decide not to build a small town.> } else msg <You do not have enough gold or wood to build this town.You need 10000 wood and 10000 gold.>
}
end define
The error is invalid propery value of something like that.Error 368.
paul_one
07 May 2005, 14:13You KNOW where the problem is from the error message...
It only happens when you select "build town".. Therefore error is in "build town" selection.
The error is because there are no returns, did you edit this by hand?
The correct town selection is:
BUT it's not all in the selection.
The problem the error is coming up (which I found out just while testing my code) is because the selection you call isn't correct!
Your code "choose <Build town>" is wrong, it HAS to be "choose <Build Town>". It is Case Sensitive!
There are loads of bits where quest has funny moments with capitals (End Define is one IIRC), this seems to be another.
It only happens when you select "build town".. Therefore error is in "build town" selection.
The error is because there are no returns, did you edit this by hand?
The correct town selection is:
define selection <Build Town>
info <What kind of town would you like to build?>
choice <Small Town - Makes 300 gold a day & adds 10 defence> {
if ( %wood% >= 10000 ) and ( %gold% >= 10000 ) then {
if ask <Are you sure you want to build a small town for 10000 wood peices and 10000 gold?> then {
msg <Your small town has been built!To collect your money, use the "bank" command.|nNote: You can only do this every 50 turns.>
inc <Army Def; 10>
give <Small Town Deed>
}
else msg <You decide not to build a small town.>
}
else msg <You do not have enough gold or wood to build this town.You need 10000 wood and 10000 gold.>
}
end define
BUT it's not all in the selection.
The problem the error is coming up (which I found out just while testing my code) is because the selection you call isn't correct!
Your code "choose <Build town>" is wrong, it HAS to be "choose <Build Town>". It is Case Sensitive!
There are loads of bits where quest has funny moments with capitals (End Define is one IIRC), this seems to be another.
francisstokes
07 May 2005, 15:43Thanks for that.....but your a little too late!I worked it out a second ago.I cant understand why its so case sensitive.
oh and yeah,i edit most of the errors by hand.(i get about 100 a day)
oh and yeah,i edit most of the errors by hand.(i get about 100 a day)
francisstokes
07 May 2005, 18:08Is it possible to times numbers together in quest?
If not, Tr0n2 have you finished your mathematical library?
If not, Tr0n2 have you finished your mathematical library?
paul_one
07 May 2005, 19:58Yes, the math library link is around in the chat forum somewhere.
I still want to add a "function to rule them all", where I can just have something like func(3;m;3;p;5;s;6;d;5).. but the wsy I have to do it is going to be hard to think of.
And yes, multiplying two numbers is easy, it's just %number% * %number2% .
I still want to add a "function to rule them all", where I can just have something like func(3;m;3;p;5;s;6;d;5).. but the wsy I have to do it is going to be hard to think of.
And yes, multiplying two numbers is easy, it's just %number% * %number2% .
francisstokes
08 May 2005, 18:14Thanks whizz, i really needed that!
francisstokes
08 May 2005, 20:04Ok heres my latest code:
Will someone look at the Tree campaign and see if they can make sense of the cut tree command.I cant make the tree come back.
Thank You.
' "Wars of Ancardia"
' Created with QDK 3.53 - UNREGISTERED VERSION
define game <Wars of Ancardia>
asl-version <350>
gametype singleplayer
start <Decidence>
game author <Francis Robert Stokes>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
startscript msg <|b|s27|jcWars Of Ancardia|s00|jl|xb>
afterturn inc <turn counter; 1>
command <Travel> choose <Travel>
command <Build> choose <Build>
command <Bank> choose <Bank Collect>
command <Cut #@Tree#> if here <#Tree#> then {
msg <You cut wood from the tree.>
inc <wood ; 4>
dec <Army EXP; 15>
hide <#Tree#>
}
define variable <Race>
type string
value <no race>
display <Race = !>
end define
define variable <Army>
type numeric
value <0>
display nozero <You have ! #Race# #class#>
end define
define variable <wood>
type numeric
value <0>
display <You have ! wood peices.>
onchange if ( %wood% > 20 ) then set numeric <wood; 20>
end define
define variable <gold>
type numeric
value <1000>
display nozero <You have ! gold peices.>
end define
define variable <Class>
type string
value <no class>
end define
define variable <Army LVL>
type numeric
value <1>
display <Army Lvl !>
onchange if ( %Army LVL% = 2 ) then inc <Credits; 5>
end define
define variable <Army EXP>
type numeric
value <100>
display <Exp till next lvl = !>
onchange if ( %Army LVL% = 1 ) and ( %Army EXP% = 0 ) then {
inc <Army LVL; 1>
inc <Army EXP; 158>
}
end define
define variable <current army>
type string
end define
define variable <Army Atk>
type numeric
value <1>
display <Army Atk = ! >
end define
define variable <Army Def>
type numeric
value <1>
display <Army Def = !>
end define
define variable <Credits>
type numeric
value <0>
display <You have ! Training Credit*s*>
end define
define variable <turn counter>
type numeric
value <0>
display <! turns>
end define
define variable <Storage Campaign>
type numeric
value <0>
end define
define variable <Storage Sell>
type numeric
value <0>
end define
define variable <Campaign>
type numeric
value <1>
end define
define variable <Tree Counter>
type numeric
value <0>
end define
end define
define synonyms
end define
define room <Orc Camp>
look <You stand in your camp with your leading general.All of your warriors are resting here.>
command <build a fort> choose <Fort>
end define
define room <Elven Camp>
end define
define room <Men Camp>
end define
define room <Decidence>
description <It is time to decide your race, young one.|nElf, Human or Orc?>
command <Orc> {
set string <Race; Orc>
set string <Class; Warriors>
msg <You have an army of 10 orcs.You must do battle and build it up to become the most feared race in the whole of Ancardia!>
inc <Army; 10>
goto <Orc Camp>
}
command <Elf> {
set string <Race; Elven>
set string <Class; Archer>
set numeric <Army; 10>
msg <You have an army of 10 Elves.You must do battle and build it up to become the most respected race in the whole of Ancardia!>
goto <Elf Camp>
}
command <Human> {
set string <Race; Men>
set string <Class; Barbarian>
set numeric <Army; 10>
msg <You have an army of 10 Men.You must do battle and build it up to become the most powerfull race in the whole of Ancardia!>
goto <Men Camp>
}
end define
define room <Storage Room>
look <This room is required by the program to execute the "build a fort" command.If you are here then there is an error with the game.Please contact Francis Stokes with all the details of the errror at francis.stokes14@btinternet.com.>
define object <Wooden Fort>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
end define
define object <Small Town Deed>
look <This shows you own a small town.>
take
examine <This shows you own a small town.>
drop nowhere <You cannot just drop you town deed!>
end define
define object <Wooden Fort2>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
end define
define object <Wooden Fort3>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
end define
define object <Wooden Fort4>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
end define
define object <Wooden Fort5>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
end define
define object <Campaign Certificate - Fort Quest>
look <-*- Quest Completed -*->
take
speak <-*- Quest Completed -*->
examine <-*- Quest Completed -*->
drop nowhere <>
end define
end define
define room <Ganaroth>
look <You and your recrutier stand in the city.You can employ warriors for 1000 gold for every 100 warriors.>
end define
define room <Railthor>
look <"welcome" says a gnome.|n"You may train here for 500 gold.">
command <train> if ( %gold% >= 500 ) and ( %Army% >= 1 ) then {
if ask <are you sure that you want to train 100 exp of your army for 500 gold?> then {
dec <gold; 500>
dec <Army EXP; 100>
}
}
command <money> dec <gold>
end define
define room <The Open>
description if ( %campaign% = 1 ) then {
msg <You are all set to begin your first campaign.|nFor this, you must build four forts and get your army LvL to at least two.>
goto <Campaign 1>
}
end define
define room <Campaign 1>
alias <Campaign>
indescription <This is your first:>
afterturn {
inc <Tree Counter; 1>
if ( %Tree Counter# = 4 ) then show <#quest.lastobject#>
if is <%Tree Counter%; =; 4> then set numeric <Tree Counter; 0>
}
define object <Tree>
look <A tall tree that can be cut down with the "cut tree command".>
examine <A tall tree that can be cut down with the "cut tree command".>
end define
define object <Tree2>
alias <Tree>
look <A tall tree that can be cut down with the "cut tree command".>
examine <A tall tree that can be cut down with the "cut tree command".>
end define
define object <Tree3>
alias <Tree>
look <A tall tree that can be cut down with the "cut tree command".>
examine <A tall tree that can be cut down with the "cut tree command".>
end define
define object <Tree4>
alias <Tree>
look <A tall tree that can be cut down with the "cut tree command".>
examine <A tall tree that can be cut down with the "cut tree command".>
end define
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
define selection <Fort>
info <What kind of Fort do you wish to build?>
choice <Wood> if ask <It costs 20 gold and 20 wood peices to build a wooden fort.Are you sure?> then {
if ( %gold% >= 20 ) and ( %wood% >= 20 ) and ( %Army% >= 10 ) then {
msg <You build a wooden fort.>
dec <gold; 10000>
dec <wood; 10000>
clone <Wooden Fort; Wooden Fort2; #quest.currentroom#>
}
else msg <You either didnt have enough gold, wood or men to build this fort.>
}
end define
define selection <Travel>
info <Travel to where?>
choice <#Race# Camp> goto <#Race# Camp>
choice <Ganaroth, Capital of Ancardia> goto <Ganaroth>
choice <Railthor - City of Training> goto <Railthor>
choice <The Open Land - Execute Campaigns> goto <The Open>
end define
define selection <Build>
info <What do you want to build?>
choice <A Fort - Adds 100 def to your army defence lvl> choose <Fort>
choice <A Town - Makes you up to 1000 gold a day> choose <Build Town>
end define
define selection <Build Town>
info <What kind of town would you like to build?>
choice <Small Town - Makes 300 gold a day & adds 10 defence> if ( %wood% >= 100 ) and ( %gold% >= 100 ) then {
if ask <Are you sure you want to build a small town for 100 wood peices and 100 gold?> then msg <Your small town has been built!To collect your money, use the "bank" command.|nNote: You can only do this once a day.>
inc <Army Def; 10>
dec <gold; 100>
dec <wood; 100>
give <Small Town Deed> else msg <You decide not to build a small town.>
}
end define
define selection <Bank Collect>
info <What kind of town do you wish to collect gold from?>
choice <Small Town> if ( %turn counter% >= 20 ) and got <Small Town Deed> then {
set numeric <turn counter; 0>
inc <gold; 300>
}
else msg <You have either not built a town or have not waited 1 day (20 turns).>
end define
Will someone look at the Tree campaign and see if they can make sense of the cut tree command.I cant make the tree come back.
Thank You.
francisstokes
11 May 2005, 18:13Ok kind of solved that,but i need to know if the is a way of checking if there is an object in a room more then once, like:
is there a way to do this?
if here <tree1; tree2; tree3>
then {
blah blah blah.
is there a way to do this?
Cryophile
11 May 2005, 21:15with the AND condition... rtfm
francisstokes
11 May 2005, 21:50That might work..... 

francisstokes
11 May 2005, 22:36This is my latest todo list / bug list / skills list.
Please take a look:-
http://www.geocities.com/francis.stokes14@btinternet.com/FilesForWOA.zip
Please take a look:-
http://www.geocities.com/francis.stokes14@btinternet.com/FilesForWOA.zip
francisstokes
20 May 2005, 15:24After stupidly testing this game with my editor this is what my code looks like:
[Edit] Wow.The forum sorted my code out.Cool.
define game <Wars of Ancardia>
asl-version <350>
gametype singleplayer
start <Decidence>
game author <Francis Robert Stokes>
game info <Created with QDK 3.53 - UNREGISTERED EVALUATION VERSION.>
startscript msg <|b|s27|jcWars Of Ancardia|s00|jl|xb>
afterturn inc <turn counter; 1>
type <Fort>
command <Travel> choose <Travel>
command <Build> choose <Build>
command <Bank> choose <Bank Collect>
command <Cut #@Tree#> if here <#Tree#> then {
msg <You cut wood from the tree.>
inc <wood ; 4>
dec <Army EXP; 15>
hide <#Tree#>
}
command <Skills> msg <|uSkills:-|xu|nMining Level : %mining lvl%|nCrafting Level : %crafting lvl%>
define variable <Race>
type string
value <no race>
display <Race = !>
end define
define variable <Army>
type numeric
value <0>
display nozero <You have ! #Race# #class#>
end define
define variable <wood>
type numeric
value <500>
display <You have ! wood peices.>
end define
define variable <gold>
type numeric
value <1000>
display nozero <You have ! gold peices.>
end define
define variable <Class>
type string
value <no class>
end define
define variable <Army LVL>
type numeric
value <1>
display <Army Lvl !>
onchange if ( %Army LVL% = 2 ) then inc <Credits; 5>
end define
define variable <Army EXP>
type numeric
value <100>
display <Exp till next lvl = !>
onchange if ( %Army LVL% = 1 ) and ( %Army EXP% <= 0 ) then {
inc <Army LVL; 1>
inc <Army EXP; 158>
}
end define
define variable <current army>
type string
end define
define variable <Army Atk>
type numeric
value <1>
display <Army Atk = ! >
end define
define variable <Army Def>
type numeric
value <1>
display <Army Def = !>
end define
define variable <Credits>
type numeric
value <0>
display <You have ! Training Credit*s*>
end define
define variable <turn counter>
type numeric
value <0>
display <! turns>
end define
define variable <Storage Campaign>
type numeric
value <0>
end define
define variable <Storage Sell>
type numeric
value <0>
end define
define variable <Campaign>
type numeric
value <1>
end define
define variable <Tree Counter>
type numeric
value <0>
end define
define variable <mining lvl>
type numeric
value <1>
end define
define variable <crafting lvl>
type numeric
value <1>
end define
define variable <Mining>
type numeric
value <0>
display <mining - !>
end define
define variable <Mined Material>
type string
end define
end define
define synonyms
end define
define room <Orc Camp>
look <You stand in your camp with your leading general.All of your warriors are resting here.>
command <build a fort> choose <Fort>
end define
define room <Elven Camp>
end define
define room <Men Camp>
end define
define room <Decidence>
description <It is time to decide your race, young one.|nElf, Human or Orc?>
command <Orc> {
set string <Race; Orc>
set string <Class; Warriors>
msg <You have an army of 10 orcs.You must do battle and build it up to become the most feared
race in the whole of Ancardia!>
inc <Army; 10>
goto <Orc Camp>
}
command <Elf> {
set string <Race; Elven>
set string <Class; Archer>
set numeric <Army; 10>
msg <You have an army of 10 Elves.You must do battle and build it up to become the most
respected race in the whole of Ancardia!>
goto <Elf Camp>
}
command <Human> {
set string <Race; Men>
set string <Class; Barbarian>
set numeric <Army; 10>
msg <You have an army of 10 Men.You must do battle and build it up to become the most powerfull
race in the whole of Ancardia!>
goto <Men Camp>
}
end define
define room <Storage Room>
look <This room is required by the program to execute the "build a fort" command.If you are here then there is
an error with the game.Please contact Francis Stokes with all the details of the errror at francis.stokes14@btinternet.com.>
define object <Wooden Fort>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
type <Fort>
end define
define object <Small Town Deed>
look <This shows you own a small town.>
take
examine <This shows you own a small town.>
drop nowhere <You cannot just drop you town deed!>
end define
define object <Campaign Certificate - Fort Quest>
look <-*- Quest Completed -*->
take
speak <-*- Quest Completed -*->
examine <-*- Quest Completed -*->
drop nowhere <>
end define
define object <Wooden Fort2>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
type <Fort>
end define
define object <Wooden Fort3>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
type <Fort>
end define
define object <Wooden Fort4>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
type <Fort>
end define
define object <Wooden Fort5>
alias <Wooden Fort>
look <A wooden fort fashioned by the hand of your race.>
examine <A wooden fort fashioned by the hand of your race.>
prefix <a>
displaytype <Fort>
article <it>
gender <it>
type <Fort>
end define
end define
define room <Ganaroth>
look <You stand in a busy city.You can go to the mines for 100 gold.>
north if ask <Would you like to goto the mines of Ganaroth?> and ( %Gold% >= 100 ) then goto <Mines of
Ganaroth>
end define
define room <Railthor>
look <"welcome" says a gnome.|n"You may train here for 500 gold.">
command <train> if ( %gold% >= 500 ) and ( %Army% >= 1 ) then {
if ask <are you sure that you want to train 100 exp of your army for 500 gold?> then {
dec <gold; 500>
dec <Army EXP; 100>
}
}
command <money> dec <gold>
end define
define room <The Open>
description if ( %campaign% = 1 ) then {
msg <You are all set to begin your first campaign.|nFor this, you must build four forts and get your
army LvL to at least two.>
goto <Campaign 1>
}
end define
define room <Campaign 1>
alias <Campaign>
indescription <This is your first:>
script give <Tree Cutting Pass>
afterturn {
inc <Tree Counter; 1>
doaction <Tree; Regen>
doaction <Tree2; Regen>
doaction <Tree3; Regen>
doaction <Tree4; Regen>
if ( %Tree Counter% >= 4 ) then set numeric <Tree Counter; 0>
if here <Wooden Fort2> and here <Wooden Fort3> and here <Wooden Fort4> and here <Wooden
Fort5> and ( %Army LVL% >= 2 ) then {
msg <Campaign Completed!|nYou can now attempt the next campaign.>
give <Campaign Certificate - Fort Quest>
goto <#Race# Camp>
}
}
define object <Tree>
look <A tall tree that can be cut down with the "cut tree command".>
examine <A tall tree that can be cut down with the "cut tree command".>
action <Regen> if not exists <Tree> and ( %Tree Counter% = 3 ) then {
set numeric <Tree Counter; 0>
show <Tree>
}
end define
define object <Tree2>
alias <Tree>
look <A tall tree that can be cut down with the "cut tree command".>
examine <A tall tree that can be cut down with the "cut tree command".>
action <Regen> if not exists <Tree2> and ( %Tree Counter% = 3 ) then {
set numeric <Tree Counter; 0>
show <Tree2>
}
end define
define object <Tree3>
alias <Tree>
look <A tall tree that can be cut down with the "cut tree command".>
examine <A tall tree that can be cut down with the "cut tree command".>
action <Regen> if not exists <Tree3> and ( %Tree Counter% = 3 ) then {
set numeric <Tree Counter; 0>
show <Tree3>
}
end define
define object <Tree4>
alias <Tree>
look <A tall tree that can be cut down with the "cut tree command".>
examine <A tall tree that can be cut down with the "cut tree command".>
action <Regen> if not exists <Tree4> and ( %Tree Counter% = 3 ) then {
set numeric <Tree Counter; 0>
show <Tree4>
}
end define
end define
define room <Mines of Ganaroth>
prefix <The>
look <There are raw materials here, such as stone, iron, gold and mithril.|nTo mine stone, you are required to
be mining lvl 1 at least.For iron, it is 3, for gold it is 10 and for mithril, it is 15.>
indescription <You are in:>
define object <Stone>
look <Type "mine stone" to mine this rock.>
take msg <This stone is to big to take.You must mine it.>
examine <This stone can be used to build or sold.>
prefix <A Mining>
use <Bronze Pickaxe> {
timeron <Mine>
set string <Mining Material; Stone>
}
end define
define object <Bronze Pickaxe>
take
end define
end define
define timer <Mine>
interval <1>
action {
inc <Mining; 1>
if ( %Mining% = 8 ) then {
msg <You mine some #Mining Material#.>
set numeric <Mining; 0>
timeroff <Mine>
}
}
disabled
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
define selection <Fort>
info <What kind of Fort do you wish to build?>
choice <Wood> if ask <It costs 20 gold and 20 wood peices to build a wooden fort.Are you sure?> then {
if ( %gold% >= 20 ) and ( %wood% >= 20 ) and ( %Army% >= 10 ) then {
if here <Wooden Fort2> and here <Wooden Fort3> and here <Wooden Fort4> then clone
<Wooden Fort; Wooden Fort5; #quest.currentroom#>
if here <Wooden Fort2> and here <Wooden Fort3> then clone <Wooden Fort; Wooden
Fort4; #quest.currentroom#>
if here <Wooden Fort2> then clone <Wooden Fort; Wooden Fort3; #quest.currentroom#>
msg <You build a wooden fort.>
dec <gold; 20>
dec <wood; 20>
if not here <Wooden Fort2> then clone <Wooden Fort; Wooden Fort2;
#quest.currentroom#>
}
else msg <You either didnt have enough gold, wood or men to build this fort.>
if got <Tree Cutting Pass> then msg <>
}
end define
define selection <Travel>
info <Travel to where?>
choice <#Race# Camp> goto <#Race# Camp>
choice <Ganaroth, Capital of Ancardia> goto <Ganaroth>
choice <Railthor - City of Training> goto <Railthor>
choice <The Open Land - Execute Campaigns> goto <The Open>
end define
define selection <Build>
info <What do you want to build?>
choice <A Fort - Adds 100 def to your army defence lvl> choose <Fort>
choice <A Town - Makes you up to 1000 gold a day> choose <Build Town>
end define
define selection <Build Town>
info <What kind of town would you like to build?>
choice <Small Town - Makes 300 gold a day & adds 10 defence> if ( %wood% >= 100 ) and ( %gold% >= 100 )
then {
if ask <Are you sure you want to build a small town for 100 wood peices and 100 gold?> then msg
<Your small town has been built!To collect your money, use the "bank" command.|nNote: You can only do this once a
day.>
inc <Army Def; 10>
dec <gold; 100>
dec <wood; 100>
give <Small Town Deed> else msg <You decide not to build a small town.>
}
end define
define selection <Bank Collect>
info <What kind of town do you wish to collect gold from?>
choice <Small Town> if ( %turn counter% >= 20 ) and got <Small Town Deed> then {
set numeric <turn counter; 0>
inc <gold; 300>
}
else msg <You have either not built a town or have not waited 1 day (20 turns).>
end define
[Edit] Wow.The forum sorted my code out.Cool.
007bond
21 May 2005, 08:46That is a very long and complicated game!
Cryophile
21 May 2005, 15:44Complicated? It's mostly empty rooms, simple unfinished procedures, and unused variables. You want to see complicated? Take a look at something written by me, CW, or ITID... and that's only what we have so far 

davidw
21 May 2005, 15:53You must have a strange idea of what a constitutes a "long" game, 007bond. Copied into a Word document it comes to just 6 pages.
paul_one
21 May 2005, 20:29Take out all the extra spaces and it comes to 3 pages
.

davidw
21 May 2005, 20:523 pages? Jeez, it's practically epic!
francisstokes
21 May 2005, 22:50Umm the game isnt even finished.What difference does it make to all of you how long or whats in it anyway.
davidw
21 May 2005, 23:26How long doesn't really matter. But "what's in it"... I'd say that matters quite a bit actually.
paul_one
22 May 2005, 10:52I liked the way 007 said:
...... Just hilarious to point and laugh
.
That is a very long and complicated game!
...... Just hilarious to point and laugh

francisstokes
22 May 2005, 11:35Ok.It might not seem as hard for all of you more experienced asl coders but thinking of ways to do certain things in this is hard, like the mining and stuff, since ive never used timers or anything.
I will finish it and ill make it the best that i possibly can.ok?
I will finish it and ill make it the best that i possibly can.ok?
007bond
22 May 2005, 17:30I wasn't doubting you when I said that.
I don't do manual ASL coding, and I congratulate anyone who does.
I'm sure that if you keep at it, it will be the best you can make it!
I don't do manual ASL coding, and I congratulate anyone who does.
I'm sure that if you keep at it, it will be the best you can make it!
Cryophile
23 May 2005, 05:54I wasn't mocking your game, francisstokes, I was simply trying to point out to 007Bond that it was not exactly long and complicated... yet. We know it isn't finished yet 
