1288 Commits

Author SHA1 Message Date
Jittapan Pluemsumran
08e26c9de9 Don't set the md->state.copy_master_mode if master_id check fails. 2016-01-09 01:51:04 +07:00
Jittapan Pluemsumran
f2bad5e832 Add master id check in setunitdata script command. Fixes #887 2016-01-08 16:57:22 +07:00
Lemongrass3110
e76fdbf15b Merge pull request #881 from rathena/cleanup/const.txt
Clean up the way we handle our script constants.
Since most of them come from source anyway we now export them directly into the scripting engine to ensure that they use the correct values.
The main benefits are that you users don't have to fear that we forget to adjust something according to source changes, if you use the constants in your scripts that is, and we developers do not have to think about updating them anyway. It also guarantees that constants that used wrong values before this use the correct values that are defined source side.
2016-01-07 19:31:37 +01:00
Lemongrass3110
33729eb961 Migrated all look constants to source exports 2016-01-07 00:43:26 +01:00
Lemongrass3110
958b6cd5d9 Migrated all font weight constants to source exports 2016-01-07 00:28:15 +01:00
Lemongrass3110
de61a19eca Migrated all getpetinfo constants to source exports
Created the respective enum on source side.
2016-01-07 00:19:37 +01:00
Lemongrass3110
28e337127e Migrated all getmonsterinfo constants to source exports
Created the respective enum on source side and changed the script doc to only refer to the constants not the direct values.
Additionally adjusted the sample script.
2016-01-06 23:55:06 +01:00
Lemongrass3110
a68ab0c88d Migrated all getpetinfo constants to source exports
Created the respective enum on source side and changed the script doc to only refer to the constants not the direct values.
2016-01-06 23:28:05 +01:00
Lemongrass3110
72fe7f9ec6 Follow up to 56a7440
Added debug output to the quest log related commands to make it easier to find the source if a command fails(usually AEGIS script logic fails...).
2016-01-06 03:54:59 +01:00
Lemongrass3110
192badd150 Fixed #878 2016-01-06 02:43:38 +01:00
Lemongrass3110
737fcc41f9 Included the new script_constants.h file
and migrated all existing exports over.
2015-12-31 03:02:30 +01:00
Lemongrass3110
48116ba9f8 Fixed MAX_CART constant being exported to script constants with wrong value(MAX_INVENTORY). 2015-12-31 02:26:35 +01:00
CairoLee
c8db271ed9 Fixed #652 #818
Signed-off-by: CairoLee <cairoliyu@gmail.com>
2015-12-12 16:24:44 +08:00
aleos89
89a33a77ad Updated Genetic Sling Item effects
* Moved all item effects to source.
* Updated HP/SP Increase Potions to use the official statuses.
* Updated Vellum Flail to use the official status instead of Critical Wound.
Thanks to @exneval.
2015-12-08 14:38:55 -05:00
Napster
0c9bd301d8 Follow up to 8b3b32e
* Revert code, found problem with npcshopattach
2015-12-07 12:47:38 +07:00
Napster
8b3b32e000 Fixed #503
* when use the callshop, then player can't move in the game. thank to @CairoLee
2015-12-06 01:01:07 +07:00
aleos89
0212d44bb4 Fixes #809
* Reverted 42b7ba9 and cef2f9e NPC shop ID checks.
2015-12-05 10:08:18 -05:00
Atemo
24ecdadf48 Merge branch 'master' into academie 2015-12-02 00:40:42 +01:00
Atemo
1a5b5f6057 Typo 2015-12-02 00:21:40 +01:00
Atemo
5695dc57e2 Update & fix.
- Updated script_commands.txt
- Fixed typo in bio4_reward.txt
- Fixed getexp command giving 1 exp with 0 value
2015-11-29 16:57:04 +01:00
Atemo
c3e56b9c1b Update 2015-11-26 23:11:22 +01:00
Atemo
7fcd0f5b9d Clean up 2015-11-24 23:22:42 +01:00
Atemo
9b13351817 Merge branch 'master' into academie 2015-11-24 18:01:09 +01:00
Atemo
501751df39 - corrected getequipid warning when nothing equipped
- getstatus should push -1 for infinite timer
2015-11-24 17:23:35 +01:00
lighta
65b6861e84 Small cleanup
And updata mapcache to use DBPATH instead rechecking RENEWAL macro,
(code duplication)
Make mapcache use cli.o to give some feedback on arguments given.
2015-11-18 06:34:14 -05:00
lighta
8703eacfe4 Merge branch 'academie' of https://github.com/rathena/rathena into academie 2015-11-17 22:19:38 -05:00
Atemo
1e80d1b720 Removed comment and corrected typo 2015-11-18 03:36:37 +01:00
aleos89
c389a6c456 Follow up to e276970
* Fixed an issue with ATK/MATK params. Thanks to Lord Ganja.
2015-11-16 11:14:42 -05:00
Atemo
cc8edaaac6 Merged novice academie from Hercules 21564acf13
-> All Credit to Kisuka for this big work.

Added news commands to alter questinfo conditions :
- setquestinfo_level : Add level range criteria for quest info with quest id 'quest_id'.
- setquestinfo_req : Add quest requirement for quest info with quest id 'quest_id'.
   -> Player have / doesn't have the required quest.
- setquestinfo_job : To add additionnal job criteria.
-> Credit to Cydh !
2015-11-16 00:34:00 +01:00
lighta
09ddcdfe2a Merge pull request #731 from lighta/master
Type enforcement
2015-11-15 19:14:39 -04:00
lighta
dcfcb39dd0 Follow up 07ba18d, add @lemon fix for filling out correctly $@arenamembers array. 2015-11-15 18:57:53 -04:00
aleos89
e276970723 Updates for Unit Controller Script Commands
* Follow up to 2cee5b6.
* Fixes #516 - Base stats (STR, AGI, etc) will now stick after the unit's statuses are recalculated.
* Statuses are directly modifiable now (ATK, DEF, etc)
* Created constant values so it's a lot easier to read.
* Updated script command documentation to reflect changes.
2015-11-14 11:47:38 -05:00
lighta
07ba18d01f Follow up for cppcheck cleanup merge.
Revert some part
2015-10-30 04:14:15 -04:00
lighta
46d417a458 merge master into cppcheck 2015-10-30 02:48:40 -04:00
Cydh Ramdh
de40271000 * Follow up 2cee5b6ff1bf53c4ae53bc1278b09ae84b8a0a76: gethominfo, getpetinfo, and getmercinfo for type 0 were correct 'to get ID' from database/their unique ID, not as GID.
* Added type for `gethominfo`, `getpetinfo`, and `getmercinfo` to return GID.
* Added `geteleminfo`, to retrieve Elemental ID and GID. The otherinfo can be gained from `getunitdata`

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-10-14 10:27:31 +07:00
Cydh Ramdh
857b82d6ee Fixed #635, thank @julia40124009.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-10-11 20:50:45 +07:00
Cydh Ramdh
927d1e2f5c * Fixed #629. Thank @anacondaqq and @theultramage
* Added optional param `char_id` for `instance_enter`.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-10-10 19:04:15 +07:00
aleos89
cef2f9ea63 Bug Fixes
* Fixes #629 - Removed an extra costume check during action requests.
* Fixes #632 - Fixed long broadcast messages getting truncated.
* Fixes #635 - Fixed Elementals getting removed twice from a map during map_quit().
* Fixes #639 - Adjusted two checks from status_get_sc_def() so that tick_def2 is properly adjusted when pc_sc_def_rate is adjusted in battle config.
* Fixes #645 - Fixed atcommand 'iteminfo' displaying items not dropping from any monsters when battle flag 'mobinfo_type' is active.
* Fixes #652 - Don't call clif_scriptclose() on script command 'close' and script command 'end' when an NPC shop is active.
* Fixes #670 - Resolved a possible map crash when using the Lux Anima Runestone.
2015-10-09 18:22:35 -04:00
Cydh Ramdh
c9c988abba * Fixed #654, TF_BACKSLIDE failed if player has 'no knock back' bonus.
* Clean up on buildin scripts, to use constant in return value.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-10-03 22:29:46 +07:00
Lemongrass3110
a760e01c59 Follow up to 78b6c15
Fixed a possible buffer overflow in mapindex.c
2015-10-02 20:31:07 +02:00
Lemongrass3110
78b6c150d2 Added usage of enum values in script.c in some places. 2015-10-02 15:09:01 +02:00
Cydh Ramdh
e112fc1c50 Fixed #647. Fail to get parameter value from readparam if the parameter given is constant as param-type value. So for an example, readparam(BaseLevel) will be fine now, the result same as like BaseLevel itself.
Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-09-27 21:44:54 +07:00
Cydh Ramdh
230811c8ab Bug fixes:
* Fixed #651, now quest_db is separated between Renewal and Pre-Renewal to avoid non-existent monster/item (current missing monster/items are removed on Pre-Renewal). Thank @lordganja.
* Fixed #622, cast warning in script.c::get_val2. Thank @Litro .

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-09-24 07:41:02 +07:00
Cydh Ramdh
631747bb07 * Fixed memleak when use @set command for string type variable.
* Removed `0x2715` and `logchrif_parse_updmail`, not being used that was duplicated by `logchrif_parse_reqchangemail` (`0x2722`).
* Changed packet header `0x2736` to `0x2b13` of `chrif_update_ip` from map-server to char-server. That was ambiguous with `0x2736` of `logchrif_parse_updcharip` that being used by char-server to login-server.
* Changed packet header `0x3804` to `0x2726`, the one that being used to send back global account reg from login-server to char-server. That was ambiguous with `0x3804` that being used by char-server (was inter actually) to map-server.
* Some indent clean up as result from char & login server refactor.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-09-14 20:17:12 +07:00
Cydh Ramdh
31505d1423 * Fixed #607:
* Added array variable option in 3rd param of `getguildmember` and `getpartymember`, so the script will returns the result in reserved array instead using temporary global variable.
  * Also, the script returns the member found directly.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2015-09-04 00:32:38 +07:00
aleos89
ebaefc1476 Bug Fix
* Fixes #615 - Fixed script command 'query_sql' not returning any results.
2015-09-02 10:32:00 -04:00
Aleos
6295c77d39 Merge pull request #457 from rathena/feature/script_engine_upgrade
Script Engine Upgrade
* More information here: https://rathena.org/board/topic/102946-script-engine-upgrade/
2015-08-31 14:26:15 -04:00
aleos89
b8f6e16f9d Follow up to 9738c82
* Fixed some more memory leaks.
* Added a few checks that were left out/removed by mistake.
2015-08-25 13:23:23 -04:00
aleos89
9738c825cc Follow up to f53916e
* Fixed remaining memory leak.
* Cleaned up and optimized a few more ERS allocations.
2015-08-25 10:31:38 -04:00
aleos89
f53916e060 Script Engine Fixes
* Cleaned up db_vdestroy errors at server shutdown.
* Expanded the ERS system. Thanks to Hercules.
* Added ERS to the database trees to speed up iterator memory allocation. Thanks to Hercules.
2015-08-21 15:16:52 -04:00