summaryrefslogtreecommitdiff
path: root/example
AgeCommit message (Collapse)AuthorFilesLines
2011-10-22Added the chr_get_level script function.Yohann Ferreira1-0/+1
Reviewed-by: Ablu.
2011-10-19Prevent server crash by not having beings talk after spawn for nowThorbjørn Lindeijer1-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
2011-09-15Added chatcommand to get position of a character.Erik Schilling1-0/+1
Add chatcommand @getpos <character> which return the mapid and location of the character. Part of: Mana-Mantis: #385. Reviewed-by: Bertram.
2011-09-12Changed specials.xml to reflect the current capabilitiesPhilipp Sehmisch1-3/+4
2011-08-18Added LUA function for changing anger of monsters.Erik Schilling1-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.
2011-08-10Made chr_inv_count and npc_trade capable of taking a name or an id.Erik Schilling1-3/+4
Resolves: Mana-Mantis #318. Reviewed-by: Bertram.
2011-08-04Allowed names of items and monsters in scripts - part 1.Erik Schilling1-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.
2011-08-03Unified the lua.cpp documentation.Yohann Ferreira2-8/+8
I also changed the chatmessage function to chat_message to follow the coding standard.
2011-08-03Added monster_remove lua function.Erik Schilling1-0/+9
mana.monster_remove(monster) can now be used to remove a monster from a map. Resolves: Mana-Mantis #352. Reviewed-by: Bertram.
2011-07-04Added new lua function for calculating distances.Ablu1-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.
2011-05-26Allow monsters to drop multiple itemsStefan Dombrowski1-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.
2011-05-01Changed the <being-effects> tag to <effects>.Yohann Ferreira1-2/+2
Effects aren't applied only on beings. Hence the former tag name was irrelevant.
2011-05-01Renamed the mana-status-effects.xml to status-effects.xmlYohann Ferreira1-0/+0
In fact, the client never prefixed that file. Hence, the server doesn't have to.
2011-05-01Changed the server to look for the skills.xml file.Yohann Ferreira1-0/+0
This, instead of the mana-skills.xml file, to follow latest client changes.
2011-04-27fixed a bug in the example crafting scriptsPhilipp Sehmisch1-2/+2
(trivial change)
2011-04-27Added a simple crafting systemPhilipp Sehmisch5-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
2011-04-19Implemented scriptable effects on item use and dispell.Yohann Ferreira1-3/+6
Reviewed-by: Thorbjorn.
2011-04-17Added a shake effect when Harmony is disappearing.Yohann Ferreira1-1/+7
... And one when she's coming back. Reviewed-by: Jaxad0127.
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-03-11Change the monster talking delay to 0.5 to minimize test failures.Yohann Ferreira1-1/+1
This should do the trick until we have a better time management system. This closed issue: Mana-Mantis #205.
2011-03-09Show a way to make monsters speak at spawn time.Yohann Ferreira2-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.
2011-03-02Enabling of warp to respawn location after deathStefan Dombrowski1-1/+1
Reviewed-by: Thorbjorn
2011-02-23Changed stroll radius to pixels in monsters.xmlYohann Ferreira1-3/+3
To simply follow the documentation. Monsters behaviour is a bit less strange now.
2011-02-22Implementing @killmonstersStefan Dombrowski1-0/+1
Reviewed-by: Crush
2011-02-20Made use of npc_disable(), npc_enable() on the template map.Yohann Ferreira1-0/+4
2011-02-20Update barbers and hair display.Yohann Ferreira16-90/+16
2011-02-15Added a merchant and a blacksmith on the template map.Yohann Ferreira5-79/+130
They're both using a fully working merchant lua function. Resolves: Mana-mantis #295.
2011-02-11Finally fix Harmony giving some GP to characters.Yohann Ferreira1-7/+4
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-31Added first visible npcs and play with them a bit.Yohann Ferreira5-6/+55
2011-01-30Added the missing Magical dodge monster property.Yohann Ferreira1-1/+1
Now this can be loaded with the 'magic-evade' xml tag.
2011-01-30Made the monsters' attributes compute fine again.Yohann Ferreira1-8/+8
As a consequence, the monsters can spawn again. Reviewed-by: Freeyorp.
2011-01-27Simply fixing the map script header while i see it.Yohann Ferreira1-4/+4
2011-01-27Updates to the example data.Yohann Ferreira42-8/+794
- 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.
2011-01-27Add collisions to the template map.Yohann Ferreira2-2/+10
2010-12-30Added new example files needed to start a more complete feature-showing map.Yohann Ferreira120-11/+2304
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.
2010-12-29Updated the attributes.xml file with a more up-to-date version.Yohann Ferreira1-12/+10
Trivial fix.
2010-12-27Implemented @log and @logsay commands.Philipp Sehmisch1-0/+2
The @log command is the equivalent to tmwAthena's @l. It allows to log a text as a transaction for documentation purpose. The @logsay command works like @t on tmwAthena. It says something in public chat while also logging it as a separate trasaction. Reviewed-by: Thorbjorn
2010-12-27Transaction logging of various command, new transaction codes and style fix.Philipp Sehmisch1-0/+2
The @mute, @goto, @attribute and @announce commands now logs transactions to the database. Added new transaction codes to database. I've preliminarily added a lot of codes for not yet supported commands so that we needn't do a database update with every single commit which implements one. Also using the equivalent "say" helper function in place of the "GameState::sayTo" method in the command handler. Reviewed-by: Kage
2010-12-17Implemented @die chat commandPhilipp Sehmisch1-0/+1
The @die chat command kills the evoking character by setting its hit points to 0. The example permissions.xml assigns it to the "tester" rights group and not "players" because server admins who are not aware of this command might run into trouble when they assume that players don't have a method to teleport to their spawn point voluntarily. Resolves: mantis ticket #192 Reviewed-by: Jaxad0127
2010-12-06Improve warp commandsJared Adams1-0/+1
@warp no longer takes a character. @charwarp was added to handle that ('#' still means the player). Both can take a map name, map id (preceded by '#') or '#' for the player's current map. Logging of warp commands now logs destination map and player warped (for @charwarp).
2010-10-26Added an empty npcs.xml file to the client dataThorbjørn Lindeijer1-0/+10
Needed for the Mana client to reach the character selection dialog.
2010-10-23Added example equip.xmlPhilipp Sehmisch1-0/+12
2010-09-18Converted CRLF to LF in attributes.xmlThorbjørn Lindeijer1-82/+82
Somebody needs to check his core.autocrlf setting.
2010-09-16Upgraded the attributes.xml example to something actually usable.Yohann Ferreira1-38/+82
2010-09-12Added an example attributes.xmlThorbjørn Lindeijer1-0/+38
Copied from bertram-experimental-mana-data and updated to new element names.
2010-08-30Added @mute chat command.Philipp Sehmisch1-0/+1
The @mute command stops another character from talking in the public chat for a specified amount of seconds. It doesn't survive a reconnect of the client, but I don't think that this is necessary because a mute by a GM is usually intended as a slap on the wrist with more severe consequences to follow (like @ban).
2010-08-22Added an empty mana-status-effect.xml to the exampleThorbjørn Lindeijer1-0/+3
Avoids an error message.
2010-07-09Added LUA script bindings for manipulating the specials available to a ↵Philipp Sehmisch1-0/+39
character. Added script call for getting the cost of a special (recharge only for now) Deleting specials works server-sided but the client isn't informed about it properly. Specials without recharge cost don't appear for the player. Both of these features require an additional netcode message. Reviewed-by: Freeyorp
2010-05-31Added minimal example global_events.luaPhilipp Sehmisch1-0/+57
Reviewed-by: Thorbjorn