758 Commits

Author SHA1 Message Date
gepard1984
4b96270a30 Fixed strtolower and strtoupper script functions (bug:5331).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15580 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-14 14:46:11 +00:00
gepard1984
22f0714c07 - Added libconfig (configuration file library: http://www.hyperrealm.com/libconfig/):
- Updated VS9/10 project files.
   - Updated `configure` & `Makefile`s.
 - New GM, Commands & Permissions system:
   - '''This is a backwards compatibility breaking update''', please read tid:58877
   - Replaced GM levels with Player Groups.
   - Commands permissions & other privileges now depend on group, not GM level.
 - `@help` command improvements: requires "commandname" param and shows more detailed info about commands.
 - Modified GM whisper system to deliver messages basing on permissions, not GM level.
 - Remote trade request is now possible only if player is allowed to use `@trade` command as well.
 - Added a proper permission to use `/changemaptype` command.
 - `clif_displaymessage` is now capable of displaying multiline messages.
 - All `ACMD_FUNC`s are static now, and the only way to invoke them is with `is_atcommand()`; all client commands (starting with `/`) are now translated into corresponding atcommands (with exception of `/kick` used on monster, as there is no atcommand to kill single monster).
 - Removed nonsense "bot check" triggering when player blocked (`/ex`) Server.
 - Merged `@monster`, `@monsterbig` and `@monstersmall`.
 - Improved flow of atcommand execution to avoid revealing info about online players or existing commands to non-privileged players.
 - Merged `atcommand` and `charcommand` script functions (`charcommand` is aliased to `atcommand`).
   - Fixed `atcommand` script function reading unknown memory area (possible access violation).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-13 01:19:04 +00:00
gepard1984
0709205ee8 Merged getmapmobs script function into mobcount (bugreport:244). See script commands documentation for details.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15530 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-31 15:15:32 +00:00
brianluau
00367cd7b7 - Removed more trailing tabs.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30 20:17:55 +00:00
brianluau
3aede46965 - Removed trailing tabs, and fixed some spacing.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15524 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30 16:02:55 +00:00
xazax-hun
d4cae50fe1 Minor cleanups, mostly reducing scopes.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15504 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-22 13:49:09 +00:00
gepard1984
bf1c81839f Merged TXT removal branch back to trunk.
* TXT save engine is removed and no longer supported.
* See also tid:53926, tid:57717.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-20 20:33:32 +00:00
gepard1984
b575345ac7 Reorganized picklog functions a bit to reuse some common code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15486 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-18 00:45:35 +00:00
gepard1984
54ac5c18de Enabled Mersenne Twister MT19937 as random number generator instead of standard rand() function (follow-up to r14865, r14870).
- It fixes issues caused by RAND_MAX being only 32k in Windows system (bugreport:1927, bugreport:86).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15483 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17 18:06:34 +00:00
brianluau
43dcf27318 - Updates to script_commands.txt, and added svn:keywords property.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17 06:15:05 +00:00
shennetsind
5024a18fce ubuntu's gcc 4.6x warning fix, bugreport:5232 credits to gepard
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15435 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-12 03:32:11 +00:00
gepard1984
8b3a63cf11 Picklog improvements:
- now it is finally possible to log every item players gain or lose
 - added 3 log types: `I` for auctioned items, `B` for buying shop transactions and `X` for all other items transactions that don't fall into another category (for detailed explanation on all log types read `conf/log_athena.conf`)
 - it also fixes items being logged as picked up/gained by player when in fact they were dropped on the ground due to full inventory


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-11 17:35:28 +00:00
shennetsind
9558a9cace fixed grouprandomitem to always create unidentified items, bugreport:2802
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15382 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-04 04:45:15 +00:00
shennetsind
01b818b0ac Added 4 new all-handy script functions; special thanks to KeyWorld!
* getargcount()
-- to be used inside functions/callsub labels, returns quantity of arguments provided
* is_function(<function name>)
-- checks weather a "user" function exists, returning 1 if function is found and 0 otherwise.
* freeloop(<toggle>)
-- lets you to enable/disable (1 or 0) the loop infinity protection for that specific npc instance, allowing your script to loop as much as it may need.
* get_revision()
-- retrieves the current svn revision

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15340 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-31 23:02:50 +00:00
xazax-hun
33cc72690e Fixed setting and removing restricted mapflags. bugreport:4119
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15273 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-25 18:49:58 +00:00
eathenabot
9085803c84 * Merged changes up to eAthena 15040.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-24 14:13:39 +00:00
xantara
b465413c40 ` Fixed MF_BATTLEGROUND by Toshiro, bugreport:5150
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-23 01:50:17 +00:00
brianluau
d6d87a6f65 - Fixed pet.c not checking log_config.enable_logs setting. [lighta]
- Updated documentation for 'showevent'.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15152 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-17 07:35:04 +00:00
brianluau
e969df2ff8 - Replaced log_config.enable_logs constants with LOG_ enums that existed since r9599.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15150 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-17 06:25:11 +00:00
epoque11
18a6fb23bf - Fixed floating shops being accessible from any location through 3rd party programs
- TODO: needs amending for the walking glitch (bugreport:5016)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15099 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-14 00:37:17 +00:00
eathenabot
bef21f4f2f * Merged changes up to eAthena 15033.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13 22:44:01 +00:00
epoque11
9d32a824b5 - Fixed rand() script command not allowing a range of over 32767 on several systems
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15090 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13 17:31:31 +00:00
GodLesZ
642584042e Added error message if a script tries to access an instance variable while no instance is attached (bugreport:4962)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15089 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13 11:51:35 +00:00
epoque11
b6d144c4c4 - Added support for multi-line messages when using mes;
- Added getstatus; script command to retrieve information about a specific, active status effect

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15072 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-12 03:32:34 +00:00
shennetsind
f7466db029 Fixing the last buildbot warning; should brian be happy, we'll open champagne
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15068 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-12 00:03:07 +00:00
brianluau
27f53c1386 - Renamed 'RRConfig' folder to 'config'.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15052 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-10 01:27:41 +00:00
shennetsind
05cad74427 Renewal Mode DEF calc fixed (can go over 127 now), bugreport:5110
Fixed Logic Issues with r15039 script command set

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15051 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-09 23:58:15 +00:00
brianluau
ce4717c6a7 - Added ToastOfDoom's String Commands Package. (tid:53411, topic:204976)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-09 02:46:31 +00:00
shennetsind
be428f5b9f getmapflag() fix by Kenpachi (bugreport:5097)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15011 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-06 02:56:12 +00:00
shennetsind
a785b383d7 Merging RREmu into rAthena -- quite a few stuff yet to be renamed, but we'll get it sorted.
Some of the stuff included in RREmu that is now part of rAthena:
- RE Drop Rate Modifier
- RE Experience Rate Modifier
- RE Weapon MATK
- RE Shield ASPD job-specific penalty
- RE Cast Time
- Renewal-specific item DEF
- 3.1 classes.
- All-New Mounts
- Official Magical Reflection
- And other perks, such as fully-functional @mapflag
also merged eAthena 15006 into rAthena.
For Bugs, Comments and Suggestions: http://rathena.org/board/tracker/

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-05 20:51:58 +00:00
ai4rei
05673d2336 * Fixed removing item scripts through script command *setitemscript not working the way it is stated in script_commands.txt (related r9831).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14999 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-11-28 20:24:43 +00:00
ai4rei
ddd5609af3 * Changed function-like macros into inline functions where it seemed appropriate (topic:264007).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14976 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-10-16 06:46:57 +00:00
L0ne_W0lf
d25e1c287b * Applied map flag update patch provided by Daegaladh. Will mess with custom restricted items.
- Adds a reset mapflag which is checked when using the Neuralizer.
- Syncronizes the item_noequip_db bitmasks with with skill_nocast_db.
- Updates mapflags, and both skills and items which are restricted.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-20 23:46:48 +00:00
flaviojs
9703374f8a * Fix C++ compilation issues.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-08 19:47:26 +00:00
ultramage
225a4b2ce2 Fixed 'getitem' documentation typo (stating the optional 3rd argument is char id instead of account id).
Initial documentation mistakes from r2402, propagated to code documentation in r9599, only partially fixed in r12648.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-01 21:19:10 +00:00
Skotlex
81ce878498 - Oh, forgot to make unitwarp support the mapname "this"
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14934 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-08-11 15:56:30 +00:00
Skotlex
b7ad7aa055 - Commiting a bunch of cleanups piled up from the past few weeks/months/years.
- Updated unitwarp so that an id of "0" causes the script's rid to be warped.
- Updated the Brasilis ontouchNPC warp command to use unitwarp instead.
- Signum Crucis's duration is now specified in the skill_cast_db file
- Updated @warp/@jump commands so that when an invalid tile is specified, a nearby cell is chosen (rather than using a map-wide random value)
- The if(req.weapon) code was broken, since req.weapon is never "0" for a skill. Updated the code so that the requirement of '99' (any weapon) is stored as 0, in order to make the checks effective.
- Cleaned up the code for script command warpparty
- Fixed the define itemdb_canrefine()
- Cleaned up some the status_damage() function
- Fixed map_random_dir(), which at times would pick cells that didn't preserve the required distance.
- Some aesthetic code cleanups.
- Fixed some possible crashes for skills where the code assumes the caster is a player.
- Fixed a bunch of idiotic code-snippets that should have embarrassed whoever was responsible for them.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14929 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-08-10 15:52:59 +00:00
ai4rei
4d6e77c875 * Added script command 'getmercinfo' for retrieving information about a mercenary of an online character.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14894 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-07-09 18:45:22 +00:00
ultramage
edcb998d59 Replaced custom type 'intptr' with standard 'intptr_t'.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30 09:14:21 +00:00
ai4rei
9e4d7a1beb * Fixed script command 'warpguild' looking for an attached player even when it is not needed (bugreport:4941, since r2674, related r14840).
- Documented special map names recognized by the command.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14841 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-30 19:24:02 +00:00
ai4rei
ce70d39dbc * Fixed script command 'warpparty' looking for an attached player even when it is not needed (bugreport:4359, since r14311, related r2674 and r5592).
- This also resolves an issue, where the command fails when the attached player is on a map that has noreturn or nowarpto mapflags set.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14840 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-30 19:00:43 +00:00
ai4rei
aa0bf03f74 * Updated script commands 'npcshopitem', 'npcshopadditem' and 'npcshopdelitem' to support cashshops as well (bugreport:4928).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14836 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-29 12:41:16 +00:00
ai4rei
bfbac60c74 * Changed enumerating defines into enumerations (related topic:264007).
- Minor fixups on few macros.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14831 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-23 07:12:02 +00:00
brianluau
d3d4504d7f - Fixed a typo in eA Job System documentation.
- Fixed some bugs in Cursed Spirit quest. (bugreport:4914, bugreport:4917)
- Changed <dir> in movenpc to wrap around if the number is < 0 or > 7.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14830 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-22 18:05:23 +00:00
ai4rei
aaab80fb80 * Some NPC event related cleaning.
- Made event label deprecation message a warning rather than an error, as the scripts still work regardless of whether '::On' is used or not (since r6592).
- Introduced constant EVENT_NAME_LENGTH (51) for all event name struct fields to eliminate size inconsistency across all objects (was 50 and 51).
- Fixed event names, that are considered special attributes, were not wiped when the value was 0 (since r5707).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14817 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-14 11:04:30 +00:00
ai4rei
333c944cae * Fixed map-server printing deprecation message, when monster event label was used as transport for special attributes (small/large monsters etc.) in script command 'monster' and related commands (bugreport:1274, since r6592, related r5707).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14814 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-14 10:05:49 +00:00
ai4rei
9d505aed9b * Random accumulated bits and pieces.
- Added checks/warnings to pc_paycash and pc_getcash (follow up to r12264).
- Added missing packet_db.txt and packet length table entries for packet 0x0859 (follow up to r14799).
- Added set of map_id2xx wrappers for map_id2bl for most common map objects, which return NULL when the bl-type is not the expected one (also updated map_id2nd to behave this way).
- Fixed missing ',' in mob_skill_db.txt example (follow up to r14270).
- Updated mapcache with recent maps (up to que_lhz).
- Functions 'msg_txt' and 'job_name' now return a const pointer.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-14 03:15:51 +00:00
ai4rei
1eb3c83394 * Script command 'query_logsql' now throws a warning when SQL logs are disabled (related r11892).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14811 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-08 16:11:02 +00:00
ai4rei
0c22fcf28e * Updated/revised description of instance-related script commands (bugreport:4880).
- Fixed 'instance_create' would return -4 (party already instancing) when the requested party was not found.
- 'instance_create' return value -2 now means 'party not found' rather than 'missing parameter'.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14809 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-08 05:34:35 +00:00
ai4rei
dc6ae732e4 * Some cleanups related to player and monster states.
- Moved user_font and bg_id out of states as they are data, not states.
- Reordered members of state structs so that bitfields are packed together (less memory gets wasted).
- Other insignificant code tweaks.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14795 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-16 12:18:24 +00:00