summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2012-08-22Major cleanup all over the place, made possible by mkbu95's scan-build ↵shennetsind1-4/+4
report he provided us with. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16687 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-22Follow up r16636 - Added the two new arguments to the buildin_areawarp_sub ↵kenpachi2k111-1/+1
call in mapwarp script command. (bugreport:6526) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-18Implemented Renewal Casting System.rud0lp201-8/+2
Fixed bugreport:2018 where CH_PALMSTRIKE deals damage to hidden targets. Fixed bugreport:6473, bugreport:6325 SC_DEADLYINFECT should now spread status ailments properly. Fixed bugreport:5541, bugreport:6179, bugreport:6281 where self buff skill is transfer to targets when doing a combo. Updated AC_VULTURE where in renewal it doesn't show the hit bonus anymore in the status window. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16661 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-15Fixed bugreport:6446 credits to flaviojs, special thanks to Lelouch vi ↵shennetsind1-11/+9
Britannia for the dump. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16638 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-15` Changed areawarp script command to accept two additional, yet optional, ↵xantara1-22/+52
parameters to allow an area warp to an area (instead of just a specific coordinates). See documentation. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16636 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-12Fixed bugreport:6459 yet another variable assignment fix, special thanks to ↵shennetsind1-2/+4
joseph for bringing this to our attention. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16625 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-10Fixed bugreport:6451, a ancient bug present r6791 which would cause any ↵shennetsind1-38/+34
non-handled items in (struct item) to possess corrupted memory. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16617 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-09Fixed bugreport:6108, getd now works as a parameter for query_sql.xantara1-27/+13
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16612 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-08Fixed replacestrcookiecrumbs1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16608 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-07Fixed bugreport:6428 where the count parameter of replacestr didn't allow ↵cookiecrumbs1-3/+34
variable integers injected in the script command. Added script command repairall to easy repair all of the attached character's items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16600 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-07Reverted wrong checkre() command optimization (bugreport:6426)daegaladh1-1/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-06Hello World! with this commit trunk will finally be making use of the ↵shennetsind1-11/+293
gorgeous stuff sirius_black last implemented. we want to make sure everything related to this feature is working as intended so for now its being released under a optional define, after the features stability is confirmed the define will be removed along with the previous processings of the feature. By enabling BETA_THREAD_TEST in /src/config/core.h all your mysql logs, query_sql and query_logsql script functions will be handled by a different thread, therefore any slow queries won't have any effect (e.g. slow down) on the game server. Everyone is welcome on helping us test and debug the features, be aware however I DO NOT RECOMMEND YOU TO ENABLE THIS ON PRODUCTION SERVERS AS OF NOW (which is why while we're all testing it still is a optional feature). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16588 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-03Fixed bugreport:6402 when a menu supersedes the client's maximum length it ↵shennetsind1-17/+51
is truncated and a warning is displayed on console, special thanks to Vianna for providing us with the proper length. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16568 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-03Modified script function 'donpcevent' as requested by Script Developer Euphy,shennetsind1-1/+6
- now returns 1 when successful, 0 when fails. - now shows a debug message on the console when no events are triggered. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16564 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-02Fixed bugreport:6032 r15982's variable assignment should be fully functional ↵shennetsind1-38/+20
now. Fixed the bug which prevented stuff such as "for (.@i = 0; .@i < 20; .@i++)" from working. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16555 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-01Added checks for when a homunculus class is invalid when passing through the ↵xantara1-1/+1
hom_class2mapid function. Special thanks to Variant. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16546 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-01Fixed bugreport:6378 fixed 'nude' script command so that it may remove costume.shennetsind1-9/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16542 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-24Renamed leftovers REMODE to RENEWAL in documentation.xazax-hun1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16493 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-23Follow up r16471 improved overall feature performance by making the bind ↵shennetsind1-31/+84
list a pointer array, this also allows the system to have a unlimited amount of atcommand bind instances. also fixed a memory leak that'd be caused when npc_do_atcmd_event fails (e.g. when target npc is manually reloaded) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16485 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-23Fixed bugreport:6297 where Cart can be dispelled by SA_DISPELL and AB_CLEARANCE.rud0lp201-17/+1
Little code optimization from r16478. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16482 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-23Added checkre() script command, which allows to check if a renewal feature ↵daegaladh1-0/+71
is enabled or not. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16478 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-22Added the ability to bind atcommands to NPC events (ex: NPCNAME::OnEvent); ↵cookiecrumbs1-0/+105
original version by ToastOfDoom however heavily modified by I enabling command level at the invoking/character (@/#) level and fixes to prevent console errors as well as fixes aimed to ensure compatibility with rAthena. Updated the script_commands.txt documentation with the following script commands: bindatcmd, unbindatcmd and useatcmd. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-21Renamed bUseSPrateSkill to bSkillUseSPrate.kenpachi2k111-1/+2
Added bSkillUseSP. Added documentation for bSkillUseSPrate(bUseSPrateSkill), bSkillUseSP, bSkillCooldown, bSkillFixedCast, bSkillVariableCast, bSkillFixedCast and bVariableCastrate. (bugreport:6193) Fixed Enriched White PotionZs (#12428) and Enrich Celermine Juices (#12437) bonus script. (bugreport:5790) Fixed Mental Sticks (#1654) bonus script. (bugreport:6071) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16466 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-14- Added new script command hommutate which changes an Homunculus into an ↵masao871-0/+31
Homunculus S Class. Super special thanks to Xantara for doing the command! - Added 2 new configs to homunc.conf to set the Max. Level for Homunculus and homunculus. - Updated homun_exp.txt table with values from Lvl. 99 to 150 for Homnunculus S. - Updated script_commands.txt with description of the new script command. - Added Homunculus S Quest. bugreport:5641 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16427 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-01Fixed bugreport:5984 rental items exploit which allowed a rental item from ↵shennetsind1-3/+0
never being deleted when used alongside storage has been fixed, blame on r14958 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16361 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-29Implemented new item script bonuses:rud0lp201-0/+3
- bSkillCooldown,n,x; - bSkillFixedCast,n,x; - *bSkillVariableCast,n,x; - bFixedCastrate,x; - *bVariableCastrate,x; *Pending until RE Casting system is fully implemented. ATM bCastrate is used to manipulate variable cast time where it should not. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16355 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-21Added mercenary and elemental objects support for getmapxy.greenboxal21-0/+21
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16326 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-15Fixed bugreport:5740 var reference was not being restored to call ↵greenboxal21-3/+29
buildin_set on assignment statements. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16300 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-14Added support for new carts (requires packetver 20120201 or newer). ↵shennetsind1-1/+4
Super-Ultra-Plus thanks to Fatal Error and Judas. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16297 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-12Added new bonus as per kenpachi's request: bonus2 bUseSPrateSkill,n,x; // ↵shennetsind1-52/+51
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16273 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-12Improved bonus-adding processes by no longer having to add it to the zero'd ↵shennetsind1-13/+10
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16272 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-08Follow up on r16240 update RK_CRUSHTRIKE formula and weapon break percentage.rud0lp201-3/+3
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16243 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-30Fixed bugreport:5873 sex changed shouldn't now make exploits regarding item ↵rud0lp201-0/+4
bonuses. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-29Fixed bugreport:5850 GN_HELLS_PLANT damage formula and behavior are now updated.rud0lp201-1/+1
Fixed bugreport:5848 RK_DRAGONTRAINING should now work normally. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16166 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-27Fixed bugreport:5821 GN_SLINGITEM item requirements(item throwables) should ↵rud0lp201-1/+1
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16155 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-21Added new script command: instance_check_party <Party ↵rud0lp201-0/+59
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-17- Added +11 and above refiner NPC.masao871-14/+53
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16126 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-16Fixed bugreport:5749 Amplify Magic Power should now work properly on ↵rud0lp201-1/+65
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16114 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-04Fix bugreport:5695 local scoped variables reference map not being freed ↵greenboxal21-8/+16
after return. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16079 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-03Regularized file not found error messages.xazax-hun1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16073 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-30- Amended the permanent NPC variable instance system to utilise the same ↵epoque111-4/+2
allocated DBMap** (follow-up to r16018) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-30- Fixed NPC instance variables not being passed through to callfunc; or ↵epoque111-4/+10
callsub; stacks properly (bugreport:5673) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16018 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-30- Removed copyarray; functionality when running set; or assigning variables ↵epoque111-2/+4
(bugreport:5675) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29- Removed leftover TXT configs, follow-up to r15503.brianluau1-0/+3
- Edited more ***_config_read() functions to show a warning if "Unknown setting" is found. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29reasonably-sized performance improvement: @reloadscript is about to 3 times ↵shennetsind1-3/+1
faster. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16004 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29- Fixed a missing variable storage allocation resulting in NPC variables not ↵epoque111-1/+1
being saved (bugreport:5669) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29- Fixed a map-server crash when script variable storage reference is NULL ↵epoque111-2/+8
(bugreport:5666) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16002 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-28- Fixed an issue with the instance variable storage system never being ↵epoque111-15/+12
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15998 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-28- Updated the script engine to make use of the DBMap* structure for storing ↵epoque111-76/+59
variables (for Ind <3) - Fixed missing new-lines at the end of various files causing warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-28- Updated the script engine to store references to important re-used methods ↵epoque111-53/+76
(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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15994 54d463be-8e91-2dee-dedb-b68131a5f0ec