84 Commits

Author SHA1 Message Date
s8nozieb
39ba3d600b Fixed typo in BUILDIN_FUNC(sleep) (#2949)
[ci skip]
2018-03-04 13:02:26 +07:00
Sader Fawall
ead017b396 Clear script command(#2840) 2018-02-18 17:47:41 +01:00
Lemongrass3110
132feeb621
Made mercenary db dynamic (#2883)
Removed hard limit of the mercenary database
Cleaned up the hard coded duplicated logic
Turned hard coded mercenary ids into constants
2018-02-18 17:15:09 +01:00
Jittapan Pluemsumran
bfb6972c59 Implemented getequiptradability script command (#2750)
Thanks to @aleos89 @anacondaqq @Lemongrass3110
2018-01-03 21:51:38 +01:00
Cydh Ramdh
32950ecead
Updated Item Group features (#2692)
* Added config to hide last chars of player's name `broadcast_hide_name` and its default value is 2.
* Fixed `getgroupitem` that should give unidentified item for equipment types.
* Added optional param for `getgroupitem` and `getrandgroupitem` to always give player identified item, ignores the `itemdb_isidentified`'s check.
* Thanks to @aleos89 @Lemongrass3110
2018-01-02 12:55:52 +07:00
Lemongrass3110
fb966a12e0
Turned pet db into a dynamic map (#2727)
Thanks to @Jeybla, @lighta and @aleos89
2018-01-01 22:57:47 +01:00
Sader Fawall
d19ba918ae Update pet script command (#2705)
* Fixes #2703.
* Added alternative for script command bpet: birthpet.
* Added alternative for script command pet: catchpet.
* Updated documentation for script command pet.
* Added PET_CATCH_UNIVERSAL_ITEM for script command pet which will attempt to catch the targeted monster as long as it is in the pet database and the targeted monster requires the lure item used.
Thanks to @sader1992!
2017-12-27 21:27:04 -05:00
lighta
7a1a76a9a9
Fix #2425 Character variable lengths and char-server (#2647)
* Fix #2425 Character variable lengths and char-server

Medium term fox for crash on char-serv caused by too long character variable.
Add few error msg and safety.
Add npc/test/npc_test_longvar.txt as a basic test.

NB:
The config.in for max_colum size if not really set as best would either retrive that value from sql, or use the same config file to actually set the sql column size...
May be handle later with some kind of hibernate ORM.

Thanks to @Tokeiburu, @aleos89, @Lemongrass3110.
2017-12-19 15:13:55 -04:00
sader fawall
1b68303f74 Update sc_end_class (#2673)
* Adjusted script command sc_end_class to accept an optional job ID.
Thanks to @sader1992!
2017-12-17 10:29:30 -05:00
Cydh Ramdh
1e1bd71e5a Fixed script commands for Item Option
* Fixes #2682: `getitem3`, `delitem3`, and `countitem3` always fail if `RandomValueArray` or `RandomParamArray` are not defined (Not all Item Options need 'Value' and 'Param')
* Thanks to @rAthenaCN
2017-12-10 18:40:01 +07:00
Lemongrass3110
7c1a88270b Added support for custom constant import (#2656) 2017-12-01 13:58:24 -05:00
Aleos
1c66035761
Refactored achievements to utilize C++ features (#2607)
* Refactored achievements to utilize C++ features
* Cleaned up the YAML parser.
* Moved achievements from DBMap to an unordered_map.
* Moved achievement targets from DBMap to a vector.
* Changed all struct arrays into vectors.
* Changed all char arrays to strings.
* Changed all int arrays to std::arrays.
* Removed achievement_dummy as it's no longer needed.
* Achievements now use smart pointer to ensure proper construction and deconstruction of objects.
Thanks to @lighta!
2017-11-20 21:34:16 -05:00
Lemongrass3110
b2ab9724fe
Implemented new monster range (#2604)
With this the internal static array was changed to a std::map which manages it's memory dynamically when needed.

Dropped mob_dummy since it was useless to have it in the first place.

Replaced a lot of direct accesses to the mob db by the "get" function.

With this you can now use 20021-31998 for monsters and also 4000-20020 will be used for player clones whenever needed.

Dropped mobdb_exists
Replaced almost all references to MAX_MOB_DB

Moved MAX_MOB_DB from the header directly into the source file to make it only visible to the .cpp file itself and not to any other.

Moved the mob drop calculation function from itemdb.cpp into mob.cpp, because it needs to iterate over the whole mob db.

Added a few missing clone checks.

Thanks to @lighta, @Jeybla and @aleos89.
2017-11-19 01:22:29 +01:00
Atemo
ea88ea5054
Emoticons constant name (#2527)
This PR change the emoticons constant name to match emoticonlist from client side.
Note: the previous emoticons names are now deprecated.

Additionnally emotion and unitemote scripts commands are being merged together to the new format
-> emotion <emotion number>{,<target>};
Where target use the target Game ID (GID) of the unit (npc, pet, character etc..).

* unitemote is now deprecated.
* Additionnally fixed incorrect variable in quests_brasilis.txt

Thanks to @aleos89 and @Lemongrass3110 !
2017-11-10 18:35:21 +01:00
Aleos
c4a364be2c
Initial work for map server to C++ (#2565)
* Initial progression of moving the map-server to C++ format.
* Converted all core files to .cpp and header files to .hpp.
* Refactored the refine database parser to utilize native YAML C++.
Thanks to @Jeybla and @lighta for their help!
2017-11-02 17:39:03 -04:00
Jittapan Pluemsumran
2830183eaa Implemented round,floor,ceil script commands. (#2524) 2017-10-18 03:10:10 -07:00
Aleos
b4106eb988 Adjusted script command bindatcmd (#2518)
* Fixes #2513.
* Defaulted the char-command level to 100.
Thanks to @mazvi and @Lemongrass3110!
2017-10-16 14:49:39 -04:00
Lemongrass3110
f42c2ff211 Moved some remaining constants into src (#2501)
* Moved all npc view constants into src

Source side the constants will use Gravity's naming standard(JT_*)
NPC side still supports the old names without JT_

* Moved all effect constants into src

Added check for effect validation to atcommand effect and all script commands using them
Removed the unused and broken function unit_changeviewsize from unit.c
Replaced a lot of hardcoded effect ids with their respective constants
Cleaned up the effect documentations

* Moved all hat effect constants into src

Added check for effect validation to script command hateffect
2017-10-14 18:13:51 +02:00
Aleos
fa425b834f Updated callshop selling list variables (#2480)
* Updated callshop selling list variables
* Updated script command callshop OnSellItem list to include random item options.
* See documentation for more information.
2017-10-10 12:15:51 +02:00
Jey
ff6722c924 Follow up to fb882c4aa09af17992f5073f1f32566d9ff7e21f
* Fixes #2489
* Thanks to @Yuchinin
2017-10-08 20:20:33 +02:00
Jeybla
b8562932cf Removes SCRIPT_CALLFUNC_CHECK ifdef-directives. (#2482)
* Closes #2205
* The SCRIPT_CALLFUNC_CHECK define was to enforce function
  calling with callfunc in scripts. Because I don't think calling
  functions without callfunc will give us performancy issues,
  this check is simply removed by this commit.
2017-10-07 16:59:45 +02:00
rpdigos
fb882c4aa0 Fix a couple of warnings. (#2462)
* Fix a couple of warnings.
Thanks to @rpdigos!
2017-10-06 10:58:17 -04:00
Jey
593ac62757 Convert mob.c to mob.cpp. 2017-10-01 18:25:16 +02:00
Jeybla
0e4ffdacdb Adds pk_mode_mes displayed on joining a pk zone. (#2400)
* When pk_mode and pk_mode_mes is enabled, the player gets notified joining a pk-zone map.
* It's now possible to specify the target in showscript.
  Default is still AREA.
* pk_mode_mes is now using showscript to SELF.
* Thanks to @Atemo, @RadianFord, @Lemongrass3110, @aleos89
2017-09-28 22:53:16 +02:00
aleos
82ed67a01c Corrected script command instance ID lookups
* Fixes #2448.
* Resolves script_instancegetid causing scripts to end prematurely during player lookups.
Thanks to @Yuchinin and @Atemo!
2017-09-26 16:46:13 -04:00
Vincent Stumpf
cd43f32ffb Shadow Refiner and getequiprefinecost (#2447)
* Fixes #2445 and fixes #2446.
* Fixed shadow refiner.
— The script uses the values of the array instead of the indexes to loop through it.
* Fixed segfault in getequiprefinecost.
— No checks in getequiprefinecost meant there were possibilities using negative indexes in arrays.
* Added to the script documentation what happens on failure when calling getequiprefinecost (it returns -1).
Thanks to @vstmpf, @crazystorm2017, and @hendra814!
2017-09-24 09:53:40 -04:00
Vincent Stumpf
70f1d86404 Fixed msvc warning casting int to bool in getequiprefinecost (#2429)
* Fixes #2428.
Thanks to @vstumpf and @Haikenz!
2017-09-19 10:15:42 -04:00
Jittapan Pluemsumran
e24d30a711 Refine overhaul (#2295)
* Converted refine_db.txt to refine_db.yml
* Refine success rates can now be set in refine_db.yml. rAthena's default NPCs will respect this database by default.
* Added shadow equipment refiner
Thanks to @Akkarinage @aleos89 @Atemo and @Mikegyver for their inputs.
2017-09-18 21:52:52 +07:00
Jey
6434a83088 Follow up to 38d225c444c88a3bfc702bbe7c2de60529c1e88f
- Fixes a compile warning
- Thanks to @Mikegyver and @Daegaladh
2017-09-07 15:34:33 +02:00
Jey
38d225c444 Follow up to 60d59124a357510a15d0039f42fce187a3104caa.
* Fixes a map server crash due to wrong casting
* Fixes #2406
* Thanks to @keitenai!
2017-09-07 13:18:28 +02:00
Jey
528539f621 Follow up to 60d59124a357510a15d0039f42fce187a3104caa
* Fixes some compile warnings
* "Forcing value to bool"
* Thanks @M4karov
2017-09-07 12:51:00 +02:00
Daegaladh
60d59124a3 Migrated script.c to C++ (#2404)
* Thanks to @Daegaladh!
* Originial pull request: #2395
2017-09-07 04:13:42 +02:00
Jittapan Pluemsumran
0379774cd2 Revert "Migrated script.c to C++ (#2395)" (#2403)
This reverts commit 965edbf47d5044e29c011c621f5129008c85b7aa.
2017-09-05 22:40:24 +07:00
Daegaladh
965edbf47d Migrated script.c to C++ (#2395)
* Migrated script.c to C++
2017-09-05 19:51:04 +07:00