summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2007-12-06- The default event script behaviour is to trigger on labels rather than ↵skotlex1-1/+1
NPCs now. - Removed several script config options which break NPC compatibility when you mess with them (event_script_type, event_requires_trigger, die_event_name, kill_pc_event_name, kill_mob_event_name, logout_event_name, login_event_name, loadmap_event_name, baselvup_event_name, joblvup_event_name) - LoadMap events no longer set the variable "@maploaded$" to the name of the new map. - Optimized/simplified the code now that the previous config options were removed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11859 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-05- Made the struct weapon_atk lhw in status_data a static member rather than ↵skotlex1-26/+29
a pointer as requested by Ultra Mage. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11858 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-29- Integrated the SG related info of hate_mob and feel_map into a single ↵skotlex1-10/+17
structure (sg_info). - Modified skill_blown and skill_attack so that reflected spells do not cause knockback. - SG Blessing skills now grant the extra experience to everyone when the SG killed the mob. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11840 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22- Changed the status_change structure to use dynamic rather than static ↵skotlex1-20/+15
memory to hold the individual status changes, this should have a noticeable impact on the server's memory consumption. - Had to add a few 'ugly' flags to status_change since now you can't track SC related information while said SC is not active (happens only for Storm Gust, Joint Beat and Magic Power). - Since I am unable to fully test, watch out for any bugs~ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11786 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-21- Moved subtype from struct block_list to struct npc_data.skotlex1-3/+3
- Fixed some compilation warnings. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-17Removed battle_config.error_log as console_silent already handles thisultramage1-12/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11751 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-05* Reverted official drop rate estimationPlaytester1-1/+0
- although it really exists we don't have enough information about it - if server owners really want it they can implement it themselves (it's just a one-line fix anyways) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11658 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-04* Adjusted drop bug according to special information...Playtester1-1/+1
- this will be changed further in the future git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11652 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-04* Implemented official drop rate estimationPlaytester1-0/+1
- estimation is rounded on 2 positions after decimal point - this will effectively raise drop rates below 50% by 0.01% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11651 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-03Tried to make sense out of timer.c ... and failedultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11647 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-01Removed code that queues OnAgitEliminate after the Emperium is broken, this ↵ultramage1-9/+1
is now done properly by the gvg script instead (partially deals with bugreport:342). If you have any extra castles, update your scripts accordingly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11630 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-31* Added names to the SC_ and SI_ enums, now they can be used to properly ↵ultramage1-4/+3
indicate where such values are to be used (replaces usage of 'int') * removed MIN_/MAX_PORTAL_MEMO, set MAX_MEMOPOINTS from 10 to 3 * removed support for @go-ing to your memo points * simplified the overly verbose @memo command; now re-uses pc_memo() * cleaned up pc_memo(), now uses semi-correct packet replies * Minor code cleaning/formatting git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11625 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27Slightly improved the message you get when trying to load a mob into the ↵ultramage1-1/+1
range reserved for player clones. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11589 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-16- Fixing TK Mission asigning non spawning mobs.zephyrus1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11485 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-13* Further updates to skill_delayfix functionPlaytester1-1/+1
- aftercast delay can never be lower than amotion - please report if this broke any skills git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-12- cleaned up homshuffle and fixed a possible crash in it.skotlex1-1/+1
- Updated the skill_delayfix function to behave as recently discovered by Tharis: Skills with no delay set will use amotion ONLY if the skill was instant-casted. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11433 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04Fixing the Warning: "suggest explicit braces to avoid ambiguous `else'" to ↵zephyrus1-0/+2
SC_ITEMBOOST. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Added SC_EXPBOOST (Field Manual), SC_ITEMBOOST (Bubble Gum) to const.txt. ↵zephyrus1-3/+7
Allready working. - Added SC_LIFEINSURANCE and SC_BOSSMAPINFO to const.txt. (not implemented but i will work on it) - Updated Field Manual and Bubble Gum in the itemdb.txt file. - As L0ne Wolf reported to me and based on Doddler information, the Bubble Gum only do a second try of the item drop, and it don't increase the drop rates. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11356 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Added MAX_HOTKEYS to supplement the HOTKEY_SAVING defineultramage1-58/+53
* Fixed a compile problem when hotkey saving is disabled (topic:167265) * Added script source error reporting to countitem() (topic:167165) * Removed integer mob skill state/target definition support (unused) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-03* Added the code for Field Manual (SC_BONUSEXP) and Bubble Gum (SC_BONUSDROP)zephyrus1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11351 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-27* Loot code using charid's instead of id's in pick priority.FlavioJS1-13/+13
* configure script using svn:eol-style LF and require mysql/pcre when --with-mysql/pcre is used. Added a forgotten file from r11311. (script_commands.txt) Note: charid's are globally unique, id's are equal for characters in the same account. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11312 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-25- Modified a bit the hard/lazy ai triggers to match aegis:skotlex1-6/+10
- Mobs go into active AI when they are 2 cells from entering a player's view (ACTIVE_AI_RANGE) - Mobs in passive AI no longer use skills. - Mobs in passive AI do not random walk UNLESS they have entered active AI before (random walk frequency is not lost during passive AI). - Added an additional check to prevent support skills from being blocked if the target has an armor element that blocks it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11294 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-24- Changed Greed Scroll's type to 11 (all itemskill items should use this)skotlex1-0/+5
- Ignore %MDef bonuses now only reduce target's base MDEF, not MDEF2. - Updated the 'skills that cause no damage are blocked now if the skill element is blocked by the target' to only apply if the skill has a status change associated (fixes Resurrection/Heal being blocked). - Reverted the opt_flag2 change in status_change_start (clif_changeoption2) since it never served its purpose. - Added a warning to prevent loading mobs with IDs that belong to the clone range. - Changed MAX_MOB_DB to 3000, updated the definitions of the clone range defines so they are updated automatically with the change of MAX_MOB_DB. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11287 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-23* map_addflooritem and struct item_drop_list using id's instead of struct ↵FlavioJS1-13/+17
map_session_data's (fixes bugreport:36). * Fixed buildin_escape_sql not properly escaping in sql servers. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11279 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-39/+73
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-17- Finally got some time to clean up and fix monster_ai&0x40 (chase through ↵skotlex1-16/+47
warps). It works correctly now regardless of the number of players on the source/destination maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11233 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-15Getting some (mostly atcommand) code cleaning out of the way...ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11222 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-07- Added support for the new party invite/reply packets from the latest ↵skotlex1-1/+1
client version. - Cleared up some TODO's - Added auto-rejecting party/guild invites when the target is disconnected from the server. - Added a correction in the walking code to abort it when map_moveblock cancels the player's walking (by warping/knocking back),the default code would fail because unit_stopwalking would do nothing since the walk timer was already -1 in that moment. - Corrected mob_randomwalk to use unsigned int for the tick variable. - Changed the default @Main format to prevent crashes in the newer clients. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11134 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-04- Removed usage of MAX_PC_BONUS all over the code, it is now only used in ↵skotlex1-3/+1
map.h (this is done so that individual bonuses can have their array length modified without having to change all the other bonuses as well). - Removed bonus bAddDamageByClass since it is not needed, and implemented bAddDefClass which can be used for the same (but previously was doing nothing). - Cleaned up the weapon_data structure to use a sub-structure to hold the add_dmg information. - Cleaned up some of the add dmg/def bonuses so the 'count' variable is not needed anymore. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11121 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03- Added bonuses bSPRegenRate, bHPRegenRate. They behave like the opposite of ↵skotlex1-2/+6
bHPLossRate/bSPLossRate, making you gain x Hp/Sp every y ms. - Added bonus bIgnoreMdefRate, used to ignore a % of the target's mdef when using magic attacks (bonus2 will ignore part of the mdef of all targets, bonus3 receives a race argument) - You can now use bonus2 bCastRate to adjust the cast rate of a single skill. - Cleaned the code for bleeding (hp-loss) and extended it to handle regen as well. - Some small cleanups in the pc_bonus functions - Removed bonus3 bHpLossRate since it was doing nothing and is not used. - Corrected bGetZeny bonus to be like in Aegis. The amount received is from 1 to the given amount, you can use negative zeny values to use an amount dependant on mob's level (amount*lv). - Updated doc/item_bonus.txt with all these changes - Anti-Magic/Stone-Skin now increase/decrease def/mdef only and in an absolute mode (+20*lv rather than +20%*lv). Also the duration is greatly decreased (x/15) when used on players. - Now when a player uses a strip skill without having it in the skill tree (auto-casted) the duration will be 0, the equipment will be stripped without causing the status change that blocks reequipping. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11112 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03- Merged @whereis from my server (displays normal spawn maps for given ↵skotlex1-0/+8
mobs). This command should be working correctly considering I've been using it since July. I was meant to merge it as soon as I got my hard-drive back, but I kinda forgot @_@ - bonus3 autospell (and autospell when hit) will change the target to self when the skill to be casted is inf&4 (self skill). - Corrected script homevolution not making the homunculus /swt if it is invoked when not loyal. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11110 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-22- Fixed Dragon Fear's status change selection and duration.skotlex1-0/+1
- Fixed Metamorphosis not displaying a speed-change update on the client. - Status changes that were blocked by element are no longer blocked, instead, now no-damage skills are blocked if they have an element which is absorbed by the target (This is the behaviour that Tharis believes is correct). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11067 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19Set proper limits to drop rates to prevent integer overflow.ultramage1-2/+3
Minor details cleanup. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-6/+7
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects) * Removed way messed-up script function 'unitdeadsit' * Tagged 'FIXME' lines written by myself git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15* Some serious code cleanupsultramage1-7/+4
- adjusted @reloadbattleconf to not depend on variable ordering - changed all battle vars to 'int' (removes pointless duplicit coding) - added min, max and default columns to battle config data structure - added properly bounded values for these columns (or at least tried to) - battle-conf loading will now complain if it finds unknown settings, and will reject values that are outside of the allowed range - added CHATROOM_TITLE_SIZE and CHATROOM_PASS_SIZE - partially cleaned up chatroom manipulation code * Fixed 'Job_Professer' typo in mage jobchange quest git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09- Moved damage logging to mob_log_damage, now non-damage targetted (or ↵skotlex1-73/+86
splash) skills also get logged into the monster's 'damage history' which affects the exp-bonus per attacker setting. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10966 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08- Changed the structure of the homunculus_db file so that the homunculus and ↵skotlex1-1/+1
its evolved version share the same line. Also added the evolution bonuses to it. - Updated the @homstats command to show evolution bonuses - Cleaned up the homunculus db structure. - Implemented the evolution stat growth bonuses. - Some small cleanups in the mercenary.c file - Corrected initial intimacy of a newly created homunculus (should be 21/1000) - Incremented the size of mob.c:summon.class_[] since mob_pouch has almost 350 entries. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10965 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08* Cleaned up junk left in the code by the mapcache/mapindex updateultramage1-6/+6
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing - Moved related processing to the interface (prevents duplicity) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08- Fixed some missing max levels for npc skillsskotlex1-6/+30
- Expanded isloggedin script command to support an optional argument (char id) - Expanded warpparty command to accept target "Leader", this will warp the party to the leader. - Added a summon structure to handle non-dead-branch mob-groups since the current implementation totally fails for mob groups that don't have MANY integrants - Fixed mobs not attempting an IDLE skill right before unlocking a target. - Removed a useless variable in the pet_data structure git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-04* Removed weird mvp reward item drop behavior (see topic:160077)ultramage1-3/+1
* Fixed Cart Revolution not transferring status effects on attack, and Cart Termination doing it when it shouldn't (see topic:156745) * Fixed #refine not accepting names with spaces in them * Fixed disguises not doing sit-down properly (missing self packet), broken since r6299 stable / r5833 trunk * Added missing /blackmith packet action to packet_db.txt * Removed "eathena's custom equipped mobs" from mob&skill db git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10946 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-27* Simplified exp gain equations (now more FPU-friendly and precise), also ↵ultramage1-19/+6
fixes the uninitialized variable problem * Corrected one exp calculation overflow (mainly affected high-rate pk servers) * Fixed Neuralizer item script typo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10921 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-26* Cleaned up mob drop code, crashfix is still needed though...ultramage1-82/+68
* Reduced ignore-list length to 20, added proper reply packet * Cleaned up some very poorly written pm-ignore code (see r141) * Fixed a typo in Warp Portal code displaying an incorrect map name git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-18- Small update to the effects list (new exe's effects by Au{R}oN)ultramage1-1/+3
- No sending of the pet_equip packet when pet has no equip (thx to Skotlex) - Added back exp gain limiting for old formula to stop exploits (see r8177) - Now a message is printed when the packet_ver filter rejects someone - Renamed two structs using same name as variables (MSVC debugger issue) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10886 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01Cleaned up some parts of the code.ultramage1-2/+2
Removed obsolete script function 'hasitems'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-11- Fixed pet equip not displaying correctly at all (closes topic:153753)ultramage1-5/+5
- Removed old fixpos packet (the 'new' one is way smaller) - Fixed some major logical typos in the code, cleaned up many places git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10746 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-03- Fixed missing client update when 'return to savepoint' failsultramage1-1/+1
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied) - Added clif_standing() to clif_sitting(), and used them in clif.c - Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-5/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast ↵ultramage1-6/+6
time and delay reducibility by item scripts (cards and such) - Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Reformatting @_@ultramage1-124/+66
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-10Attempt to fix unwanted teleporting of immobile mobsPlaytester1-1/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10525 54d463be-8e91-2dee-dedb-b68131a5f0ec