summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2012-03-05Added lua function for getting pvp status of mapErik Schilling1-0/+4
mana.map_get_pvp() now returns one of the constants in libmana-constants.lua Reviewed-by: Bertram.
2012-03-03Made some global Lua variables localThorbjørn Lindeijer1-46/+47
We have to be careful with introducing globals now that there is only a single Lua state, so we shouldn't use globals unnecessarily. Any variable should be declared 'local' unless there is a reason to make it global. For additional safety we can also think about disallowing the use of globals entirely. This also helps to catch typos in scripts. Reviewed-by: Erik Schilling
2012-03-03Added further missing callbacksErik Schilling1-0/+11
Reviewed-by: bjorn.
2012-03-02Converted functions called by LuaScript to callbacksThorbjørn Lindeijer1-21/+16
This includes the quest reply, post reply, death notification and remove notification. Also, Script::Ref was changed from a typedef to a small class, automating initialization and making the check for validness clearer. Reviewed-by: Erik Schilling
2012-03-02Merged all the different Lua states into oneThorbjørn Lindeijer1-2/+2
No more Lua state for each status effect, monster, item effect or map. All scripts are loaded into the same state. This should be more efficient overall and make it easier to implement dynamic reloading of the scripts in the future. Now, this introduces the problem of name collisions between different Lua scripts. For now this is solved by using more specific function names, like 'tick_plague' and 'tick_jump' rather than just 'tick'. The plan is however to get rid of these globals, and register these callbacks from the script, so that they can be local functions without the danger of colliding with other scripts. Reviewed-by: Erik Schilling Reviewed-by: Yohann Ferreira
2012-01-02Made all beings capable of having a genderErik Schilling1-2/+2
Reviewed-by: o11c, bjorn, Bertram.
2012-01-02Made do_npc_close to be called by default after the end of the talk functionErik Schilling1-1/+6
Reviewed-by: Bertram.
2011-10-22Officially added the being gender to the protocol.Yohann Ferreira1-0/+1
Reviewed-by: o11c.
2011-06-27Added Lua function for logging.Ablu1-0/+7
You can now call mana.log(loglevel, message) to log messages with scripts. For loglevel you can use the new constants defined in libmana-constants.lua Resolves: Mana-Mantis #359
2011-03-11Simplified check_schedule a bitThorbjørn Lindeijer1-14/+9
2011-03-10Avoid running newly scheduled jobs by using a fixed time point.Yohann Ferreira1-1/+2
Reviewed-by: Thorbjorn.
2011-02-20Fixed the check_schedule() lua function.Yohann Ferreira1-0/+5
An misleading error was raised when the function dealt with its last remaining job as it didn't return after removing it. Reviewed-by: Ablu.
2011-02-11Added the schedule_per_date() lua function.Yohann Ferreira1-0/+11
Reviewed-by: Ablu, Freeyorp.
2011-02-11Fix basic money handling using the ATTR_GP attribute.Yohann Ferreira1-3/+5
Reviewed-by: Freeyorp.
2011-02-11Synced the libmana-constants.lua file with the current protocol.Yohann Ferreira1-59/+68
Trivial.
2011-02-08Implemented LUA binding to get the gender of a characterPhilipp Sehmisch1-0/+3
The function is named mana.chr_get_gender. It returns 0 for male and 1 for female. libmana-constants.lua defines the variables GENDER_MALE and GENDER_FEMALE with these values. Also made the banker NPC refer to the gender of the player character. Reviewed-by: Jaxad0127
2010-05-30Copied basic Lua libs back from tmwserv-data and added dummy dataThorbjørn Lindeijer3-0/+654
The dummy data is currently mostly empty data though, so still nothing to see as far as the example content is concerned. Reviewed-by: Bertram
2007-08-13Deleted obsolete files. Cleaned configuration. Removed obsolete SQL tables.Guillaume Melquiond1-66/+0
2005-11-15Updated bindings, game state class and more (see ChangeLog).Aaron Marks1-6/+53
2005-11-14CVS is being stupid.Aaron Marks1-0/+19