summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-18Reorganized picklog functions a bit to reuse some common code.gepard19841-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15486 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17Enabled Mersenne Twister MT19937 as random number generator instead of ↵gepard19841-5/+2
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15483 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17- Updates to script_commands.txt, and added svn:keywords property.brianluau1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-12ubuntu's gcc 4.6x warning fix, bugreport:5232 credits to gepardshennetsind1-4/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15435 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-11Picklog improvements:gepard19841-61/+16
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-04fixed grouprandomitem to always create unidentified items, bugreport:2802shennetsind1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15382 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-31Added 4 new all-handy script functions; special thanks to KeyWorld!shennetsind1-2/+67
* 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15340 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-25Fixed setting and removing restricted mapflags. bugreport:4119xazax-hun1-3/+15
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15273 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-24* Merged changes up to eAthena 15040.eathenabot1-37/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-23` Fixed MF_BATTLEGROUND by Toshiro, bugreport:5150xantara1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-17- Fixed pet.c not checking log_config.enable_logs setting. [lighta]brianluau1-1/+1
- Updated documentation for 'showevent'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15152 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-17- Replaced log_config.enable_logs constants with LOG_ enums that existed ↵brianluau1-26/+26
since r9599. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15150 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-14- Fixed floating shops being accessible from any location through 3rd party ↵epoque111-0/+3
programs - TODO: needs amending for the walking glitch (bugreport:5016) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15099 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13* Merged changes up to eAthena 15033.eathenabot1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13- Fixed rand() script command not allowing a range of over 32767 on several ↵epoque111-0/+4
systems git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15090 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-13Added error message if a script tries to access an instance variable while ↵GodLesZ1-1/+4
no instance is attached (bugreport:4962) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15089 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-12- Added support for multi-line messages when using mes;epoque111-2/+66
- Added getstatus; script command to retrieve information about a specific, active status effect git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15072 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-12Fixing the last buildbot warning; should brian be happy, we'll open champagneshennetsind1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15068 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-10- Renamed 'RRConfig' folder to 'config'.brianluau1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15052 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-09Renewal Mode DEF calc fixed (can go over 127 now), bugreport:5110shennetsind1-5/+5
Fixed Logic Issues with r15039 script command set git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15051 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-09- Added ToastOfDoom's String Commands Package. (tid:53411, topic:204976)brianluau1-0/+802
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-06getmapflag() fix by Kenpachi (bugreport:5097)shennetsind1-109/+114
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15011 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-05Merging RREmu into rAthena -- quite a few stuff yet to be renamed, but we'll ↵shennetsind1-9/+173
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-11-28* Fixed removing item scripts through script command *setitemscript not ↵ai4rei1-2/+2
working the way it is stated in script_commands.txt (related r9831). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14999 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-10-16* Changed function-like macros into inline functions where it seemed ↵ai4rei1-2/+10
appropriate (topic:264007). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14976 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-20* Applied map flag update patch provided by Daegaladh. Will mess with custom ↵L0ne_W0lf1-1/+5
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-08* Fix C++ compilation issues.flaviojs1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-09-01Fixed 'getitem' documentation typo (stating the optional 3rd argument is ↵ultramage1-2/+2
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-08-11- Oh, forgot to make unitwarp support the mapname "this"Skotlex1-1/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14934 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-08-10- Commiting a bunch of cleanups piled up from the past few weeks/months/years.Skotlex1-23/+31
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14929 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-07-09* Added script command 'getmercinfo' for retrieving information about a ↵ai4rei1-0/+57
mercenary of an online character. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14894 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30Replaced custom type 'intptr' with standard 'intptr_t'.ultramage1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-30* Fixed script command 'warpguild' looking for an attached player even when ↵ai4rei1-7/+6
it is not needed (bugreport:4941, since r2674, related r14840). - Documented special map names recognized by the command. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14841 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-30* Fixed script command 'warpparty' looking for an attached player even when ↵ai4rei1-7/+6
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14840 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-29* Updated script commands 'npcshopitem', 'npcshopadditem' and ↵ai4rei1-3/+3
'npcshopdelitem' to support cashshops as well (bugreport:4928). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14836 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-23* Changed enumerating defines into enumerations (related topic:264007).ai4rei1-3/+7
- Minor fixups on few macros. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14831 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-22- Fixed a typo in eA Job System documentation.brianluau1-1/+1
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14830 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-14* Some NPC event related cleaning.ai4rei1-3/+3
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14817 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-14* Fixed map-server printing deprecation message, when monster event label ↵ai4rei1-3/+11
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14814 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-14* Random accumulated bits and pieces.ai4rei1-1/+1
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-08* Script command 'query_logsql' now throws a warning when SQL logs are ↵ai4rei1-0/+7
disabled (related r11892). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14811 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-08* Updated/revised description of instance-related script commands ↵ai4rei1-2/+2
(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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14809 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-16* Some cleanups related to player and monster states.ai4rei1-6/+6
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14795 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-06- Changed 'specialeffect' when <send_target> is SELF, it will display the ↵brianluau1-2/+12
effect to the attached RID (if there is one) instead of the npc. (topic:243842) - Changed 'movenpc' to accept an optional argument for direction. (topic:206973) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14776 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-06* Improved changes to script command 'waitingroom' from r14772.ai4rei1-38/+13
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14773 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-06* Fixed script command 'warpwaitingpc' not checking, whether or not the ↵ai4rei1-5/+33
player still has required amount of Zeny (since r14765). - Fixed warping through 'warpwaitingpc' to savepoint would take the fee twice ( missing {} ). - Fixed random warping through 'warpwaitingpc' would not take away fee Zeny at all. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-04-05- Completed L0ne's 2007 request for 'waitingroom' to support required zeny ↵Kisuka1-41/+17
and level. - Updated NPC files which required the waitingroom update. - Added Poring War script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14765 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-03-27* Added separate character state for vending (like for buyingstore), instead ↵ai4rei1-1/+1
of vender_id != 0 (follow up to r14682, related r14713). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-03-08* Fixed @item2 and script command 'getitem2' not taking MAX_REFINE define ↵ai4rei1-1/+1
into consideration (bugreport:4804). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14739 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-03-06* Implemented search store info system (aka. vending and buying store ↵ai4rei1-0/+34
search) together with related items. - Requires 2010-08-03aRagexeRE or later and can be disabled in 'conf/battle/feature.conf'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14732 54d463be-8e91-2dee-dedb-b68131a5f0ec