====== Log of changes affecting lua scripting API including changes to prog triggers. ====== ===== 3/21/2016 ===== - Add CH.ascents and CH.subclass. ===== ===== ===== 3/15/2016 ===== - Global log() no longer takes format arguments. - log() now has optional 2nd argument to send to wiznet. ===== 3/14/2016 ===== - Add oprog command trigger (Bobble). ===== 2/14/2016 ===== - Add oprog merge trigger. ===== 2/10/2016 ===== - Add CH.savesphys, CH.savesmagic. ===== 2/7/2016 ===== - Add db.exec(), db.escape(), db.libversion(). - Add CH.godname, CH.religionrank, CH.faith. ===== 10/26/2015 ===== - Remove OBJ:wear() and OBJPROTO:wear(). - Add OBJ.weartype and OBJPROTO.weartype. ===== 10/19/2015 ===== - Add oprog death trigger. ===== 10/10/2015 ===== - Add CH.dicenumber and CH.dicetype. ===== 10/5/2015 ===== - Add CH:setoffensive(). - Adjust all EXIT methods with side effects to security 1 (from 0). ===== 9/27/2015 ===== - Recall now honors aprog enter, aprog renter, and rprog enter triggers. - gtransfer() returns false if transfer failed for any CH. - Gate spell now honors rprog exit trigger. - Summon spell now honors rprog exit, aprog rexit, aprog exit, aprog enter, aprog renter, rprog enter triggers. - Teleport spell now honors rprog exit, aprog rexit, aprog exit, aprog enter, aprog renter, rprog enter triggers. - Word of recall spell now honors rprog exit, aprog rexit, aprog exit, aprog enter, aprog renter, rprog enter triggers. - Transfer() and gtransfer() now honors rprog exit, aprog rexit, aprog exit triggers (already honored aprog enter, aprong renter, rprog enter, oprog greet, mprog greet). - Fixed order of trigger processing when entering portals. Add check for oprog move trigger. - Added area scoped 'shared' table. ===== 9/26/2015 ===== - Add prereset and postreset triggers for area and room progs. ===== 8/9/2015 ===== - Add oprog move trigger. ===== 5/10/2015 ===== - OBJ.weapontype settable ===== 4/26/2015 ===== - Add global awardptitle() - CH.questpoints settable. - Add CH.ptitle and CH.ptitles. ===== 4/1/2015 ===== - Add CH.waitcount and CH.stopcount. ===== 3/29/2015 ===== - Add 'rest' and 'sleep' oprog triggers. ===== 2/5/2015​ ===== - arguments() global is now security 0 (was NOSCRIPT). ===== 1/27/2015 ===== - Add forceget() and forceset() global functions. - Add start_con_handler() global function. ===== 1/23/2015 ===== - Make OBJ.attacktype settable. - Add OBJ:setweaponflag(). ===== 1/22/2015 ===== - Add CH.master and CH.leader. - Replace CH:gecho() with global gecho(). ===== 1/14/2015 ===== - Add purge() and reset() to ROOM and AREA. ===== 1/10/2015 ===== - Add BOSSACHV and BOSSREC types (for boss achievements). ===== 1/7/2015 ===== - Add aprog connect trigger. - Add rprog connect trigger. - Add global gettime(). ===== 1/2/2015 ===== - Add OBJ:setexitflag ===== 12/23/2014 ===== - Add oprog drink trigger. ===== 12/1/2014 ===== - CH.hitroll and CH.damroll no longer settable. - Add hitrollbase (get/set), hrpcnt (set), damrollbase (get/set), drpcnt (set) to CH. - Add CH.ac (get), CH.acbase (get/set), CH.acpcnt (set). ===== 7/28/2014 ===== - acpierce, acbash, acslash, acexotic properties of OBJ, and OBJPROTO replaced by 'ac'. ===== 6/28/2014 ===== - Add CH.id ===== 6/16/2014 ===== - Add DESCRIPTOR type. - Add CH.achpoints. ===== 6/15/2014 ===== - Add oprog sit and wake triggers. ===== 6/13/2014 ===== - Add CH.scroll. ===== 6/11/2014 ===== - Add HELP type. ===== 6/1/2014 ===== - Add oprog quaff, open, unlock triggers. ===== 5/10/2014 ===== - Add CH.attacktype, CH.damtype, CH.damnoun. ===== 5/4/2014 ===== - Add mudconfig global function. ===== 5/1/2014 ===== - Remove CH:setlevel() completely (previously deprecated and replaced with CH.level setter). ===== 4/27/2014 ===== - Rename CH:isvisible() to CH:cansee(). - The following methods were changed to boolean properties for CH: - ispc - isnpc - isevil - isgood - isneutral - ischarm - isfollow - isactive - isimmort ===== 4/26/2014 ===== - CH:carries() returns item count if found. ===== 4/24/2014 ===== - Optionally copy luavals with OBJ:clone(). - Create echoaround() and echoat() global funcs and deprecate the CH versions. - CH:goto() autolooks unless explicitly not. - Add OBJPROTO.rating. ===== 3/23/2014 ===== - Add OBJPROTO:adjustdamage(). ===== 3/13/2014 ===== - Add rvnum() for CH, OBJ, ROOM, AREA. ===== 2/23/2014 ===== - Add support for imm/vuln/res for CH:addaffect. ===== 2/22/2014 ===== - Add AFFECT type. - Add CH:addaffect() and CH:removeaffect(). ===== 2/14/2014 ===== - OBJ.room is settable. - Add global 'getrandomroom()'. ===== 2/13/2014 ===== - Add CH:describe(). (Graves) ===== 2/8/2014 ===== - Allow CH.pet to be set for PCs. ===== 1/28/2014 ===== - Add damnoun and liquidcolor for OBJ/OBJPROTO. - Add apply() for OBJ and OBJPROTO. ===== 1/27/2014 ===== - Added CH.pet. - Added MOBPROTO.count. ===== 1/23/2014 ===== - Added SHOP type. - Added global getshoplist() and MOBPROTO.shop. ===== 1/17/2014 ===== - Added CH.description. - Added OBJ:clone(). ===== 1/15/2014 ===== - Added setvuln(), setimmune(), setresist() for CH. ===== 1/1/2014 ===== - Added OBJ.timer. ===== 12/27/2013 ===== - Added 'stance' to CH. - Added PROG type. - Added MTRIG, OTRIG, ATRIG, RTRIG types. - Added OBJPROTO.otrigs, MOBPROTO.mtrigs, AREA.atrigs, ROOM.rtrigs. - Added 'mprogs', 'oprogs', 'aprogs', 'rprogs' to AREA. ===== 12/26/2013 ===== - Added 'luaquery' command. - Fixed code to actually check security (was only working for global funcs). - All 'set' fields changed to security 5. - Added util.strlen_color. - Added util.truncate_color_string. - Added util.format_color_string. - Added 'damavg' for OBJ and OBJPROTO (weapon only). - Added 'ingame' for CH, OBJ. - Added 'area' field for OBJPROTO, MOBPROTO. - All "check only" methods left with security 0, all others are set to 1. ===== 12/20/2013 ===== - Added 'description' get and set for OBJ, get for OBJPROTO. - Added rprog 'try' trigger. ===== 12/17/2013 ===== - Added 'ingame' field for OBJPROTO/MOBPROTO/ROOM. ===== 12/16/2013 ===== - Added 'damtype' get field for OBJ/OBJPROTO. ===== 12/15/2013 ===== - Added 'other' section to luahelp. - 'setact' no longer accepts "not " syntax. - 'setact' will error if called on PC. - Added global 'getobjlist'. - Added the following otype specific flag check methods for OBJ and OBJPROTO: - exitflag - portalflag - furnitureflag - weaponflag - containerflag - Added the following otype specific get fields for OBJ and OBJPROTO: - light - arrowcount - arrowdamage - arrowdamtype - spelllevel - chargestotal - chargesleft - spellname - toroom - maxpeople - maxweight - healbonus - manabonus - spells - acpierce - acbash - acslash - acexotic - weapontype - numdice - dicetype - attacktype - key - capacity - weightmult - liquidtotal [renamed from 'total'] - liquidleft [renamed from 'left'] - liquid - poisoned - foodhours - fullhours - silver - gold ===== 12/11/2013 ===== 1. Added loop protection to lua interpreter (luai). \\ 2. Added oprog hit trigger. \\ 3. Added oprog prehit trigger. ===== 12/10/2013 ===== 1. Setting CH.level preserves hp/mana/move ratios. \\ 2. Added CH.hitroll, CH.damroll. ===== 12/9/2013 ===== 1. Added util lib: a. capitalize [Gammon] b. trim [Gammon] c. convert_time [Gammon] d. format_list [Shinosuke] e. pluralize [Shinosuke] ===== 12/4/2013 ===== 1. Updated CH:tell() to take (string, fstring) args. \\ 2. Added global getpc(). ===== 12/3/2013 ===== 1. Added CH:tell() \\ 2. Changed CH:skilled() to return skill percentages. \\ 3. Added global 'dammessage'. ===== 11/26/2013 ===== 1. Added AREA.objprotos. \\ 2. Added portalflag(), exitflag() to OBJ and OBJPROTO (for type "portal" only). ===== 11/23/2013 ===== 1. Added 'loadfunction' for CH,OBJ,ROOM,AREA. ===== 11/21/2013 ===== 1. Added 'scriptdump' command. \\ 2. pagetochar() has optional third argument to print 'raw'. ===== 11/19/2013 ===== 1. Reworked the game object interface code which now facilitates 'luahelp' system. \\ 2. Added settable fields for CH and OBJ. \\ 3. Added alternate argument list for CH:damage(). ===== 11/14/2013 ===== 1. Added room prog 'look' trigger. ===== 11/9/2013 ===== 1. Added room progs. \\ 2. Added tprint, loadprog, loadscript, loadstring, savetbl, loadtbl to ROOM. ===== 11/7/2013 ===== 1. Added lock,unlock,open,close methods for EXIT. \\ 2. Added EXIT:setflag(). ===== 11/5/2013 ===== 1. Added ROOM.contents. \\ 2. Added OBJ.liquid, OBJ.total, OBJ.left (for fountains only). \\ 3. Added ROOM.sector. \\ 4. Added loadstring method for CH/OBJ/AREA. ===== 11/4/2013 ===== 1. Update delay() and cancel() to accept tag optional arguments. ===== 11/3/2013 ===== 1. Added oprog 'fight' trigger. ===== 11/2/2013 ===== 1. Added timer trigger for mob/obj/area progs. \\ 2. Added delay() and cancel() methods for CH, OBJ, AREA. \\ 3. Added debug.show(). ===== 10/25/2013 ===== 1. Added CH.fighting. \\ 2. Added MOBPROTO. \\ 3. Added getmobproto(). \\ 4. Added CH.proto. \\ 5. Addded AREA.mobprotos. ===== 10/23/2013 ===== 1. CH:mload() returns a CH (or nil) ===== 10/22/2013 ===== 1. Added oprog lore trigger. \\ 2. Added oprog enter trigger. ===== 10/19/2013 ===== 1. Added oprog look trigger. ===== 10/18/2013 ===== 1. Added god commands to global functions. \\ 2. Add AREA.security, AREA.ingame. \\ 3. Added OBJ.wearlocation. \\ 4. Add ROOM.players, ROOM.mobs. ===== 10/17/2013 ===== 1. Added AREA:flag() ===== 10/16/2013 ===== 1. tostring(CH), tostring(OBJ), tostring(OBJPROTO), tostring(ROOM), tostring(AREA) will return names. \\ 2. Add global functions 'getarealist', 'clearloopcount'. \\ 3. Add RESET type. \\ 4. Add CH:olc(). \\ 5. Add AREA.rooms. \\ 6. Add ROOM.resets. \\ 7. CH:reward can optionally accept reward( target[CH], type[string], value[number] ) call signature. \\ 8. CH:kill can optionally accept kill( target[CH] ) call signature. \\ 9. CH:assist can optionally accept assist( target[CH] ) call signature. \\ 10. CH:echoaround can optionally accept echoaround( target[CH], message[string] ) call signature. \\ 11. CH:echoat can optionally accept echoat( target[CH], message[string] ) call signature. \\ 12. CH:remort can optionally accept remort( target[CH] ) call signature. \\ 13. CH:qset can optionally accept qset( target[CH], id[string/number], value[number] {, timer[number]} {,limit[number]}) call signature \\ 14. CH:qadvance can optionally accept qadvance( target[CH], id[string/number] {, increment[number]} ) call signature. The following functions will accept format arguments: \\ 1. sendtochar \\ 2. pagetochar \\ 3. log \\ 4. CH:emote \\ 5. CH:asound \\ 6. CH:gecho \\ 7. CH:zecho \\ 8. CH:kill \\ 9. CH:assist \\ 10. CH:junk \\ 11. CH:echo \\ 12. CH:echoaround \\ 13. CH:echoat \\ 14. CH:mload \\ 15. CH:purge \\ 16. CH:goto \\ 17. CH:at \\ 18. CH:transfer \\ 19. CH:gtransfer \\ 20. CH:otransfer \\ 21. CH:force \\ 22. CH:gforce \\ 23. CH:vforce \\ 24. CH:cast \\ 25. CH:damage \\ 26. CH:remove \\ 27. CH:remort \\ 28. CH:qset \\ 29. CH:qadvance \\ 30. CH:reward \\ 31. CH:peace \\ 32. CH:restore \\ 33. CH:setact \\ 34. CH:hit \\ 35. CH:mdo \\ 36. CH:mobhere \\ 37. CH:objhere \\ 38. CH:mobexists \\ 39. CH:objexists \\ 40. CH:act \\ 41. CH:offensive \\ 42. CH:immune \\ 43. CH:carries \\ 44. CH:wears \\ 45. CH:has \\ 46. CH:uses \\ 47. CH:say \\ 48. CH:vuln \\ 49. CH:resist \\ 50. CH:skilled \\ 51. CH:ccaries \\ 52. EXIT:flag \\ 53. ROOM:flag \\ 54. ROOM:echo \\ 55. OBJPROTO:wear \\ 56. OBJPROTO:extra \\ 57. OBJ:echo \\ 58. OBJ:wear \\ 59. OBJ:extra \\ 60. AREA:echo ===== 10/14/2013 ===== 1. Added security to progs, some functions will check for it. \\ 2. New [[http://rooflez.com/wiki/index.php?n=Main.AREAProperties|AREA]] properties: people, players, mobs \\ 3. New global function 'getobjlist'. ===== Changes from appr 8/1/2013 to 10/9/2013 ===== 1. Fixed infinite loop protection. \\ 2. Include new argument "trigtype" for m/o/aprogs. \\ 3. Lua support for 'mob remember' and 'mob delay' and related functionality removed as it's unnecessary. \\ 4. CH:flee() is deprecated along with 'mob flee' in standard mprogs. \\ 5. name() and vnum(), mpcnt(), remort() global functions deprecated. \\ 6. OBJ and OBJPROTO 'type' field renamed to 'otype' to prevent some behind the scenes conflict. \\ 7. OBJ.inroom renamed to OBJ.room to be consistent with CH.room. \\ 8. 'areafname' field for CH, OBJ, AREA is deprecated \\ 9. Script max length increased to 100000 characters (only achievable with loadscript, otherwise limited to 10000). \\ 10. loadscript can no longer return values. \\ 11. 'pcall' and 'xpcall' removed from scripting environments to prevent messing with infinite loop protection. The following were changed from global functions to methods of CH, OBJ, and AREA: \\ 1. loadprog \\ 2. loadscript \\ 3. tprint \\ 4. savetbl \\ 5. loadtbl The following were changed from global functions to methods of CH: \\ 1. mobhere \\ 2. objhere \\ 3. mobexists \\ 4. objexists \\ 5. ispc \\ 6. canattack \\ 7. isnpc \\ 8. isgood \\ 9. isevil \\ 10. isneutral \\ 11. isimmort \\ 12. ischarm \\ 13. isfollow \\ 14. isactive \\ 15. isvisible \\ 16. affected \\ 17. act \\ 18. offensive [renamed from 'off'] \\ 19. immune [renamed from 'imm'] \\ 20. carries \\ 21. wears \\ 22. has \\ 23. uses \\ 24. qstatus \\ 25. vuln \\ 26. resist [renamed from 'res'] \\ 27. skilled \\ 28. ccarries New global functions: \\ 1. sendtochar \\ 2. pagetochar \\ 3. tprintstr \\ 4. getcharlist \\ 5. getmoblist \\ 6. getplayerlist