549 Commits

Author SHA1 Message Date
Atemo
09cbf2dfa6 Follow up a63604d92a1c8090257277e353fd28464e859c08
The display name of the NPC won't get appended in front of the message for globalmes script command.

Corrected area monsters spawn in Nydhoggr's Nest Instance
2017-01-22 19:14:19 +01:00
Atemo
c6470ff4ff Clean-up permanent monster spawn: (#1831)
* Clean-up permanent monster spawn:
- <delay1>,<delay2>,<event> are actually optionnal field
- <event> value 0 and 1 are meaningless (actually event name with length < 4 are skipped)

* Exported monster AI constants

* Updated docs for monster size constants (already exported)
Notes:
- the default size for monster script cmd was small not medium
- monster script cmd now display a warning for size above SZ_BIG (previously SZ_ALL)

* - Fixed an issue to make <xs> and <ys> optionnals
- Updated npcs scripts

* Leftover in the docs for permanent monster spawn

* Corrected english docs. Credit to @aleos89
Added additionnal warning for xs / ys negative input. Credit @Lemongrass3110 

Thanks to @cydh for the idea
2017-01-22 19:03:08 +01:00
Atemo
c6ab72207e Horror toy factory (#1813)
* Initial release of Horror Toy Factory instance.
Thanks to @aleos89, @secretdataz, @Lemongrass3110
Took some part from 52f6420abc
Credit @exneval

Todo : implement NPC_HELLBURNING skill
2017-01-18 03:25:12 +01:00
Lemongrass3110
2043c95e66 Refactored hardcoded npc event names (#1767)
While refactoring those events the following other changes were made:

Introducing OnInstanceDestroy event. This event can be used to hook script code right in front of the instance destruction. This can be useful if you have any stored references to an instance id for example.

The script command cmdothernpc will now check if the target event exists and report failures. Therefore it now returns true or false.

All agit(FE,SE,TE) start and end commands from atcommand and script commands have been merged in their respective guild function which now returns a bool value of true for successful actions and false if it did not succeed(if the specific WoE was [not] running).

All global triggered events with mapserver status output now call the same function and therefore have the same mapserver output(including their respective event name of course).

Renamed a few events in the script configuration to match the other names

Added constants for months and weekdays

Additionally added constants for gettime types to make it easier to read.

Replaced all existing usages I found with their proper new syntax or better fitting functions.
2017-01-10 22:58:04 +01:00
Lemongrass3110
55459f30f2 Added a script command for instance information (#1815)
With this script command you can look up information about a specific instance. This way you do not have to hardcode values specified in the database in the script if you need it.

Thanks to @aleos89 for the script documentation.
2017-01-07 00:08:11 +01:00
Cydh Ramdh
2896d894d1 Official Random Coordinates for Savepoint (#1756)
* Added parameters for `savepoint are range for `x` and `y` for random savepoint coordinates.
* Added documentation for new savepoint params. Credits to @aleos89
* Updated savepoint on script to follow official behaviour (random save in 3x3). All credits to @Atemo
2016-12-20 17:16:42 +07:00
Lemongrass3110
1b634c8f42 Fixed showdigit's start values (#1807)
Fixed #1769
2016-12-20 01:37:40 +01:00
Lemongrass3110
93339212bc Fixed #1772 (#1773)
* Fixed #1772

Added support for char_id to readparam
Added a check and error message if get_var is used on a parameter instead of a variable
2016-12-11 16:00:44 +01:00
Lemongrass3110
b9a8ab722e Added an additional parameter to instance_enter (#1720)
Added an additional parameter to instance_enter

This allows easier usage for instances in IM_NONE, where a player will never be attached to the instance.
All you have to do is remember the created instance id and supply this command with it. That way you do not have to use any workaround like the following anymore:
warp instance_mapname( <mapname>, <instance id> ), <hardcoded enter x coordinate>, <hardcoded enter y coordinate>;

Added usage of the new constants in the existing scripts

Fixed default checks and null pointer output
Thanks to @Atemo
2016-12-10 12:38:57 +01:00
Lemongrass3110
ecc8cf9f0b Initial release of the clan system
Thanks to @cydh, @RagnarokNova and @aleos89 for their help.
2016-11-16 15:36:08 +01:00
aleos89
5aa53e4738 Merge branch 'master' into cleanup/storages_optimization 2016-11-11 14:54:43 -05:00
aleos89
b831287b0e Small documentation cleanups
* Cleaned up the inter_server.conf documentation.
* Cleaned up the script command openstorage2 documentation.
2016-11-01 09:08:59 +07:00
Cydh Ramdh
46b1de7d50 Initial release 'premium' storage
* Adapting official multiple storages.
* Added config to defines storages. See conf/import-tmpl/inter_server.conf.
* Added packet IZ `0x388c` for sending storage definitions.
* Added script command `openstorage2` to open premium storages.
* Removed `sd->storage_size`, replaced by `sd->storage.max_amount`. The value is defined in inter_server.conf in storage entries.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-11-01 09:08:55 +07:00
Lemongrass3110
6f67a65855 Added documentation for item links in mes (#1616)
Fixes #1614
2016-10-29 16:28:51 +01:00
Akkarinage
d20cbcae48 Removed use of petheal command from pet_db.txt in both PRE and RE modes. (#1648)
Removed use of petheal command from pet_db.txt in both PRE and RE modes.
* Changed documentation to show deprecation more prominently.
* Closes #1576.
* Removed script command petheal.

Signed-off-by: Akkarinage <akkarin@rathena.org>
2016-10-21 15:25:32 -04:00
Cydh Ramdh
748035141b Merge branch 'master' into cleanup/storages_optimization 2016-10-14 06:12:52 +07:00
aleos89
6663df344b Corrected script command statusup2 documentation (fixes #1612)
* Corrected the documentation referencing the wrong script command.
* Removed some trailing white spaces.
* Prettified some text.
Thanks to @lucasoli!
2016-10-11 14:23:15 -04:00
Lemongrass3110
f0dd764095 Merge branch 'master' into cleanup/storages_optimization
# Conflicts:
#	src/map/script.c
2016-10-10 13:06:52 +02:00
Jittapan Pluemsumran
6510d414fa Merged warp and warpchar into a single function (#1584)
* the warp command now allows you to warp other players
* the warpchar script command is still usable but not recommended
* removed warpchar documentation from script_commands.txt to let it fade from people's memory
2016-10-02 23:25:03 +02:00
Lemongrass3110
30647011e2 Small cleanups 2016-09-29 15:04:35 +02:00
Lemongrass3110
644e294699 Merge branch 'master' into woe_te-restrictions
# Conflicts:
#	npc/re/mapflag/nobranch.txt
#	npc/re/mapflag/nomemo.txt
#	npc/re/mapflag/noteleport.txt
#	npc/re/scripts_athena.conf
#	src/map/atcommand.c
#	src/map/map.h
#	src/map/script.c
#	src/map/script_constants.h
2016-09-29 08:13:31 +02:00
Jittapan Pluemsumran
33cda97717 Battleground script command expansion (#1534)
* Implemented 2 new battleground commands. Closes #1531.
* bg_join - join battleground without npc chat room
* bg_create - create a battle group without npc chat room
* Made events for bg_create and waitingroom2bg optional
* Made map,x,y parameters on waitingroom2bg_single optional

Thanks to @Lemongrass3110 and @cydh for code reviews
Thanks to @aleos89 for documentation cleanup
2016-09-12 13:30:50 +07:00
aleos89
7a05b59dd1 Merge branch 'master' into cleanup/storages_optimization 2016-09-06 13:40:01 -04:00
aleos89
7ffb943343 Storage optimization clean ups
* Cleaned up some of the script command documentation.
* Adjusted some checks to use constants.
2016-08-31 19:55:19 -04:00
Jittapan Pluemsumran
92eacaccfd
Corrected grammatical error in documentation.
Thanks to @Lemongrass3110
2016-08-31 19:48:03 +07:00
Jittapan Pluemsumran
0329edf800
Follow up to 668690d
* Commented about default behavior of itemskill command that bypasses skill requirements.
Thanks to @Lemongrass3110
2016-08-31 19:43:16 +07:00
Jittapan Pluemsumran
668690d028
Expanded itemskill script command to allow skill requirements checking 2016-08-31 19:39:42 +07:00
Cydh Ramdh
0df1ba0a20 TE Updates
* Implemented `job_noenter_map.txt` for TE maps.
* Added job list that cannot enter TE Castles and Guild Dungeons.
* Replaced `getpermissionwoete` with `jobcanentermap`.
* Added missing quest `7516`.
* Fixed typo in TE Mission NPC.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-31 14:42:49 +07:00
Cydh Ramdh
65a90ff84c Merge branch 'master' into woe_te-restrictions 2016-08-31 08:03:34 +07:00
aleos89
bd36b294ad Merge branch 'master' into cleanup/storages_optimization 2016-08-30 19:40:36 -04:00
Cydh Ramdh
47276e94a6 Clean up party invitation reply. (#1471)
* Clean up party invitation reply.
* Added reply result as enum.
* Added official party restriction.
* Added configuration in party.conf

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-31 01:07:55 +02:00
Cydh Ramdh
d84d6ba1e5 Initial release: Map X Job restriction (#1526)
* Listed job with matched map zone is restricted to enter the map.
* Added db file `job_noenter_map.txt` with format: `JobID,FlagZone,GroupLevelBypass`.
* Reserved usage for WOE:TE implementation.
* Typo correction, thanks @aleos89 @Lemongrass3110
2016-08-30 22:09:02 +07:00
aleos89
cd5dbe28e4 Adjusted the npctalk script command
* Now has an optional parameter of NPC name.
- If supplied, it will display over that NPC's head, else it will use the attached NPC.
2016-08-29 11:56:19 -04:00
Cydh Ramdh
8805e7e1d8 Merge branch 'master' into woe_te-restrictions 2016-08-27 07:04:41 +07:00
Jittapan Pluemsumran
021bed5f5d
Implemented status reduction potion support
* New script command `needed_status_point` added.
* The items are not yet implemented.
2016-08-21 14:30:17 +07:00
Cydh Ramdh
8da71a126d * Fixed memory leaks from item random options, follow up f296409ada211a0aa89863db4d9603054845cf65
* Clean up doc and array index check for `getequiprandomoption`, `setrandomoption`, follow up 8deabb157ae9e58db86d0383c34dba7211780b6a
* Exported CARD0_FORGE, CARD0_FORGE, and CARD0_PET for `getequipcardid` result.
* Add `SCSTART_` references in `sc_start` doc.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-08-16 11:14:33 +07:00
Jittapan Pluemsumran
8deabb157a
Implemented basic script commands to apply options to equipped item. 2016-08-15 17:04:06 +07:00
Lemongrass3110
a87d86cb11 Fixed getinventorylist documentation
Fixes #1497.
Thanks to @Darkelfen for reporting it.

Additionally exported the EQP_* constants into the script engine.
Replaced some hardcoded equip positions with their respective constants.
2016-08-14 00:26:22 +02:00
Lemongrass3110
ede39b1730 Refurbished hat effects
Follow up to 5da49b8
Thanks to @cydh for the good base in #1465.

Renamed the function from itemeffect to hateffect.
The effects now get sent to other players as well.
You can enable or disable one effect at a time with the script command now.
2016-08-13 21:56:58 +02:00
Lemongrass3110
5da49b87b5 Added hat effect packet and script support 2016-07-29 19:15:46 +02:00
aleos89
2e98ff68ae Updated script documentation
* Updated the constant location references to the new script_constants.h file.
2016-06-22 13:47:19 -04:00
Jittapan Pluemsumran
98fdf31fb3 Implemented recalculatestat command (#1348)
This command will force a stat recalculation for the attached player.
2016-06-07 23:50:34 +07:00
aleos89
eeccb70050 Merge branch 'master' into cleanup/storages_optimization
Conflicts:
	doc/script_commands.txt
	src/map/pc.c
	src/map/script.c
2016-06-01 13:24:27 -04:00
Atemo
6258557fcc Added another note for active_transform command. 2016-05-28 20:54:53 +02:00
Jittapan Pluemsumran
c0ab4d5594
Documentation update on body style (LOOK_BODY2) 2016-05-27 01:58:32 +07:00
aleos89
161a4c01c9 Small adjustments for the instance system
* Follow up to 32c829d.
* Added a missing break on guild type instance creation.
- Thanks to @Canoe!
* Added instance name back to script command instance_enter.
- This will present the proper error message when trying to enter another instance.
2016-05-26 09:06:49 -04:00
Aleos
32c829debe Merge pull request #1264 from rathena/feature/instance_expansion
Expanded the instance system to support new modes
* New modes include: No player attached, single player, and guild.
* Modified the instance_db to allow instance idle time to be adjustable.
* Removed Map1 from the instance_db as the EnterMap is always the same value.
* Adjusted the stored maps of instances to dynamic arrays to conserve memory.
- Max amount of possible maps increased to 255.
* Instances will now be destroyed even if the owner cannot be found.
* Corrected the return value when entering an instance when a character, party, or guild does not have an instance.
* Expanded script command instance_create to take in an owner ID and an optional mode.
* Added a new script command instance_check_guild (works the same as instance_check_party).
* Corrected a few script commands to properly stop the script engine on failures for instance script commands.
* Removed the instance name lookup for when entering an instance as instance_id is now passed.
- Adjusted script command instance_enter to no longer require the instance name.
* Cleaned up script command instance_warpall.
* Adjusted script command instance_announce to check when instance ID is 0 rather than -1 since instance IDs are stored as unsigned now.
* Refactored all instance_id to unsigned short.
* Updated documentation to reflect changes.
2016-05-25 14:55:50 -04:00
aleos89
6babca3689 Corrected a few minor issues
* Follow up to 2cfb844.
* Adjusted the instance_db documentation.
* Adjusted script command instance_announce to check when instance ID is 0 rather than -1 since instance IDs are stored as unsigned now.
* Added a couple of checks when sending instance information to the client.
* Fixed a compile warning.
2016-05-24 09:22:03 -04:00
aleos89
2cfb844429 Refactored a bit of the instance modes
* Follow up to c97be60.
* Added some safety measures when sending the instance name to the client.
* Adjusted the stored maps of instances to dynamic arrays to conserve memory.
- Max amount of possible maps increased to 255.
* Removed Map1 from the instance_db as the EnterMap is always the same value.
* Instances will now be destroyed even if the owner cannot be found.
* Corrected the return value when entering an instance when a character, party, or guild does not have an instance.
* Corrected a few script commands to properly stop the script engine on failures for instance script commands.
* Removed the instance name lookup for when entering an instance as instance_id is now passed.
- Adjusted script command instance_enter to no longer require the instance name.
* Adjusted script command instance_create to keep backwards compatibility.
* Cleaned up script command instance_warpall.
* Updated script documentation to reflect changes.
* Updated instance_db to reflect changes.
2016-05-23 14:12:34 -04:00
Lemongrass3110
2e668ea25a Merge pull request #1286 from Jeybla/add_1278
Adds var 'killedrid' to script monster OnKillEvents. (Closes #1278)

Thanks to @Jeybla - tested by @Stolao and confirmed as working.
2016-05-20 12:49:45 +02:00