summaryrefslogtreecommitdiffstats
path: root/example/serverdata/scripts/npcs
Commit message (Collapse)AuthorAgeFilesLines
* Merged the example client and server dataThorbjørn Lindeijer2012-02-258-576/+0
| | | | | | | | | It's easier to just talk about world data and to modify it as a whole. If there is really a need to separate it, a project can still choose to do that (and in whatever suitable way). There is no need to enforce this separation or to do it in our example. Reviewed-by: Erik Schilling
* Simplified merchant.luaThorbjørn Lindeijer2012-02-041-80/+85
| | | | | | | | Just defined an inline function to make talking to the player easier. Would be nice when NPC scripts could look more like this by default. Also indented with 4 spaces, which we do in C++ so why not Lua files (the file had mixed 2 and 4 space indentation before).
* Use a full user data object for MapObject referencesThorbjørn Lindeijer2012-01-311-0/+10
| | | | | | | | | | Based on a templated helper class, MapObject references in Lua scripts are now full user data objects. Using the '__index' member of their metatable, a library is associated with it so that member functions can be called directly on the object. Reviewed-by: Yohann Ferreira Reviewed-by: Erik Schilling
* Added announce(text [, sender]) lua functionErik Schilling2012-01-221-0/+1
| | | | | | | The function will cause a global announcement. If no sender ist set "Server" will be used. Reviewed-by: Bjorn.
* Made all beings capable of having a genderErik Schilling2012-01-022-3/+3
| | | | Reviewed-by: o11c, bjorn, Bertram.
* Made do_npc_close to be called by default after the end of the talk functionErik Schilling2012-01-027-10/+1
| | | | Reviewed-by: Bertram.
* Script binding for the new screen shake effect.Philipp Sehmisch2011-03-141-0/+48
| | | | | | | | | | The new lua function mana.chr_shake_screen can cause a screen shake for a single client with variable x-intensity, y-intensity, decay and duration. I also added an example script which causes tremors for nearby characters with intensity and direction relative to a specific point. The function is not referenced on the example map because it is quite distracting.
* Update barbers and hair display.Yohann Ferreira2011-02-201-2/+2
|
* Added a merchant and a blacksmith on the template map.Yohann Ferreira2011-02-152-73/+99
| | | | | | They're both using a fully working merchant lua function. Resolves: Mana-mantis #295.
* Implemented LUA binding to get the gender of a characterPhilipp Sehmisch2011-02-081-1/+7
| | | | | | | | | 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
* Updates to the example data.Yohann Ferreira2011-01-271-2/+2
| | | | | | | - Fixed monsters Id. - Added collision layer to the desert map. - Added a few simple NPCs on the map (They still need a sprite.) - Added player and hairstyles sprites files and definition in items.xml.
* Added new example files needed to start a more complete feature-showing map.Yohann Ferreira2010-12-307-0/+489
I also replaced certain files with newer version, just as the items.xml file. And I started to split test npcs from the tmwserv repository into reusable pieces. Big but trivial. Part of the Mana-Mantis issue: #231.