summaryrefslogtreecommitdiffstats
path: root/example
Commit message (Collapse)AuthorAgeFilesLines
...
* 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).
* Added a way to specify the min and max attributes values.Yohann Ferreira2012-02-021-22/+135
| | | | | | | | | This can now be done in attributes.xml through the minimum and maximum attribute parameters. I also changed the AttributeInfo struct as requested by bjorn. Reviewed-by: Erik Schilling, Thorbjørn Lindeijer
* 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.
* Added the chr_get_inventory and chr_get_equipment functions.Yohann Ferreira2012-01-181-0/+28
| | | | | | | | | | | Those will make the scripters able to get a full view of the current player's possessions. Use with care. + Fixes following Ablu's review. Resolves: Mana-Mantis #207. Reviewed-by: Ablu
* Fixed the chr_inv_count function to handle equipment.Yohann Ferreira2012-01-181-2/+11
| | | | | | | | | | | | | | | the function can now count in the inventory and/or the player's equipment. I also fixed the script function and added a use case in the example map. + Fixes after Ablu's review. + 2nd fix after Ablu's review: Fix the inventory remove behaviour. Resolves: Mana-Mantis #288 Reviewed-by: Ablu
* Made all beings capable of having a genderErik Schilling2012-01-024-10/+11
| | | | Reviewed-by: o11c, bjorn, Bertram.
* Made do_npc_close to be called by default after the end of the talk functionErik Schilling2012-01-028-11/+1
| | | | Reviewed-by: Bertram.
* Added @skills command which lists all skillsErik Schilling2011-12-041-0/+1
| | | | Reviewed-by: o11c.
* Added the background parameter values to the equip.xml file.Yohann Ferreira2011-11-131-10/+10
| | | | Reviewed-by: Thorbjorn Lindeijer
* Merged three global script states into oneThorbjørn Lindeijer2011-11-071-0/+17
| | | | | | | | | | | | | | | | | These scripts could trivially share one script state, since the methods called on them from the server are not overlapping. This does leave them open to access each other's global variables, but that's the problem with global variables. The one remaining global script file name is now configurable, so that it may also be set to a script in a different scripting language. The two related script options are: script_mainFile (default: scripts/main.lua) script_defaultEngine (default: lua) - renamed from defaultScriptEngine Reviewed-by: jurkan Reviewed-by: Yohann Ferreira
* Added @permissions commandErik Schilling2011-11-021-0/+1
| | | | | | | Added @permissions <character> which lists the permissions of a player. Made @givepermission giving feedback on success. Reviewed-by: Thorbjørn Lindeijer.
* Merge branch 'master' of github.com:mana/manaservYohann Ferreira2011-10-191-7/+12
|\ | | | | | | | | Conflicts: src/game-server/accountconnection.cpp
| * Prevent server crash by not having beings talk after spawn for nowThorbjørn Lindeijer2011-10-191-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment it is the responsibility of the script to make sure any references to beings passed into script functions are valid. This means you can't schedule delayed scripts like the one making maggots say 'Roaaarrrr!!!', since the being might have been removed before the script gets executed. In the case of this bug the maggots are removed by some script code testing 'mana.monster_remove'. We should of course fix the way actor handles are used in Lua so that scripts can't end up crashing the server. Mantis-issue: 384 Reviewed-by: Yohann Ferreira
| * Added chatcommand to get position of a character.Erik Schilling2011-09-151-0/+1
| | | | | | | | | | | | | | | | Add chatcommand @getpos <character> which return the mapid and location of the character. Part of: Mana-Mantis: #385. Reviewed-by: Bertram.
| * Changed specials.xml to reflect the current capabilitiesPhilipp Sehmisch2011-09-121-3/+4
| |
| * Added LUA function for changing anger of monsters.Erik Schilling2011-08-181-1/+4
| | | | | | | | | | | | | | You now can change the anger of a monster to a being using mana.monster_change_anger(monster, being, anger) Resolves: Mana-Mantis #366.
* | Added a default skill id getter in the skill manager.Yohann Ferreira2011-09-281-1/+1
| | | | | | | | | | | | I also added a link to the skillmanager object in its header file. This will later be used to get info from elsewhere than the server main loop.
* | Fixed the items.xml fileYohann Ferreira2011-09-281-14/+17
| | | | | | | | | | | | | | The file is now setting the correct attack for the given weapons. I also updated the auto attack parameter to correspond the ones needed in the code.
* | Added the chr_get_level script function.Yohann Ferreira2011-09-281-0/+1
| |
* | Added chatcommand to get position of a character.Erik Schilling2011-09-011-0/+1
| | | | | | | | | | Add chatcommand @getpos <character> which return the mapid and location of the character. Part of: Mana-Mantis: #385.
* | As requested, changed the trigger 'existence' to 'in-inventory'.Yohann Ferreira2011-08-301-9/+9
| |
* | Merge branch 'equipment-fix'Yohann Ferreira2011-08-301-10/+29
|\ \
| * | Synced the equip.xml file to the latest changes.Yohann Ferreira2011-08-301-10/+29
| | |
* | | Merge branch 'equipment-fix' of github.com:Bertram25/manaservYohann Ferreira2011-08-2515-12/+415
|\| |
| * | Merge git://gitorious.org/~bertram/mana/manaserv-equipment-fix into ↵Yohann Ferreira2011-08-1915-12/+408
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | equipment-fix Conflicts: example/serverdata/scripts/maps/desert.lua
| | * | Added boots and pants to play with on the test map.Yohann Ferreira2011-08-1913-11/+363
| | | |
| | * | Used the client base to make a final bugfix on the server code.Yohann Ferreira2011-08-195-2/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made the server handle only one slot type requirement since it's irrelevant to have more anyway. Plus, it simplifies the code for both equipping/unequipping. I also added a dagger to show how equipping/unequipping is working.
| * | | Merge branch 'master' of ↵Yohann Ferreira2011-08-111-9/+16
| |\| | | | |/ | |/| | | | | | | | | | | | | git://gitorious.org/~bertram/mana/manaserv-equipment-fix into equipment-fix Conflicts: src/common/manaserv_protocol.h
| | * Merge branch 'master' of git://gitorious.org/mana/manaservYohann Ferreira2011-08-041-1/+1
| | |\
| | * \ Merge branch 'master' of git://gitorious.org/mana/manaservYohann Ferreira2011-08-043-8/+17
| | |\ \
| | * | | Reworked the way equip slot info are loaded in a more logical way.Yohann Ferreira2011-07-271-9/+16
| | | | |
* | | | | Updated specials.xml to better illustrate the features which are currentlyunknown2011-08-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | working and expected by the server to be known by the client. Note: I would like to get rid of specials.xml on the client side and make the gameserver provide all information relevant for the players character at runtime to allow for proceduarally generated specials.
* | | | | Added LUA function for changing anger of monsters.Erik Schilling2011-08-181-1/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | You now can change the anger of a monster to a being using mana.monster_change_anger(monster, being, anger) Resolves: Mana-Mantis #366.
* | | / Made chr_inv_count and npc_trade capable of taking a name or an id.Erik Schilling2011-08-101-3/+4
| |_|/ |/| | | | | | | | | | | | | | Resolves: Mana-Mantis #318. Reviewed-by: Bertram.
* | | Allowed names of items and monsters in scripts - part 1.Erik Schilling2011-08-041-1/+1
| |/ |/| | | | | | | | | | | | | | | You can now use either the name or the id of the item in the LUA functions chr_inv_change, monster_create, item_drop. Part of: Mana-Mantis #318. Reviewed-by: Bertram.
* | Unified the lua.cpp documentation.Yohann Ferreira2011-08-032-8/+8
| | | | | | | | | | I also changed the chatmessage function to chat_message to follow the coding standard.
* | Added monster_remove lua function.Erik Schilling2011-08-031-0/+9
|/ | | | | | | | | mana.monster_remove(monster) can now be used to remove a monster from a map. Resolves: Mana-Mantis #352. Reviewed-by: Bertram.
* Added new lua function for calculating distances.Ablu2011-07-041-0/+2
| | | | | | | | | You can now call mana.get_distance(being1, being2) or mana.get_distance(x1, y1, x2, y2) for calculating distances. Reviewed-by: Jaxad0127, Bertram. Resolves: Mana-Mantis #370.
* Allow monsters to drop multiple itemsStefan Dombrowski2011-05-261-25/+20
| | | | | | | Before at most one item was droped and the sum of all probablilites was limited to 100%. Also in the example data drops are changed to existing items.
* Changed the <being-effects> tag to <effects>.Yohann Ferreira2011-05-011-2/+2
| | | | | Effects aren't applied only on beings. Hence the former tag name was irrelevant.
* Renamed the mana-status-effects.xml to status-effects.xmlYohann Ferreira2011-05-011-0/+0
| | | | | In fact, the client never prefixed that file. Hence, the server doesn't have to.
* Changed the server to look for the skills.xml file.Yohann Ferreira2011-05-011-0/+0
| | | | | This, instead of the mana-skills.xml file, to follow latest client changes.
* fixed a bug in the example crafting scriptsPhilipp Sehmisch2011-04-271-2/+2
| | | | (trivial change)
* Added a simple crafting systemPhilipp Sehmisch2011-04-275-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | A client can craft something using the @craft command. The command needs a list of item names and amounts. The gameserver checks if the character has these items in the inventory and then passes the list together with the character handle to the lua script function on_craft in the script file scripts/crafting.lua. This function can then be used to evaluate if the list is a valid crafting combination and when this is the case take or give items. Implemented two example crafting scripts there, one which enforces exact item order and amount and one which doesn't. Both are disabled per default and one needs to be enabled by uncommenting a line. Also gave the player group permission to use the @craft command in permissions.xml and added two new items (wood and iron) required for the example crafting combination. Resolves: #333 Reviewed-by: bcs86, Bertram
* Implemented scriptable effects on item use and dispell.Yohann Ferreira2011-04-191-3/+6
| | | | Reviewed-by: Thorbjorn.
* Added a shake effect when Harmony is disappearing.Yohann Ferreira2011-04-171-1/+7
| | | | | | ... And one when she's coming back. Reviewed-by: Jaxad0127.
* 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.
* Change the monster talking delay to 0.5 to minimize test failures.Yohann Ferreira2011-03-111-1/+1
| | | | | | | This should do the trick until we have a better time management system. This closed issue: Mana-Mantis #205.
* Show a way to make monsters speak at spawn time.Yohann Ferreira2011-03-092-2/+12
| | | | | | | | | | | | | | Even when events are inserted before game state update time, the monsters don't speak since they still don't have an id (-1). As I thought that reworking the mapcomposite engine for that particular point was ineffective, here is another working way to make monsters speak at spawn time by using the schedule_in function with 0.3 second (or 3 ticks). Resolves: Mana-Mantis #205. Reviewed-by: Thorbjorn.