Health
"You drop " + object.alias + "."dbc572bf-7a96-4d4e-8341-5d365d3fab840.12015ArcherFarmerBlacksmithMageMinerWarriorWoodsman0000 NASimulationMediumPoliteLight Writerfalse00013SkyBlueWhiteWhiteWhiteWhite750SkyBlue*.jpg;*.jpeg;*.png;*.gif;*.js;*.wav;*.mp3;*.htm;*.html;*.svg;*.txtStartContinueInstall DLCVersionfalse
SetInventory2Label ("Current Objective")
SetInventory2 (GetDirectChildren (equipment))
play sound ("01-title-theme.mp3", false, true)
Setupfalse
StartMenu
01You can't carry any more weight in this bag!200defenseDefense: !]]>speedSpeed: !]]>levelLevel: !]]>goldGold: !]]>1100
player
player
playerplayerplayerplayerhehehehegame.hour + ":" + game.minute + " " + game.suffix + " on " + game.month + "/" + game.dayTell the mysterious man your name!equip #object#You can't equip this!unequip #object#"You aren't wearing " + object.alias.*) (on|with) (?.*)$]]>Your HousefalseYourBedroomA small familair room plastered with old family photographs.
speech ("???", "Wake up!")
wait {
speech (player.alias, "Hold on!")
wait {
speech ("Mother", player.alias + ", wake up already!")
Ask ("Will you clamber out of bed?") {
if (result = true) {
msg ("You decide it's best that you obey your mother or face her feiry wraith! You quickly clamber out of bed.")
}
else {
msg ("You lay back down for a few more seconds.")
wait {
speech ("Mother", "Seriously, " + player.alias + ", wake up already!")
msg ("You decide it's best to obey your mother or face her feiry wraith! You quickly clamber out of bed.")
}
}
}
}
}
Blue BedA nice comfty looking bed that you can rest in.falseYou decide to take a well deserved rest on this bed!Look atA photo plastered to the wall of your deceased father and younger version of your mother who took care of you and holds an infant in her arms (the infant is you when you were younger)Family Photo3311false
msg ("Handed over Family Photos!")
speech ("Mother", "I sure miss your father! This brings back so many memories. I'll just hold onto these for you.")
this.parent = mother
speech ("Mother", "That reminds me, your father wanted me to give you this on your Day of Choosing.")
AddToInventory (fathers_ring)
Wooden NightstandA brown, wooden, nightstand with one drawer and a metal handle.falseThe drawer slides openThe drawer slides closedLook atOpenLook atDropLeather TunicA brown leather tunic that offers minimal protection.01Leather Tunic [EQUIPPED]Leather TunicLook atDropEquip5Enchanted Bag
player.maxvolume = 100
MoveObject (this, garbage)
KitchenBlack StoveA blue flare of fire spews to lifeA blue flare of fire spews ontopA black iron stove.Look atTakeSwitch on
list add (this.displayverbs, "Switch off")
list remove (this.displayverbs, "Switch on")
list remove (this.displayverbs, "Switch off")
list add (this.displayverbs, "Switch on")
Black RefrigeratorA simple black refrigerator with a silver handle.falseLook atOpen310Red Apple1Look atTakeEatLook atDropEat1Raw Fish-5Yuck! This is nasty!Look atUseDropEat3cooked_fishLiving RoomherMotherfalseYourLook at
speech ("Mother", "You should head to the King's Castle to choose your life! I'm so excited for you")
new_mission ("Head to the King's Castle and choose your life!")
UnlockExit (your_house_exit_out)
You should, probably, see what your mother wants before going outside and exploring Westfall!Mother's RoomfalseYourStairsfalseYou are on theStairsfalseYou are on theSouth WestfallCentral Westfall10
message1 = RandomChance(25)
message2 = RandomChance(25)
message3 = RandomChance(50)
if (message1) {
speech ("Villager", "Go away kid, can't you see I'm busy?")
}
else if (message2) {
speech ("Villager", "Don't you have somewhere to be?")
}
else if (message3) {
speech ("Villager", "Maybe if we ignore " + player.article + " they'll go away!")
}
else {
speech ("Villager", "Herm!")
}
Male VillagerManheEast WestfallNorth WestfallWest WestfallWestfall CastlefalsetheA golden chandelier dangles from above, to the northwest and northeast is a stairwell leading up to the second floor and straight ahead is a doorway with a guard on either side of the doorway holding spears forming an X across the doorway. You have a nagging feeling that this is where you're supposed to go.The guards block your way!Westfall Castle HallfalsetheupdateBlue BedA nice comfty looking bed that you can rest in.falseYou decide to take a well deserved rest on this bed!Look atTakeBlack RefrigeratorA simple black refrigerator with a silver handle.falseLook atOpenBlack StoveA blue flare of fire spews to lifeA blue flare of fire spews ontopA black iron stove.Look atTakeSwitch on
list add (this.displayverbs, "Switch off")
list remove (this.displayverbs, "Switch on")
list remove (this.displayverbs, "Switch off")
list add (this.displayverbs, "Switch on")
Minor Healing Potion20Restored 20 HP!Major Healing Potion50Restored 50 HP!Red Applefalse10Cooked Fish10Yummy in my tummy!Look atUseDropEat21Raw Fish-5Yuck! This is nasty!Look atDropEatcooked_fish15Yummy in my tummy!Look atDropEatLook atTakeEat
if (HasString(this, "eatmsg")) {
msg (this.eatmsg)
}
else {
msg (DynamicTemplate("Eaten", this))
}
if (HasInt(game.pov, "health")) {
game.pov.health = game.pov.health + this.eathealth
}
if (this.quantity = 1) {
destroy (this.name)
}
else {
this.quantity = this.quantity - 1
}
Leather TunicA brown leather tunic that offers minimal protection.01Leather Tunic [EQUIPPED]Leather TunicLook atDropEquip55Look atDropEquip44Leather Pants2Leather Boots21Leather Gloves1Leather Helmet3310Golden Chestplate8Golden Leggings4Golden Boots6Golden HelmetFather's Ring3Look atDropEquipFather's Ring [EQUIPPED]Father's Ring0
if (HasString(this, "eatmsg")) {
msg (this.eatmsg)
}
else {
msg (DynamicTemplate("Eaten", this))
}
if (HasInt(game.pov, "health")) {
game.pov.health = game.pov.health + this.eathealth
}
if (this.quantity = 1) {
destroy (this.name)
}
else {
this.quantity = this.quantity - 1
}
Georgia, serif14WhiteBlackBluefalse0.3Arial12WhiteBlackLightGreyBlacknorthwestnorthnortheastwesteastsouthwestsouthsoutheastupdowninout0falsealleverythingtheaanfalse1000false3002525falsefalse1234falsefalsefalsefalsefalseenfalse30300falsefalsefalsefalsefalsefalse*.jpg;*.jpeg;*.png;*.gif;*.js;*.wav;*.mp3;*.htm;*.html;*.svg
InitPOV (oldvalue, game.pov)
Look atLook atDropfalsefalseititfalsefalsefalsefalseYou are inYou can seeYou can gocontainingfalsefalsefalse0falsefalse11WhiteBlack115false00memyselfselfLooking good.youyourselffalsefalsefalsefalsefalsefalse0falsefalse
if (game.pov = this) {
if (IsDefined("oldvalue")) {
OnEnterRoom (oldvalue)
}
else {
OnEnterRoom (null)
}
if (game.gridmap) {
MergePOVCoordinates
}
}
if (this.isopen and HasScript(this, "onopen")) {
do (this, "onopen")
}
if (not this.isopen and HasScript(this, "onclose")) {
do (this, "onclose")
}
if (this.locked and HasScript(this, "onlock")) {
do (this, "onlock")
}
if (not this.locked and HasScript(this, "onunlock")) {
do (this, "onunlock")
}
if (this.switchedon and HasScript(this, "onswitchon")) {
do (this, "onswitchon")
}
if (not this.switchedon and HasScript(this, "onswitchoff")) {
do (this, "onswitchoff")
}
11Look atTakehead0Look atTakeEquipbody0Look atTakeEquiplegs0Look atTakeEquipfeet0Look atTakeEquiparms0Look atTakeEquipfingers0Look atTakeEquiphands0Look atTakeEquip')")
JS.eval ("$('.ui-button').css('background', 'SkyBlue')")
JS.eval ("$('.ui-button').css('border', '1px solid white')")
JS.eval ("$('.ui-button-text').css('color', 'white')")
JS.eval ("$('.ui-button').mousedown(function() { $(this).css('background-color', 'white'); } )")
JS.eval ("$('.ui-button-text').mousedown(function() { $(this).css('color', 'SkyBlue'); } )")
JS.eval ("$('#gameBorder').mouseup(function() { $('.ui-button-text').css('color', 'white'); } )")
JS.eval ("$('#gameBorder').mouseup(function() { $('.ui-button').css('background-color', 'SkyBlue'); } )")
JS.eval ("var styleSelecting = $(''); $('html > head').append(styleSelecting)")
JS.eval ("var styleUnselecting = $(''); $('html > head').append(styleUnselecting)")
JS.eval ("var styleSelected = $(''); $('html > head').append(styleSelected)")
JS.eval ("$('#cmdCompassN').css('background', 'white')")
JS.eval ("$('#cmdCompassE').css('background', 'white')")
JS.eval ("$('#cmdCompassS').css('background', 'white')")
JS.eval ("$('#cmdCompassW').css('background', 'white')")
JS.eval ("$('#cmdCompassNW').css('background', 'white')")
JS.eval ("$('#cmdCompassNE').css('background', 'white')")
JS.eval ("$('#cmdCompassSW').css('background', 'white')")
JS.eval ("$('#cmdCompassSE').css('background', 'white')")
JS.eval ("$('#cmdCompassU').css('background', 'white')")
JS.eval ("$('#cmdCompassIn').css('background', 'white')")
JS.eval ("$('#cmdCompassD').css('background', 'white')")
JS.eval ("$('#cmdCompassOut').css('background', 'white')")
JS.eval ("$('#cmdCompassN').css('border', '2px solid red')")
JS.eval ("$('#cmdCompassE').css('border', '2px solid orange')")
JS.eval ("$('#cmdCompassW').css('border', '2px solid yellow')")
JS.eval ("$('#cmdCompassS').css('border', '2px solid green')")
JS.eval ("$('#cmdCompassNW').css('border', '2px solid blue')")
JS.eval ("$('#cmdCompassNE').css('border', '2px solid indigo')")
JS.eval ("$('#cmdCompassSE').css('border', '2px solid violet')")
JS.eval ("$('#cmdCompassSW').css('border', '2px solid red')")
JS.eval ("$('#cmdCompassIn').css('border', '2px solid orange')")
JS.eval ("$('#cmdCompassOut').css('border', '2px solid yellow')")
JS.eval ("$('#cmdCompassU').css('border', '2px solid green')")
JS.eval ("$('#cmdCompassD').css('border', '2px solid blue')")
JS.eval ("$('#compassLabel').css('background', 'SkyBlue')")
JS.eval ("$('#compassLabel').css('color', 'white')")
JS.eval ("$('#compassAccordion').css('background', 'SkyBlue')")
JS.eval (" var arrowUrl = 'images/ui-icons_d8e7f3_256x240.png'; var styleArrow = $(''); $('html > head').append(styleArrow) ")
JS.eval ("$('#status').css('background-image', 'none');")
JS.eval ("$('#status').css('background-color', 'SkyBlue');")
JS.eval ("$('#status').css('border', 'SkyBlue');")
]]>
if (HasString(object, "openmsg")) {
msg (object.openmsg)
}
else {
msg (DynamicTemplate("OpenSuccessful", object))
}
object.isopen = true
list add (object.displayverbs, "Close")
list remove (object.displayverbs, "Open")
ListObjectContents (object)
if (HasString(object, "closemsg")) {
msg (object.closemsg)
}
else {
msg (DynamicTemplate("CloseSuccessful", object))
}
object.isopen = false
list add (object.displayverbs, "Open")
list remove (object.displayverbs, "Close")
handled = false
if (HasString(object2, "give")) {
msg (object2.give)
handled = true
}
else if (TypeOf(object2, "give") = "scriptdictionary") {
if (DictionaryContains(object2.give, object1.name)) {
parameters = NewObjectDictionary()
dictionary add (parameters, "this", object2)
dictionary add (parameters, "object", object1)
invoke (ScriptDictionaryItem(object2.give, object1.name), parameters)
handled = true
}
if (not handled) {
if (HasScript(object2, "giveanything")) {
// TO DO: Would be better to use a delegate for giveanything, but need to implement Editor support first
parameters = NewObjectDictionary()
dictionary add (parameters, "object", object1)
do (object2, "giveanything", parameters)
handled = true
}
}
}
if (not handled) {
if (HasString(object1, "giveto")) {
msg (object1.giveto)
handled = true
}
else if (TypeOf(object1, "giveto") = "scriptdictionary") {
if (DictionaryContains(object1.giveto, object2.name)) {
parameters = NewObjectDictionary()
dictionary add (parameters, "this", object1)
dictionary add (parameters, "object", object2)
invoke (ScriptDictionaryItem(object1.giveto, object2.name), parameters)
handled = true
}
else {
if (HasScript(object1, "givetoanything")) {
// TO DO: Would be better to use a delegate for givetoanything, but need to implement Editor support first
parameters = NewObjectDictionary()
dictionary add (parameters, "object", object2)
do (object1, "givetoanything", parameters)
handled = true
}
}
}
}
if (not handled) {
msg (DynamicTemplate("DefaultGive", object2, object1))
}
game.pov.maxvolume) {
continue = false
if (HasString(game.pov, "containerfullmessage")) {
message = prefix + game.pov.containerfullmessage
}
else {
message = prefix + DynamicTemplate("FullInventory", object)
}
}
}
children = GetDirectChildren(game.pov)
if (HasInt(game.pov, "maxobjects")) {
if (game.pov.maxobjects > 0) {
if (ListCount(children) >= game.pov.maxobjects) {
continue = false
if (HasString(game.pov, "containermaxobjects")) {
message = prefix + game.pov.containermaxobjects
}
else {
message = prefix + DynamicTemplate("MaxObjectsInInventory", object)
}
}
}
}
if (continue = false) {
msg (message)
}
else {
found = true
takemsg = object.takemsg
switch (TypeOf(object, "take")) {
case ("script") {
if (ismultiple) {
OutputTextNoBr (prefix)
}
do (object, "take")
takemsg = ""
}
case ("boolean") {
if (object.take = true) {
object.parent = game.pov
if (takemsg = null) {
takemsg = DynamicTemplate("TakeSuccessful", object)
}
}
else {
found = false
}
}
case ("string") {
object.parent = game.pov
takemsg = object.take
}
default {
found = false
}
}
if (not found and takemsg = null) {
takemsg = DynamicTemplate("TakeUnsuccessful", object)
}
if (LengthOf(takemsg) > 0) {
msg (prefix + takemsg)
}
if (HasScript(object, "ontake")) {
do (object, "ontake")
}
if (found and GetBoolean (object, "scenery") and object.parent = game.pov) {
object.scenery = false
}
}
}
]]>
result = NewObjectList()
foreach (obj, GetAllChildObjects(game.pov)) {
if (ContainsVisible(game.pov, obj)) {
list add (result, obj)
}
}
return (result)
1) {
prefix = ""
if (ismultiple) {
prefix = GetDisplayAlias(object) + ": "
}
if (not ListContains(ScopeInventory(), object)) {
msg (prefix + DynamicTemplate("NotCarrying", object))
}
else if (not ListContains(ScopeReachable(), object)) {
msg (prefix + DynamicTemplate("ObjectNotOpen", GetBlockingObject(object)))
}
else {
found = true
dropmsg = object.dropmsg
object.quantity2 = object.quantity
object.quantity = 1
CloneObjectAndMove (object, game.pov.parent)
object.quantity = object.quantity2 - 1
GetDisplayAlias (object)
switch (TypeOf(object, "drop")) {
case ("script") {
if (ismultiple) {
OutputTextNoBr (prefix)
}
do (object, "drop")
dropmsg = ""
}
case ("boolean") {
if (object.drop = true) {
object.parent = game.pov
if (dropmsg = null) {
dropmsg = DynamicTemplate("DropSuccessful", object)
}
}
else {
found = false
}
}
case ("string") {
dropmsg = object.drop
}
default {
found = false
msg ("")
}
}
if (not found and dropmsg = null) {
dropmsg = DynamicTemplate("DropUnsuccessful", object)
}
if (LengthOf(dropmsg) > 0) {
msg (prefix + dropmsg)
}
if (HasScript(object, "ondrop")) {
do (object, "ondrop")
}
}
}
else {
object.parent = game.pov.parent
}
]]>
if (HasInt(obj, "quantity")) {
result = obj.alias + " x" + obj.quantity
}
else {
result = obj.alias
}
return (result)
if (HasString(obj, "listalias")) {
result = obj.listalias
obj.listalias = obj.listalias + "x" + obj.quantity
}
else {
result = GetDisplayAlias(obj)
}
return (result)
HP: !/" + player.maxHP)
}
]]> null) {
oldPOV.alias = oldPOV.external_alias
oldPOV.alt = oldPOV.external_alt
oldPOV.look = oldPOV.external_look
oldPOV.gender = oldPOV.external_gender
oldPOV.article = oldPOV.external_article
}
newPOV.external_alias = newPOV.alias
newPOV.external_alt = newPOV.alt
newPOV.external_look = newPOV.look
newPOV.external_gender = newPOV.gender
newPOV.external_article = newPOV.article
if (not GetBoolean(newPOV, "pov_used")) {
if (newPOV.alt = null) {
newPOV.pov_alt = newPOV.pov_alt
}
else {
newPOV.pov_alt = ListCombine(newPOV.alt, newPOV.pov_alt)
}
if (newPOV.alias <> null) {
list add (newPOV.pov_alt, newPOV.alias)
}
if (game.showhealth) {
newPOV.health = 20
newPOV.changedhealth => {
if (this.health > player.maxHP) {
this.health = player.maxHP
}
else if (this.health <= 0) {
this.health = 0
if (HasScript(game, "onhealthzero")) {
do (game, "onhealthzero")
}
}
}
}
newPOV.pov_used = true
}
newPOV.alias = newPOV.pov_alias
newPOV.alt = newPOV.pov_alt
newPOV.look = newPOV.pov_look
newPOV.gender = newPOV.pov_gender
newPOV.article = newPOV.pov_article
]]>
ShowMenu ("What Class have you choosen?", game.classes, false) {
player.class = result
Ask ("Is " + player.class + " correct?") {
if (result = true) {
if (player.class = "Archer") {
msg ("So you have choosen the life of an " + player.class + "!")
}
else {
msg ("So you have choosen the life of a " + player.class + "!")
}
}
else {
class_choice
}
}
}
game.minute = minute
game.hour = hour
game.day = day
game.month = month
game.time = game.hour + ":" + game.minute + " on " + game.month + "/" + game.day
game.timesuffix = suffix
" + speaker + ": " + message)
]]>
speech ("???", "What is your name, stranger?")
get input {
player.alias = result
Ask ("Is " + player.alias + " correct?") {
if (result = true) {
speech ("???", "It's nice to meet you, " + player.alias + "!")
speech ("???", "Prepare to begin the start of your adventure!")
MoveObject (player, yourbedroom)
new_mission ("Head downstairs and speak to your Mother!")
}
}
}
New Objective!")
PrintCentered (mission.alias)
]]>
if (object2.cancook) {
if (object2.switchedon) {
// both conditions are met
AddToInventory (object1.cooked)
if (object1.quantity = 1) {
destroy (object1.name)
}
else {
msg ("If only there was a fire.")
}
}
}
foreach (item, ScopeInventory()) {
for (i, 1, 100) {
l = ScopeInventory()
n = GetRandomInt (0, ListCount(l)-1)
item1 = ObjectListItem(l,n)
}
for (z, 1, 100) {
x = ScopeInventory()
y = GetRandomInt (0, ListCount(x)-1)
item2 = ObjectListItem(x,y)
}
if (item1.name = item2.name) {
}
else if (item1.alias = item2.alias) {
item1.quantity = item1.quantity + item2.quantity
item2.parent = garbage
}
else {
}
}
s = GetFileData (filename)
current_object = null
foreach (line, Split(s, "\n")) {
line = Crop(line)
if (not line = "" and not StartsWith(line, "#")) {
bits = Split(line, "=")
if (StringListItem(bits, 0) = "new") {
if (ListCount(bits) = 2) {
create (StringListItem(bits, 1))
current_object = GetObject(StringListItem(bits, 1))
}
else {
create (StringListItem(bits, 2), StringListItem(bits, 1))
current_object = GetObject(StringListItem(bits, 2))
}
}
else if (StringListItem(bits, 0) = "find") {
current_object = GetObject(StringListItem(bits, 1))
if (current_object = null) {
error ("Failed to find " + StringListItem(bits, 1) + " in the game world. Things will go badly...")
}
}
else if (StringListItem(bits, 0) = "exit") {
create exit (StringListItem(bits, 2), null, null, null, StringListItem(bits, 1))
current_object = GetObject(StringListItem(bits, 2))
}
else if (StringListItem(bits, 0) = "parent") {
current_object.parent = GetObject(StringListItem(bits, 1))
if (current_object.parent = null) {
error ("Failed to find " + StringListItem(bits, 1) + " in the game world. Things will go badly...")
}
}
else if (StringListItem(bits, 0) = "to") {
current_object.to = GetObject(StringListItem(bits, 1))
if (current_object.to = null) {
error ("Failed to find " + StringListItem(bits, 1) + " in the game world. Things will go badly...")
}
}
else {
if (LCase(StringListItem(bits, 1)) = "false") {
set (current_object, StringListItem(bits, 0), false)
}
else if (LCase(StringListItem(bits, 1)) = "true") {
set (current_object, StringListItem(bits, 0), true)
}
else if (IsInt(StringListItem(bits, 1))) {
set (current_object, StringListItem(bits, 0), ToInt(StringListItem(bits, 1)))
}
set (current_object, StringListItem(bits, 0), StringListItem(bits, 1))
}
}
}
Current Version: " + game.version)
StartMenu
}
else {
msg ("There currently is no DLC available.")
StartMenu
}
}
]]>
genderlist = NewStringList()
list add (genderlist, "Boy")
list add (genderlist, "Girl")
ShowMenu ("Are you a Boy or a Girl?", genderlist, false) {
player.gender = result
if (player.gender = "Boy") {
player.article = "him"
}
else {
player.article = "her"
}
Ask ("Is " + player.gender + " correct?") {
if (result) {
input_name
}
else {
gender
}
}
}
111