1305 Commits

Author SHA1 Message Date
Lemongrass3110
7377f0f674 bindatcmd now supports the new event name length 2017-02-04 00:03:40 +01:00
Jeybla
929384cead Fixes AgitEnd2 Scriptcommand. (#1936)
OnAgitEnd2 events were not triggered by using the AgitEnd2 script command.

Follow up to 2043c95
2017-02-03 08:38:15 +01:00
aleos
706345f56f Revamped script command setunitdata (fixes #1903)
* Resolved mobs having certain stats getting reset to their database value when the mob's status is recalculated.
* Resolved some monster, homunculus, mercenary, and elemental stats not properly recalculating when setting the unit data.
Thanks to @technoken and @Tokeiburu!
2017-01-25 20:48:24 -05: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
aleos
d8768e4cae Cleaned up the colored messages (fixes #1855)
* Removed redundant clif_colormes and clif_messagecolor2 functions.
* Changed all clif_disp_onlyself to clif_messagecolor.
* Resolves several places around source using the 0x17F packet which now has a display toggle for Guild Chat resulting in these messages not related to Guild Chat not displaying.
* Added COLOR_LIGHT_GREEN to imitate the Guild Chat color.
2017-01-18 17:20:25 -05:00
aleos89
2c4cd07af0 Corrected script command atcommand (fixes #1894)
* Resolves the map ID being stored instead of the map index when a dummy player is used.
Thanks to @Tokeiburu!
2017-01-18 10:06:37 -05: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
a73814eeee Fixed some compile warnings
Fixes #1861
Thanks to @rubie123
2017-01-11 10:21:47 +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
88aaa9be98 Added a parameter to map_nick2sd for partial name (#1852)
With this parameter the caller can decide if he wants to enable or disable partial name scan support.
Generally it was disabled in a lot of functions(clif,channel,script commands).
It is still available for some "non-critical" atcommands as well as for all charcommands.
2017-01-07 00:19: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
Lemongrass3110
12457d342f Fixed sleep2 and awake functions for non-players (#1849)
Fixes #1837
2017-01-06 23:41:18 +01:00
Lemongrass3110
eb47d74f08 Added a config for maprespawnguildid's behaviour (#1836) 2017-01-06 23:29:49 +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
Locien
fb29b18b52 Consistency changes for script unit commands (#1801)
* Consistency changes for script unit commands

Made it so that all unit commands(except for unitexists) take 0 as the
unit ID argument which will reference the activator of the script.
Unitwarp has since previously had this functionality and it's very
useful. Example use: When a monster walks over an npc script with the
OnTouchNPC label unitkill 0; will kill the monster.

* Clean up and fixes to unit script commands self referencing with ID 0

Added a script_rid2bl function that will return the block list beloning
to an RID specified or the activator of the script if 0 is specified as
RID.
2016-12-20 02:08:35 +01:00
Lemongrass3110
1b634c8f42 Fixed showdigit's start values (#1807)
Fixed #1769
2016-12-20 01:37:40 +01:00
Lemongrass3110
7df9962a72 Follow up to 9333921
Thanks to @Playtester's friend Ash for reporting this.
2016-12-13 09:10:07 +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
d13acf3886 Fixed a bug with getarraysize
When the attached rid of the script was actually not a player, but a monster or something else the script was terminated. A good example for this was to use getarraysize on a OnTouchNPC event.

Thanks to MasterOfMuppets(@Locien) for reporting this.
2016-12-11 14:57:18 +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
Cydh Ramdh
342443bf61 Added new mapflag hidemobhpbar (#1537)
* Added new mapflag `hidemobhpbar` to hides monster's HP bar on a map.
* Added maps for this mapflag, credits to @Atemo and @Lemongrass3110 

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-12-04 10:52:14 +07:00
Lemongrass3110
ac2ba09415 Fixed areawarp cell check
The script command areawarp has been checking the wrong target map for ages. It has been checking the mapindex rather than the mapid and therefore returned a wrong result.
2016-12-01 13:06:54 +01:00
Lemongrass3110
c88ca4432d Definition cleanup
Removed a few ghost definitions
Adjusted some definitions to use the same types

Related to #1738
2016-11-26 20:34:55 +01:00
aleos89
9910478ce2 Resolved some compile warnings
* Resolved two unreachable code warnings.
* Resolved two potentially uninitialized local variable warnings.
2016-11-16 13:07:19 -05: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
cb279a7243 Resolved an uninitialized variable (fixes #1717)
* Follow up to ade1b17.
* Corrects the countitem script command having an uninitialized variable warning during compile.
Thanks to @hnomkeng!
2016-11-15 21:54:44 -05:00
aleos89
5aa53e4738 Merge branch 'master' into cleanup/storages_optimization 2016-11-11 14:54:43 -05:00
Lemongrass3110
418d8203e6 Refactored clif functions for unit names (#1664)
Refactored clif functions for unit names

Renamed clif_charnameack to clif_name and added additional parameters to follow other clif functions.

Removed clif_charnameupdate completely since it was just a copy of the BL_PC code in clif_charnameack and replaced all calls with clif_name_area.

Fixed guild position display
Fixes #1662
Thanks to @ghul3 for reporting it.

Removed useless params for some guild functions
2016-11-02 11:13:52 +01: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
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
Lemongrass3110
e443f846c6 Increased EVENT_NAME_LENGTH and some more cleanups
Fixed an invalid reference in clif.c(follow up to 008be23)
Moved the OnWhisperGlobal name definition to the other special event name declarations
Increased EVENT_NAME_LENGTH from 51 to 77 characters because it uses NPCs exname which can be up to 50 characters now
Added a warning when an NPCs exname is too long for an OnWhisperEvent
2016-10-14 09:13:53 +02:00
Cydh Ramdh
748035141b Merge branch 'master' into cleanup/storages_optimization 2016-10-14 06:12:52 +07:00
Jittapan Pluemsumran
f51a1c74ba Removed additional clif_maptypeproperty2 calls 2016-10-11 08:45:03 +02:00
Lemongrass3110
940c473c88 Cleaned up map property sending functions
Implemented ZC_MAPPROPERTY_R2 properly
2016-10-11 08:45:03 +02:00
Lemongrass3110
103ee947ff Follow up to f0dd764
Fixed compile/merge errors from 5a56210
2016-10-10 13:13:23 +02:00
Lemongrass3110
f0dd764095 Merge branch 'master' into cleanup/storages_optimization
# Conflicts:
#	src/map/script.c
2016-10-10 13:06:52 +02:00
Cydh Ramdh
9a52768f6f Cleanup party withdraw (#1585)
* Added enum for withdraw result in mmo.h.
* Added name of kicked player and changed `sd` init from `account_id` to `char_id`.
* Fixed party list window isn't updated when member kicked.
* Updated packet documentation.
* Thanks to @aleos89 @Lemongrass3110

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-10-06 10:58:05 +07:00
Lemongrass3110
5a5621073f Fixed random options being removed on cardremoval
Fixes #1587
2016-10-03 13:31:20 +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
9e176ce8d1 Whitespace cleanup from merging
Follow up to 644e294.
Sorry somehow tortoise git always screws up with those lines...
2016-09-29 08:19:26 +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
Atemo
23b271c958 Initial release of nocostume map flag (#1137)
* Initial release of `nocostume` map flag to follow official `DISABLE_COSTUMEITEM` map property.
* Added map flag `nocostume`, current confirmed maps are TE Castles and Guild Dungeons.
* Fixed #815.
* Stores `setlook` values so it won't be removed on `nocostume` mapflag

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-06 11:34:36 +02:00
Cydh Ramdh
cf80d72359 Typo fix
* Fixed typo in warning message of `getcastledata`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-09-05 18:00:38 +07: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
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
ab7324c84c Resolved some compile warnings
* Removed an unused variable.
* Resolved an uninitialized variable issue.
2016-08-30 20:58:40 -04:00