summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
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
2012-04-27- Fixed typo for the -- operator (follow-up to r15982)epoque111-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15985 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-27- Added initial support for direct variable assignment (allows assigning ↵epoque111-4/+187
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-26- Follow-up to r15979, updated parse_simpleexpr to parse direction function ↵epoque111-0/+12
invocation - Added SCRIPT_CALLFUNC_CHECK macro to disable direct callback if affecting performance git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15981 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-26- Added support for scripts to call user-defined functions without the use ↵epoque111-2/+15
of callfunc - Note: the callfunc; method is still required to be defined in the source git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-25Minor performance improvement on script function is_function -- replaced ↵shennetsind1-3/+3
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-25Removed pc_cant_newmount since it has been proved newer clients still ↵shennetsind1-3/+1
support them. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15966 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-22* Merged changes up to eAthena 15090.eathenabot1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15929 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-20Initial support for Genetic, Sorcerer and Elemental Summons. Special Thanks ↵shennetsind1-1/+1
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15885 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-19- Added 22nd argument to 'getmonsterinfo' which returns the mvp_exp of a ↵brianluau1-1/+2
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15872 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-15Let there be light! GREEN TREE ON ALL DISTROS, I CHOOSE YOU, NOW!shennetsind1-34/+34
All 64-bit warnings should be cleared by this revision. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15862 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-04More cleanups for old clients.protimus1-2/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15830 54d463be-8e91-2dee-dedb-b68131a5f0ec