sandyrepope Apprentice Adventurer
   Age : 60 Joined : 10 Jun 2008 Posts : 35
 | Subject: understanding carriedX Thu Jul 31, 2008 9:41 pm | |
| I've looked in the language.txt file and have been trying to understand the carriedX.
Could someone explain how this is to be used?
Thanks Sandy |
|
catventure Admin Adventurer

   Age : 56 Joined : 08 Jun 2008 Posts : 132 Location : UK Humor : Enjoys a laugh!
 | Subject: Re: understanding carriedX Fri Aug 01, 2008 10:36 am | |
| Hi Sandy,
CONDITIONS
carriedX notcarrX
Check if a particular object is carried by player or not carried by player
X = object number
Object 5 = a sword
Character 1 = a creature
Example usage:
attack creature with sword#charpresent1#carried5[acts]cmessYou swing the sword and swiftly decapitate the creature. It is dead.#charloc1=0#else#charpresent1#notcarr5[acts]cmessBut you aren't holding a sword![end]
This translates as: IF character 1 (the creature) is present AND the sword is carried THEN kill the creature and remove it from game (set its location to 0) ELSE IF the creature is here but the sword is not carried THEN tell the player via a cmess action...
There are also companion commands:
objlocn1=carried - is objn1 carried? objlocn2=carried objlocn1=notcarried - is objn1 not carried? objlocn2=notcarried
Here is a further example which could follow the above one:
attack %charn1% with %objn2%#charpresentn1#objlocn2=carried[acts]cmessYou attack %charname1% with the %objn2%. It didn't seem to have any effect...#else#charpresentn1#objlocn2=notcarried[acts]cmessBut you aren't holding a %objn2%![end]
This will trigger if the player tries to attack ANY valid character with ANY valid object providing the character is present and will produce a different reply depending on if the object in question is carried or not carried.
catventure _________________ http://tab.thinbasic.com ; Home of the TAB I.F. project. |
|