<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
omimike wrote:and wanted to make it where if you don't drink you can dehydrate.
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>cd102f9d-370a-4bda-b6ea-ca42288f619c</gameid>
<version>1.0</version>
<start type="script">
msg ("What is your name?")
get input {
msg (" - " + result)
player.alias = result
show menu ("What is your gender?", split ("male;female" , ";"), false) {
player.gender = result
show menu ("What is your race?", split ("human;elf;dwarf" , ";"), false) {
player.race = result
show menu ("What is your class?", split ("warrior;cleric;mage;thief" , ";"), false) {
player.class = result
msg (player.alias + " is a " + " " + player.gender + " " + player.race + " " + player.class + ".")
}
}
}
}
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="defaultplayer" />
<age type="int">0</age>
<height type="int">0</height>
<weight type="int">0</weight>
<strength type="int">0</strength>
<intelligence type="int">0</intelligence>
<agility type="int">0</agility>
<statusattributes type="simplestringdictionary">age = ;height = ;weight = ;strength = ;intelligence = ;agility = ;level = ;experience = ;cash = ;turns = </statusattributes>
<level type="int">0</level>
<experience type="int">0</experience>
<cash type="int">0</cash>
<turns type="int">0</turns>
</object>
<object name="potion100">
<inherit name="editor_object" />
<alias>100 exp potion</alias>
<take />
<displayverbs>Look at; Take; drink</displayverbs>
<inventoryverbs>Look at; Use; Drop; drink</inventoryverbs>
<drink type="script">
msg ("You drink the exp potion, receiving 100 experience.")
player.experience = player.experience + 100
</drink>
</object>
<object name="potion300">
<inherit name="editor_object" />
<alias>300 exp potion</alias>
<take />
<displayverbs>Look at; Take; drink</displayverbs>
<inventoryverbs>Look at; Use; Drop; drink</inventoryverbs>
<drink type="script">
msg ("You drink the exp potion, receiving 300 experience.")
player.experience = player.experience + 300
</drink>
</object>
</object>
<turnscript name="turns lvlup script">
<enabled />
<script>
lvlup
player.turns = player.turns + 1
</script>
</turnscript>
<function name="lvlup"><![CDATA[
if (player.experience >= player.level * 100 + 100) {
player.experience = player.experience - (player.level * 100 + 100)
player.level = player.level + 1
switch (player.gender) {
case ("male") {
player.strength = player.strength + 1
}
case ("female") {
player.agility = player.agility + 1
}
}
switch (player.race) {
case ("dwarf") {
player.strength = player.strength + 2
}
case ("elf") {
player.agility = player.intelligence + 2
}
case ("human") {
player.strength = player.strength + 1
player.agility = player.agility + 1
}
}
switch (player.class) {
case ("warrior") {
player.strength = player.strength + 2
}
case ("cleric") {
player.intelligence = player.intelligence + 1
player.agility = player.agility + 1
}
case ("mage") {
player.intelligence = player.intelligence + 2
}
case ("thief") {
player.strength = player.strength + 1
player.agility = player.agility + 1
}
}
lvlup
}
]]></function>
</asl>
<function name="character_creation_function">
msg ("What is your name?")
get input {
msg ("-" + game.pov.alias)
game.pov.alias=result
show menu ("What is your gender?", split ("male;female",";"), false) {
game.pov.gender=result
show menu ("What is your species?", split ("human;dwarf;elf;gnome;hobbit",";"), false) {
game.pov.species=result
switch (game.pov.species) {
case ("human") {
show menu ("What is your race?", split ("european;african;asian;american",";"), false) {
game.pov.race=result
switch (game.pov.race) {
case ("european") {
show menu ("What is your skin color?", split ("white;orangish;redish;olive;tanned",";"), false) {
game.pov.skin_color = result
show menu ("What is your eye color?", split ("blue;green;light_brown;dark_brown;amber;hazel;grey",";"), false) {
game.pov.eye_color = result
show menu ("What is your hair color?", split ("white;light_yellow;bright_yellow;dirty_yellow;red;orange;red_orange;light_brown;dark_brown;black;grey",";"), false) {
game.pov.hair_color = result
show menu ("What is your hair type?", split ("straight;wavy;curly",";"), false) {
game.pov.hair_type = result
}
}
}
}
}
case ("african") {
show menu ("What is your skin color?", split ("light_brown;dark_brown;black;greyish",";"), false) {
game.pov.skin_color = result
show menu ("What is your eye color?", split ("blue;green;light_brown;dark_brown;amber;hazel;grey",";"), false) {
game.pov.eye_color = result
show menu ("What is your hair color?", split ("white;light_yellow;bright_yellow;dirty_yellow;red;orange;red_orange;light_brown;dark_brown;black;grey",";"), false) {
game.pov.hair_color = result
show menu ("What is your hair type?", split ("straight;wavy;curly",";"), false) {
game.pov.hair_type = result
}
}
}
}
}
case ("asian") {
show menu ("What is your skin color?", split ("white;light_brown;dark_brown;olive;tanned",";"), false) {
game.pov.skin_color = result
show menu ("What is your eye color?", split ("blue;green;light_brown;dark_brown;amber;hazel;grey",";"), false) {
game.pov.eye_color = result
show menu ("What is your hair color?", split ("white;light_yellow;bright_yellow;dirty_yellow;red;orange;red_orange;light_brown;dark_brown;black;grey",";"), false) {
game.pov.hair_color = result
show menu ("What is your hair type?", split ("straight;wavy;curly",";"), false) {
game.pov.hair_type = result
}
}
}
}
}
case ("american") {
show menu ("What is your skin color?", split ("white;light_brown;dark_brown;olive;tanned",";"), false) {
game.pov.skin_color = result
show menu ("What is your eye color?", split ("blue;green;light_brown;dark_brown;amber;hazel;grey",";"), false) {
game.pov.eye_color = result
show menu ("What is your hair color?", split ("white;light_yellow;bright_yellow;dirty_yellow;red;orange;red_orange;light_brown;dark_brown;black;grey",";"), false) {
game.pov.hair_color = result
show menu ("What is your hair type?", split ("straight;wavy;curly",";"), false) {
game.pov.hair_type = result
}
}
}
}
}
}
}
}
case ("dwarf") {
msg ("???")
}
case ("elf") {
show menu ("What is your race?", split ("high;dark;wood",";"), false) {
game.pov.race=result
}
}
case ("gnome") {
msg ("???")
}
case ("hobbit") {
msg ("???")
}
}
}
}
}
on ready {
msg (game.pov.alias + " is a " + game.pov.age + " year old " + game.pov.gender + " " + game.pov.race + " " + game.pov.species + " with " + game.pov.skin_color + " skin, " + game.pov.eye_color + " eyes, and " + game.pov.hair_color + " " + game.pov.hair_type + " hair.")
}
</function>
game.pov.alias +
" is a "
+ game.pov.age +
" year old "
+ game.pov.gender +
" "
+ game.pov.race +
" "
+ game.pov.species +
" with "
+ game.pov.skin_color +
" skin, "
+ game.pov.eye_color +
" eyes, and "
+ game.pov.hair_color +
" "
+ game.pov.hair_type +
" hair."
game.pov.alias + " // (HK note: this needs a right quatation mark, which will be at the very end, after the period)
is a
" + game.pov.age + "
year old
" + game.pov.gender + "
" + game.pov.race + "
" + game.pov.species + "
with
" + game.pov.skin_color + "
skin,
" + game.pov.eye_color + "
eyes, and
" + game.pov.hair_color + "
" + game.pov.hair_type + "
hair." // (HK note: this is the right quatation mark that matches up with the left quation mark at the very beginning, after: game.pov.alias +)
<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="another z game">
<gameid>7bbac88f-66a1-42ad-8ab5-6ef501e27f25</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<attr name="autodescription_description" type="int">4</attr>
<attr name="autodescription_youcansee" type="int">2</attr>
<attr name="autodescription_youcango" type="int">3</attr>
<autodescription_youarein_useprefix />
<gridmap type="boolean">false</gridmap>
<showscore type="boolean">false</showscore>
<start type="script">
character_creation_function
</start>
</game>
<function name="character_creation_function">
msg ("First, what is your name?")
get input {
msg ("-" + result)
player.alias = result
show menu ("What gender are you?", split ("male;female",";"), false) {
player.gender = result
show menu ("What field are you in?", split ("officer;doctor;nurse;survivalist;military", ";"), false) {
player.field = result
msg ("")
msg (player.alias + " is a " + player.gender + " " + player.field +".")
msg ("")
wait {
}
}
}
}
</function>
<function name="global_game_turns_function">
player.turns = player.turns + 1
</function>
<turnscript name="global_events_turnscript">
<enabled />
<script>
leveling_function
global_game_turns_function
</script>
</turnscript>
<type name="playable_character_object_type">
<mental type="int">0</mental>
<experience type="int">0</experience>
<physical type="int">0</physical>
<heart type="int">0</heart>
<strength type="int">0</strength>
<intelligence type="int">0</intelligence>
<stamina type="int">0</stamina>
<turns type="int">0</turns>
<level type="int">0</level>
<statusattributes type="simplestringdictionary">mental =; physical =; stamina =; strength =; intelligence =; experience =; heart =; level =; turns =</statusattributes>
<field type="simplestringlist">doctor;officer;nurse;military;survivalist</field>
</type>
<object name="ward 14">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<description type="string">"HK: Do you want a message here?"</description>
<attr name="grid_label">Ward14</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<firstenter type="script">
// you need a script(s) here, if you want to use it
</firstenter>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<inherit name="playable_character_object_type" />
</object>
<object name="window">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<look>Its a long window with white shutters.</look>
<alt type="stringlist">
<value>glass</value>
</alt>
<inventoryverbs type="stringlist">
<value>look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<lookout type="script">
firsttime {
player.experience = player.experience + 2
msg ("Looking out the window you see a mass of bodies, military cars and trucks though out the parking lot.")
} otherwise {
// do you want some script or message (see below) here?
// msg ("Do you want a message here, or was the message that I moved~have above, suppose to be here?")
}
</lookout>
</object>
<object name="newspaper">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<alt type="stringlist">
<value>paper</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
<value>Read</value>
</displayverbs>
<take />
<look type="script">
msg ("Georgia Times")
</look>
<read type="script">
firsttime {
player.experience = player.experience + 5
msg ("Wonder if I can find out any thing from this.") // Did you want this to be the message for the "firsttime" script? If yes, then replace this with what I put above
SetTimeout (3) {
msg ("Headlines: MASSIVE VIRUS OUTBEAK SPREADS ALL AROUND THE WORLD!!")
SetTimeout (5) {
msg ("All around the world regions have be struck by a massive virus outbreak. No one can confirm where and how it started. Must regions have placed safe zones for area of quarintine, these regions include CHINA, RUSSIA, JAPAN, EUORPE, ITALY, CANADA, MEXICO AND THE U.S. ")
SetTimeout (6) {
msg ("Offical documents released these photo as the outbreak hit the U.S")
SetTimeout (3) {
picture ("zom pic.png")
SetTimeout (3) {
msg ("The victom here is Mall of America which sadly we say there is no hope for. Major U.S cities have marked signs with this logo")
SetTimeout (4) {
picture ("quarintine.jpg")
SetTimeout (3) {
msg ("Follow these signs, this leads to safe zones this will be our last print its been a pleasure serving the American people for over 75 years may God have mercy on us all.")
}
}
}
}
}
}
}
} otherwise {
msg ("Wonder if I can find out any thing from this.") // Did you want this to be the message for the "firsttime" script? If yes, then replace this with what I put above
SetTimeout (3) {
msg ("Headlines: MASSIVE VIRUS OUTBEAK SPREADS ALL AROUND THE WORLD!!")
SetTimeout (5) {
msg ("All around the world regions have be struck by a massive virus outbreak. No one can confirm where and how it started. Must regions have placed safe zones for area of quarintine, these regions include CHINA, RUSSIA, JAPAN, EUORPE, ITALY, CANADA, MEXICO AND THE U.S. ")
SetTimeout (6) {
msg ("Offical documents released these photo as the outbreak hit the U.S")
SetTimeout (3) {
picture ("zom pic.png")
SetTimeout (3) {
msg ("The victom here is Mall of America which sadly we say there is no hope for. Major U.S cities have marked signs with this logo")
SetTimeout (4) {
picture ("quarintine.jpg")
SetTimeout (3) {
msg ("Follow these signs, this leads to safe zones this will be our last print its been a pleasure serving the American people for over 75 years may God have mercy on us all.")
}
}
}
}
}
}
}
}
</read>
</object>
<object name="medical equipment">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<look>no power nothing happens.</look>
<use>Doesn't do anything without power.</use>
</object>
<exit alias="east" to="bathroom">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="ward 14">
<inherit name="southdirection" />
<lookonly />
<look type="string">"HK: Do you want a message here?"</look>
</exit>
<exit alias="north" to="hallway">
<inherit name="northdirection" />
<look>Its a door to the hall it looks like.</look>
</exit>
</object>
<object name="bathroom">
<inherit name="editor_room" />
<description>It a hospital bathroom with very white walls and a handicap shower. A sink sits to the left with a toilet next to it.</description>
<attr name="grid_label">Bathroom</attr>
<exit alias="west" to="ward 14">
<inherit name="westdirection" />
<look>Thats the room I woke up in.</look>
</exit>
<object name="toliet">
<inherit name="editor_object" />
<scenery />
<flush type="script">
msg ("Toliet flushes, water still on.")
</flush>
</object>
<object name="shower">
<inherit name="editor_object" />
<inherit name="switchable" />
<scenery />
<switchedondesc>No time for a shower.</switchedondesc>
<switchedoffdesc>Would be nice if I had the time.</switchedoffdesc>
</object>
<object name="sink">
<inherit name="editor_object" />
<inherit name="switchable" />
<take type="boolean">false</take>
<inventoryverbs type="stringlist" />
<switchedondesc>Cool water flows from the sink.</switchedondesc>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Switch on</value>
<value>Switch off</value>
</displayverbs>
<ontake type="script">
// Did you want a (or multiple) script(s) here?
</ontake>
<onswitchon type="script">
play sound ("Running Water-SoundBible.com-568417508.mp3", false, true)
firsttime {
player.experience = player.experience + 5
} otherwise {
// Do you want any scripts here?
}
</onswitchon>
<onswitchoff type="script">
play sound ("water-droplet-2.mp3", false, false)
</onswitchoff>
<attr name="fill_bottle" type="script">
firsttime {
if (Got(bottle)) {
if (bottle.isopen) {
if (IsSwitchedOn(sink)) {
player.experience = player.experience + 5
MoveObject (water, bottle)
} else if (not IsSwitchedOn(sink)) {
msg ("Helps to turn on the sink....Wow!")
}
} else if (not bottle.isopen) {
msg ("Helps to open bottle first genious!")
}
} else {
msg (You need a bottle, silly.")
}
} otherwise {
if (Got(bottle)) {
if (bottle.isopen) {
if (IsSwitchedOn(sink)) {
MoveObject (water, bottle)
} else if (not IsSwitchedOn(sink)) {
msg ("Helps to turn on the sink....Wow!")
}
} else if (not bottle.isopen) {
msg ("Helps to open bottle first genious!")
}
} else {
msg (You need a bottle, silly.")
}
}
</attr>
<object name="water">
<inherit name="editor_object" />
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<look>Looks like clean water.</look>
<scenery />
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<volume type="int">1</volume>
</object>
</object>
</object>
<object name="ward 15">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Ward15</attr>
<exit alias="south" to="hall1">
<inherit name="southdirection" />
<look>Its a recovery ward.</look>
</exit>
</object>
<object name="ward 16">
<inherit name="editor_room" />
<dark type="boolean">false</dark>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<attr name="grid_label">Ward16</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<description>Its kinda dark really could use a little light. Not much different then the other ward, just without a window.</description>
<beforeenter type="script">
// Did you want scripts here?
</beforeenter>
<enter type="script">
// Did you want scripts here?
</enter>
<darkroomdescription type="script">
// Did you want scripts here?
</darkroomdescription>
<firstenter type="script">
// Did you want scripts here?
</firstenter>
<exit alias="north" to="hall1">
<inherit name="northdirection" />
<look>Its a hallway</look>
</exit>
<object name="bottle">
<inherit name="editor_object" />
<inherit name="container_limited" />
<take />
<isopen type="boolean">false</isopen>
<transparent type="boolean">false</transparent>
<look>Aquafina</look>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
<value>Open</value>
<value>Close</value>
</inventoryverbs>
<maxvolume type="boolean">false</maxvolume>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
</displayverbs>
<maxobjects type="boolean">false</maxobjects>
<listchildren />
<listchildrenprefix>Heres some good</listchildrenprefix>
<alt type="stringlist">
<value>water bottle</value>
<value>container</value>
</alt>
<scenery type="boolean">false</scenery>
<visible type="boolean">false</visible>
<usedefaultprefix />
<ontake type="script">
msg ("I should fill this up.")
</ontake>
<ondrop type="script">
msg ("I really should keep this.")
</ondrop>
<onopen type="script">
// Did you want scripts here?
</onopen>
<drink type="script">
if (Contains (bottle,water)) {
player.mental = player.mental + 1
player.physical = player.physical + 1
MoveObject (water, sink)
}
</drink>
<selfuseon type="scriptdictionary">
<item key="water">
if (Got(bottle)) {
if (IsSwitchedOn(sink)) {
MoveObject (water, bottle)
}
}
</item>
</selfuseon>
</object>
</object>
<verb>
<property>lookout</property>
<pattern>look out</pattern>
<defaultexpression>"You can't look out " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>use</property>
<pattern>use </pattern>
<defaultexpression>"You can't use " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>flush</property>
<pattern>flush</pattern>
<defaultexpression>"You can't flush " + object.article + "."</defaultexpression>
</verb>
<object name="hallway">
<inherit name="editor_room" />
<description>Its a hallway with mangled bodies, blood, beds and chairs scattered throughout.</description>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hallway</attr>
<attr name="grid_fill">Yellow</attr>
<exit alias="south" to="ward 14">
<inherit name="southdirection" />
</exit>
<exit alias="west" to="hall1">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="hall2">
<inherit name="eastdirection" />
</exit>
<exit alias="north" to="hallway">
<lookonly />
<look>The walls are covered in blood and bullet holes.</look>
</exit>
<object name="wall">
<inherit name="editor_object" />
<scenery />
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>blood and bullet holes cover the entire wall.</look>
<use type="boolean">false</use>
</object>
</object>
<object name="hall1">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hall1</attr>
<attr name="grid_fill">Yellow</attr>
<exit alias="east" to="hallway">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="ward 16">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="ward 15">
<inherit name="northdirection" />
</exit>
<exit alias="west" to="hall1">
<inherit name="westdirection" />
<lookonly />
<look>This way is blocked by piled debris and mangled bodies.</look>
</exit>
<object name="exp juice">
<inherit name="editor_object" />
<take />
<drink type="script"><![CDATA[
// the "<![CDATA[ ]] >" is for coding only, for the quest engine to recognize the "<" and ">" that you used within a script to be seen as "greater than" or "lesser than" operators, instead of as the coding stuff (ie <function name="blah">)
// Did you want the "<br/>" in the message script line below? I'm not personally familiar with the use of this coding stuff yet, nor with what it does, but if you want it there, then obviously leave it there, lol.
msg ("You drink the juice<br/>")
player.experience = player.experience + 10
]]></drink>
</object>
</object>
<object name="hall2">
<inherit name="editor_room" />
<description>There is a intake desk along with phone and papers scattered around.</description>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hall2</attr>
<attr name="grid_fill">Yellow</attr>
<firstenter type="script">
msg ("A object flashes past with the sound of clicking nails on the tiled floor tap.")
</firstenter>
<exit alias="west" to="hallway">
<inherit name="westdirection" />
</exit>
<object name="intake desk">
<inherit name="editor_object" />
<inherit name="surface" />
<alt type="stringlist">
<value>desk</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<hidechildren />
<object name="matches">
<inherit name="editor_object" />
<take />
<takemsg>Now I'll be able to see in the dark.</takemsg>
<open type="boolean">false</open>
<close type="boolean">false</close>
<scenery type="boolean">false</scenery>
<dropmsg>I really shouldn't Ill need these.</dropmsg>
<lightsource />
<lightstrength>weak</lightstrength>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<light type="script">
firsttime {
player.experience = player.experience + 8
msg ("At least I can see a little bit.")
} otherwise {
if (player.parent = ward 16) {
msg ("Humm not much different then the other wards, just without a window. Oh, you see something now...")
MakeObjectVisible (bottle)
}
}
</light>
<look type="script">
picture ("matches.png")
</look>
</object>
</object>
</object>
<verb>
<property>light</property>
<pattern>light</pattern>
<defaultexpression>"You can't light " + object.article + "."</defaultexpression>
</verb>
<object name="ward16a">
<inherit name="editor_room" />
</object>
<object name="corridor">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">corridor</attr>
<description type="script">
// Did you want scripts (such as a message script) here?
</description>
<beforeenter type="script">
// Did you want scripts (such as a message script) here?
</beforeenter>
<beforefirstenter type="script">
play sound ("Dog Growl V2.mp3", true, false)
</beforefirstenter>
<firstenter type="script">
play sound ("Rip Arm Off-SoundBible.com-1079968039.mp3", false, false)
</firstenter>
<object name="dog">
<inherit name="editor_object" />
<inherit name="namedmale" />
<look type="script">
play sound ("Dog Growl V2.mp3", true, false)
msg ("The dog is eatting peoples dead fleah from the rotting carcusses on the floor.")
</look>
</object>
<exit alias="south" to="hall2">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="hall3">
<inherit name="northdirection" />
<locked type="boolean">false</locked>
</exit>
</object>
<object name="room of the dead">
<inherit name="openable" />
<description>{img:dead door.jpg}</description>
<attr name="grid_label">Door of the Dead</attr>
<picture>dead door.jpg</picture>
<attr name="grid_fill">DarkSeaGreen</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_borderwidth" type="int">1</attr>
<take type="boolean">false</take>
<openscript type="script">
</openscript>
<beforeenter type="script">
LockExit
</beforeenter>
<exit alias="west" to="hall3">
<inherit name="westdirection" />
</exit>
</object>
<object name="hall3">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<description type="script">
MakeObjectVisible (room of the dead)
</description>
<beforeenter type="script">
picture ("dead door.jpg")
play sound ("Zombie_Horde-Mike_Koenig-1926300541.mp3", false, false)
</beforeenter>
<exit alias="south" to="corridor">
<inherit name="southdirection" />
</exit>
<exit alias="east" to="room of the dead">
<inherit name="eastdirection" />
<locked />
<lockmessage>This way is blocked by locked chains.</lockmessage>
<attr name="grid_length" type="int">2</attr>
<look type="script">
picture ("dead door.jpg")
</look>
</exit>
</object>
<verb>
<property>fill_bottle</property>
<pattern>fill_bottle</pattern>
<defaultexpression>"You can't fill_bottle " + object.article + "."</defaultexpression>
</verb>
<function name="leveling_function"><![CDATA[
if (player.experience >= player.level * 10 + 10) {
player.experience = player.experience - (player.level * 10 + 10)
player.level = player.level + 1
switch (player.gender) {
case ("male") {
player.strength = player.strength +1
}
case ("female") {
player.inteligence = player.intelligence + 1
}
}
switch (player.field) {
case ("officer") {
player.intelligence = player.intelligence + 1
player.physical = player.physical + 1
}
case ("doctor") {
player.intelligence = player.intelligence + 2
}
case ("survivalist") {
player.strength = player.strength + 1
player.intelligence = player.intelligence + 1
}
case ("nurse") {
player.heart = player.heart + 1
player.intelligence = player.intelligence + 1
}
case ("military") {
player.stamina = player.stamina + 1
player.physical = player.physical + 1
player.strength = player.strength + 1
}
}
leveling_function
}
]]></function>
<timer name="newspaper_timer">
<interval>3</interval>
<script>
// you need a script(s) here, if you want to use it
</script>
</timer>
<timer name="hydryation_timer">
<interval>60</interval>
<enabled type="boolean">false</enabled>
<script>
// you need a script(s) here, if you want to use it
</script>
</timer>
<timer name="no_water_timer">
<interval>1</interval>
<script>
// you need a script(s) here, if you want to use it
</script>
</timer>
</asl>
<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="another z game">
<gameid>7bbac88f-66a1-42ad-8ab5-6ef501e27f25</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<attr name="autodescription_description" type="int">4</attr>
<attr name="autodescription_youcansee" type="int">2</attr>
<attr name="autodescription_youcango" type="int">3</attr>
<autodescription_youarein_useprefix />
<gridmap type="boolean">false</gridmap>
<showscore type="boolean">false</showscore>
<start type="script">
msg ("First, what is your name?")
get input {
msg (" - " + result)
player.alias = result
ShowMenu ("What gender are you?", split ("male;female" , ";"), false) {
player.gender = result
ShowMenu ("What field are you in?", split ("officer;doctor;nurse;survivalist;military" , ";"), false) {
player.field = result
msg ("")
msg (player.alias + " is a " + " " + player.gender + " " + " " + player.field + ".")
msg ("")
msg ("Press any key to begin!")
}
}
}
</start>
<turnscript name="turns level_up">
<enabled />
<script>
level_up
player.turns = player.turns + 1
</script>
</turnscript>
</game>
<object name="ward 14">
<inherit name="editor_room" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<description type="string"></description>
<attr name="grid_label">Ward14</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<firstenter type="script">
</firstenter>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<statusattributes type="stringdictionary">
<item>
<key>mental</key>
<value></value>
</item>
<item>
<key>physical</key>
<value></value>
</item>
<item>
<key>stamina</key>
<value></value>
</item>
<item>
<key>strength</key>
<value></value>
</item>
<item>
<key>intelligence</key>
<value></value>
</item>
<item>
<key>experience</key>
<value></value>
</item>
<item>
<key>heart</key>
<value></value>
</item>
<item>
<key>level</key>
<value></value>
</item>
<item>
<key>turns</key>
<value></value>
</item>
</statusattributes>
<mental type="int">0</mental>
<experience type="int">0</experience>
<physical type="int">0</physical>
<heart type="int">0</heart>
<strength type="int">0</strength>
<intelligence type="int">0</intelligence>
<stamina type="int">0</stamina>
<turns type="int">0</turns>
<level type="int">0</level>
<field type="stringdictionary">
<item>
<key>doctor</key>
<value></value>
</item>
<item>
<key>officer</key>
<value></value>
</item>
<item>
<key>nurse</key>
<value></value>
</item>
<item>
<key>military</key>
<value></value>
</item>
<item>
<key>survivalist</key>
<value></value>
</item>
</field>
</object>
<object name="window">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<look>Its a long window with white shutters.</look>
<alt type="stringlist">
<value>glass</value>
</alt>
<inventoryverbs type="stringlist">
<value>look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<lookout type="script">
firsttime {
player.experience = player.experience + 2
}
msg ("Looking out the window you see a mass of bodies, military cars and trucks though out the parking lot.")
</lookout>
</object>
<object name="newspaper">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<alt type="stringlist">
<value>paper</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
<value>Read</value>
</displayverbs>
<take />
<look type="script">
msg ("Georgia Times")
</look>
<read type="script">
firsttime {
player.experience = player.experience + 5
}
msg ("Wonder if I can find out any thing from this.")
SetTimeout (3) {
msg ("Headlines: MASSIVE VIRUS OUTBEAK SPREADS ALL AROUND THE WORLD!!")
SetTimeout (5) {
msg ("All around the world regions have be struck by a massive virus outbreak. No one can confirm where and how it started. Must regions have placed safe zones for area of quarintine, these regions include CHINA, RUSSIA, JAPAN, EUORPE, ITALY, CANADA, MEXICO AND THE U.S. ")
SetTimeout (6) {
msg ("Offical documents released these photo as the outbreak hit the U.S")
SetTimeout (3) {
picture ("zom pic.png")
SetTimeout (3) {
msg ("The victom here is Mall of America which sadly we say there is no hope for. Major U.S cities have marked signs with this logo")
SetTimeout (4) {
picture ("quarintine.jpg")
SetTimeout (3) {
msg ("Follow these signs, this leads to safe zones this will be our last print its been a pleasure serving the American people for over 75 years may God have mercy on us all.")
}
}
}
}
}
}
}
</read>
</object>
<object name="medical equipment">
<inherit name="editor_object" />
<scenery type="boolean">false</scenery>
<look>no power nothing happens.</look>
<use>Doesn't do anything without power.</use>
</object>
<exit alias="east" to="bathroom">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="ward 14">
<inherit name="southdirection" />
<lookonly />
<look type="string"></look>
</exit>
<exit alias="north" to="hallway">
<inherit name="northdirection" />
<look>Its a door to the hall it looks like.</look>
</exit>
</object>
<object name="bathroom">
<inherit name="editor_room" />
<description>It a hospital bathroom with very white walls and a hadicap shower. A sink sits to the left with a toilet next to it.</description>
<attr name="grid_label">Bathroom</attr>
<exit alias="west" to="ward 14">
<inherit name="westdirection" />
<look>Thats the room I woke up in.</look>
</exit>
<object name="toliet">
<inherit name="editor_object" />
<scenery />
<flush type="script">
msg ("Toliet flushes, water still on.")
</flush>
</object>
<object name="shower">
<inherit name="editor_object" />
<inherit name="switchable" />
<scenery />
<switchedondesc>No time for a shower.</switchedondesc>
<switchedoffdesc>Would be nice if I had the time.</switchedoffdesc>
</object>
<object name="sink">
<inherit name="editor_object" />
<inherit name="switchable" />
<take type="boolean">false</take>
<inventoryverbs type="stringlist" />
<switchedondesc>Cool water flows from the sink.</switchedondesc>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Switch on</value>
<value>Switch off</value>
</displayverbs>
<ontake type="script">
</ontake>
<onswitchon type="script">
play sound ("Running Water-SoundBible.com-568417508.mp3", false, true)
firsttime {
player.experience = player.experience + 5
}
</onswitchon>
<onswitchoff type="script">
play sound ("water-droplet-2.mp3", false, false)
</onswitchoff>
<attr name="fill_bottle" type="script">
firsttime {
player.experience = player.experience + 5
}
if (Got(bottle)) {
if (bottle.isopen) {
if (IsSwitchedOn(sink)) {
MoveObject (water, bottle)
}
}
else if (not IsSwitchedOn(sink)) {
msg ("Helps to turn on the sink....Wow!")
}
else if (not bottle.isopen) {
msg ("Helps to open bottle first genious!")
}
}
</attr>
<object name="water">
<inherit name="editor_object" />
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<look>Looks like clean water.</look>
<scenery />
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<volume type="int">1</volume>
</object>
</object>
</object>
<object name="ward 15">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Ward15</attr>
<exit alias="south" to="hall1">
<inherit name="southdirection" />
<look>Its a recovery ward.</look>
</exit>
</object>
<object name="ward 16">
<inherit name="editor_room" />
<dark type="boolean">false</dark>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<attr name="grid_label">Ward16</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<description>Its kinda dark really could use a little light.not much different then the other ward just not window.</description>
<beforeenter type="script">
</beforeenter>
<enter type="script">
</enter>
<darkroomdescription type="script">
</darkroomdescription>
<firstenter type="script">
</firstenter>
<exit alias="north" to="hall1">
<inherit name="northdirection" />
<look>Its a hallway</look>
</exit>
<object name="bottle">
<inherit name="editor_object" />
<inherit name="container_limited" />
<take />
<isopen type="boolean">false</isopen>
<transparent type="boolean">false</transparent>
<look>Aquafina</look>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
<value>Open</value>
<value>Close</value>
</inventoryverbs>
<maxvolume type="boolean">false</maxvolume>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
</displayverbs>
<maxobjects type="boolean">false</maxobjects>
<listchildren />
<listchildrenprefix>Heres some good</listchildrenprefix>
<alt type="stringlist">
<value>water bottle</value>
<value>container</value>
</alt>
<scenery type="boolean">false</scenery>
<visible type="boolean">false</visible>
<usedefaultprefix />
<ontake type="script">
msg ("I should fill this up.")
</ontake>
<ondrop type="script">
msg ("I really should keep this.")
</ondrop>
<onopen type="script">
</onopen>
<drink type="script">
if (Contains (bottle,water)) {
player.mental = player.mental + 1
player.physical = player.physical + 1
MoveObject (water, sink)
}
</drink>
<selfuseon type="scriptdictionary">
<item key="water">
if (Got(bottle)) {
if (IsSwitchedOn(sink)) {
MoveObject (water, bottle)
}
}
</item>
</selfuseon>
</object>
</object>
<verb>
<property>lookout</property>
<pattern>look out</pattern>
<defaultexpression>"You can't look out " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>use</property>
<pattern>use </pattern>
<defaultexpression>"You can't use " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>flush</property>
<pattern>flush</pattern>
<defaultexpression>"You can't flush " + object.article + "."</defaultexpression>
</verb>
<object name="hallway">
<inherit name="editor_room" />
<description>Its a hallway with mangled bodies, blood, beds and chairs scattered throughout. </description>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hallway</attr>
<attr name="grid_fill">Yellow</attr>
<exit alias="south" to="ward 14">
<inherit name="southdirection" />
</exit>
<exit alias="west" to="hall1">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="hall2">
<inherit name="eastdirection" />
</exit>
<exit alias="north" to="hallway">
<lookonly />
<look>The walls are covered in blood and bullet holes.</look>
</exit>
<object name="wall">
<inherit name="editor_object" />
<scenery />
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>blood and bullet holes cover the entire wall.</look>
<use type="boolean">false</use>
</object>
</object>
<object name="hall1">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hall1</attr>
<attr name="grid_fill">Yellow</attr>
<exit alias="east" to="hallway">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="ward 16">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="ward 15">
<inherit name="northdirection" />
</exit>
<exit alias="west" to="hall1">
<inherit name="westdirection" />
<lookonly />
<look>This way is blocked by piled debris and mangled bodies.</look>
</exit>
<object name="exp juice">
<inherit name="editor_object" />
<take />
<drink type="script"><![CDATA[
msg ("You drink the juice<br/>")
player.experience = player.experience + 10
]]></drink>
</object>
</object>
<object name="hall2">
<inherit name="editor_room" />
<description>There is a intake desk along with phone and papers scattered around.</description>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">Hall2</attr>
<attr name="grid_fill">Yellow</attr>
<firstenter type="script">
msg ("A object flashes past with the sound of clicking nails on the tiled floor tap.")
</firstenter>
<exit alias="west" to="hallway">
<inherit name="westdirection" />
</exit>
<object name="intake desk">
<inherit name="editor_object" />
<inherit name="surface" />
<alt type="stringlist">
<value>desk</value>
</alt>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<hidechildren />
<object name="matches">
<inherit name="editor_object" />
<take />
<takemsg>Now I'll be able to see in the dark.</takemsg>
<open type="boolean">false</open>
<close type="boolean">false</close>
<scenery type="boolean">false</scenery>
<dropmsg>I really shouldn't Ill need these.</dropmsg>
<lightsource />
<lightstrength>weak</lightstrength>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<light type="script">
if (game.pov.parent = ward 16) {
msg ("Humm not much different then the other wards just not window.")
}
msg ("At least I can see a little bit.")
MakeObjectVisible (bottle)
firsttime {
player.experience = player.experience + 8
}
</light>
<look type="script">
picture ("matches.png")
</look>
</object>
</object>
</object>
<verb>
<property>light</property>
<pattern>light</pattern>
<defaultexpression>"You can't light " + object.article + "."</defaultexpression>
</verb>
<object name="ward16a">
<inherit name="editor_room" />
</object>
<object name="corridor">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_label">corridor</attr>
<description type="script">
</description>
<beforeenter type="script">
</beforeenter>
<beforefirstenter type="script">
play sound ("Dog Growl V2.mp3", true, false)
</beforefirstenter>
<firstenter type="script">
play sound ("Rip Arm Off-SoundBible.com-1079968039.mp3", false, false)
</firstenter>
<object name="dog">
<inherit name="editor_object" />
<inherit name="namedmale" />
<look type="script">
play sound ("Dog Growl V2.mp3", true, false)
msg ("The dog is eatting peoples dead fleah from the rotting carcusses on the floor.")
</look>
</object>
<exit alias="south" to="hall2">
<inherit name="southdirection" />
</exit>
<exit alias="north" to="hall3">
<inherit name="northdirection" />
<locked type="boolean">false</locked>
</exit>
</object>
<object name="room of the dead">
<inherit name="openable" />
<description>{img:dead door.jpg}</description>
<attr name="grid_label">Door of the Dead</attr>
<picture>dead door.jpg</picture>
<attr name="grid_fill">DarkSeaGreen</attr>
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<attr name="grid_borderwidth" type="int">1</attr>
<take type="boolean">false</take>
<openscript type="script">
</openscript>
<beforeenter type="script">
LockExit
</beforeenter>
<exit alias="west" to="hall3">
<inherit name="westdirection" />
</exit>
</object>
<object name="hall3">
<inherit name="editor_room" />
<attr name="grid_width" type="int">1</attr>
<attr name="grid_length" type="int">1</attr>
<description type="script">
MakeObjectVisible (room of the dead)
</description>
<beforeenter type="script">
picture ("dead door.jpg")
play sound ("Zombie_Horde-Mike_Koenig-1926300541.mp3", false, false)
</beforeenter>
<exit alias="south" to="corridor">
<inherit name="southdirection" />
</exit>
<exit alias="east" to="room of the dead">
<inherit name="eastdirection" />
<locked />
<lockmessage>This way is blocked by locked chains.</lockmessage>
<attr name="grid_length" type="int">2</attr>
<look type="script">
picture ("dead door.jpg")
</look>
</exit>
</object>
<verb>
<property>fill_bottle</property>
<pattern>fill_bottle</pattern>
<defaultexpression>"You can't fill_bottle " + object.article + "."</defaultexpression>
</verb>
<function name="level_up"><![CDATA[
if (player.experience >= player.level * 10 + 10) {
player.experience = player.experience - (player.level * 10 + 10)
player.level = player.level + 1
switch (player.gender) {
case ("male") {
player.strength = player.strength +1
}
case ("female") {
player.inteligence = player.intelligence + 1
}
}
switch (player.field) {
case ("officer") {
player.intelligence = player.intelligence + 1
player.physical = player.physical + 1
}
case ("doctor") {
player.intelligence = player.intelligence + 2
}
case ("survivalist") {
player.strength = player.strength + 1
player.intelligence = player.intelligence + 1
}
case ("nurse") {
player.heart = player.heart + 1
player.intelligence = player.intelligence + 1
}
case ("military") {
player.stamina = player.stamina + 1
player.physical = player.phyical + 1
player.strength = player.strength + 1
}
}
level_up
}
]]></function>
<timer name="newspaper timer">
<interval>3</interval>
<script>
</script>
</timer>
<timer name="hydryation_timer">
<interval>60</interval>
<enabled type="boolean">false</enabled>
<script>
</script>
</timer>
<timer name="no water timer">
<interval>1</interval>
<script>
</script>
</timer>
</asl>
msg ("What is your name?")
get input {
game.pov.alias
// blah blah blah more character creation coding~scripts
}
msg ("What is your name?")
get input {
player.alias = result // or whatever you changed its name to: your_choosen_name.alias ~ ie: player_1.alias = result ~ ie master_chief_from_Halo_game_err_actually_this_might_be_legally_protected_so_bad_idea_lol.alias = result
// blah blah blah more character creation coding~scripts
}
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="blah">
<gameid>bbc85c01-6e80-4a71-8abf-c1e870fb5b42</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
</object>
<type name="character_object_type"> // create~add an Object Type: Advanced -> Object Type -> Add
<dead type="boolean">false</dead>
<hit_points type="int">0</hp>
<damage type="int">0</damage>
<experience type="int">0</experience>
<cash type="int">0</cash>
</type>
<turnscript name="global_events_turnscript">
<inherit name="enabled" /> // this means the turnscript is activated at the very start of the game
<script>
game_over_function // in the GUI~Editor this is the "Call Function" script: add a~new script -> Scripts -> "Call function" script
global_game_turns_function // another "Call Function" script
</script>
</turnscript>
<function name="game_over_function">
if (player.hit_points <= 0) {
finish // GAME OVER, you lose the game
}
</function>
<function name="global_game_turns_function">
player.turns = player.turns + 1
</function>
<object name="player">
<parent>room</parent>
<inherit name="defaultplayer" />
<inherit name="character_object_type" />
<turns type="int">0</turns>
<hit_points type="int">999</hit_points> // see below
<physical_damage type="int">100</physical_damage> // see below
</object>
<object name="orc">
<parent>room</parent>
<inherit name="editor_object" />
<inherit name="character_object_type" />
<hit_points type="int">100</hit_points> // this overrides the "0" hp from the inherited attribute "character_object_type"
<physical_damage type="int">50</physical_damage> // see above
<experience type="int">100</experience> // see above
<cash type="int">50</cash>
<verb name="fight"><![CDATA[ // this CDATA coding is for the use of the ">" and "<" as greater~lesser than operators for the quest engine to understand, instead of as for, for example: <object name="orc">
if (orc.dead = true) {
msg (The orc is already dead, silly!")
} else if (orc.dead = false) {
if (orc.hit_points <= 0) {
player.experience = player.experience + orc.experience
player.cash = player.cash + orc.cash
orc.dead = true // this is a "boolean" type attribute
msg ("You won the fight, killing the orc")
} else if (orc.hit_points > 0) {
player.hit_points = player.hit_points - orc.damage
msg ("The orc attacks you, doing" + orc.damage + "damage to you!")
}
on ready { // this causes the below scripts to wait until the above scripts are done
if (player.hit_points <= 0) {
player.dead = true
msg ("The battle is over, as the orc killed you.")
} else if (player.hit_points > 0) {
orc.hit_points = orc.hit_points - player.damage
msg ("You attack the orc, doing" + player.damage + "damage to the orc!")
}
}
}
]]></verb> // the ending of the CDATA coding, which is before, the ending for the verb coding
</object>
</asl>
01. cc = character creation function
02. sa = status attributes (mainly for implementing/displaying of ' cur / max ' stats) function
03. char = character object type ("pcs", "npcs", "monsters", etc., so, not a room, item, equipment, spell, etc)
04. pc = playable character object type ("player" characters / game.povs)
05. npc = non-playable character ("people", "monsters", and etc, so not a "player" character / not a game.pov, I'm going to have a hostility system, so any npc can be friendly or hostile, instead of having an actual "monster/enemy" type set aside)
06. hp = hit points (life) stat attribute
07. mp = mana points (magic) stat attribute
08. str = strength (physical damage, carry weight / equipment requirement, etc) stat attribute
09. end = endurance (physical defense, and etc) stat attribute
10. dex = dexterity (weapon~attack skill, think of this as "if your attack connects or not, do you 'whiff' or not", so not to gete confused with hc, and etc) stat attribute
11. agi = agility (dodging/evading, and etc) stat attribute
12. spd = speed (who goes first in battle, extra battle turns, escaping from battle, and etc) stat attribute
13. hc = hit chance (think of this more as piercing their armor or not, so not to get confused with dex, and etc) stat attribute
14. pd = physical damage stat attribute
15. fp = fire damage stat attribute
16. wp = water damage stat attribute
17. ap = air damage stat attribute
18. ed = earth damage stat attribute
19. ld = light damage stat attribute
20. dd = dark damage stat attribute
21. pr = physical resistance stat attribute
22. fr = fire resistance stat attribute
23. wr = water resistance stat attribute
24. ar = air resistance stat attribute
25. er = earth resistance stat attribute
26. lr = light resistance stat attribute
27. dr = dark resistance stat attribute
28. defending = boolean (reduces damage done for that character and increases the damage done by that character, if they chosoe to attack on the next turn)
29. escaped = boolean, run from battle (not completed/implemented yet)
30. hostile = boolean, any npc can be friendly or a(n) "monster/enemy", based upon a hostility scale (0-100), but not completed
31. dead = boolean
32. crit_hit = critical hit (bonus damage based upon luck)
33. luck = luck stat attribute
34. lvl = level stat attribute
35. exp = experience stat attribute
36. cash = cash stat attribute (currency)
37. lvlup = level up function
<library>
<!-- New Game -->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Colloseum">
<gameid>bbc85c01-6e80-4a71-8abf-c1e870fb5b42</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<!-- Object Types -->
<type name="character_object_type">
<strength type="int">0</strength>
<endurance type="int">0</endurance>
<dexterity type="int">0</dexterity>
<agility type="int">0</agility>
<speed type="int">0</speed>
<intelligence type="int">0</intelligence>
<spirituality type="int">0</spirituality>
<mentality type="int">0</mentality>
<piety type="int">0</piety>
<luck type="int">0</luck>
<dead type="boolean">false</dead>
<undead type="boolean">false</undead>
<defending type="boolean">false</defending>
<casting type="boolean">false</casting>
<experience_points type="int">0</experience_points>
<cash type="int">0</cash>
<level type="int">0</level>
<level_up_points type="int">0</level_up_points>
<attribute_points type="int">0</attribute_points>
<health_points type="string">0/0</health_points>
<mana_points type="string">0/0</mana_points>
<current_health_points type="int">0</current_health_points>
<maximum_health_points type="int">0</maximum_health_points>
<current_mana_points type="int">0</current_mana_points>
<maximum_mana_points type="int">0</maximum_mana_points>
</type>
<!-- Turnscripts -->
<turnscript name="global_events_turnscript">
status_attributes_function
level_up_function
game.turns = game.turns + 1
</turnscript>
<!-- Commands -->
<command name="fight_command">
<pattern>fight #text#</pattern>
<script>
fight_function (game.pov,text)
</script>
</command>
<command name="level_up_system_command">
<pattern>lvlup</pattern>
<script>
level_up_system_function
</script>
</command>
<!-- Functions -->
<function name="fight_function" parameters="self,text">
enemy=GetObject(text)
if (enemy=null) {
foreach (obj,AllObjects()) {
if (obj.alias=text) {
enemy=obj
} else {
msg ("There seemingly is no " + text + " here.")
}
}
} else if (not check_reachable_function (enemy) = true) {
msg ("There seemingly is no " + enemy.alias + " here.")
} else if (not DoesInherit (enemy,"character_object_type")) {
msg (enemy.alias + "is seemingly not something that you can battle.")
} else if (GetBoolean (enemy,"hostile") = false) {
msg (enemy.alias + " is seemingly not something that you can battle.")
} else if (GetBoolean (enemy,"dead") = true) {
msg (enemy.alias + " is already dead.")
} else {
battle_sequence_function (self,enemy)
}
</function>
<function name="battle_sequence_function" parameters="self,enemy"><![CDATA[
if (enemy.dead=false or self.escaped=false) {
you_go_first=false
if (GetInt (self,"speed") > GetInt (enemy,"speed") {
you_go_first=true
} else if (GetInt (self,"speed") = GetInt (enemy,"speed") and RandomChance (50)=true) {
you_go_first=true
}
if (you_go_first=true) {
msg ("You get to go first for this round")
self_battle_turn_function (self,enemy)
on ready {
if (not enemy.dead=true or not self.escaped=true){
enemy_battle_turn_function (self,enemy)
}
}
} else {
msg (enemy.alias + " gets to go first for this round.")
enemy_battle_turn_function (self,enemy)
on ready {
if (not enemy.dead=true or not self.escaped=true){
msg ("It is now your turn.")
self_battle_turn_function (self,enemy)
}
}
}
on ready {
msg ("The round has ended.")
battle_sequence_function (self,enemy)
}
} else {
msg ("The battle is over.")
}
]]></function>
<function name="self_battle_turn_function" parameters="self,enemy"><![CDATA[
msg (self.alias + " has " + self.current_health_points + " HP left.")
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
wait {
show menu ("What is your battle choice?", split ("Attack;Defend;Cast;Item;Run", ";"), false) {
switch (result) {
case ("Attack") {
self_attack_failed = false
if (RandomChance (GetInt (enemy,"agility") - GetInt (self,"speed")) = true) {
msg (enemy.alias + "evaded your attack!")
self_attack_failed = true
self.defending = false
} else if (RandomChance (GetInt (enemy,"dexterity") - GetInt (self,"agility")) = true) {
msg (enemy.alias + "parried your attack!")
self_attack_failed = true
self.defending = false
} else if (RandomChance (GetInt (enemy,"agility") - GetInt (self,"dexterity")) = true) {
msg (enemy.alias + "blocked your attack!")
self_attack_failed = true
self.defending = false
} else if (RandomChance (GetInt (self,"dexterity") - GetInt (enemy,"speed")) = false) {
msg ("Your attack missed " + enemy.alias +"!")
self_attack_failed = true
self.defending = false
} else if (RandomChance (GetInt (enemy,"armor_class") - GetInt (self,"attack_rating")) = true) {
msg ("Your attack failed to penetrate " + enemy.alias +"!")
self_attack_failed = true
self.defending = false
} else if (self_attack_failed = false) {
if (self.defending = true and enemy.defending = true) {
enemy.current_health_points = enemy.current_health_points - (critical_hit_function (self) * 2 * GetInt (self,"physical_damage") / 2 + GetInt (self,"physical_damage") * (GetInt (self,"strength") - GetInt (enemy,"endurance")) / 100)
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
self.defending = false
} else if (self.defending = true and enemy.defending = false) {
enemy.current_health_points = enemy.current_health_points - (critical_hit_function (self) * 2 * GetInt (self,"physical_damage") + GetInt (self,"physical_damage") * (GetInt (self,"strength") - GetInt (enemy,"endurance")) / 100)
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
self.defending = false
} else if (self.defending = false and enemy.defending = true) {
enemy.current_health_points = enemy.current_health_points - (critical_hit_function (self) * GetInt (self,"physical_damage") / 2 + GetInt (self,"physical_damage") * (GetInt (self,"strength") - GetInt (enemy,"endurance")) / 100)
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
} else if (self.defending = false and enemy.defending = false) {
enemy.current_health_points = enemy.current_health_points - (critical_hit_function (self) * GetInt (self,"physical_damage") + GetInt (self,"physical_damage") * (GetInt (self,"strength") - GetInt (enemy,"endurance")) / 100)
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
}
}
}
case ("Defend") {
msg ("You defend yourself against " + enemy.alias)
self.defending = true
}
case ("Cast") {
self.defending = false
}
case ("Item") {
self.defending = false
}
case ("Run") {
self.defending = false
self.escaping = true
}
}
if (GetInt (enemy,"current_health_points") > 0) {
if ( RandomChance (GetInt (self,"speed") - GetInt (enemy,"speed"))= true) {
msg ("You get an extra battle turn!")
self_battle_turn (self,enemy)
} else {
msg ("Your battle turn is over.")
}
} else if (GetInt (enemy,"current_health_points") <= 0) {
msg (enemy.alias + " is dead.")
msg ("You have won the battle!")
self.defending = false
self.escaping = false
enemy.defending = false
enemy.dead = true
}
}
}
]]></function>
<function name="enemy_battle_turn_function" parameters="self,enemy"><![CDATA[
msg (self.alias + " has " + self.current_health_points + " HP left.")
msg (enemy.alias + " has " + enemy.current_health_points + " HP left.")
result = GetRandomInt (1,3)
switch (result) {
case (1) {
enemy_attack_failed = false
if (RandomChance (GetInt (self,"agility") - GetInt (enemy,"speed")) = true) {
msg ("You have evaded the attack!")
enemy_attack_failed = true
enemy.defending = false
} else if (RandomChance (GetInt (self,"dexterity") - GetInt (enemy,"agility")) = true) {
msg ("You have parried the attack!")
enemy_attack_failed = true
enemy.defending = false
} else if (RandomChance (GetInt (self,"agility") - GetInt (enemy,"dexterity")) = true) {
msg ("You have blocked the attack!")
enemy_attack_failed = true
enemy.defending = false
} else if (RandomChance (GetInt (enemy,"dexterity") - GetInt (self,"speed")) = false) {
msg (enemy.alias +"'s attack missed!")
enemy_attack_failed = true
enemy.defending = false
} else if (RandomChance (GetInt (self,"armor_class") - GetInt (enemy,"attack_rating")) = true) {
msg ("You weren't penetrated by the attack!")
enemy_attack_failed = true
enemy.defending = false
} else if (enemy_attack_failed = false) {
if (enemy.defending = true and self.defending = true) {
self.current_health_points = self.current_health_points - (critical_hit_function (enemy) * 2 * GetInt (enemy,"physical_damage") / 2 + GetInt (enemy,"physical_damage") * (GetInt (enemy,"strength") - GetInt (self,"endurance")) / 100)
msg (self.alias + " has " + self.cur_hp + " HP left.")
enemy.defending = false
} else if (enemy.defending = true and self.defending = false) {
self.current_health_points = self.current_health_points - (critical_hit_function (enemy) * 2 * GetInt (enemy,"physical_damage") + GetInt (enemy,"physical_damage") * (GetInt (enemy,"strength") - GetInt (self,"endurance")) / 100)
msg (self.alias + " has " + self.current_health_points + " HP left.")
enemy.defending = false
} else if (enemy.defending = false and self.defending = true) {
self.current_health_points = self.current_health_points - (critical_hit_function (enemy) * GetInt (enemy,"physical_damage") / 2 + GetInt (enemy,"physical_damage") * (GetInt (enemy,"strength") - GetInt (self,"endurance")) / 100)
msg (self.alias + " has " + self.current_health_points + " HP left.")
} else if (enemy.defending = false and self.defending = false) {
self.current_health_points = self.current_health_points - (critical_hit_function (enemy) * GetInt (enemy,"physical_damage") + GetInt (enemy,"physical_damage") * (GetInt (enemy,"strength") - GetInt (self,"endurance")) / 100)
msg (self.alias + " has " + self.current_health_points + " HP left.")
}
}
}
case (2) {
msg (enemy.alias + " has choosen to defend itself.")
enemy.defending = true
}
case (3) {
enemy.defending = false
msg ("Cast")
}
}
if (GetInt (self,"current_health_points") > 0) {
if (RandomChance (GetInt (enemy,"speed") - GetInt (self,"speed")) = true) {
msg (enemy.alias + " gets an extra battle turn!")
wait {
enemy_battle_turn (self,enemy)
}
} else {
msg (enemy.alias + " 's battle turn is over.")
}
} else if (GetInt (self,"current_health_points") <= 0) {
msg (self.alias + " has died.")
msg ("GAME OVER")
finish
}
]]></function>
<function name="check_reachable_function" parameters="enemy" type="boolean">
foreach (obj,ScopeReachableNotHeld ()) {
if (obj=enemy) {
value = true
} else {
value = false
}
}
return (value)
</function>
<function name="critical_hit_function" parameters="target" type="int">
if (RandomChance (GetInt (target,"luck")) = true) {
value = 2
} else {
value = 1
}
return (value)
</function>
<function name="level_up_function"><![CDATA[
if (game.pov.experience_points >= game.pov.level * 100 + 100) {
game.pov.experience_points = game.pov.experience_points - (game.pov.level * 100 + 100)
game.pov.attribute_points = game.pov.attribute_points + 5
game.pov.level_up_points = game.pov.level_up_points + 1
game.pov.level = game.pov.level + 1
level_up_function
}
]]></function>
<function name="level_up_system_function"><![CDATA[
if (game.pov.level_up_points > 0) {
if (game.pov.attribute_points > 0) {
show menu ("What attribute would you like to raise?",split("strength;endurance;dexterity;agility;speed;intelligence;spirituality;mentality;piety;luck",";"),false) {
switch (result) {
case ("strength") {
msg ("How many points?")
get input {
game.pov.points=result
}
}
}
}
]]></function>
<function name="status_attributes_function">
game.pov.health_points = game.pov.current_health_points + "/" + game.pov.maximum_health_points
game.pov.mana_points = game.pov.current_mana_points + "/" + game.pov.maximum_mana_points
</function>
<function name="shop_function">
</function>
</library>
<!--Saved by Quest 5.4.4840.17608-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="nm">
<gameid>46538ab8-34a9-4af7-b16a-692260fd7984</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="defaultplayer" />
<statusattributes type="stringdictionary">
<item>
<key>turns</key>
<value></value>
</item>
<item>
<key>attack</key>
<value></value>
</item>
<item>
<key>defend</key>
<value></value>
</item>
<item>
<key>life</key>
<value></value>
</item>
</statusattributes>
<turns type="int">0</turns>
<life type="int">5</life>
<attack type="int">5</attack>
<defend type="int">3</defend>
</object>
<object name="hostile">
<inherit name="editor_object" />
<life type="int">5</life>
<attack type="int">4</attack>
<defend type="int">4</defend>
<dead type="boolean">false</dead>
<fight type="script"><![CDATA[
if (hostile.dead=false) {
if (RandomChance(50)=true) {
player_damage = player.attack - hostile.defend
on ready {
if (player_damage < 0) {
player_damage = 0
}
on ready {
hostile.life = hostile.life - player_damage
msg ("You hit it for " + player_damage + " damage, and it has only " + hostile.life + " life left.")
on ready {
if (hostile.life <= 0) {
msg ("You killed it, and gained some stats too!")
player.life = player.life + 2
player.attack = player.attack +1
hostile.dead = true
}
}
}
}
} else {
msg ("")
msg ("Carefull!")
msg ("")
msg ("Hostile lashes at you!")
hostile_damage = hostile.attack - player.defend
on ready {
if (hostile_damage < 0) {
hostile_damage = 0
}
on ready {
player.life = player.life - hostile_damage
msg ("Shit that hurt!")
msg ("Hostile hit you for " + hostile_damage + " damage, and you now have only " + player.life + " life left.")
on ready {
if (player.life <= 0) {
msg ("You are dead")
finish
}
}
}
}
}
}
else {
msg ("Hostile is already dead, silly!")
}
]]></fight>
<look type="script">
msg ("Life: " + hostile.life)
msg ("Attack: " + hostile.attack)
msg ("Defend: " + hostile.defend)
</look>
</object>
</object>
<verb>
<property>fight</property>
<pattern>fight</pattern>
<defaultexpression>"You can't fight " + object.article + "."</defaultexpression>
</verb>
<turnscript name="global_events_turnscript">
<enabled />
<script>
player.turns = player.turns + 1
</script>
</turnscript>
</asl>
<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="nm">
<gameid>46538ab8-34a9-4af7-b16a-692260fd7984</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<description type="script">
</description>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<statusattributes type="stringdictionary">
<item>
<key>attack</key>
<value>5</value>
</item>
<item>
<key>defend</key>
<value>3</value>
</item>
<item>
<key>life</key>
<value></value>
</item>
</statusattributes>
<life type="int">5</life>
</object>
<object name="hostile">
<inherit name="editor_object" />
<life type="int">5</life>
<attack type="int">4</attack>
<defend type="int">4</defend>
<fight type="script">
if (RandomChance(50)) {
player.attack = hostile.defend
msg ("You hit him for 1 damage!")
hostile.life = hostile.life - 1
if (hostile.life = 0) {
msg ("You killed it!")
player.life = player.life + 2
player.attack = player.attack +1
}
}
else {
msg ("Carefull!")
}
msg ("He lashes back!")
if (RandomChance(47)) {
hostile.attack = player.defense
msg ("Shit that hurt!")
player.life = player.life - 2
if (player.life = 0) {
msg ("You are dead")
finish
}
}
else {
msg ("Missed me!")
}
</fight>
</object>
</object>
<verb>
<property>fight</property>
<pattern>fight</pattern>
<defaultexpression>"You can't fight " + object.article + "."</defaultexpression>
</verb>
</asl>
<fight type="script"><![CDATA[
if (hostile.dead=false) {
if (hostile.following = false) {
hostile.following = true
}
if (RandomChance(50)=true) {
player_damage = player.attack - hostile.defend
on ready {
if (player_damage < 0) {
player_damage = 0
}
on ready {
hostile.life = hostile.life - player_damage
msg ("You hit it for " + player_damage + " damage, and it has only " + hostile.life + " life left.")
on ready {
if (hostile.life <= 0) {
msg ("You killed it, and gained some stats too!")
player.life = player.life + 2
player.attack = player.attack +1
hostile.following = false
hostile.dead = true
}
}
}
}
} else {
msg ("")
msg ("Carefull!")
msg ("")
msg ("Hostile lashes at you!")
hostile_damage = hostile.attack - player.defend
on ready {
if (hostile_damage < 0) {
hostile_damage = 0
}
on ready {
player.life = player.life - hostile_damage
msg ("Shit that hurt!")
msg ("Hostile hit you for " + hostile_damage + " damage, and you now have only " + player.life + " life left.")
on ready {
if (player.life <= 0) {
msg ("You are dead")
finish
}
}
}
}
}
}
else {
msg ("Hostile is already dead, silly!")
}
]]></fight>
if (orc.following=true) {
if (not orc.parent = player.parent) {
orc.parent = player.parent
}
}
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Testing Game Stuff">
<gameid>d83ba5bb-2e3c-4f31-80c9-3e88a2dc082c</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<game name="blah">
// blah coding
<start type="script">
// blah coding
</start>
// blah coding
</game>
/blah coding