54 Commits

Author SHA1 Message Date
Lemongrass3110
fe7c0a78ec
Refactored roulette system (#3271)
Fixes #2887 - thanks to @Everade
Fixes #3292 - thanks to @admkakaroto

Added a script command to open the roulette window from server side.
Added support for clients >= 2018-05-16
Fixed losing behavior for roulette
Enabled roulette system by default
Added a server side delay
Added missing sql log enum value 'Y'

Thanks to @Everade, @admkakaroto, @V0rr, @ecdarreola, @Haikenz and everyone else who contributed to this.
2018-07-06 22:39:58 +02:00
Lemongrass3110
3faf700443
Added possibility to log without attached player (#3260)
Fixes #2268

Thanks to @Akkarinage
2018-07-02 11:45:55 +02:00
Lemongrass3110
b3643bfe45
Added a 'force' option to attachrid (#3261)
Fixes #1763
2018-07-01 22:28:56 +02:00
Lemongrass3110
23f7b945ec
Fixed a map-server crash from getitem3 (#3122)
Fixes #3121

Wrong usage by supplying a non-array variable.
Using a non-server variable without having a player attached.

Thanks to @Everade
2018-06-23 18:49:38 +02:00
Aleos
11b42569fc
Synchronized source file headers (#3212)
* Alphabetically sorted includes.
* Updated copyright and license text to match across all files.
* Removed pragma once define in header files in lieu of ifdef guards.
2018-06-20 18:08:30 -04:00
Lemongrass3110
801d3ed942
Moved common, config and mapcache to C++ (#3200)
Dropped BETA_THREAD_TEST and everything around it
Dropped mt19937
Replaced msinttypes with cinttypes
Removed IRC link and updated README name
2018-06-14 21:51:58 +02:00
Lemongrass3110
dd60f4c47e
Added 2 new parameters for getpetinfo (#3164)
Fixed inter-server handling for creation of pets that are not incubated.

Thanks to @Everade for his idea.
2018-05-27 22:52:08 +02:00
Sader Fawall
151c8476af inarray script commands (#3071)
Thanks to @anacondaqq, @Lemongrass3110, @Jeybla, @secretdataz, @aleos89, @Atemo and @hurtsky for reviewing and testing.
2018-05-27 22:51:37 +02:00
Aleos
87e7e8891b
Added missing Imperial Set Combos (#3151)
* Fixes #3031.
* Added missing Royal Guard Necklace and Imperial Glove.
* Added bSkillDelay bonus which increases delay of skill sk by t milliseconds.
Thanks to @iubantot and @Secret!
2018-05-26 12:50:39 -04:00
Lemongrass3110
55bf142ab8 Follow up to d13d6a6
Thanks to @RadianFord
2018-04-20 22:53:09 +02:00
Lemongrass3110
d13d6a6e19
Changed SI_ enum to the official EFST_ enum (#2995) 2018-04-20 18:24:20 +02:00
Lemongrass3110
5b13dc7009
Added script command mail (#3043) 2018-04-12 00:46:01 +02:00
Lemongrass3110
cc63bb594f Follow up to 07e2bf0
Fixed a missing switch case.

Thanks to @teededung and @RadianFord.
2018-04-11 14:50:35 +02:00
Jittapan Pluemsumran
e2b9e42b7d Cleaned up custom battleground scripts (#3025)
Added a warning to script command delwall
2018-04-11 11:22:29 +02:00
Jittapan Pluemsumran
07e2bf09af Made the second parameter for bonus script command optional (#2902)
* Made the second parameter for bonus script command optional

* Updated item scripts to reflect the bonus command change
2018-04-10 19:38:56 +02:00
Lemongrass3110
25f2626cf8 Removed a stack push from getvar (#2912)
Fixes #2891.
Thanks to @sader1992!
2018-04-10 12:27:48 -04:00
Atemo
cdae404e6a Updated getunitdata / setunitdata (#3029)
Added the possibility to retrieve / change the current target id of a Mob, Homunculus, Mercenary and Elemental through getunitdata / setunitdata
2018-04-10 00:23:22 +02:00
Sader Fawall
1390930ca5 HotFix getinventorylist (#3033)
* Follow up to f07a1c4.
* Expanded the char array.
Thanks to @RadianFord and @sader1992!
2018-04-03 22:47:46 -04:00
Aleos
f07a1c4b4d
Added Random Option item data to getinventorylist (#3030)
* Closes #3021.
* Added Random Option item data to script command getinventorylist return values.
Thanks to @Yuchinin!
2018-04-03 10:40:29 -04:00
Jittapan Pluemsumran
41ea1531bc
Prevent unloadnpc script command to unload the invoking NPC. (#3000)
* Prevent unloadnpc script command to unload the invoking NPC.
Addressed #2999
2018-03-20 21:56:11 +07:00
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