407 Commits

Author SHA1 Message Date
Cydh Ramdh
62bdc99f05 A little cleanup for Pet DB
* Separated pet_db for Renewal & Pre-Renewal to avoid non-existant monster in different mode.
* Cleaned script command in pet_db.txt file, just point it to doc/script_commands.txt. Read them there!
* Separated damage value for petskillattack2 to its own var 'damage', that previously use 'lv' var to store the value.
* Added config 'pet_ignore_infinite_def' in conf/battle/pet.conf,
  * If disabled (val:"no"), fixed damage from pet script 'petskillattack2' will be adjusted to 1. Example, just like player attacks Shining Plant.
  * Enabled by default. Previously, fixed damage ignore the infinite defense, that's why it's enabled by default.
  * TODO: Correcting the logic and maybe also confirm the correct behavior!
* Added validation for pet script commands,
  * Skill for petskillattack, petskillattack2, & petskillsupport
  * SC range for petrecovery.
* Cleaned up some source documentation.

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-12-31 23:38:57 +07:00
Cydh Ramdh
aff0a005a7 Doc update for 'ermgeitem'
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-12-06 14:36:42 +07:00
Cydh Ramdh
5ce80555a7 Corrected guid implementation of item package in 51074a0
* GUID
  - `guid` field in official PackageItem.lua supposed to make item will be separated even item is stackable item.
  - Currently `guid` usage is using item Unique ID that generated when item with GUID flag is appear from package.
  - Some item containers in official PackageItem.lua are also separated, not stacked when player obtain it. Example when using atcommand "@item Xmas_Bless". For current implementation, the items are flagged in item_flag.txt (db folder) with flag 4.
  - `isNamed` field in item group is replaced by `GUID` and move the `isNamed` as new additional field. See doc/item_group.txt or db/re/item_package.txt.
* NPC:
  - Enabled npc/re/other/item_merge.txt and it's now usable.
* Script Command:
  - Added `mergeitem` to merge separated items in player's inventory. See doc/script_commands.txt.
* Misc:
  - Changed how to broadcast the item that obtained from package with flag `isAnnounced` to intif_broadcast, so it will be announced to all connected map-servers.
  - Added some items that flagged as 'item group container' in db/re/item_flag.txt

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-11-30 13:52:52 +07:00
Cydh Ramdh
34ca457ab0 Follow up bbe733e, typos
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-11-23 14:33:28 +07:00
Cydh Ramdh
bbe733e236 Expand 'checkvending' script
* Added returned values for buying store.
* Made returned values as bitmask. &1 - Vending, &2 - Autotrading, &4 - Buyingstore

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-11-21 21:56:16 +07:00
Cydh Ramdh
3047292665 Just a little changes
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-11-19 03:16:59 +07:00
Akkarinage
d02bd5b016 Removed script command 'getusersname' (bugreport:1024) 2014-11-18 17:12:45 +00:00
icxbb-xx
66df36b0b2 Fixed compile warning (follow-up to 04a1173)
- Special Thank @tmav94
2014-11-09 10:39:14 +07:00
icxbb-xx
2ca6cd7760 Fixed typo in script command merge to dispbottom (follow-up to 4f09d08)
- Special Thank @Euphy
2014-11-08 05:49:14 +07:00
icxbb-xx
4f09d08226 Follow-up to a4f2bdb 2014-11-03 07:08:07 +07:00
aleos89
c0ed836e87 * Changed how the Unique ID System saves and creates IDs for items. (Hercules dd49dbc)
- System is now enabled by default.
- All non-stackable items that previously existed will get unique IDs if items::item_check is enabled.
- Added 'getequipuniqueid' script command to get the unique ID of an equipment on a player.
- Don't forget to apply the SQL update!
* Renamed SQL update file that applied to logs.
2014-08-22 17:52:15 -04:00
aleos89
60b0ed9c8b Bug Fixes
* Fixed mouse cursor displaying incorrectly for PvP scenarios. Thanks to Napster. (bugreport:8605)
* Fixed summons getting stuck when master gets too far off screen or changes maps. (bugreport:9152)
* Added a battle_config 'spawn_direction' for keeping a  character's face direction when teleporting/changing maps/logging in. Default is always North (official). (bugreport:8754)
* Cast sensor mobs should always target the caster whenever any skill is used. (bugreport:8555)
* Added a packet version check to char_del_option based on client date. (bugreport:8521)
* Script command query_sql will now return -1 on an empty result or failed result. (bugreport:5937)
2014-08-16 16:15:50 -04:00
Cristian Gonzalez
eb7d77debd typo 2014-08-05 10:55:11 +02:00
Cristian Gonzalez
bf7e0960db typo 2014-08-05 10:52:01 +02:00
aleos89
62a2813adc Bug Fixes
* Fixed Concentration ending when Frenzy is used. (bugreport:8942)
* Fixed Hells Plant hitting Ghost element enemies. (bugreport:8799)
* Forced guild notice changes to save immediately. (bugreport:8961)
* Fixed Cart Tornado damage formula. (bugreport:9065)
* Adjust Amistr's Castling to now switch to any target type. Still needs skill switching support. (bugreport:1784)
* Removed hard coded 1 second skill duration reduction for Spore Explosion.
* Fixed the party window not displaying the correct map name when in an instance. (bugreport:7949)
* Fixed hatching a pet causing client disconnections. (bugreport:9059) (Hercules 533ff4f)
* Updated Kagerou/Oboro skill cast times. (bugreport:9035)
* Removed deprecated negative nameid value for getitem/getitem2.
* Renamed incuvate to incubate throughout source and SQL.
* Added skill ID to the error display for battle_calc_attack to help resolve issues. (bugreport:8876)
* Cleaned and corrected some Sorcerer Elemental skills. (bugreport:9058)
* Cleaned up some more compile warnings.
2014-06-27 15:45:35 -04:00
Cydh Ramdh
0fca530278 * Fixed bugreport:9034 (Hercules aff9c14)
* 'bonus_script' improvement:
-- Added flag values (partial merge from sc_config branch):
-- * 16  : Removeable by Banishing Buster.
-- * 32  : Removable by Refresh.
-- * 128 : Removable by Luxanima.
-- * 256 : Remove when Madogear is activated or deactivated.
-- * 512 : Remove when receive damage.
-- * 1024: Script is permanent, cannot be cleared by bonus_script_clear
-- Added 'bonus_script_clear' command to remove active bonus_script from player (works like sc_end) Thank Napster to mention this. (bugreport:9042)

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-06-20 15:12:42 +07:00
Euphy
5e261ba415 Minor cleanup of riding script commands.
- The 'checkriding()' function no longer checks for wargs and dragons, ONLY Pecos, Grand Pecos, and Gryphons (as documented). (bugreport:9024)
http://rathena.org/board/tracker/issue-9024-about-renters-from-rathenanpcremerchants/
- Replaced 'checkoption()' warg checks with 'checkwug()'.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-06-10 22:58:09 -04:00
Akkarinage
47e7771563 Merge pull request #76 from Atemo/master
Some fix
2014-06-02 14:06:18 +01:00
Cydh Ramdh
794c1a8247 Bug fixes & Misc:
-- Map crashed because empty item_combo script (bugreport:8959)
-- Wrong MATK calculation of Distort Crescent/Zangetsu effect (SC_ZANGETSU) (bugreport:8998)
-- Wrong damage reduction of Sera's Pain Killer effect (SC_PAIN_KILLER) (bugreport:8994)
-- Fixed Shape Shift (NC_SHAPESHIFT) wrong requirement (bugreport:9002)
-- @itembound, getitembound usage. Not, now allowed for unspecified bound_type (thank Ceejay Abne! http://rathena.org/board/index.php?showtopic=94726)
-- Change check behavior for skill requirement level-dependent check.
-- Removed NC_REPAIR hardcoded requirement.
-- Moved the required equipped item to 'RequiredEquipment' on skill_require_db.txt.
-- Missing "Option_Ruwach" as contantan.
-- Corrected Chasewalk STR bonus, it's SC_CHASEWALK2, different with SC_INCSTR.
-- Corrected some Rebellion skill's effects.
-- USESKILL_FAIL_MADOGEAR message for failed skill that needs player has Madogear.
-- Changed skill name and description length to 31 chars.
-- Some documentation updates.
-- Follow up 0f2dd7f. (Well, using empty password in import file, won't works, if you want, empty the original conf file. Fix this later, related on 'sscanf' for those files)
-- Follow up 28c90bb, thank @julia40124009
-- Misc. :P

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-05-31 21:42:44 +07:00
Capuche
dcd6b02c09 Update script command (bugreport 7836). 2014-05-30 20:52:29 +02:00
Capuche
45a7abcf4e - Updated docs about strmobinfo.
- Fixed an exploit in jobmaster.txt
2014-05-30 20:46:23 +02:00
aleos89
1d1a58cdcb Bug Fixes
* Removed unused guild aura leftovers and fixed some other issues with setting the guild aura. (bugreport:8892)
* Fixed Fire Expansion Acid to be a magic type attack. Thanks to exneval.
* Cleaned up some remaining issues with Issen. (bugreport:8905)
* 16th Night (Izayoi) should remove fixed cast time from all skills.
* Circle of Nature is now part of Group B songs.
* Updated Reading Spell Book spell memorization to official.
* Updated homunculus skill cooldowns.
* Added missing Holy element bonus for Hesperus Lit.
* Fixed Coluseo Heal and Praefatio not giving a party bonus. (bugreport:8904)
* Fixed the status icon for ALL_RIDING not being displayed at login.
* Adjusted the notice display order when players login. (Hercules df1952d)
* Self skills can now be used while storage is open. (Hercules 6f6a6b3)
* Cleaned up SC_NOCHAT/Manner system. (Hercules 94ef1ee)
2014-04-16 11:06:09 -04:00
aleos89
9b098e109e Merge pull request #62 from cydh/master
Added a few new script commands thanks to @cydh!
- *countitem:
-- Added cartcountitem
-- Added storagecountitem
-- Added cartcountitem2
-- Added storagecountitem2
-- Added a new param 'AccountID'
- *delitem:
-- Added cartdelitem
-- Added storagedelitem
-- Added cartdelitem2
-- Added storagedelitem2
2014-04-01 14:49:45 -04:00
aleos89
5e02af25af Fixed quest information icons not displaying properly on NPC. (bugreport:8156, bugreport:8157) (Hercules 1ab0017) 2014-03-31 08:17:45 -04:00
Cydh Ramdh
f756d7e249 Merge branch 'rathena/master' 2014-03-27 13:48:41 +07:00
Cydh Ramdh
01c30bf505 Script Command Updates:
- *countitem:
-- Added cartcountitem
-- Added storagecountitem
-- Added cartcountitem2
-- Added storagecountitem2
-- Added a new param 'AccountID'
- *delitem:
-- Added cartdelitem
-- Added storagedelitem
-- Added cartdelitem2
-- Added storagedelitem2

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-03-22 14:44:20 +07:00
Jeric
7081f0ce7a Update script_commands.txt
Added documentation for switch statement.
2014-03-20 17:18:40 +08:00
Euphy
8c133f139b Hercules merges.
- If a player has both a Cart and Magic Gear, removing them will now first remove the Magic Gear first (instead of both simultaneously).  (2f9a514)
- Added overflow check to 'itemheal'; documentation updated. (1849d35)

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-03-13 16:20:56 -04:00
Euphy
4889699376 Bug fixes.
- Fixed guild names for payg_cas02 and payg_cas04. (bugreport:8763)
http://rathena.org/board/tracker/issue-8763-castle-db-wrong-castle-names/
- Fixed OnTouch issues in Old Glast Heim instance. (bugreport:8738)
http://rathena.org/board/tracker/issue-8738-oldglastheim/
- Fixed a minor documentation issue with 'pcblockmove'. (bugreport:8706)
http://rathena.org/board/tracker/issue-8706-pcblockmove-description-incorrect/

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-03-13 15:47:02 -04:00
Jeric
83ee884891 Update script_commands.txt
Improved explanation for OnWhisperGlobal and included the reference in the docs.
2014-03-13 15:34:38 +08:00
Jeric
7ee480a38b Update script_commands.txt 2014-03-12 18:11:07 +08:00
Akkarinage
6e5545274e Variable typo (bugreport:8722) 2014-03-06 11:49:25 +00:00
Euphy
4a84de748c Merge pull request #49 from CairoLee/master
- Add instance_enter2 script command
2014-03-03 16:41:29 -05:00
Euphy
cad0a57865 Replaced 'getserverdef' command with 'script_hardcoded_constants' function in source. These constants can now be directly accessed in scripts. (Hercules 950e3eb)
- Relocated 'Option_*' constants from 'db/const.txt' to source; added OPTION_COSTUME compound. (Hercules a5728fd)
- Added MAX_CHAT_USERS define. (Hercules 950e3eb)
- Follow-up ca9642a: applied 'Loc' changes to Pre-Renewal database.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-03-01 15:42:49 -05:00
Sean Allen
f20e54150a Update script_commands.txt
- Update instance_enter Description
2014-02-24 03:01:49 +08:00
CairoLee
1f426bcb07 - Add instance_enter2 script command 2014-02-24 00:45:57 +08:00
Cydh Ramdh
072e98bdf2 Spiritball typo
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-02-23 19:17:11 +07:00
Cydh Ramdh
992c382562 Updated documentation for spiritball script commands
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-02-23 19:05:16 +07:00
Cydh Ramdh
a607a42ea3 Merge branch 'rathena/master' 2014-02-20 10:45:49 +07:00
Euphy
944e7d041f Minor bug fixes.
- Changed 'bIgnoreDefRate' to 'bIgnoreDefRaceRate' in Pre-Renewal item database. (bugreport:8674)
http://rathena.org/board/tracker/issue-8674-item-bonus-error-or-not/
- Added missing 'bFixedCastrate' bonus for item 1832. (bugreport:8422)
http://rathena.org/board/tracker/issue-8422-vellum-claw-not-giving-insta-cast-on-10/
- Clarified 'getgmlevel()' and 'getgroupid()' functions in script documentation. (bugreport:8586, pull #46)
http://rathena.org/board/tracker/issue-8586-script-commandstxt-doc-getgroupid/
- Added Buying Store tables to source documentation.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-02-18 19:09:37 -05:00
Euphy
27a0f3f88e Added 'OnPCStatCalcEvent' trigger. (tid:77230, credits: @QQfoolsorellina, AnnieRuru)
This label triggers whenever a player's stats are recalculated.
http://rathena.org/board/topic/77230-onpcstatcalcevent/

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-02-15 12:40:43 -05:00
Euphy
877af1cfab Added optional 'dragon color' parameter to @mount. (tid:79844)
http://rathena.org/board/topic/79844-mount/

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-02-11 22:53:17 -05:00
Euphy
eba153919e Added script command 'getguildmember', similar to 'getpartymember'. (tid:78308, credits: AnnieRuru, GodLesZ)
http://rathena.org/board/topic/78308-getguildmember/

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-02-11 15:12:47 -05:00
Euphy
a2d095f5c4 Item database update.
- Added/edited itemscripts for some new items.
- Corrected the persistence of many Hit- and Flee-increasing consumables, as they should dispel upon death. (incl. bugreport:8626)
http://rathena.org/board/tracker/issue-8626-accuracy-30-scroll-effect-when-death/

Hercules merges:
- Added optional 'count' parameter to script command 'successrefitem'. (9d1f80e)
- Atcommand bindings are now case-insensitive, like normal atcommands. (92be98c)
- Consumables without expire time no longer stack with rental items. (afcb4bc, bugreport:8458)
http://rathena.org/board/tracker/issue-8458-rent-item-bug/

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-02-10 16:13:53 -05:00
Cydh Ramdh
842e35c293 Merge branch 'rathena/master'
Conflicts:
	src/map/script.c
2014-02-10 19:05:45 +07:00
Euphy
2fff785894 Modernized syntax and fixed errors in the sample scripts. (Hercules 21fa090)
Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-02-08 16:34:26 -05:00
Euphy
de46393592 Improved 'client_hash_check' config. (Hercules e4a1ca2)
- Added option to disable hash check by GM group_id (specify 'disabled' as hash for a certain group_id to let them log in with any client, even if 'client_hash_check' is enabled.
- Updated and reworded related documentation for the feature.

Improvements on script command 'axtoi'; added 'strtol'. (Hercules 1cf7c1e)
- Added script command 'strtol' (conforming to the ISO C90 function).
- Modified script command 'axtoi' to internally use 'strtol' instead of an unnecessary separate implementation.

Cleaned up many sections of script documentation, and modernized syntax in examples.
Added documentation for 'rentitem2' and 'makeitem2'. (follow-up 339c0a8)

Added 'true' (1) and 'false' (2) as script constants.

'freeloop' argument is now optional, and will only return the value of freeloop if no argument is given. (tid:92470)
http://rathena.org/board/topic/92470-freeloop-optional-argument/

Added a missing mapflag to custom 'devil_square' script. (bugreport:8611)
http://rathena.org/board/tracker/issue-8611-devil-square-bug/

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-02-08 15:32:28 -05:00
Cydh Ramdh
339c0a8c48 * Added script commands2, rentitem2 and makeitem2, suggestion http://rathena.org/board/topic/90918-emistrys-rentitem2-be-added-to-svn/
-- *rentitem2 <item id>,<time>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>;
-- *rentitem2 "<item name>",<time>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>;
-- from http://www.eathena.ws/board/index.php?showtopic=241313&view=findpost&p=1315831
-- *makeitem2 <item id>,<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>;
-- *makeitem2 "<item name>",<amount>,"<map name>",<X>,<Y>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>;
-- Credits for the script author(s) & contributor(s)
-- NOTE: I didn't make the documentation yet
* Follow up 3441d4a

Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
2014-02-08 16:34:55 +07:00
Euphy
957f49563a Added 'preg_match' script command to match regular expressions.
The command is only available if the PCRE library is installed.

Updated indefinite articles in Global_Functions with regex. (credits: Kaivosukeltaja/php-indefinite-article/863f1d5)

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-01-29 16:33:27 -05:00
Euphy
ad13f26fc2 'consumeitem' no longer requires npc_id to run. (bugreport:8563, credits: AnnieRuru)
Second part of the bug report is not yet fixed.
http://rathena.org/board/tracker/issue-8563-consumeitem-doesnt-work-if-the-npc-id-is-0-example-bonus-script/

Replaced a few 'consumeitem' commands in scripts that were broken.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
2014-01-28 03:00:48 -05:00