summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2006-09-13- Modified the nocommand mapflag so you can specify the GM range that is ↵skotlex1-2/+2
blocked from using commands (eg: "prontera.gat mapflag nocommand 40" disables commands to characters in the GM range 0~39) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-11git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8698 ↵Lupus1-8/+7
54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-05- Corrected SC_INTRAVISION not starting.skotlex1-12/+9
- Small cleanups (line terminators, indenting) - Fixed crash when attempting to read a Label as a string on a script (thanks to End of Exam) - Fixed possible crash when changing a chat-room's owner (thanks to End of Exam) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8639 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-04- Should have fixed "sleep", thanks to Lance for figuring out the error.skotlex1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-04- Some cleanup of how mobcount works.skotlex1-6/+3
- status_calc_misc will now be invoked in status_calc_bl even on the first call, since status could have gone up due to skill bonuses. - Moved max HP/SP calculations to before invoking status_calc_misc - Simplified distance and check_distance to use "aegis" methods (greater of dx/dy = distance), there's a new define in map.h called CIRCULAR_AREA, when set, the previous method is used, and map for each in range calls will also check for distances, making most ground skills and battle system use real circles instead of squares. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8609 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-01The Clearing unused stack report will now print the related NPCtoms1-2/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8584 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-31- Fixed @summon's delete timer being screwed up.skotlex1-9/+11
- Cleaned up a bit the summon script command. - Fixed the clone script command's delete-timer being screwed up. - Corrected battle config name max_walk_rate, it should be named max_walk_speed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8559 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27* Optional macro MEMSET_TURBO for faster low-level memory initializations.Lance1-16/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-25- Oops, forgot to even try to compile the previous update.skotlex1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8481 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-25- Added script commands roclass/eaclass to enable scripts to access eA's job ↵skotlex1-0/+38
format. Read script_commands.txt and ea_job_system.txt for a more complete explanation of how this job system works. - Removed doc/item.txt (seems like a totally useless file) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8480 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-24- script command "isrefine" will no longer return always false for equip ↵skotlex1-1/+1
positions above 6 (this has not been needed since the addition of the refine column to tbe item_db many months ago) - Added NPC_CRITICALSLASH to the list of skills that display as a normal attack. - Changed the default of clear_skills_on_death to 0 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-23- Cleaned up getmapxy script function, also added support for type 4 so that ↵skotlex1-109/+94
it returns a player's homunculus position if such exists. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8459 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-23- Fixed a possible SIGSEGV on buildin_maprespawnguildid if the map is unknowntoms1-1/+5
- Added debug on "Inifity loop" to know which script is making this loop git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8451 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-22- Fixed a crash on the mobspawn script command.skotlex1-1/+1
- Made SC_FLEET increase batk as well as watk. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8444 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-22- updated (more or less) the sql-files/item_db2.sql file.skotlex1-1/+1
- Some insignificant cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8429 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-22- getnameditem will now also work on stackable itemsskotlex1-3/+2
- Corrected battle_calc_weapon_attack so that all skills ignore your left-hand weapon, and that the Katar's double-attack damage bonus for the offhand damage applies ONLY on normal attacks. - Fixed Resurrect Homunculus's % to 20*lv% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-21- Adjusted Glittering's success rate to 20+10*lv%skotlex1-2/+10
- Corrected isequipped() so that cards will not be tagged as "used up" unless all the specified items were found. - Fixed a confusion in skill_attack using the src instead of dsrc for some calls, which was causing some problems with the KAITE check from AoE spells. - Fixed ASC_BREAKER's misc damage part not having the ignore-element flag set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-21- Fixed the Autosave routine not working when there's only one player online.skotlex1-3/+1
- Disabled command @rain since the client no longer supports it anyway. - Fixed delitem not checking for the first slot's card, also optimized it so that it doesn't checks on the other slots. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8399 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-18- Changed unit_free so that it receives which cleartype should be used when ↵skotlex1-1/+1
the character is still on a map. Used this on status_damage so that mobs that do not respawn when killed will properly display the death animation. - Should have fixed the signed/unsigned comparison warnings in the main regen function. - Fixed Energy Coat consuming 10x less SP per hit than it should. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8339 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-16- Added support for hexadecimal values in the const.txt file.skotlex1-5/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8321 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-16- Spirit of Wizard will now consume an item 7321 each time it blocks ↵skotlex1-0/+13
reflected magic. - Added script command jobname, retrieves a given's class name as per the appropiate msg_athena.txt entry (this command should had been added years ago) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8320 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-15- Cleaned up some of the pet related @/# commands, same for some script ↵skotlex1-36/+37
commands. - Moved s_pet structure from map_session_data to pet_data, this enabled the removal of a few redundant values in the pet_data structure (name, class, equip) - Pet offensive skills who's inf value is self will be casted on the pet now (for stuff like Grand Cross) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8301 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-14- Increased Run's walk speed bonus to 25->50% skotlex1-5/+5
- Modified emergency_call setting to allow for more specific configuration (woe/non-woe, gvg-grounds/non-gvg-grounds, disable from nowarpto maps), see skill.conf for details. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-10- Fixed two instances in the login-sql server where the ip in the log-login ↵skotlex1-0/+26
table was being stored backwards. - Now when a skill's range is 0 and the skill is NOT casted on self, it will take the basic weapon's range (without Vulture/Snake Eye bonus). - Now when a duration is not specified, sc_start/sc_start2/sc_start4 will try to guess the duration by extracting it from the skill_db (it uses skill_get_time on whatever skill is associated to the status-change using val1 as skill-level) - Corrected that extra comma at the end of the Kaensin layout setup. - Some cleanups on trade_tradeaccept to prevent packets being resent when they shouldn't. - Corrected that ALLOW NULL thingie on main.sql git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8229 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-09- Got rid of the "i might be used uninitialized on this function" warning in ↵skotlex1-1/+1
`buildin_getpartyleader' git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8199 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-07- Adjusted the order in which option/sc change packets are sent to match Aegis'sskotlex1-0/+53
- Added script command getpartyleader through which you can retrieve various information of a party's leader. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8162 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-04- Enabled Mastery damage on Soul Breaker again, moved adv katar mastery out ↵skotlex1-58/+20
of the mastery function so that it may apply to all skills except Soul Breaker. - Changed name of the setting log_pick to log_filter since that's what it does now. - Modified enable_logs so that instead of a 0/1 setting, you can specify which kind of events to log (so you can use a combination), see log_athena for the bitmask configuration. - Cleaned a bit the contents of log_athena.conf git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8129 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-03- GAHH, I am sick tired of typing TBL_HOMUNCULUS/BL_HOMUNCULUS all over the ↵skotlex1-5/+5
place. The idea is that the TBL* versions are supposed to be easier to use than the standard structure definition, but using TBL_HOMUNCULUS as an alias to struct homun_data kinda beats the purpose! Renamed them all to TBL_HOM/BL_HOM. - Fixed using the right-hand weapon's size modifiers regardless of which weapon was being used. - Simplified the ignore-size check by making the Weapon Perfection check be done when specifying the flag, also moved the size-fix property of riding spear-knights to status_calc_pc. - Removed variable hd from status_calc_bl as it's not needed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8112 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02- Fixed Defender Raising Walk speed instead of diminishing it.skotlex1-4/+0
- Swaped val3/val4 of defender so that all walking penalty skills store said penalty in val3. - Added a check on status-change load to prevent loading speed-affecting status when their speed adjustment is 0 (prevents division by zero) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8061 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02- Fixed script code data not being free'd if a player quits in the middle of ↵skotlex1-5/+11
a script. - Modified run_script so that when there are leaks, it will report the place where run_script was called from as source rather than the inner code of run_script (for debugging purposes) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8057 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-01- Added the missing lines to enable script command "kickwaitingroomall"skotlex1-0/+2
- Magic Rod's can-act delay will no longer be applied when you absorb a spell. - Fixed Don't Forget Me increase speed instead of decreasing it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8031 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-01- Modified setlabel so that the script engine barks when you are trying to ↵skotlex1-103/+37
use the same label name as a constant or variable name. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8027 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-31- Fixed a possible crash in the main script engine when restoring previous ↵skotlex1-6/+11
script. - Fixed sleep.tick not being set back to 0 before resuming execution, which leads to scripts that are continously executed even when they already ended (they do nothing but waste resources) - Fixed a pair of free -> aFree used on stacks, which would lead to memory manager reporting leaks where there aren't. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-29Removed ugly struct cast in login.ctoms1-21/+55
New version of buildin_query_sql which accept more than one column and can return the number of rows. See script_commands.txt for more details. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7975 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-29Added a return value to buildin_rid2name if rid is invalidtoms1-0/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7973 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-29Fixed segmentation fault in script engine when calling something which is ↵toms1-13/+14
not a function git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7971 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-29Fixed segmentation fault in script engine when activating DEBUG_RUN flag toms1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7970 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-28Fixed "conversion from 'double' to 'int', possible loss of data"toms1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7939 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-28- Fixed a missing initialization in run_script_main.skotlex1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7933 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-28- Added missing include of limits.h in script.cskotlex1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7932 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-27- Synced the script.c file with as much data as possible from jA's:skotlex1-2082/+2125
- A lot of functions were moved around, a bunch of indentation and space-usage changes were done to make it easier to diff against their files. - Miscellanous addition and corrections were applied. - Largest one is likely a restructuring of run_script_main, which hopes to solve the memory leaks. - script engine now uses the setjmp functions to restore memory state when there's an error parsing scripts, which means that script errors won't cause the map-server to inmediately bail out anymore. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7926 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-27- Now when you set the guardian's HP, if the guardian is spawned, it's HP ↵skotlex1-1/+16
will be updated accordingly (and if you set it to 0, the guardian is killed) - Added functions status_set_hp/status_set_sp to set hp/sp to a given value. Applied usage of these on the Berserk and Soul Change code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7922 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-26- Some code cleanup of HLIF_MOON in regards to the number of hits and damage ↵skotlex1-1/+1
equation. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7900 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-26- Added support for "sc_end -1" which will clear all status changes. Added ↵skotlex1-1/+4
the constant SC_ALL so you can use in scripts "sc_end SC_ALL;" instead. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-25- Cleaned up run_script_main to properly free previous stack-data when ↵skotlex1-33/+28
running scripts. Note that scripts may still leak memory when run by non-players and they don't reach the "END" state, however I am not sure how this case should be handled, so it's left as it is for now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7886 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-24- Added a check to prevent Deluge/Volcano/Violent Gale from being placed on ↵skotlex1-6/+0
top of each other. Reverted the previous 'fix' where atk was being increased based on armor element rather than element of attack. - Added flag 0x002 (no reiteration) to Deluge/Volcano/Violent Gale (skill_unit_db) - Removed the noreturn mapflag check from script command warp. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7858 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-23- Fixed buildin_isequip not working correctly with non-cards.skotlex1-7/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-20- Added source reporting when you do an invalid int&str or str&int operation ↵skotlex1-0/+1
on a script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7782 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17Orn's and Albator's Homunculus system, finally, YAY!!DracoRPG1-2/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-13- Fixed the value range checks added by Zido on pc_bonus (some of them were ↵skotlex1-8/+4
even redundant...) - Fixed script command "recovery". git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7654 54d463be-8e91-2dee-dedb-b68131a5f0ec