summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2006-05-09- Script commands sc_start, sc_start2 and sc_start4 will now start ↵skotlex1-3/+3
regardless of sc defense of the target player (that is, they cannot be avoided) - Fixed a possible counter overflow in attacked_count, changed the var size to unsigned char since the code can handle the overflow now. - Multiple targets again reduces armor defense, as reported by Tharis. - Increased dex increase of NPC_POWERUP to +20 per level. - Fog of Wall's -50 hit reduction is now only for ranged attacks. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6528 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-07removed old logsLupus1-9/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6510 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-01* Optimized fake npc system. Added npc_checknear back to npc_buysellsel.Lance1-13/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-30- If someone is expulsed from a guild while the guild storage is open, it ↵skotlex1-0/+14
will be auto-closed now. - Modified battle_consume_ammo to prevent consuming multiple arrows on AC_SHOWER. - Readded script command skillpointcount. (who removed it? <.<) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-30- and more typosLance1-16/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6389 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-30Fixed typo in script.cLance1-2/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6388 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29- pc_resetskill flag can now be &2, it only returns the total amount of ↵skotlex1-0/+14
skill points spent, it doesn't does a reset. - added script command skillpointcount. Returns total amount of skill points a char has (the value returned is the same that SkillPoint would have after invoking a skill reset) - Modified Defender. Speed reduction is 35-5*lv%, damage reduction on devoted chars is 5+5*lv%. These values are custom, but should be closer to "reality" than what we have. - When you have the wrong ammo type equipped, the equip arrows first message will be sent, as suggested by Haplo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6384 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29* Reverted npc_checknear to exclude check for class_ -1.Lance1-2/+3
* Removed npc_checknear in npc_buysellsel, npc_selllist and npc_buylist as enough preventive measures of hacking are already implemented. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6370 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29* Using malloc for memory allocations that doesn't need to be pre-initialized.Lance1-52/+37
* Eliminated initializations for pointers returned by calloc. * Moved grfio_final to do_init since it's not used after server boot. * Optimized scripts to return CONSTSTR instead of allocating memory just to return a constant string. Some buildin functions still need work. * Disabled graph since it doesn't work yet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6355 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-27- Fixed compilation error/warning on script command setbattleflag.skotlex1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6323 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-27- Small change in the pet_ai that should stop the "strange" catch-up ↵skotlex1-0/+2
behaviour of pets when you are much faster than them. - Corrected the unequip script of the wedding dress/tuxedo (it should be Class, not bClass) - Changebase script command will also refresh the weapon sprites (in case you changed into Wedding/Xmas class) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6317 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-27- Added the missing clif_* calls to make changebase's view-class change ↵skotlex1-1/+5
update on the client. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6312 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-27updated 'setmapflag' script commandLupus1-2/+18
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6304 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Updated item_db.sql to current.skotlex1-5/+1
- Some small code-cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6298 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Item use interval is set to a default of 100ms now.skotlex1-1/+10
- Updated Full Buster so that the can't act delay carries on to the weapon attack delay and can't use item intervals. - Added script command getbattleflag to retrieve the current value of a battle_config switch. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6296 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26- Wedding Dress/Tuxedo now handle view-change using the onequip/onunequip ↵skotlex1-3/+1
scripts. - Removed special state changebase and view-change check on status_calc_pc git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26* Fixed typo in skill.c: skill_clear_groupLance1-1/+1
* Fixed command descriptions in script_commands.txt * Cosmetic changes to script.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6289 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25- Modified and simplified the random item group format. It now is ↵skotlex1-1/+1
<GroupID>,<ItemID>,<Rate>, where Rate normally is 1, greater numbers is the equivalent of adding the line multiple times. - Added constants to identify all groups to db/const.txt - Cleaned up and updated item_db to use these new constants (warning: item_db.sql needs to be updated!) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24- Added script command escape_sql. It will return an escaped string for use ↵skotlex1-0/+13
in the sql_query script command (in case you want to use input of players in your queries). - Removed the skill packet from TK_RUN as the client ignores the walkok packet sent right after it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6262 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-19- Removed the max cap of autoloot so you are now allowed to set autoloot ↵skotlex1-4/+15
values above 100. - Initialized w1/w2/w3/w4 before reading each npc line to avoid sending unread values to the parsers (for example, if w4 has a value in one line and none on the next, it will be parsed with the previous value of w4 on the following lines) - Updated getpartymember to receive an int which specifies what to retrieve. 0: Character names (array $@partymembername$), 1 character char ids (array $@partymembercid), 2 character account ids (array $@partynameaid). By default it returns party member names. - Updated script_commands.txt with the updated behaviour of getpartymember. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6182 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-18- Fixed the delete_timer (@summons, alchemist plants) not invoking ↵skotlex1-2/+2
unit_free, hence causing memory leaks and the like. - Applied jA's patch to fix a bug in the scripting engine in regards to priority of operators. Thanks to End of Exam for the information. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6161 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-18- Removed message 592 from trade.cskotlex1-9/+3
- Removed mapflag nopvp - Added support for disabling mapflags on a mapflag line: comodo.gat mapflag nomemo <- turns on nomemo mapflag comodo.gat mapflag nomemo off <- turns off nomemo mapflag - Cleaned up and optimized the restricted/zones mapflag. Restricted cards will just not work in disallowed maps rather than blocking the compounded equipement from being used. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6159 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-18Modifying st->oid is dangerous. Using sd->state.using_fake_npc as identifier ↵Lance1-2/+1
instead. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6152 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-18* Shinomori's method (kinda) of remote script execution with interaction.Lance1-1/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6151 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17Refer to changelogZido1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6141 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12- Added special_state changebase to identify when a character has a ↵skotlex1-2/+3
special-view associated with some equipment to correctly revert the look when you take off said equipment (fixes tuxedo/wedding dress when you use modify_wedding_display: yes) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6002 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11- Multiple optimizations to the unit_data auto-chase upgrade, also ↵skotlex1-2/+2
simplified the mob and pet ai routines. - Simplified the walk routines to half the number of timers required for walking. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08- Wedding Sprites fixedZido1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5957 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03- Fixed script command mapwarp.skotlex1-8/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01* Should not exit when you can't find an NPC file.. Lance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5845 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01typoLance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5844 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01bl.subtype check.Lance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5843 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01Fixed the dynamic shop system memory allocation and id_db problem. Added ↵Lance1-1/+3
sample script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5842 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01* Dynamic shops support with script callback. (needs testing)Lance1-2/+52
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5841 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01* Fixed compiler warnings.Lance1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01- Added structure view_data to handle sprite information for all characters ↵skotlex1-39/+27
(equipment, weapons, hair, dyes, etc). Unified a bunch of clif functions now that you only need to handle the view_data (so instead of clif_spawn[pc/mob/npc/pet] you just have clif_spawn) - Fixed the clif_change_class packet (it should check for non players classes, not a class above MAX_PC_CLASS), it fixes morphing enemies. - Rewrote the way cloth dye packets are resent to optimize bandwidth usage. - Fixed the npc_item_flag thing (enable_items/disable_items script command) - Rewrote the disguise implementation to be bandwidth friendly. - Modified the hide options to change your class to INVISIBLE_CLASS, since such classes don't even get their view packets sent around. - Rewrote several clif functions to adapt to the new view_data class; - Added class 139 to npcdb_checkid which was required by some npcs in the swordman quest? o.O git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5833 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01* April fool! Improved soundeffectall script command. (No, this is not a lie)Lance1-11/+43
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5832 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-30Added year day return in gettime function. gettime(8) returns 1~366foruken1-0/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5816 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24- Modified script commands atcommand/charcommand to execute even if there ↵skotlex1-11/+36
isn't a player attached. They'll use a dummy player data with the same position/name as the script's owner (usually an npc) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5738 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-23* Minor cleanups.Lance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5712 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22- Merged the unit_data structure from jA for handling unit-related data ↵skotlex1-92/+81
(attack times, walking, auto-attack timers, skill related data) - Modified unit_skillcastcancel to receive flag&2, which stands for "cancel casting only if current skill is cancellable" - Battle config options changed from yes/no to BL_TYPE settings: skillrange_by_distance, skill_noreiteration, skill_nofootset, gvg_traps_target_all, skill_log, attack_direction_change, auto_counter_type - Clif.c will disconnect sessions that send an unknown command packet above 0x30000 instead of just ignoring it. - Cleaned up/rewrite of the pet ai, same for pet_calc_pos - Implemented use of mob variable attacked_players as it is used on jA - Cleaned up error reporting during mob-skill loading to be less spamy with non-loaded mobs. - Corrected water_height reading. I forgot to give credits to LittleWolf for providing the water-reading function :X git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-19* Fixed event_kill_pc to behave like what it should instead of another ↵Lance1-3/+25
replication of event_death. Added script function rid2name to convert bl ids to name. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5663 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-19* Recoded getmobdata script function. Fixed mob_damage typo sd -> mvp_sd. ↵Lance1-19/+83
Cleanep up confusing indentation in clif.c. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5661 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-18added script function 'getmonsterinfo'Lupus1-0/+92
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5659 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17* Fixed misleading and inaccurately documented events and added a missing flag. Lance1-4/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5649 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17- removed auto-attaching of player-run scripts in initnpctimer. You must use ↵skotlex1-1/+1
attachnpctimer! - updated juperos elevator script to invoke attachnpctimer as it should be. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5643 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17* Final fix on Juperos NPC.Lance1-0/+1
* Fix on initnpctimer not attaching rid. * Fix on OnTouch ignoring -1 NPCs. * Fix on @reloadscript crashing due to passing non BL_SKILL bl to a function that accepts only BL_SKILL bl. * Added area NPC detection in clif_parseLoadEndAck. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5638 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17* Fixed compiler warning in script.c get_mob_data.Lance1-25/+25
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5635 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16* mob_chat_sub fix. Added buildin_pcblockmove. Lance1-0/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5628 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16* BL_PC and BL_MOB control script commands (experimental).Lance1-0/+387
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5627 54d463be-8e91-2dee-dedb-b68131a5f0ec