Difference between pages "ASSEMBLIES ASSEMBLY ASSEMBLE MAKE BAKE BREW CRAFT FLETCH KNIT MIX THATCH W" and "EXPRESSIONS TRIGEDIT-EXPRESSIONS INCREMENTS MATHEMATICAL /="

From 4Dimensions
(Difference between pages)
Jump to: navigation, search
m
 
m
 
Line 1: Line 1:
'''ASSEMBLIES ASSEMBLY ASSEMBLE MAKE BAKE BREW CRAFT FLETCH KNIT MIX THATCH W'''
+
'''EXPRESSIONS TRIGEDIT-EXPRESSIONS INCREMENTS MATHEMATICAL /= || \'''
 
[[Category:Help Files]]
 
[[Category:Help Files]]
 
[[Category:Building]]
 
[[Category:Building]]
  
With the assembly code, quests and crafts allow for items to be assembled,  
+
A false expression is any expression that evaluates to 0, or an empty string.
  
baked, brewed, crafted, fletched, knitted, made, mixed, thatched, weaved or
+
A true expression is any expression that evaluates to anything other than a
  
forged out of various other items.
+
false expression. The following list are the recognized operators. The higher
  
The assembly still requires a script, which can be put on objects/mobs/rooms.  
+
the operator is on the list, the higher the precedence. The expression is
  
The same script will also be added in the assembly itself.  
+
evaluated from left to right. Parenthesis can be used to group.  
  
Keep in mind that you can NOT set the script on an item that will be purged.
 
  
 +
<pre>
 +
|Operator|        Name          | Examples  0=False 1=True  |
 +
--------------------------------------------------------------
  
* First you must create all the objects that you'll require for the assembly.
+
|  ||  | logical or            | 0 || ( ) = 0; 5 || 0 = 1  |
* assedit new <vnum of the new assemblied item> -> will set up a new assembly
 
* assedit <vnum of the new assemblied item> -> will allow you to specify the
 
*; assembly.
 
* assedit delete <vnum> -> to delete an assembly
 
  
T) Here you well set the kind of assembly: assemble, bake, brew, craft, fletch,
+
|  &&  | logical and          | 1 && 0 = 0; 5 && 3 = 1    |
  
knit, make, mix, thatch, weave or forge.
+
|  ==  | equivalence          | 5 == 3 = 0; dog == DoG = 1|
  
S) Here comes the vnum of the script - this script should also be added to
+
|  !=  | inequality            | 0 != Z = 0; dog != d = 1  |
  
an object/room/mob, but can not be put on an item that will be purged.
+
|  <    | less than            | 4 < 3 = 0; 4 < 5 = 1      |
  
 +
|  >    | greater than          | 4 > 3 = 1; 4 > 4 = 0      |
  
 +
|  <=  | less than or equal    | 4 <= 3 = 0; 4 <= 5 = 1    |
  
A) Allows you to set all the needed components to make the new assemblied item.
+
|  >=  | greater than or equal | 4 >= 3 = 1; 4 >= 4 = 1    |
  
E) In the edit you can determine, what components will remain, which ones will
+
|  /=  | substring            | "concatenate" /= "cat"    |
  
disappear and where they have to be (player's inventory or in the room.)
+
|  -    | subtraction          | 15 - 10 = 5              |
  
D) Delete one of the added components.
+
|  +    | addition              | 10 + 15 = 25              |
  
Q) Quit the assembly editor.
+
|  *    | multiplication        | 10 * 20 = 400            |
  
 +
|  /    | division              | 100 / 20 = 5              |
  
Once the player activates the assembly, and has the right components, the
+
|  !    | negation              | !() = 1; !0 = 1; !dog = 0;|
  
new assemblied item will appear in the players inventory.
+
--------------------------------------------------------------
 +
</pre>
  
  
In the script you must add the following line:
+
Example: {cRTSTAT 63{c0
 
 
* if %actor.assemblycheck(vnum of the new assemblied item)%
 
this will check if the actor has every needed component.
 
 
 
If files get transfered from one port to another, the assembly will have
 
 
 
to be readded to the port the files have been transfered too.
 
 
 
 
 
Seeing the transfer of files causes too much trouble, {cRPlease refrain from
 
 
 
using assemblies.{cx
 

Latest revision as of 11:25, 14 July 2017

EXPRESSIONS TRIGEDIT-EXPRESSIONS INCREMENTS MATHEMATICAL /= || \

A false expression is any expression that evaluates to 0, or an empty string.

A true expression is any expression that evaluates to anything other than a

false expression. The following list are the recognized operators. The higher

the operator is on the list, the higher the precedence. The expression is

evaluated from left to right. Parenthesis can be used to group.


|Operator|         Name          | Examples  0=False 1=True  |
--------------------------------------------------------------

|   ||   | logical or            | 0 || ( ) = 0; 5 || 0 = 1  |

|   &&   | logical and           | 1 && 0 = 0; 5 && 3 = 1    |

|   ==   | equivalence           | 5 == 3 = 0; dog == DoG = 1| 

|   !=   | inequality            | 0 != Z = 0; dog != d = 1  | 

|   <    | less than             | 4 < 3 = 0; 4 < 5 = 1      |

|   >    | greater than          | 4 > 3 = 1; 4 > 4 = 0      |

|   <=   | less than or equal    | 4 <= 3 = 0; 4 <= 5 = 1    |

|   >=   | greater than or equal | 4 >= 3 = 1; 4 >= 4 = 1    |

|   /=   | substring             | "concatenate" /= "cat"    |

|   -    | subtraction           | 15 - 10 = 5               |

|   +    | addition              | 10 + 15 = 25              |

|   *    | multiplication        | 10 * 20 = 400             |

|   /    | division              | 100 / 20 = 5              |

|   !    | negation              | !() = 1; !0 = 1; !dog = 0;| 

--------------------------------------------------------------


Example: {cRTSTAT 63{c0