This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
lua:changelog [2015/01/15 06:57] vodur |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Log of changes affecting lua scripting API including changes to prog triggers. ====== | ||
- | ===== 1/14/2015 ===== | ||
- | |||
- | 1. Add purge() and reset() to ROOM and AREA.\\ | ||
- | |||
- | ===== 1/10/2015 ===== | ||
- | |||
- | 1. Add BOSSACHV and BOSSREC types (for boss achievements).\\ | ||
- | |||
- | ===== 1/7/2015 ===== | ||
- | |||
- | 1. Add aprog connect trigger.\\ | ||
- | 2. Add rprog connect trigger.\\ | ||
- | 3. Add global gettime().\\ | ||
- | |||
- | ===== 1/2/2015 ===== | ||
- | |||
- | 1. Add OBJ:setexitflag | ||
- | |||
- | ===== 12/23/2014 ===== | ||
- | |||
- | 1. Add oprog drink trigger. | ||
- | |||
- | ===== 12/1/2014 ===== | ||
- | |||
- | 1. CH.hitroll and CH.damroll no longer settable.\\ | ||
- | 2. Add hitrollbase (get/set), hrpcnt (set), damrollbase (get/set), drpcnt (set) to CH.\\ | ||
- | 3. Add CH.ac (get), CH.acbase (get/set), CH.acpcnt (set).\\ | ||
- | |||
- | ===== 7/28/2014 ===== | ||
- | |||
- | 1. acpierce, acbash, acslash, acexotic properties of OBJ, and OBJPROTO replaced by 'ac'. | ||
- | |||
- | ===== 6/28/2014 ===== | ||
- | |||
- | 1. Add CH.id | ||
- | |||
- | ===== 6/16/2014 ===== | ||
- | |||
- | 1. Add DESCRIPTOR type.\\ | ||
- | 2. Add CH.achpoints. | ||
- | |||
- | ===== 6/15/2014 ===== | ||
- | |||
- | 1. Add oprog sit and wake triggers. | ||
- | |||
- | ===== 6/13/2014 ===== | ||
- | |||
- | 1. Add CH.scroll. | ||
- | |||
- | ===== 6/11/2014 ===== | ||
- | |||
- | 1. Add HELP type. | ||
- | |||
- | ===== 6/1/2014 ===== | ||
- | |||
- | 1. Add oprog quaff, open, unlock triggers. | ||
- | |||
- | ===== 5/10/2014 ===== | ||
- | |||
- | 1. Add CH.attacktype, CH.damtype, CH.damnoun. | ||
- | |||
- | ===== 5/4/2014 ===== | ||
- | |||
- | 1. Add mudconfig global function. | ||
- | |||
- | ===== 5/1/2014 ===== | ||
- | |||
- | 1. Remove CH:setlevel() completely (previously deprecated and replaced with CH.level setter). | ||
- | |||
- | ===== 4/27/2014 ===== | ||
- | |||
- | 1. Rename CH:isvisible() to CH:cansee(). \\ | ||
- | 2. The following methods were changed to boolean properties for CH: | ||
- | |||
- | <code> | ||
- | a. ispc | ||
- | b. isnpc | ||
- | c. isevil | ||
- | d. isgood | ||
- | e. isneutral | ||
- | f. ischarm | ||
- | g. isfollow | ||
- | h. isactive | ||
- | i. isimmort | ||
- | </code> | ||
- | |||
- | ===== 4/26/2014 ===== | ||
- | |||
- | 1. CH:carries() returns item count if found. | ||
- | |||
- | ===== 4/24/2014 ===== | ||
- | |||
- | 1. Optionally copy luavals with OBJ:clone(). \\ | ||
- | 2. Create echoaround() and echoat() global funcs and deprecate the CH versions. \\ | ||
- | 3. CH:goto() autolooks unless explicitly not. \\ | ||
- | 4. Add OBJPROTO.rating. | ||
- | |||
- | ===== 3/23/2014 ===== | ||
- | |||
- | 1. Add OBJPROTO:adjustdamage(). | ||
- | |||
- | ===== 3/13/2014 ===== | ||
- | |||
- | 1. Add rvnum() for CH, OBJ, ROOM, AREA. | ||
- | |||
- | ===== 2/23/2014 ===== | ||
- | |||
- | 1. Add support for imm/vuln/res for CH:addaffect. | ||
- | |||
- | ===== 2/22/2014 ===== | ||
- | |||
- | 1. Add AFFECT type. \\ | ||
- | 2. Add CH:addaffect() and CH:removeaffect(). | ||
- | |||
- | ===== 2/14/2014 ===== | ||
- | |||
- | 1. OBJ.room is settable. \\ | ||
- | 2. Add global 'getrandomroom()'. | ||
- | |||
- | ===== 2/13/2014 ===== | ||
- | |||
- | 1. Add CH:describe(). (Graves) | ||
- | |||
- | ===== 2/8/2014 ===== | ||
- | |||
- | 1. Allow CH.pet to be set for PCs. | ||
- | |||
- | ===== 1/28/2014 ===== | ||
- | |||
- | 1. Add damnoun and liquidcolor for OBJ/OBJPROTO. \\ | ||
- | 2. Add apply() for OBJ and OBJPROTO. | ||
- | |||
- | ===== 1/27/2014 ===== | ||
- | |||
- | 1. Added CH.pet. \\ | ||
- | 2. Added MOBPROTO.count. | ||
- | |||
- | ===== 1/23/2014 ===== | ||
- | |||
- | 1. Added SHOP type. \\ | ||
- | 2. Added global getshoplist() and MOBPROTO.shop. | ||
- | |||
- | ===== 1/17/2014 ===== | ||
- | |||
- | 1. Added CH.description. \\ | ||
- | 2. Added OBJ:clone(). | ||
- | |||
- | ===== 1/15/2014 ===== | ||
- | |||
- | 1. Added setvuln(), setimmune(), setresist() for CH. | ||
- | |||
- | ===== 1/1/2014 ===== | ||
- | |||
- | 1. Added OBJ.timer. | ||
- | |||
- | ===== 12/27/2013 ===== | ||
- | |||
- | 1. Added 'stance' to CH. \\ | ||
- | 2. Added PROG type. \\ | ||
- | 3. Added MTRIG, OTRIG, ATRIG, RTRIG types. \\ | ||
- | 4. Added OBJPROTO.otrigs, MOBPROTO.mtrigs, AREA.atrigs, ROOM.rtrigs. \\ | ||
- | 5. Added 'mprogs', 'oprogs', 'aprogs', 'rprogs' to AREA. | ||
- | |||
- | ===== 12/26/2013 ===== | ||
- | |||
- | 1. Added 'luaquery' command. \\ | ||
- | 2. Fixed code to actually check security (was only working for global funcs). \\ | ||
- | 3. All 'set' fields changed to security 5. \\ | ||
- | 4. Added util.strlen_color. \\ | ||
- | 5. Added util.truncate_color_string. \\ | ||
- | 6. Added util.format_color_string. \\ | ||
- | 7. Added 'damavg' for OBJ and OBJPROTO (weapon only). \\ | ||
- | 8. Added 'ingame' for CH, OBJ. \\ | ||
- | 9. Added 'area' field for OBJPROTO, MOBPROTO. \\ | ||
- | 10. All "check only" methods left with security 0, all others are set to 1. | ||
- | |||
- | ===== 12/20/2013 ===== | ||
- | |||
- | 1. Added 'description' get and set for OBJ, get for OBJPROTO. \\ | ||
- | 2. Added rprog 'try' trigger. | ||
- | |||
- | ===== 12/17/2013 ===== | ||
- | |||
- | 1. Added 'ingame' field for OBJPROTO/MOBPROTO/ROOM. | ||
- | |||
- | ===== 12/16/2013 ===== | ||
- | |||
- | 1. Added 'damtype' get field for OBJ/OBJPROTO. | ||
- | |||
- | ===== 12/15/2013 ===== | ||
- | |||
- | 1. Added 'other' section to luahelp. \\ | ||
- | 2. 'setact' no longer accepts "not <flagname>" syntax. \\ | ||
- | 3. 'setact' will error if called on PC. \\ | ||
- | 3. Added global 'getobjlist'. \\ | ||
- | 4. Added the following otype specific flag check methods for OBJ and OBJPROTO: | ||
- | |||
- | <code> | ||
- | a. exitflag | ||
- | b. portalflag | ||
- | c. furnitureflag | ||
- | d. weaponflag | ||
- | e. containerflag | ||
- | </code> | ||
- | |||
- | 5. Added the following otype specific get fields for OBJ and OBJPROTO: | ||
- | |||
- | <code> | ||
- | a. light | ||
- | b. arrowcount | ||
- | c. arrowdamage | ||
- | d. arrowdamtype | ||
- | e. spelllevel | ||
- | f. chargestotal | ||
- | g. chargesleft | ||
- | h. spellname | ||
- | i. toroom | ||
- | j. maxpeople | ||
- | k. maxweight | ||
- | l. healbonus | ||
- | m. manabonus | ||
- | n. spells | ||
- | o. acpierce | ||
- | p. acbash | ||
- | q. acslash | ||
- | r. acexotic | ||
- | s. weapontype | ||
- | t. numdice | ||
- | u. dicetype | ||
- | v. attacktype | ||
- | w. key | ||
- | x. capacity | ||
- | y. weightmult | ||
- | z. liquidtotal [renamed from 'total'] | ||
- | aa. liquidleft [renamed from 'left'] | ||
- | ab. liquid | ||
- | ac. poisoned | ||
- | ad. foodhours | ||
- | ae. fullhours | ||
- | af. silver | ||
- | ag. gold | ||
- | </code> | ||
- | |||
- | ===== 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: | ||
- | |||
- | <code> | ||
- | a. capitalize [Gammon] | ||
- | b. trim [Gammon] | ||
- | c. convert_time [Gammon] | ||
- | d. format_list [Shinosuke] | ||
- | e. pluralize [Shinosuke] | ||
- | </code> | ||
- | |||
- | ===== 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 |