summaryrefslogtreecommitdiff
path: root/example/serverdata/scripts/npcs
AgeCommit message (Collapse)AuthorFilesLines
2012-02-25Merged the example client and server dataThorbjørn Lindeijer8-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
2012-02-04Simplified merchant.luaThorbjørn Lindeijer1-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).
2012-01-31Use a full user data object for MapObject referencesThorbjørn Lindeijer1-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
2012-01-22Added announce(text [, sender]) lua functionErik Schilling1-0/+1
The function will cause a global announcement. If no sender ist set "Server" will be used. Reviewed-by: Bjorn.
2012-01-02Made all beings capable of having a genderErik Schilling2-3/+3
Reviewed-by: o11c, bjorn, Bertram.
2012-01-02Made do_npc_close to be called by default after the end of the talk functionErik Schilling7-10/+1
Reviewed-by: Bertram.
2011-03-14Script binding for the new screen shake effect.Philipp Sehmisch1-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.
2011-02-20Update barbers and hair display.Yohann Ferreira1-2/+2
2011-02-15Added a merchant and a blacksmith on the template map.Yohann Ferreira2-73/+99
They're both using a fully working merchant lua function. Resolves: Mana-mantis #295.
2011-02-08Implemented LUA binding to get the gender of a characterPhilipp Sehmisch1-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
2011-01-27Updates to the example data.Yohann Ferreira1-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.
2010-12-30Added new example files needed to start a more complete feature-showing map.Yohann Ferreira7-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.