<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Mystic Mages">
<gameid>7b455ee2-72c1-42e0-a111-09eb20b79ca1</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<showhealth type="boolean">false</showhealth>
<showscore type="boolean">false</showscore>
<gridmap type="boolean">false</gridmap>
<start type="script">
</start>
<onhealthzero type="script">
finish
</onhealthzero>
<object name="monsters">
<inherit name="editor_object" />
<inherit name="maleplural" />
<object name="zombie">
<inherit name="editor_object" />
</object>
<object name="spider">
<inherit name="editor_object" />
</object>
<object name="necromancer">
<inherit name="editor_object" />
</object>
<object name="maruader">
<inherit name="editor_object" />
</object>
</object>
</game>
<object name="living room">
<alias>Cottage Home</alias>
<object name="upstairs">
<inherit name="editor_room" />
<alias>stairs</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<object name="bedroom1">
<inherit name="openable" />
<alias>your bedroom</alias>
<visible type="boolean">false</visible>
<beforefirstenter type="script">
</beforefirstenter>
<beforeenter type="script">
</beforeenter>
<object name="bed1">
<inherit name="editor_object" />
<alias>bed</alias>
</object>
<object name="dresser1">
<inherit name="editor_object" />
<inherit name="container_open" />
<alias>dresser</alias>
<isopen type="boolean">false</isopen>
<hidechildren type="boolean">false</hidechildren>
<listchildren />
<object name="gold_piece">
<inherit name="editor_object" />
<take />
<attr name="value_worth" type="script">
if (Got(gold_piece)) {
player.gold = player.gold + 5
}
else if (not Got(gold_piece)) {
player.gold = player.gold - 5
}
</attr>
<use type="boolean">false</use>
<ontake type="script">
do (gold_piece, "value_worth")
</ontake>
<ondrop type="script">
player.gold = player.gold - 5
</ondrop>
<usemenuprompt type="string"></usemenuprompt>
<giveto type="scriptdictionary">
<item key="Jane">
</item>
</giveto>
<alt type="stringlist">
<value>gold</value>
<value>money</value>
<value>cash</value>
<value>currency</value>
</alt>
</object>
</object>
<object name="closest">
<inherit name="openable" />
<dark />
</object>
<exit alias="hall" to="upstairs">
<inherit name="southeastdirection" />
</exit>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<statusattributes type="stringdictionary">
<item>
<key>strength</key>
<value></value>
</item>
<item>
<key>dexterity</key>
<value></value>
</item>
<item>
<key>intelligence</key>
<value></value>
</item>
<item>
<key>level</key>
<value></value>
</item>
<item>
<key>class</key>
<value></value>
</item>
<item>
<key>experience</key>
<value></value>
</item>
<item>
<key>turns</key>
<value></value>
</item>
<item>
<key>health</key>
<value></value>
</item>
<item>
<key>gold</key>
<value></value>
</item>
</statusattributes>
<strength type="int">0</strength>
<dexterity type="int">0</dexterity>
<intelligence type="int">0</intelligence>
<level type="int">0</level>
<class>mage; archer; warrior;</class>
<experience type="int">0</experience>
<turns type="int">0</turns>
<health type="int">0</health>
<dead type="boolean">false</dead>
<gold type="int">0</gold>
</object>
</object>
<object name="bedroom2">
<inherit name="openable" />
<alias>brothers room</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<visible type="boolean">false</visible>
<object name="bed">
<inherit name="editor_object" />
</object>
<object name="end table">
<inherit name="editor_object" />
</object>
<exit alias="hall" to="upstairs">
<inherit name="southwestdirection" />
</exit>
</object>
<exit alias="down" to="living room">
<inherit name="downdirection" />
</exit>
<exit alias="your room" to="bedroom1">
<inherit name="northwestdirection" />
<locked type="boolean">false</locked>
</exit>
<exit alias="brothers room" to="bedroom2">
<inherit name="northeastdirection" />
</exit>
</object>
<object name="kitchen">
<object name="den">
<inherit name="editor_room" />
<exit alias="up" to="kitchen">
<inherit name="updirection" />
</exit>
</object>
<exit alias="down" to="den">
<inherit name="downdirection" />
</exit>
<exit alias="east" to="living room">
<inherit name="eastdirection" />
</exit>
</object>
<exit alias="out" to="front lawn">
<inherit name="outdirection" />
</exit>
<exit alias="up" to="upstairs">
<inherit name="updirection" />
</exit>
<exit alias="west" to="kitchen">
<inherit name="westdirection" />
</exit>
<object name="chair">
<inherit name="editor_object" />
<sit type="script">
msg ("No time to sit got to get busy!")
</sit>
</object>
<object name="couch">
<inherit name="editor_object" />
<sit>No time to lounge got to get busy!</sit>
</object>
</object>
<object name="restroom">
<alias>outhouse</alias>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<dark />
<object name="sink">
<inherit name="editor_object" />
</object>
<exit alias="southeast" to="front lawn">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="front lawn">
<inherit name="editor_room" />
<exit alias="in" to="living room">
<inherit name="indirection" />
</exit>
<exit alias="northwest" to="restroom">
<inherit name="northwestdirection" />
</exit>
<exit alias="south" to="road">
<inherit name="southdirection" />
</exit>
<object name="npc">
<inherit name="editor_object" />
<alias>oldman</alias>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<speak type="script">
firsttime {
questions1 = NewStringList()
list add (questions1, "yes")
list add (questions1, "no")
ShowMenu ("Will you do me a favor?", questions1, false) {
if (result="yes") {
msg ("Oh thank you child, my bones can't carry me that far.")
msg ("Here! Take this orb to Jane at the Village Inn.")
MoveObject (orb, player)
msg ("Return to me and I will give you the potion.")
SetObjectFlagOn (Jane, "orbtask")
}
else if (result="no") {
msg ("Maybe tommorow then.")
}
else if (Contains (Jane,orb)) {
firsttime {
msg ("Here child!")
MoveObject (exp potion, player)
}
otherwise {
msg ("You did good thank you again.")
}
}
}
}
otherwise {
}
</speak>
<giveto type="scriptdictionary">
<item key="exp potion">
if (GetBoolean(Jane, "orbtask")) {
msg ("Once you have completed the task then you may have the potion.")
}
else if (not GetBoolean(Jane, "orbtask")) {
msg ("Here you are.")
MoveObject (exp potion, player)
}
</item>
</giveto>
<object name="orb">
<inherit name="editor_object" />
<take />
<look>Its a shiny black orb..</look>
<givesingle />
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<givemenuprompt>Jane</givemenuprompt>
<giveto type="scriptdictionary">
<item key="Jane">
msg ("Here you go, an elderly man gave me this to give to you.")
MoveObject (orb, Jane)
if (Contains (Jane,orb)) {
SetObjectFlagOff (Jane, "orbtask")
}
else {
msg ("Thank you! she says!")
}
</item>
</giveto>
</object>
<object name="exp potion">
<inherit name="editor_object" />
<take />
<drink type="script">
player.experience = player.experience + 15
</drink>
</object>
</object>
</object>
<object name="humble way">
<inherit name="editor_room" />
<object name="village square">
<object name="guild hall">
<object name="achers guild">
<object name="allen the archer">
<inherit name="editor_object" />
<inherit name="namedmale" />
</object>
<exit alias="southeast" to="guild hall">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="mage guild">
<object name="maggie the mage">
<inherit name="editor_object" />
<inherit name="namedfemale" />
</object>
<exit alias="southwest" to="guild hall">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="warrior guild">
<object name="larry the warrior">
<inherit name="editor_object" />
<inherit name="namedmale" />
</object>
<exit alias="northeast" to="guild hall">
<inherit name="northeastdirection" />
</exit>
</object>
<exit alias="down" to="village square">
<inherit name="downdirection" />
</exit>
<exit alias="northwest" to="achers guild">
<inherit name="northwestdirection" />
</exit>
<exit alias="northeast" to="mage guild">
<inherit name="northeastdirection" />
</exit>
<exit alias="southwest" to="warrior guild">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="general store">
<object name="tom">
<inherit name="editor_object" />
<inherit name="namedmale" />
</object>
<object name="tent">
<inherit name="editor_object" />
</object>
<object name="bedroll">
<inherit name="editor_object" />
</object>
<object name="flask">
<inherit name="editor_object" />
</object>
<object name="rations">
<inherit name="editor_object" />
</object>
<exit alias="northwest" to="village square">
<inherit name="northwestdirection" />
</exit>
</object>
<object name="village square inn">
<exit alias="southwest" to="village square">
<inherit name="southwestdirection" />
</exit>
<object name="front desk">
<inherit name="editor_object" />
<inherit name="container_open" />
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<close type="boolean">false</close>
<isopen />
<open type="boolean">false</open>
<onopen type="script">
MakeObjectVisible (Jane)
</onopen>
<object name="Jane">
<inherit name="editor_object" />
<inherit name="namedfemale" />
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<speak type="script">
questions = NewStringList()
list add (questions, "yes")
list add (questions, "no")
ShowMenu ("Would you like a room today only 5G?", questions, false) {
msg ("-" + result)
if (result="yes") {
if (Got(gold_piece)) {
MoveObject (gold_piece, Jane)
if (not Got(gold_piece)) {
player.gold = player.gold - 5
msg ("Enjoy your stay!")
MoveObject (key, player)
room_renting
}
}
}
else if (result="no") {
msg ("Ok thank you have a nice day.")
}
}
</speak>
<give type="scriptdictionary">
<item key="orb">
MoveObject (orb, Jane)
if (GetBoolean(Jane, "orbtask")) {
SetObjectFlagOff (Jane, "orbtask")
msg ("Thank you very much.")
}
</item>
<item key="gold_piece">
MoveObject (key, player)
</item>
</give>
<tell type="scriptdictionary" />
<object name="key">
<inherit name="editor_object" />
<alt type="stringlist">
<value>door</value>
</alt>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>It has a peep hole and the #1 on the front of the door.</look>
<selfuseon type="scriptdictionary">
<item key="room1">
UnlockExit (room_key)
</item>
</selfuseon>
</object>
</object>
</object>
<object name="room1">
<inherit name="container_open" />
<inherit name="container_lockable" />
<key type="object">key</key>
<locked />
<canlockopen type="boolean">false</canlockopen>
<isopen type="boolean">false</isopen>
<onunlock type="script">
</onunlock>
<goto type="script">
if (room1.locked = false) {
MoveObject (player, room1)
}
else if (room1.locked = true) {
msg ("Door is locked you need a room key!")
}
else if (not Contains (player,key)) {
msg ("You can't go in with out a key..")
}
</goto>
<exit alias="southeast" to="village square inn">
<inherit name="southeastdirection" />
</exit>
<object name="bed2">
<inherit name="editor_object" />
<alias>bed</alias>
<attr name="lay_down" type="script">
MoveObject (player, bed2)
EnableTimer (sleep_timer)
</attr>
</object>
<object name="night_stand">
<inherit name="editor_object" />
</object>
</object>
<object name="room2">
<inherit name="container_open" />
<inherit name="container_lockable" />
<isopen type="boolean">false</isopen>
<exit alias="south" to="village square inn">
<inherit name="southdirection" />
</exit>
</object>
<object name="room3">
<inherit name="container_open" />
<inherit name="container_lockable" />
<isopen type="boolean">false</isopen>
<exit alias="southwest" to="village square inn">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="room4">
<inherit name="container_open" />
<inherit name="container_lockable" />
<isopen type="boolean">false</isopen>
<exit alias="west" to="village square inn">
<inherit name="westdirection" />
</exit>
</object>
<exit alias="out" to="village square">
<inherit name="outdirection" />
</exit>
</object>
<exit alias="out" to="humble way">
<inherit name="outdirection" />
</exit>
<exit alias="up" to="guild hall">
<inherit name="updirection" />
</exit>
<exit alias="in" to="village square inn">
<inherit name="indirection" />
</exit>
<exit alias="southeast" to="general store">
<inherit name="southeastdirection" />
</exit>
<exit alias="southwest" to="blacksmith">
<inherit name="southwestdirection" />
</exit>
</object>
<exit alias="north" to="light forest">
<inherit name="northdirection" />
</exit>
<exit alias="in" to="village square">
<inherit name="indirection" />
</exit>
</object>
<object name="forest way">
<inherit name="editor_room" />
<object name="forest trail">
<inherit name="editor_room" />
<object name="light forest">
<object name="thick forest">
<object name="dark forest">
<exit alias="northwest" to="woods2">
<inherit name="northwestdirection" />
</exit>
</object>
<exit alias="east" to="light forest">
<inherit name="eastdirection" />
</exit>
<exit alias="northeast" to="woods2">
<inherit name="northeastdirection" />
</exit>
<exit alias="southwest" to="trail1">
<inherit name="southwestdirection" />
</exit>
</object>
<exit alias="north" to="woods2">
<inherit name="northdirection" />
</exit>
<exit alias="west" to="woods5">
<inherit name="westdirection" />
</exit>
<exit alias="south" to="humble way">
<inherit name="southdirection" />
</exit>
</object>
<exit alias="southeast" to="woods1">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="woods1">
<inherit name="editor_room" />
<exit alias="northeast" to="woods">
<inherit name="northeastdirection" />
</exit>
</object>
<object name="woods2">
<inherit name="editor_room" />
<exit alias="west" to="woods">
<inherit name="westdirection" />
</exit>
<exit alias="southwest" to="thick forest">
<inherit name="southwestdirection" />
</exit>
<exit alias="south" to="light forest">
<inherit name="southdirection" />
</exit>
</object>
<object name="woods">
<inherit name="editor_room" />
<exit alias="southwest" to="woods1">
<inherit name="southwestdirection" />
</exit>
<exit alias="east" to="woods2">
<inherit name="eastdirection" />
</exit>
<exit alias="northwest" to="forest way">
<inherit name="northwestdirection" />
</exit>
</object>
<exit alias="north" to="roadway1">
<inherit name="northdirection" />
</exit>
<exit alias="southeast" to="woods">
<inherit name="southeastdirection" />
<runscript type="boolean">false</runscript>
</exit>
</object>
<object name="road">
<exit alias="north" to="front lawn">
<inherit name="northdirection" />
</exit>
<object name="roadway1">
<exit alias="east" to="road">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="forest way">
<inherit name="southdirection" />
</exit>
</object>
<object name="roadway2">
<exit alias="west" to="road">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="traders route">
<inherit name="eastdirection" />
</exit>
</object>
<exit alias="west" to="roadway1">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="roadway2">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="road">
<inherit name="southdirection" />
<lookonly />
<look>A mass of forest sits theres but it looks a little thin in spots.</look>
</exit>
</object>
<object name="trail1">
<inherit name="editor_room" />
<exit alias="northeast" to="thick forest">
<inherit name="northeastdirection" />
</exit>
<exit alias="south" to="trail2">
<inherit name="southdirection" />
</exit>
<exit alias="southeast" to="woods4">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="trail2">
<inherit name="editor_room" />
<exit alias="north" to="trail1">
<inherit name="northdirection" />
</exit>
<exit alias="southeast" to="Mystical Mage">
<inherit name="southeastdirection" />
</exit>
<exit alias="west" to="woods3">
<inherit name="westdirection" />
</exit>
</object>
<object name="woods3">
<inherit name="editor_room" />
<exit alias="east" to="trail2">
<inherit name="eastdirection" />
</exit>
</object>
<object name="woods4">
<inherit name="editor_room" />
<exit alias="northwest" to="trail1">
<inherit name="northwestdirection" />
</exit>
</object>
<object name="woods5">
<inherit name="editor_room" />
<exit alias="east" to="light forest">
<inherit name="eastdirection" />
</exit>
</object>
<object name="Mystical Mage">
<inherit name="editor_room" />
<exit alias="northwest" to="trail2">
<inherit name="northwestdirection" />
</exit>
</object>
<object name="blacksmith">
<inherit name="editor_room" />
<exit alias="northeast" to="village square">
<inherit name="northeastdirection" />
</exit>
</object>
<object name="traders route">
<inherit name="editor_room" />
<exit alias="west" to="roadway2">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="traders route 1">
<inherit name="eastdirection" />
</exit>
</object>
<object name="traders route 1">
<inherit name="editor_room" />
<exit alias="west" to="traders route">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="traders route 2">
<inherit name="eastdirection" />
</exit>
</object>
<object name="traders route 2">
<inherit name="editor_room" />
<exit alias="west" to="traders route 1">
<inherit name="westdirection" />
</exit>
<exit alias="northeast" to="traders square">
<inherit name="northeastdirection" />
</exit>
</object>
<object name="traders square">
<inherit name="editor_room" />
<exit alias="southwest" to="traders route 2">
<inherit name="southwestdirection" />
</exit>
<exit alias="in" to="traders market">
<inherit name="indirection" />
</exit>
</object>
<object name="traders market">
<inherit name="editor_room" />
<exit alias="out" to="traders square">
<inherit name="outdirection" />
</exit>
<exit alias="northwest" to="traders hall">
<inherit name="northwestdirection" />
</exit>
<exit alias="southwest" to="traders pub">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="traders hall">
<inherit name="editor_room" />
<exit alias="southeast" to="traders market">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="gambling hall">
<inherit name="editor_room" />
</object>
<object name="traders pub">
<inherit name="editor_room" />
<exit alias="northeast" to="traders market">
<inherit name="northeastdirection" />
</exit>
</object>
<turnscript name="global_game_turns">
<enabled />
<script>
game_turn_function
leveling function
</script>
</turnscript>
<verb>
<property>givejane</property>
<pattern>givejane</pattern>
<defaultexpression>"You can't givejane " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>goto</property>
<pattern>goto</pattern>
<defaultexpression>"You can't goto " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>lay_down</property>
<pattern>lay_down</pattern>
<defaultexpression>"You can't lay_down " + object.article + "."</defaultexpression>
</verb>
<function name="intro_function">
msg ("A vast land where monsters roam and evil lurks, the people of Villagoplia thrive to survive in these troubled lands. Lives lost and wars raged but we still live they will conquer us and we will not lye down and die.....")
msg ("......................................................................................................................")
msg ("......................................................")
wait {
msg ("Whats your name?")
get input {
msg ("Hello " + result)
genderlist = NewStringList()
list add (genderlist, "male")
list add (genderlist, "female")
ShowMenu ("Whats your gender?", genderlist, false) {
player.gender = result
classlist = NewStringList()
list add (classlist, "mage")
list add (classlist, "warrior")
list add (classlist, "archer")
ShowMenu ("What class would you like to be?", classlist, false) {
player.class = result
msg ("You are a " + result)
if (result="mage") {
mage class
}
else if (result="warrior") {
warrior class
}
else if (result="archer") {
archer class
}
}
}
}
}
</function>
<function name="warrior class">
player.strength = player.strength + 3
player.dexterity = player.dexterity + 2
player.intelligence = player.intelligence + 1
player.health = player.health + 18
</function>
<function name="archer class">
player.intelligence = player.intelligence + 1
player.dexterity = player.dexterity + 3
player.strength = player.strength + 2
player.health = player.health + 14
</function>
<function name="mage class">
player.dexterity = player.dexterity + 2
player.strength = player.strength + 1
player.intelligence = player.intelligence + 3
player.health = player.health + 10
</function>
<function name="leveling function"><![CDATA[
if (player.experience >= player.level * 15 + 15) {
player.experience = player.experience - (player.level * 15 + 15)
player.level = player.level + 1
switch (player.gender) {
case ("male") {
player.strength = player.strength + 1
player.dexterity = player.dexterity + 1
player.health = player.health + 2
}
case ("female") {
player.intelligence = player.intelligence + 1
player.dexterity = player.dexterity + 1
player.health = player.health + 1
}
}
switch (player.class) {
case ("warrior") {
player.strength = player.strength + 2
player.intelligence = player.intelligence + 1
player.dexterity = player.dexterity + 1
player.health = player.health + 6
}
case ("mage") {
player.intelligence = player.intelligence + 2
player.dexterity = player.dexterity + 1
player.strength = player.strength + 1
player.health = player.health + 2
}
case ("archer") {
player.intelligence = player.intelligence + 1
player.deterity = player.dexterity + 2
player.strength = player.strength + 1
player.health = player.health + 4
}
}
leveling function
}
]]></function>
<function name="fight function">
</function>
<function name="game_turn_function">
player.turns = player.turns + 1
</function>
<function name="orb_task">
</function>
<function name="room_renting">
if (Got(key)) {
EnableTimer (room_timer)
}
else if (Contains (Jane,key)) {
DisableTimer (room_timer)
}
</function>
<timer name="room_timer">
<interval>30</interval>
<script>
MoveObject (key, Jane)
if (game.pov.parent = room1) {
MoveObject (player, village square inn)
HelperCloseObject (room1)
}
DisableTimer (room_timer)
</script>
</timer>
<timer name="sleep_timer">
<interval>60</interval>
<script>
msg ("YAWNNN!! That was a good rest!")
MoveObject (player, room1)
DisableTimer (sleep_timer)
</script>
</timer>
</asl>
<turnscript name="global_game_turns">
<enabled />
<script>
leveling function
game_turns_function
</script>
</turnscript><turnscript name="global_game_turns">
<enabled />
<script>
game_turn_function
leveling function
</script>
</turnscript>HegemonKhan wrote:Can you give some specific things that aren't working in your game, so we can work on fixing them, one thing at a time, it'd make it easier for me anyways, as it's hard to scour through your game, trying to figure out what you want done, and thus then looking for the problems that you have with doing the stuff you want done.
--------------
what's publically available so far, is what is publically available so far, lol. Be patient and hope others will provide more coding, or try to slowly learn to code on your own ~ making your own code (and share it with us... or keep it to yourself, but then you'll have to listen to new noobs asking for such coding too... lol) that you need for building~making your game. Libraries are blue prints, it's up to you to use them to build your own stuff, and asking people to code (ie make) your game, is asking quite a lot of them. Asking for more "in-depth" coding beyond a "blue print" library's coding, is basically asking them to code in your game for you... I'll try to do what I can to help, but it's a lot of work to help others, as I am also trying to work on learning more at coding for progressing on my own game making, on top of the busy-ness of my real world life, lol.
here's the link to the libraries: ( viewforum.php?f=18 )
check out these Libraries, in particular:
Hint Coding (Pixie): ( viewtopic.php?f=18&t=3802 )
Journal Coding (Pixie): ( viewtopic.php?f=18&t=2610 )
Shop Coding: ( viewtopic.php?f=18&t=2557 )
Score Coding: ( viewtopic.php?f=18&t=2627 )
and whatever you can find is this discussion forum, in its threads~posts, too.
--------------------
whether working with code or the GUI~Editor, both requires "code~computer logic" thinking~mindset of your brain, which isn't easy to shift your brain's thinking this way. The brain is far beyond non-organic circuitry, we have no clue that we're actually communicating just as a computer does, through the use of "ifs", ie Conditionals, (orc is not dead -> if orc is not dead -> then, fight with orc -> you kill orc ~hopefully~ and now it is "dead", lol -> try to fight with orc again -> if orc is dead -> and since the orc is indeed now dead -> then, you fail to fight with it, as it is dead) and "3-way handshakes" ( 1~"hi, and did you hear me?" -> 2~"yes, I heard you, you said, hi, correct?" -> 3~"yes, indeed, I said hi to you" -> 1~"ah, good, and now I'm saying hi back to you, and did you hear me say hi back to you? -> etc etc etc). But for computers, we've and they've got to literally spell this out to them and themselves as part of the communication, and that's~this' what we call "coding", hehe.
<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Mystic Mages">
<gameid>7b455ee2-72c1-42e0-a111-09eb20b79ca1</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<showhealth type="boolean">false</showhealth>
<showscore type="boolean">false</showscore>
<gridmap type="boolean">false</gridmap>
<start type="script">
intro_function
</start>
<onhealthzero type="script">
finish
</onhealthzero>
<object name="monsters">
<inherit name="editor_object" />
<inherit name="maleplural" />
<object name="zombie">
<inherit name="editor_object" />
<dead type="boolean">false</dead>
<dexterity type="int">1</dexterity>
<attack type="script"><![CDATA[
if (zombie.dead=false) {
if (RandomChance(50)) {
}
else if ("player.weapon " "><" "zombie.dexterity ") {
player_damage =
}
}
]]></attack>
<strength type="int">8</strength>
<intelligence type="int">-5</intelligence>
<health type="int">10</health>
</object>
<object name="spider">
<inherit name="editor_object" />
<strength type="int">3</strength>
<dexterity type="int">5</dexterity>
<intelligence type="int">4</intelligence>
<health type="int">8</health>
<dead type="boolean">false</dead>
</object>
<object name="necromancer">
<inherit name="editor_object" />
<intelligence type="int">8</intelligence>
<strength type="int">3</strength>
<dexterity type="int">4</dexterity>
<health type="int">13</health>
<dead type="boolean">false</dead>
</object>
<object name="maruader">
<inherit name="editor_object" />
<health type="int">12</health>
<strength type="int">4</strength>
<dexterity type="int">5</dexterity>
<intelligence type="int">5</intelligence>
<dead type="boolean">false</dead>
</object>
</object>
</game>
<object name="living room">
<alias>Cottage Home</alias>
<object name="upstairs">
<inherit name="editor_room" />
<alias>stairs</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<object name="bedroom1">
<inherit name="openable" />
<alias>your bedroom</alias>
<visible type="boolean">false</visible>
<beforefirstenter type="script">
</beforefirstenter>
<beforeenter type="script">
</beforeenter>
<object name="bed1">
<inherit name="editor_object" />
<alias>bed</alias>
</object>
<object name="dresser1">
<inherit name="editor_object" />
<inherit name="container_open" />
<alias>dresser</alias>
<isopen type="boolean">false</isopen>
<hidechildren type="boolean">false</hidechildren>
<listchildren />
<object name="gold_piece">
<inherit name="editor_object" />
<take />
<use type="boolean">false</use>
<usemenuprompt type="string"></usemenuprompt>
<alt type="stringlist">
<value>gold</value>
<value>money</value>
<value>cash</value>
<value>currency</value>
</alt>
<attr name="value_worth" type="script">
if (Got(gold_piece)) {
player.gold = player.gold + 5
}
else if (not Got(gold_piece)) {
player.gold = player.gold - 5
}
</attr>
<ontake type="script">
do (gold_piece, "value_worth")
</ontake>
<ondrop type="script">
player.gold = player.gold - 5
</ondrop>
<giveto type="scriptdictionary">
<item key="Jane">
</item>
</giveto>
</object>
</object>
<object name="closest">
<inherit name="openable" />
<dark />
</object>
<exit alias="hall" to="upstairs">
<inherit name="southeastdirection" />
</exit>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<statusattributes type="stringdictionary">
<item>
<key>strength</key>
<value></value>
</item>
<item>
<key>dexterity</key>
<value></value>
</item>
<item>
<key>intelligence</key>
<value></value>
</item>
<item>
<key>level</key>
<value></value>
</item>
<item>
<key>class</key>
<value></value>
</item>
<item>
<key>experience</key>
<value></value>
</item>
<item>
<key>turns</key>
<value></value>
</item>
<item>
<key>health</key>
<value></value>
</item>
<item>
<key>gold</key>
<value></value>
</item>
</statusattributes>
<strength type="int">0</strength>
<dexterity type="int">0</dexterity>
<intelligence type="int">0</intelligence>
<level type="int">0</level>
<class>mage; archer; warrior;</class>
<experience type="int">0</experience>
<turns type="int">0</turns>
<health type="int">0</health>
<dead type="boolean">false</dead>
<gold type="int">0</gold>
<fireball type="script">
if (player.class + result = "mage") {
player.intelligence = player.intelligence = player.fireball
}
</fireball>
<attr name="ice_blast" type="script">
if (player.class + result = "mage") {
player.intelligence = player.intelligence = player.ice_blast
}
</attr>
<attr name="lighting_bolt" type="script">
if (player.class + result = "mage") {
player.intelligence = player.intelligence = player.lighting_bolt
}
</attr>
<attr name="health_recharge" type="script">
if (player.class + result = "mage") {
player.intelligence = player.intelligence = player.health_regain
}
</attr>
<lighting type="string"></lighting>
<attr name="regain_health" type="string"></attr>
</object>
</object>
<object name="bedroom2">
<inherit name="openable" />
<alias>brothers room</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<visible type="boolean">false</visible>
<object name="bed">
<inherit name="editor_object" />
</object>
<object name="end table">
<inherit name="editor_object" />
</object>
<exit alias="hall" to="upstairs">
<inherit name="southwestdirection" />
</exit>
</object>
<exit alias="down" to="living room">
<inherit name="downdirection" />
</exit>
<exit alias="your room" to="bedroom1">
<inherit name="northwestdirection" />
<locked type="boolean">false</locked>
</exit>
<exit alias="brothers room" to="bedroom2">
<inherit name="northeastdirection" />
</exit>
</object>
<object name="kitchen">
<object name="den">
<inherit name="editor_room" />
<exit alias="up" to="kitchen">
<inherit name="updirection" />
</exit>
</object>
<exit alias="down" to="den">
<inherit name="downdirection" />
</exit>
<exit alias="east" to="living room">
<inherit name="eastdirection" />
</exit>
</object>
<exit alias="out" to="front lawn">
<inherit name="outdirection" />
</exit>
<exit alias="up" to="upstairs">
<inherit name="updirection" />
</exit>
<exit alias="west" to="kitchen">
<inherit name="westdirection" />
</exit>
<object name="chair">
<inherit name="editor_object" />
<sit type="script">
msg ("No time to sit got to get busy!")
</sit>
</object>
<object name="couch">
<inherit name="editor_object" />
<sit>No time to lounge got to get busy!</sit>
</object>
</object>
<object name="restroom">
<alias>outhouse</alias>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<dark />
<object name="sink">
<inherit name="editor_object" />
</object>
<exit alias="southeast" to="front lawn">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="front lawn">
<inherit name="editor_room" />
<exit alias="in" to="living room">
<inherit name="indirection" />
</exit>
<exit alias="northwest" to="restroom">
<inherit name="northwestdirection" />
</exit>
<exit alias="south" to="road">
<inherit name="southdirection" />
</exit>
<object name="npc">
<inherit name="editor_object" />
<alias>oldman</alias>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>Its an oldman with long white beard and old ratty clothes.</look>
<speak type="script">
firsttime {
questions1 = NewStringList()
list add (questions1, "yes")
list add (questions1, "no")
ShowMenu ("Will you do me a favor?", questions1, false) {
if (result="yes") {
msg ("Oh thank you child, my bones can't carry me that far.")
msg ("Here! Take this orb to Jane at the Village Inn.")
MoveObject (orb, player)
msg ("Return to me and I will give you the potion.")
set (Jane, "orbtask", true)
}
else if (result="no") {
msg ("Maybe tommorow then.")
}
}
}
otherwise {
if (Jane.orbtask = true) {
msg ("You will have your reward as soon as Jane gets the orb..")
}
else if (Jane.orbtask = false) {
msg ("Thank you so much. Here you go!")
MoveObject (exp potion, player)
}
msg ("Hello beautiful day!")
}
</speak>
<object name="orb">
<inherit name="editor_object" />
<take />
<look>Its a shiny black orb..</look>
<givesingle />
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
</displayverbs>
<inventoryverbs type="stringlist">
<value>Look at</value>
<value>Drop</value>
</inventoryverbs>
<givemenuprompt>Jane</givemenuprompt>
</object>
<object name="exp potion">
<inherit name="editor_object" />
<take />
<drink type="script">
player.experience = player.experience + 15
RemoveObject (exp potion)
</drink>
</object>
</object>
</object>
<object name="humble way">
<inherit name="editor_room" />
<object name="village square">
<object name="guild hall">
<object name="achers guild">
<object name="allen the archer">
<inherit name="editor_object" />
<inherit name="namedmale" />
</object>
<exit alias="southeast" to="guild hall">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="mage guild">
<object name="maggie the mage">
<inherit name="editor_object" />
<inherit name="namedfemale" />
</object>
<exit alias="southwest" to="guild hall">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="warrior guild">
<object name="larry the warrior">
<inherit name="editor_object" />
<inherit name="namedmale" />
</object>
<exit alias="northeast" to="guild hall">
<inherit name="northeastdirection" />
</exit>
</object>
<exit alias="down" to="village square">
<inherit name="downdirection" />
</exit>
<exit alias="northwest" to="achers guild">
<inherit name="northwestdirection" />
</exit>
<exit alias="northeast" to="mage guild">
<inherit name="northeastdirection" />
</exit>
<exit alias="southwest" to="warrior guild">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="general store">
<object name="tom">
<inherit name="editor_object" />
<inherit name="namedmale" />
</object>
<object name="tent">
<inherit name="editor_object" />
</object>
<object name="bedroll">
<inherit name="editor_object" />
</object>
<object name="flask">
<inherit name="editor_object" />
</object>
<object name="rations">
<inherit name="editor_object" />
</object>
<exit alias="northwest" to="village square">
<inherit name="northwestdirection" />
</exit>
</object>
<object name="village square inn">
<exit alias="southwest" to="village square">
<inherit name="southwestdirection" />
</exit>
<object name="front desk">
<inherit name="editor_object" />
<inherit name="container_open" />
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<close type="boolean">false</close>
<isopen />
<open type="boolean">false</open>
<onopen type="script">
MakeObjectVisible (Jane)
</onopen>
<object name="Jane">
<inherit name="editor_object" />
<inherit name="namedfemale" />
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<orbtask type="boolean">false</orbtask>
<speak type="script">
questions = NewStringList()
list add (questions, "yes")
list add (questions, "no")
ShowMenu ("Would you like a room today only 5G?", questions, false) {
msg ("-" + result)
if (result="yes") {
if (Got(gold_piece)) {
MoveObject (gold_piece, Jane)
if (not Got(gold_piece)) {
player.gold = player.gold - 5
msg ("Enjoy your stay!")
MoveObject (key, player)
room_renting
}
}
}
else if (result="no") {
msg ("Ok thank you have a nice day.")
}
}
</speak>
<give type="scriptdictionary">
<item key="orb">
MoveObject (orb, Jane)
set (Jane, "orbtask", false)
msg ("Thank you so much!")
</item>
<item key="gold_piece">
MoveObject (key, player)
</item>
</give>
<object name="key">
<inherit name="editor_object" />
<alt type="stringlist">
<value>door</value>
</alt>
<inventoryverbs type="stringlist">
<value>Look at</value>
</inventoryverbs>
<displayverbs type="stringlist">
<value>Look at</value>
</displayverbs>
<look>It has a peep hole and the #1 on the front of the door.</look>
<selfuseon type="scriptdictionary">
<item key="room1">
UnlockExit (room_key)
</item>
</selfuseon>
</object>
</object>
</object>
<object name="room1">
<inherit name="container_open" />
<inherit name="container_lockable" />
<locked />
<canlockopen type="boolean">false</canlockopen>
<isopen type="boolean">false</isopen>
<key type="object">key</key>
<onunlock type="script">
</onunlock>
<goto type="script">
if (room1.locked = false) {
MoveObject (player, room1)
}
else if (room1.locked = true) {
msg ("Door is locked you need a room key!")
}
else if (not Contains (player,key)) {
msg ("You can't go in with out a key..")
}
</goto>
<exit alias="southeast" to="village square inn">
<inherit name="southeastdirection" />
</exit>
<object name="bed2">
<inherit name="editor_object" />
<alias>bed</alias>
<attr name="lay_down" type="script">
MoveObject (player, bed2)
EnableTimer (sleep_timer)
</attr>
</object>
<object name="night_stand">
<inherit name="editor_object" />
</object>
</object>
<object name="room2">
<inherit name="container_open" />
<inherit name="container_lockable" />
<isopen type="boolean">false</isopen>
<exit alias="south" to="village square inn">
<inherit name="southdirection" />
</exit>
</object>
<object name="room3">
<inherit name="container_open" />
<inherit name="container_lockable" />
<isopen type="boolean">false</isopen>
<exit alias="southwest" to="village square inn">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="room4">
<inherit name="container_open" />
<inherit name="container_lockable" />
<isopen type="boolean">false</isopen>
<exit alias="west" to="village square inn">
<inherit name="westdirection" />
</exit>
</object>
<exit alias="out" to="village square">
<inherit name="outdirection" />
</exit>
</object>
<exit alias="out" to="humble way">
<inherit name="outdirection" />
</exit>
<exit alias="up" to="guild hall">
<inherit name="updirection" />
</exit>
<exit alias="in" to="village square inn">
<inherit name="indirection" />
</exit>
<exit alias="southeast" to="general store">
<inherit name="southeastdirection" />
</exit>
<exit alias="southwest" to="blacksmith">
<inherit name="southwestdirection" />
</exit>
</object>
<exit alias="north" to="light forest">
<inherit name="northdirection" />
</exit>
<exit alias="in" to="village square">
<inherit name="indirection" />
</exit>
</object>
<object name="forest way">
<inherit name="editor_room" />
<object name="forest trail">
<inherit name="editor_room" />
<object name="light forest">
<object name="thick forest">
<object name="dark forest">
<exit alias="northwest" to="woods2">
<inherit name="northwestdirection" />
</exit>
</object>
<exit alias="east" to="light forest">
<inherit name="eastdirection" />
</exit>
<exit alias="northeast" to="woods2">
<inherit name="northeastdirection" />
</exit>
<exit alias="southwest" to="trail1">
<inherit name="southwestdirection" />
</exit>
</object>
<exit alias="north" to="woods2">
<inherit name="northdirection" />
</exit>
<exit alias="west" to="woods5">
<inherit name="westdirection" />
</exit>
<exit alias="south" to="humble way">
<inherit name="southdirection" />
</exit>
</object>
<exit alias="southeast" to="woods1">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="woods1">
<inherit name="editor_room" />
<exit alias="northeast" to="woods">
<inherit name="northeastdirection" />
</exit>
</object>
<object name="woods2">
<inherit name="editor_room" />
<exit alias="west" to="woods">
<inherit name="westdirection" />
</exit>
<exit alias="southwest" to="thick forest">
<inherit name="southwestdirection" />
</exit>
<exit alias="south" to="light forest">
<inherit name="southdirection" />
</exit>
</object>
<object name="woods">
<inherit name="editor_room" />
<exit alias="southwest" to="woods1">
<inherit name="southwestdirection" />
</exit>
<exit alias="east" to="woods2">
<inherit name="eastdirection" />
</exit>
<exit alias="northwest" to="forest way">
<inherit name="northwestdirection" />
</exit>
</object>
<exit alias="north" to="roadway1">
<inherit name="northdirection" />
</exit>
<exit alias="southeast" to="woods">
<inherit name="southeastdirection" />
<runscript type="boolean">false</runscript>
</exit>
</object>
<object name="road">
<exit alias="north" to="front lawn">
<inherit name="northdirection" />
</exit>
<object name="roadway1">
<exit alias="east" to="road">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="forest way">
<inherit name="southdirection" />
</exit>
</object>
<object name="roadway2">
<exit alias="west" to="road">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="traders route">
<inherit name="eastdirection" />
</exit>
</object>
<exit alias="west" to="roadway1">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="roadway2">
<inherit name="eastdirection" />
</exit>
<exit alias="south" to="road">
<inherit name="southdirection" />
<lookonly />
<look>A mass of forest sits theres but it looks a little thin in spots.</look>
</exit>
</object>
<object name="trail1">
<inherit name="editor_room" />
<exit alias="northeast" to="thick forest">
<inherit name="northeastdirection" />
</exit>
<exit alias="south" to="trail2">
<inherit name="southdirection" />
</exit>
<exit alias="southeast" to="woods4">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="trail2">
<inherit name="editor_room" />
<exit alias="north" to="trail1">
<inherit name="northdirection" />
</exit>
<exit alias="southeast" to="Mystical Mage">
<inherit name="southeastdirection" />
</exit>
<exit alias="west" to="woods3">
<inherit name="westdirection" />
</exit>
</object>
<object name="woods3">
<inherit name="editor_room" />
<exit alias="east" to="trail2">
<inherit name="eastdirection" />
</exit>
</object>
<object name="woods4">
<inherit name="editor_room" />
<exit alias="northwest" to="trail1">
<inherit name="northwestdirection" />
</exit>
</object>
<object name="woods5">
<inherit name="editor_room" />
<exit alias="east" to="light forest">
<inherit name="eastdirection" />
</exit>
</object>
<object name="Mystical Mage">
<inherit name="editor_room" />
<exit alias="northwest" to="trail2">
<inherit name="northwestdirection" />
</exit>
</object>
<object name="blacksmith">
<inherit name="editor_room" />
<exit alias="northeast" to="village square">
<inherit name="northeastdirection" />
</exit>
</object>
<object name="traders route">
<inherit name="editor_room" />
<exit alias="west" to="roadway2">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="traders route 1">
<inherit name="eastdirection" />
</exit>
</object>
<object name="traders route 1">
<inherit name="editor_room" />
<exit alias="west" to="traders route">
<inherit name="westdirection" />
</exit>
<exit alias="east" to="traders route 2">
<inherit name="eastdirection" />
</exit>
</object>
<object name="traders route 2">
<inherit name="editor_room" />
<exit alias="west" to="traders route 1">
<inherit name="westdirection" />
</exit>
<exit alias="northeast" to="traders square">
<inherit name="northeastdirection" />
</exit>
</object>
<object name="traders square">
<inherit name="editor_room" />
<exit alias="southwest" to="traders route 2">
<inherit name="southwestdirection" />
</exit>
<exit alias="in" to="traders market">
<inherit name="indirection" />
</exit>
</object>
<object name="traders market">
<inherit name="editor_room" />
<exit alias="out" to="traders square">
<inherit name="outdirection" />
</exit>
<exit alias="northwest" to="traders hall">
<inherit name="northwestdirection" />
</exit>
<exit alias="southwest" to="traders pub">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="traders hall">
<inherit name="editor_room" />
<exit alias="southeast" to="traders market">
<inherit name="southeastdirection" />
</exit>
</object>
<object name="gambling hall">
<inherit name="editor_room" />
</object>
<object name="traders pub">
<inherit name="editor_room" />
<exit alias="northeast" to="traders market">
<inherit name="northeastdirection" />
</exit>
</object>
<turnscript name="global_game_turns">
<enabled />
<script>
game_turn_function
leveling function
</script>
</turnscript>
<verb>
<property>givejane</property>
<pattern>givejane</pattern>
<defaultexpression>"You can't givejane " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>goto</property>
<pattern>goto</pattern>
<defaultexpression>"You can't goto " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>lay_down</property>
<pattern>lay_down</pattern>
<defaultexpression>"You can't lay_down " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>attack</property>
<pattern>attack</pattern>
<defaultexpression>"You can't attack " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>use_spell</property>
<pattern>use_spell</pattern>
<defaultexpression>"You can't use_spell " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>lighting</property>
<pattern>lighting</pattern>
<defaultexpression>"You can't lighting " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>regain_health</property>
<pattern>regain_health</pattern>
<defaultexpression>"You can't regain_health " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>fireball</property>
<pattern>fireball</pattern>
<defaultexpression>"You can't fireball " + object.article + "."</defaultexpression>
</verb>
<verb>
<property>ice_blast</property>
<pattern>ice_blast</pattern>
<defaultexpression>"You can't ice_blast " + object.article + "."</defaultexpression>
</verb>
<function name="intro_function">
msg ("A vast land where monsters roam and evil lurks, the people of Villagoplia thrive to survive in these troubled lands. Lives lost and wars raged but we still live they will conquer us and we will not lye down and die.....")
msg ("......................................................................................................................")
msg ("......................................................")
wait {
msg ("Whats your name?")
get input {
msg ("Hello " + result)
genderlist = NewStringList()
list add (genderlist, "male")
list add (genderlist, "female")
ShowMenu ("Whats your gender?", genderlist, false) {
player.gender = result
classlist = NewStringList()
list add (classlist, "mage")
list add (classlist, "warrior")
list add (classlist, "archer")
ShowMenu ("What class would you like to be?", classlist, false) {
player.class = result
msg ("You are a " + result)
if (result="mage") {
mage class
}
else if (result="warrior") {
warrior class
}
else if (result="archer") {
archer class
}
}
}
}
}
</function>
<function name="warrior class">
player.strength = player.strength + 3
player.dexterity = player.dexterity + 2
player.intelligence = player.intelligence + 1
player.health = player.health + 18
</function>
<function name="archer class">
player.intelligence = player.intelligence + 1
player.dexterity = player.dexterity + 3
player.strength = player.strength + 2
player.health = player.health + 14
</function>
<function name="mage class">
player.dexterity = player.dexterity + 2
player.strength = player.strength + 1
player.intelligence = player.intelligence + 3
player.health = player.health + 10
do (player, "spells")
</function>
<function name="leveling function"><![CDATA[
if (player.experience >= player.level * 15 + 15) {
player.experience = player.experience - (player.level * 15 + 15)
player.level = player.level + 1
switch (player.gender) {
case ("male") {
player.strength = player.strength + 1
player.dexterity = player.dexterity + 1
player.health = player.health + 2
}
case ("female") {
player.intelligence = player.intelligence + 1
player.dexterity = player.dexterity + 1
player.health = player.health + 1
}
}
switch (player.class) {
case ("warrior") {
player.strength = player.strength + 2
player.intelligence = player.intelligence + 1
player.dexterity = player.dexterity + 1
player.health = player.health + 6
}
case ("mage") {
player.intelligence = player.intelligence + 2
player.dexterity = player.dexterity + 1
player.strength = player.strength + 1
player.health = player.health + 2
}
case ("archer") {
player.intelligence = player.intelligence + 1
player.deterity = player.dexterity + 2
player.strength = player.strength + 1
player.health = player.health + 4
}
}
leveling function
}
]]></function>
<function name="fight function">
</function>
<function name="game_turn_function">
player.turns = player.turns + 1
</function>
<function name="room_renting">
if (Got(key)) {
EnableTimer (room_timer)
}
else if (Contains (Jane,key)) {
set (room1, "locked", true)
DisableTimer (room_timer)
}
</function>
<timer name="room_timer">
<interval>120</interval>
<script>
MoveObject (key, Jane)
if (game.pov.parent = room1) {
MoveObject (player, village square inn)
HelperCloseObject (room1)
}
DisableTimer (room_timer)
</script>
</timer>
<timer name="sleep_timer">
<interval>30</interval>
<script>
msg ("YAWNNN!! That was a good rest!")
MoveObject (player, room1)
player.health = player.health + 5
DisableTimer (sleep_timer)
</script>
</timer>
</asl><function name="leveling_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.level = game.pov.level + 1
leveling_function
}
]]></function>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) {
self_battle_turn_function
} else {
enemy_battle_turn_function
}if (RandomChance (GetInt (enemy,"agility") - GetInt (self,"speed")) = true) {
msg (enemy.alias + "evaded your attack!")
}if (RandomChance (GetInt (enemy,"dexterity") - GetInt (self,"agility")) = true) {
msg (enemy.alias + "parried your attack!")
}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) {
// you're attacking the enemy for damage
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
}
}
<function name="critical_hit_function" parameters="target" type="int">
if (RandomChance (GetInt (target,"luck")) = true) {
value = 2
} else {
value = 1
}
return (value)
</function><library>
<!-- New Game Code -->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="HK's more recent combat code">
<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="defaultplayer" />
</object>
</object>
</asl>
<!-- Game Object -->
<game name="HK's more recent combat code">
<gameid>bbc85c01-6e80-4a71-8abf-c1e870fb5b42</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<turns type="int">0</turns>
</game>
<!-- Player Objects -->
<object name="player">
<inherit name="editor_object" />
<inherit name="defaultplayer" />
<inherit name="character_object_type" />
<alias>HK</alias>
<current_health_points type="int">999</current_health_points>
<maximum_health_points type="int">999</maximum_health_points>
<current_mana_points type="int">99</current_mana_points>
<maximum_mana_points type="int">99</maximum_mana_points>
<strength type="int">100</strength>
<endurance type="int">100</endurance>
<dexterity type="int">100</dexterity>
<agility type="int">100</agility>
<speed type="int">100</speed>
<intelligence type="int">100</intelligence>
<spirituality type="int">100</spirituality>
<mentality type="int">100</mentality>
<piety type="int">100</piety>
<luck type="int">100</luck>
</object>
<!-- Hostile NPC Objects -->
<object name="orc_1">
<inherit name="editor_object" />
<inherit name="character_object_type" />
<alias>orc child</alias>
<current_health_points type="int">999</current_health_points>
<maximum_health_points type="int">999</maximum_health_points>
<current_mana_points type="int">99</current_mana_points>
<maximum_mana_points type="int">99</maximum_mana_points>
<strength type="int">25</strength>
<endurance type="int">25</endurance>
<dexterity type="int">25</dexterity>
<agility type="int">25</agility>
<speed type="int">25</speed>
<intelligence type="int">25</intelligence>
<spirituality type="int">25</spirituality>
<mentality type="int">25</mentality>
<piety type="int">25</piety>
<luck type="int">25</luck>
<experience_points type="int">100</experience_points>
<cash type="int">50</cash>
</object>
<!-- 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>
<defending type="boolean">false</defending>
<experience_points type="int">0</experience_points>
<cash type="int">0</cash>
<level type="int">0</level>
<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
leveling_function
global_game_turns_function
</turnscript>
<!-- Commands -->
<command name="fight_command">
<pattern>fight #text#</pattern>
<script>
fight_function (game.pov,text)
</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) {
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){
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){
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
}
}
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
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="leveling_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.level = game.pov.level + 1
level_up_function
}
]]></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>
</library>
onimike wrote:I think it would be great if I knew exactly where to input a code at then I could just fiddle around with some already posted codes
<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="defaultplayer" />
</object>
</object>
</asl><asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<include ref="name_of_the_library_file_that_you_want_to_add_to_this_game_of_yours.aslx" />
// for example... Pixie's Combat Library File: CombatLibrary1.aslx
// <include ref="CombatLibrary1.aslx" />
// lastly, you can add as many libraries as you want, there's no limit on them, though getting them all to work~sync together will be a problem~challenge... lol
<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="defaultplayer" />
</object>
</object>
</asl>onimike wrote:Also want the combat to go off of stats not just attack for instance ( using str vs str in melee combat, dex vs dex in ranged combat such as bows int vs int vs spells/magic like abilities) I do know how to jut use the randomchance50 but want it to actually add in the stat difference so it leans toward the highest stat rather it just being 50% possibility of either or. If Possible!
within the "fight" verb with the final boss, his "battle_turn_scripting" chunk of code:
result_x = GetRandomInt (0, 3)
switch (result_x) {
case (0) {
// attack scripts~coding
msg ("the final boss physically attacks you with his tainted cursed black humongous bloody deadly decapitation axe!")
}
case (1) {
// casting damage spells scripts~coding
msg ("the final boss casts his ultimate spell 'oblivion' upon you... gulp!")
}
case (2) {
// casting heal spells scripts~coding
msg ("the final boss casts his ultimate healing spell, he is back to full hit points!")
}
case (3) {
// vulnerability coding
msg ("the final boss is finally temporarily vulnerable, now you can do damage to him! Kick his butt like the fate of the world depends upon it!")
}
}
onimike.hit_points = onimike.hit_points + GetRandomInt (GetInt (onimike, "spirituality"), GetInt (onimike, "intelligence") + GetInt (onimike, "spirituality") + GetInt (onimike, "mentality"))
the code probably won't work, but meh, it's an example of how it can be usedHegemonKhan wrote:I just made a new thread, a guide on starting building a combat script block:
viewtopic.php?f=10&t=3872
it's very noob-friendly: STEP BY STEP IN THE GUI~EDITOR
it took me some effort and time, so hopefully you'll be appreciative, and hopefully it'll be actually helpful too, lol, hehe
onimike wrote:Wish there was a program with every tab, button, verb, combat, etc. needed to run any basic rpg or rpg type game because doing most of it became very apparent to me but for some reason I had a heck of a time with this lol.