This is out of date

Live Features

  • Thread Control
    • %threadid%
      • Returns the current ID of a thread, which is a record with the following fields:
        • entity: a reference to the thing the thread is running on
        • thread: an id number for a thread unique to the entity
    • killthread
      • Stops the specified script thread
  • 64 bit
    • The script engine now uses 64 bit math; this allows for a MUCH greater range of numbers ( > 2 billion, < -2 billion) and more accuracy in decimal math
  • New xor logic
    • A ^^ B
    • "true" if either A or B is true, but not if both are true
  • Bitwise logic
    • New bitwise operators &, |, ^, <<, >>
    • "val1 & val2" returns an intersection of the bits of val1 and val2 (only the bits that are set in both values)
    • "val1 | val2" returns a union of the bits of val1 and val2 (a combination of all set bits in both balues)
    • "val1 ^ val2" returns an exclusive union of the bits of val1 and val2 (only the bits that are set in either value but not both)
    • "val1 << val2" shifts the bits of val1 left by val2 bits
    • "val1 >> val2" shifts the bits of val1 right by val2 bits
    • NEW ~ unary operator (~value) inverts the bits of the value
  • Allowing ~ as a character in all editable text
  • Filters
    • %var.filter(FILTER SPEC)%
    • A list may be filtered as a series of values, objects, or records, with a comparison to another value. Anything not matching the filter is discarded.
    • Example: %self.room.people.filter("race == Alien")%
    • This would return a list of characters in the room that are Aliens
  • Threading a function onto an object
    • thread <target> Function(args)
    • A function in a script may be 'threaded' onto another object, that is, a new script is created on the target object, and it starts executing the function. When the function ends or halts, the script disappears. This is similiar to attaching a script to an object and then 'calling' that script, without the need to create a second script.
    • Functions in imported scripts can be threaded onto an object as well
  • Function arguments
    • Now a function definition can include the list of variables to fill in based on the comma-separated arguments passed to it:
    • function Func(var1, var2, var3)
    • calling Func like: %Func(foo, bar, baz 45)% will fill in the variables as such:
      • var1 = foo
      • var2 = bar
      • var3 = baz 45
      • arg is NOT set, any excess parameters passed would be ignored
    • A function with no ( ) in it's definition will still get %arg%
    • A function with ( ) but no variables in the list will NOT get %arg%, it will not get any variables set
    • No variable name, like: function Func(var1, , var3) will work, with the middle paramter ignored (that is, the results will be the same as above; var1 = foo, var3 = baz 45, var2 will not exist)
  • Constant Data
    • constant <varname> <value>
    • Just like a variable! However, it cannot be set. If you do set it, you are merely creating a new local/global that overrides it.
    • Accessible like a function, within the current script (including functions), and anything in the script that imports it
  • %players% - returns a list of all live connected sockets
  • clan() returns a record of clan data
    • NEW Returns list of allies
  • Hexadecimal and octal numbers supported through most of the script engine
  • room.newexit(dir) returns the new-format exit data
  • value.paramfind(match) finds a matching parameter
  • object.gun returns an object's gun data as a record
  • character.bonusarmor returns bonus armor of a character
  • send, echo, echoaround, echoaround2 can take optional +sleeping argument to also send to sleeping characters
  • inc/increment and dec/decrement variable commands added
  • endcombat renamed stopcombat
  • Behavior Sets
    • A "Set" of scripts and predefined variables that an object/mob/room can inherit from, without having to manually set the scripts/variables on the object. When the set is modified, all of the objects that use that set will be updated properly.
  • NEW oset command to alter object variables
  • NEW text.splat(num) - given the text string, repeat it num times.
    • Example: %foo.splat(3)% - repeats contents of %foo% 3 times. %string("BLAM!").splat(4)% produces "BLAM!BLAM!BLAM!BLAM!"
  • NEW list.intersection(list2) - given list and list2, produces a list of words that are common to both
  • NEW mob kill trigger - functions like obj kill trigger, triggers whenever the mob kills something

Planned

  • Specifically saved variables
    • SAVE-VARIABLES flag will go away, and only variables that are marked as saving, will save
  • Persistent Data storage/retrieval

-- FearItself - 20 Feb 2006

Topic revision: r10 - 28 Feb 2008 - 17:27:25 - FearItself
Lexiscript.LexiScriptNewFeatures moved from Core.LexiScriptNewFeatures on 24 Sep 2006 - 01:33 by FearItself - put it back
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback