809 Commits

Author SHA1 Message Date
greenboxal2
66d5d750fe Added mercenary and elemental objects support for getmapxy.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16326 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-21 10:28:02 +00:00
greenboxal2
30e0f39055 Fixed bugreport:5740 var reference was not being restored to call buildin_set on assignment statements.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16300 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-15 00:30:20 +00:00
shennetsind
282892387f Added support for new carts (requires packetver 20120201 or newer). Super-Ultra-Plus thanks to Fatal Error and Judas.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16297 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-14 19:36:05 +00:00
shennetsind
4ca3aa34ed Added new bonus as per kenpachi's request: bonus2 bUseSPrateSkill,n,x; // Reduced increases/reduced the SP consumption of skilln by x%. (supports skill names)
e.g. bonus2 bUseSPrateSkill,"AL_BLESSING",50; -> increases AL_BLESSING sp usage by 50% (e.g. if its 50 it goes to 75)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16273 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-12 02:09:55 +00:00
shennetsind
e2fd3350e5 Improved bonus-adding processes by no longer having to add it to the zero'd memset bullshit, replaced it by moving the first set of bonus into its own struct and simply zeroing the struct prior to recalc.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16272 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-12 01:08:05 +00:00
rud0lp20
9c2c02007f Follow up on r16240 update RK_CRUSHTRIKE formula and weapon break percentage.
Fixed bugreport:5953 GC_CROSSRIPPERSLASHER range is now (8 + 1 * skill level) cells.
Fixed bugreport:5943 SC_GROOMY is now really remove selected mounts.
Updated Guillotine cross skills formula base on re-balancing formulas...

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16243 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-08 12:28:14 +00:00
rud0lp20
3a86a38e89 Fixed bugreport:5873 sex changed shouldn't now make exploits regarding item bonuses.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-30 19:10:36 +00:00
rud0lp20
7771470c6c Fixed bugreport:5850 GN_HELLS_PLANT damage formula and behavior are now updated.
Fixed bugreport:5848 RK_DRAGONTRAINING should now work normally.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16166 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-29 16:25:25 +00:00
rud0lp20
1d43091f5b Fixed bugreport:5821 GN_SLINGITEM item requirements(item throwables) should now works normally.
Fixed bugreport:5223 GN_BLOOD_SUCKER should now work like official behavior.
Fixed part of bugreport:5674 Spiral Pierce is now in RE.
Fixed setmadogear now it accepts optional parameter(0=unmount 1=mount).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16155 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-27 11:33:42 +00:00
rud0lp20
d1e0139939 Added new script command: instance_check_party <Party ID>{,<amount>{,<min>{,<max>}}};
-Checks the Players Party if it meets the above set requirements. see script_commands.txt for more info. Thanks Masao

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-21 13:33:43 +00:00
masao87
df766d8374 - Added +11 and above refiner NPC.
- Added NPC to refine Oridecons / Eluniums to Cardium / Bradium.
- Added downrefitem script command and updated script_commands.txt with it.
- Updated refine_db.txt with probably custom values for +11 to +20 values. Source : http://ratemyserver.net/index.php?page=misc_table_refine
- Some little script improvements to Suhnbi. (Enriched Elunium / Oridecon Upgrader.)
* Further improvements for the refinement system and refinement NPC's will come within the next few days.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16126 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-17 20:39:42 +00:00
rud0lp20
2990091a11 Fixed bugreport:5749 Amplify Magic Power should now work properly on multi-hit magical skills.
Fixed bugreport:5748 Masquerade-Groomy now removes Dragon and Warg.
Fixed bugreport:5751 Implemented script command in checking/mounting Dragon, Warg and MADO Gear, also made a clean up regarding MADO Gear and Warg conditions. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16114 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-16 16:56:43 +00:00
greenboxal2
e82b087692 Fix bugreport:5695 local scoped variables reference map not being freed after return.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16079 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-04 23:17:25 +00:00
xazax-hun
d7c5f0acf3 Regularized file not found error messages.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16073 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-03 19:46:59 +00:00
epoque11
3e22697410 - Amended the permanent NPC variable instance system to utilise the same allocated DBMap** (follow-up to r16018)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-30 12:59:01 +00:00
epoque11
8d89bc7c83 - Fixed NPC instance variables not being passed through to callfunc; or callsub; stacks properly (bugreport:5673)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16018 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-30 12:50:56 +00:00
epoque11
7c77d43217 - Removed copyarray; functionality when running set; or assigning variables (bugreport:5675)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-30 12:21:59 +00:00
brianluau
a0ef961db9 - Removed leftover TXT configs, follow-up to r15503.
- Edited more ***_config_read() functions to show a warning if "Unknown setting" is found.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29 20:32:21 +00:00
shennetsind
535e0712a9 reasonably-sized performance improvement: @reloadscript is about to 3 times faster.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16004 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29 15:47:57 +00:00
epoque11
9b45e8e104 - Fixed a missing variable storage allocation resulting in NPC variables not being saved (bugreport:5669)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29 14:47:56 +00:00
epoque11
7c11d35955 - Fixed a map-server crash when script variable storage reference is NULL (bugreport:5666)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16002 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29 11:40:20 +00:00
epoque11
ab8f7490a0 - Fixed an issue with the instance variable storage system never being initialised (since unknown revision)
- Combined both string and integer instance variables into a single DBMap* structure
- Fixed a missing new-line at the end of src/common/conf.h causing warnings

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15998 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-28 22:15:18 +00:00
epoque11
02e4daf67d - Updated the script engine to make use of the DBMap* structure for storing variables (for Ind <3)
- Fixed missing new-lines at the end of various files causing warnings

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-28 21:50:55 +00:00
epoque11
20e1d5b8b4 - Updated the script engine to store references to important re-used methods (set, callfunc, callsub, getelementofarray)
- Updated the user-defined function invocation to reduce strdb_get() calls to find a matching function
- Updated the direct variable assignment system to remove an unnecessary for loop while processing variable names
- Updated the direct variable assignment system to support assigning an array to a variable directly (without the use of copyarray)
- Note: copyarray; is still required to be defined in the source

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15994 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-28 12:39:38 +00:00
epoque11
c9228bf0f3 - Fixed typo for the -- operator (follow-up to r15982)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15985 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-27 17:09:10 +00:00
epoque11
c3193f3106 - Added initial support for direct variable assignment (allows assigning values to variables without the use of 'set')
- Note: the set; function is still required to be defined in the source

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-27 13:28:51 +00:00
epoque11
870a300ae5 - Follow-up to r15979, updated parse_simpleexpr to parse direction function invocation
- Added SCRIPT_CALLFUNC_CHECK macro to disable direct callback if affecting performance

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15981 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-26 19:19:31 +00:00
epoque11
2578dfe2f9 - Added support for scripts to call user-defined functions without the use of callfunc
- Note: the callfunc; method is still required to be defined in the source

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-26 18:37:23 +00:00
shennetsind
147c6ddbad Minor performance improvement on script function is_function -- replaced strdb_get with strdb_exists since we don't use the data at all.
Modified get_revision to return the revision number rather than it's string, when revision is not known by the server it now returns -1.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-25 13:42:49 +00:00
shennetsind
9d14415b75 Removed pc_cant_newmount since it has been proved newer clients still support them.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15966 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-25 11:20:28 +00:00
eathenabot
a8dd6428de * Merged changes up to eAthena 15090.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15929 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-22 17:34:07 +00:00
shennetsind
a1612031a6 Initial support for Genetic, Sorcerer and Elemental Summons. Special Thanks to 3CeAM for the base.
Notice this revision onwards requires you to update your char sql table and add the elemental sql table (check sql-files/upgrade_svn15885_log.sql)
If you step by any bugs, let us know at http://rathena.org/board/tracker/ Thank you very much.
ARRIBA ARRIBA.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15885 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-20 18:05:14 +00:00
brianluau
64379ae3d4 - Added 22nd argument to 'getmonsterinfo' which returns the mvp_exp of a monster.
- Changed 'checkvending' to return 2 if player is using @autotrade.
- Follow up to r15871: used spaces so everything lines up (people might use different Tab Size in their text editors).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15872 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-19 05:56:01 +00:00
shennetsind
c0a6468d03 Let there be light! GREEN TREE ON ALL DISTROS, I CHOOSE YOU, NOW!
All 64-bit warnings should be cleared by this revision.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15862 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-15 12:40:20 +00:00
protimus
f5f937c809 More cleanups for old clients.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15830 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-04 01:20:06 +00:00
shennetsind
66030c2dc6 Fixed gcc warning on script.c, getnpcid
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15823 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-02 23:36:33 +00:00
epoque11
00aa83d419 - Fixed grouprandomitem; always produced negative item IDs. (bugreport:5529)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15822 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-02 20:47:42 +00:00
eathenabot
cbce9ab414 * Merged changes up to eAthena 15085.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15819 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-31 22:52:58 +00:00
shennetsind
7f57ab9eee Fixed bugreport:5497, LK/RG/PD/RG new mounts are now available again to clients prior to november 2011, items with delayed consumption are no longer available to users in new mount state. Updated setoption to consider pc_cant_mount and remove OPTION_MOUNTING from the opt bundle
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15808 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-28 04:39:54 +00:00
eathenabot
a678624e64 * Merged changes up to eAthena 15083.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15773 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-23 04:57:11 +00:00
epoque11
7bcfb36e0e - Fixed Clown/Gypsy/Minstrel/Wanderer not receiving skill points upon change-sex
- Fixed missing casts from void* to struct online_char_data* in char.c

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15735 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-20 14:01:10 +00:00
gepard1984
b610cb1a7c - Script label db now utilizes DBMap's ability to store integer-type data (follow-up to r15682).
- Some minor code cleanups.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-19 23:35:42 +00:00
lordttseven
58c5c34e81 Refine DB update
* DB courtesy of Kenpachi
 * added support for different stats per refine level for renewal
 * cleaned up the corresponding code a little
 * REMODE now displays the atk values on the client correctly

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15730 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-19 14:43:41 +00:00
gepard1984
691872fdc7 Enhanced DBMap implementation to allow storing integer type data in addition to void pointers.
- Added enum for data: `int`, `unsigned int` and `void*`
 - Replaced generic `void*` data with `DBData` struct to hold `int`, `unsigned int` or `void*` (member of `DBNode`)
 - Added `db_i2data`, `db_ui2data` and `db_ptr2data` functions to cast from `int`/`uint`/`void*` to `DBData` (used in `DBMap::put()`)
 - Added `db_data2i`, `db_data2ui` and `db_data2ptr` functions to get `int`/`uint`/`void*` from `DBData`
 - Enabled statistics for new functions in `db_stats` struct
 - `DBCreateData` functions (used in `DBMap::ensure()`) now return `DBData` instead of `void*`
 - `DBApply` functions (used in `DBMap::foreach()` and `DBMap::destroy()`) now take `DBData*` as a parameter instead of `void*`
 - `DBMatcher` functions (used in `DBMap::getall()`) now take `DBData` as a parameter instead of `void*`
 - `DBReleaser` functions now take `DBData` as parameter instead of `void*`
 - Default releasers release data if it is `void*` (`DB_DATA_PTR`) type
 - `DBIterator` functions: `first()`, `last()`, `next()` and `prev()` now return `DBData*` instead of `void*`
 - `DBIterator::remove()` now returns `int` (1 if node was found and removed, 0 otherwise) instead of `void*` and takes an extra `DBData*` parameter for the data of removed entry
 - `DBMap::get()` and `DBMap::ensure()` now return `DBData*` instead of `void*`
 - `DBMap::remove()` and `DBMap::put()` now return `int` (1 if node already existed, 0 otherwise) instead of `void*` and take an extra `DBData*` parameter for the data of removed entry
 - `DBMap::put()` now takes `DBData` as parameter instead of `void*`
 - `DBMap::getall()` now puts data into `DBData**` buffer instead of `void**` buffer
 - Updated macros:
   - (`i`/`ui`/`str`)`db_get` and (`i`/`ui`/`str`)`db_ensure` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by `DBMap::get()`
   - added (`i`/`ui`/`str`)`db_iget` and (`i`/`ui`/`str`)`db_uiget` that get `DBData` from `DBMap` and extract `int`/`unsigned int` from it (with `db_data2i`/`db_data2ui`)
   - `db_put`, `idb_put`, `uidb_put` and `strdb_put` data params were wrapped with `db_ptr2data` to match new signature of `DBMap::put()` (`DBData` instead of `void*`)
   - added (`i`/`ui`/`str`)`db_iput` and (`i`/`ui`/`str`)`db_uiput` that put `int`/`unsigned int` into `DBMap` (first wrapping it with `DBData`)
   - added `NULL` in place of extra parameter for removed data in `db_remove` macros
   - `dbi_first`, `dbi_last`, `dbi_next` and `dbi_prev` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by these `DBIterator` functions
 - Updated `DBMap` documentation, and fixed a dozen of typos in it.
 - Updated rest of rA code to reflect `DBMap` changes (mostly required signature changes of `DBCreateData` and `DBApply` functions).
 - Fixed a bug where `DBMap::put()` would return data of a deleted entry.
 - Removed some unnecessary pointer casts.
 - Increased `showmsg.c` static buffer size to fit entire DBMap stats report.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13 14:46:28 +00:00
gepard1984
47fc6d2fe2 - Guild Castle code cleanup:
- all changes to guild castle data are now handled first by map-server and only sent to char-server for saving
  - ensured that changes made to guild castle during char-server disconnection time will be resent on reconnect
  - actually removed definition of `MAX_GUILDCASTLE` (r15657)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-05 00:08:28 +00:00
gepard1984
f810293de3 - Guild Castle code cleanup:
- removed `MAX_GUILDCASTLE` limit
  - char-server now caches guild castles in `DBMap`
  - improved guild castle SQL queries to support non-default values of `MAX_GUARDIANS`
  - disallowed declaring guild castles on maps that are on other map-servers 
  - map-server now requests data for all guild castles from char-server on initial connect (bugreport:287)
  - removed ''guildcastleinfo events'' as they were esentially duplicated ''OnAgitInit''
  - optimized castle data load packets (bugreport:287)
  - updated WoE scripts to reflect source changes (scripts no longer need or should request castle or guild data)
  - updated related docs
- Added `db_size` macro.
- Replaced manual counting of castles occupied by a guild with `guild_checkcastles()` calls.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15657 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-04 18:37:29 +00:00
lordttseven
9f938e0c70 * fixed getiteminfo offset being off by one in REMODE (bugreport:5378)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15652 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-03 13:15:01 +00:00
gepard1984
654676b73e Replaced some magic numbers related to castle guardians with MAX_GUARDIANS.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15650 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-02 17:00:17 +00:00
gepard1984
17bb9ae684 Enabled DB_OPT_RELEASE_DATA for several DBMaps to simplify data freeing.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15644 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-01 23:21:45 +00:00
gepard1984
09193ae095 Added getgroupid() script command (follow-up to r15572).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-15 00:34:32 +00:00