332 Commits

Author SHA1 Message Date
Atemo
7b816e18fb Initial release of episode 19 - Walkthrough Conversion 2024-07-30 17:03:13 +02:00
Daegaladh
29a63820fd
Fixed searchstores incorrectly updating uses (#8491) 2024-07-04 22:22:44 +02:00
Lemongrass3110
25b9126644
Refactored get/set unitdata (#8483)
Fixes #8481

Thanks to @Hyroshima
2024-07-03 17:05:15 +02:00
Atemo
88e3eba8cf
Updated instance_check_party script command (#8457)
* The command now returns 0 if the party id does not exist
* Fixed #8426

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2024-06-27 18:23:03 +02:00
Daegaladh
549fc3f860
Fixed searchstores and added a map parameter (#8456)
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
Co-authored-by: Atemo <Atemo@users.noreply.github.com>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-06-26 20:21:26 +02:00
Daegaladh
5123704795
Added player permission script commands (#8450) 2024-06-21 19:12:01 +02:00
Lemongrass3110
1ca634df1d
Packet cleanups - const and casts (#8422) 2024-06-20 14:33:47 +02:00
Playtester
566ac2078d
Guillotine Fist SP Recovery Prevention Cleanup (#8443)
- Unified code for SC_EXTREMITYFIST
  * It stops natural SP recovery for 300s in pre-re
  * It stops natural SP recovery and recovery from items for 3s and shows icon in renewal
- Removed SC_EXTREMITYFIST2 as it's no longer needed
- Fixed an issue that caused a natural SP regen tick to happen right after using Guillotine Fist
- Fixes #8377
2024-06-19 07:53:30 +02:00
Atemo
ce5de23874
Updated get_bosstype and UMOB_MODE (#8439)
* Updated mob_data::get_bosstype() to use current mob data instead of db data to fix issue when the mode is changed via the setunitdata script command.
* Added unit_refresh in UMOB_MODE to refresh the mini icon near the monster indicating the monster type.
2024-06-17 19:38:00 +02:00
Atemo
6451925430
Updated npcspeed, npcwalkto and npcstop script commands (#8354)
* Added the optional parameter <npc name> to npcspeed to change the walking speed of the npc with the said name.
  Usage : npcspeed( <speed value> {,"<npc name>"} );

* Added the optional parameter <npc name> to npcwalkto to move the npc with the said name at the given coordinates.
  Usage : npcwalkto( <x>,<y> {,"<npc name>"} } );

* Added the optional parameters `<npc name>` and `<flag>` to `npcstop` to stop the movement of the npc with the said name with options.
  Usage : `npcstop( {"<npc name>", {"<flag>"}});`

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2024-06-16 14:57:59 +02:00
Lemongrass3110
34eb4be25b
Preparatory cleanup of parties (#8418) 2024-06-12 15:39:24 +02:00
Lemongrass3110
aaa9890470
Preparatory cleanup of clans (#8416) 2024-06-12 10:03:44 +02:00
Daegaladh
0d3550e7ea
Fixed clif_move to use the correct movement packets (#8405)
* Removed unused ZC_NOTIFY_MOVE (0x86) packet
---------

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-06-11 00:03:43 +02:00
Daegaladh
6ca99e7852
Fixed potentially dangerous map_addflooritem calls and related behaviors (#8360)
*Removed potentially dangerous map_additemfloor calls
*Added weight/inventory checks for marry atcommand
*Fixed overweight message for box items
*Fixed inventory space check for box items to match official requirement (the total number of the items the box will give you *r min 10, plus 1)
*Fixed inventory space message for box items
*Fixed pet egg creation not deleting the pet data when failed to add it to the inventory
*Fixed pet egg creation dropping the egg on the floor when failed to add it to the inventory
*Fixed pet equipment dropping on the floor when failed to retrieve the item
*Added a battle configuration to prevent removing the pet equipment (and disappear into nothingness) when failed to retrieve the item
*Added missing skill_drop_items_full checks on several skills (official behavior makes the items disappear)
---------

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-06-10 22:44:19 +02:00
Lemongrass3110
48b4623f3e
Fixed all warnings in MSVS (#8391)
Fixes #2859
Fixes #3570
Fixes #8389
2024-06-04 03:07:16 +02:00
Lemongrass3110
660b194ade
Changed droplists from ERI to STL (#8370) 2024-06-04 02:40:55 +02:00
Daegaladh
1f9a43c9d2
Replaces more constant names with the official ones (#8374)
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2024-05-31 14:51:59 +02:00
Lemongrass3110
1b9e46b247
Generic cleanup of packets (#8369)
Standardized initial packet length of dynamic packets to sizeof
Standardized normal casts of packet_buffer to reinterpret_cast
Standardized packet length incrementations to static_cast with decltype
Removed unused function clif_setdisguise
Fixed an issue with string length in clif_scriptmenu
Removed struct keywords
Resolved a few warnings
2024-05-31 14:28:40 +02:00
Atemo
361530a1b6
Converted some packets to structs (#8351) 2024-05-21 21:28:01 +02:00
Atemo
d1cf6f4ac7
Converted some packets to structs (#8332) 2024-05-20 21:13:59 +02:00
Lemongrass3110
da8229b8f5
Added some suggested code improvements (#8331)
Fixes #8309

Thanks to @mrpond
2024-05-13 17:46:47 +02:00
Jittapan Pluemsumran
d445497870
Converted a bunch of packets to structs (#8295)
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-05-09 23:06:32 +02:00
Lemongrass3110
b48948822a
Replaced NULL with nullptr (#8298) 2024-05-03 19:38:13 +02:00
Lemongrass3110
827517f8cf
Cleaned up a few TODOs from #7963 (#8254) 2024-05-02 22:44:31 +02:00
Lemongrass3110
cb42dceb87
Switched most C headers to C++ (#8225) 2024-04-07 22:14:51 +02:00
Atemo
a768af85ee
Updated geteleminfo script command (#8168)
* Updated geteleminfo script command
* Added a new <type> "2" that returns the class ID of the elemental spirit
* Fixed Dimensions Elemental* combos: item descriptions require high elemental spirit check
* Added new constants for geteleminfo

Thanks to @aleos89 @Badarosk0 !
2024-03-14 14:08:45 +01:00
Pokye
eb308dcad2
Implemented Dialog Types (#8110)
Fixes #8109

Co-authored-by: Aleos <aleos89@users.noreply.github.com>
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2024-02-26 22:08:52 +01:00
Lemongrass3110
d3fcb66d3a
Fixed some memleaks (#8107)
Improved memleak location reporting for parse_script
2024-01-17 18:58:13 +01:00
Vincent Stumpf
61c2480d89
Add explicit [[fallthrough]] attributes (#8054)
Fixes #7918
2023-12-29 01:08:24 +01:00
Vincent Stumpf
8336f046b7
Allow default sell values in npc shop scripts (#8050)
Fixes #6594
2023-12-27 22:16:04 +01:00
Vincent Stumpf
f2a3bad3e2
Cleanup uses of SWAP macro (#8051) 2023-12-27 11:36:46 +01:00
Lemongrass3110
cd0c44af60
Refactored script command rand (#8040)
Fixes #8041

Added support for int64, so the range of the random numbers that can be generated is much wider now.

Changed the logic to be more restrictive:
	(1) The range version is intended for positive numbers only.
	(2) If minimum and maximum are equal and no random value can be calculated.
Triggering the more restrictive behavior will trigger the script source (file) to be reported in the map-server.

Co-authored-by: Atemo <Atemo@users.noreply.github.com>
2023-12-26 23:52:37 +01:00
Lemon
7c153416bc
Improved randomness (part 1) (#7882)
Faster and with no module bias

Removed rnd_init, rnd_uint32 and rnd_uniform
From now on we will only use rnd_value(min, max) for values in range [min, max] and rnd_chance(chance, base) for chances

Fixes #7881
Fixes #7883
Fixes #7884
Fixes #7885

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2023-12-20 00:12:15 +01:00
HAO YAN
7ee7a25887
Add autoloot script command (#8032) 2023-12-14 15:39:57 +01:00
HAO YAN
7db67c6207
Battleground and clan support for addrid (#7969) 2023-12-11 08:47:00 +01:00
HAO YAN
461294f423
Add channel_join script command (#7970) 2023-12-11 08:43:56 +01:00
Atemo
c23afaeac0
Implemented script command opentips (#8005)
- Opens the tip box UI for the attached player or the given character ID.
2023-11-13 19:15:40 +01:00
HAO YAN
a1616903a6
Add has_autoloot script command (#7972)
* Adds the has_autoloot script command to check if a player is autolooting items.
2023-11-06 12:30:34 -05:00
Harvin
0e9ae33f64
Fix mailing special card (#7950)
Fixes #7947

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
2023-10-05 09:12:09 +02:00
Atemo
8196149b2b
Additional check in script_instancegetid (#7929) 2023-09-15 17:36:50 +02:00
Singe Horizontal
af602d5535
Call script_hasdata before script_getnum in addrid (#7876)
* Fixes #7875.
* Calling script_hasdata before script_getnum in addrid
Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2023-08-04 12:02:35 -04:00
Vincent Stumpf
833966f47b
Convert guild_db to unordered_map (#7612)
* Refactor guild db to STL container

* Split up struct guild and MapGuild/CharGuild
2023-06-16 19:42:55 -07:00
Vincent Stumpf
08a1c41d1b
Refactor MapFlag accessors (#7783)
Use methods instead of direct member access.
2023-06-03 17:38:29 -07:00
Atemo
b4b69a2cc1
Fixed an issue where mobs instantly walked after being spotted (#7738)
* Fixed an issue where mobs instantly walked after being spotted
  MIN_RANDOMWALKTIME was initialized too early
* This behavior is only applied on the monster script command
2023-05-12 00:34:36 +02:00
Singe Horizontal
b4be3b059a
Prevent an uint underflow and reformat array_size occurences in some commands (#7729)
Fixes #7728
2023-04-22 19:42:13 -07:00
Lemongrass3110
18ec884ba8 Removed a duplicate function call in erasequest
Thanks to @Pokye
2023-04-12 22:33:21 +02:00
Everade
7853e926c2
Episode 17.2 - Sage's Legacy (#6799)
* Episode 17.2 Initial Release of instances and quests
* Added warp portals and monster spawn scripts
* Added Episode 17.2 related database entries

Closed #6470 

Thanks to @Megelith @Pokye 

Co-authored-by: JohnnyPlayy <JohnnyPlayy@users.noreply.github.com>
Co-authored-by: Everade <privacy@gatheringro.com>
Co-authored-by: crazyarashi <26841779+crazy-arashi@users.noreply.github.com>
Co-authored-by: Atemo <capucrath@gmail.com>
2023-04-12 21:27:34 +02:00
Atemo
0413d0e85c
Initial release of Illusion of Luanda (#7559)
* Implemented the main quest, daily quests and exchange npcs related to Illusion of Luanda.
Fixed #6462 

Co-authored-by: Aleos <aleos89@users.noreply.github.com>
2023-04-12 18:38:26 +02:00
Atemo
db5874d677
Updated unitskilluseid and unitskillusepos script commands (#7684)
* Added the parameter 'ignore_range' to ignore the skill range defined in skill_db.yml
2023-04-07 01:09:44 +02:00
Vincent Stumpf
f0e374ea23
Fixes getrefine failing in OnEquip/OnUnequip scripts (#7592) 2023-03-20 10:08:04 -07:00