summaryrefslogtreecommitdiff
path: root/src/map/mob.h
AgeCommit message (Collapse)AuthorFilesLines
2009-06-19* Implemented script command "areamobuseskill" and skill NPC_INVINCIBLE and ↵Inkfish1-0/+3
NPC_INVINCIBLEOFF. (topic:217330) * Using items no longer cancels invincibility(but using target and ground skills through items does). (bugreport:3259) * Fixed Butterfly Wings not working during GVG. (bugreport:3264) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13897 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-25Now we can use 'boss_monster' to summon whatever monsters that need to be ↵Inkfish1-0/+1
radared by Convex Mirror. (bugreport:2653) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15- Fixed a bunch of invalid memory access bugs as reported by Valgrind.skotlex1-1/+1
- Updated unit_stop_walking to not move character an extra cell when it is already half-way there unless flag 0x4 is passed. (bugreport:3078) - Fixed the monster MD_CASTSENSOR code not correctly setting the monster's aggressive state. - Corrected a few compiler warnings - Changed a bit the code for SC_BOSSMAPINFO so it is not so hideously ugly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13774 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-04Small edits to battleground code (bugreport:2816)ultramage1-1/+0
- removed bg_idle_announce setting (could be considered later) - moved crystal protection code to battle_calc_bg_damage - removed mob state 'inmunity' in favor of a script-based solution - removed unneeded 'setmobdata' (fixes collision with mob controller) - added svn:eol-style native for battleground code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13565 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-26- Fixed item Nemesis.zephyrus1-0/+4
- Fixed Tarot Card being used on Emperium. - First Part of BattleGround Implementation (please wait). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13Mobs with nonzero spawn time can now be cached as well, saving some more ↵ultramage1-0/+1
cpu/memory (bugreport:1197). Fixed dynamic mobs being unloaded without stopping their respawn timer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13445 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-20- More cleanup of Barricades (final i think)zephyrus1-1/+0
- Fixed a bug, missing sizeof(add_steal_rate). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13100 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-20- Removed my barricade implementation. Not required in WoE SE.zephyrus1-4/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13097 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-12Now using proper enum type for mob skill state tracking.ultramage1-17/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13075 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-04- Killed mobs with NPC_REBIRTH skill used should not drop items again. ↵zephyrus1-0/+1
(Aegis test) - Monsters with SC_KAIZEL should not trigger event script until. - Monsters NPC_REBIRTH should not be casted if no source (killmonster script or @killmonster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13047 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-31Removed the mob controller system, now a customization (see topic:194375).ultramage1-19/+0
The system consists of * script command to spawn a controlled mob * script commands to attach npcs to such mobs and manipulate their AI * a page of documentation for these commands * callbacks at various source code locations that invoke the attached npcs * two npc examples git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13021 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26- Implemented official Convex Mirror (With help of Yomanda and Sirius White)zephyrus1-0/+1
- Fixed SC_WARN don't receiving reflecting damage (Bug Report 1854). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-05* Moved the mob killmonster flag to a more appropriate area. (bugreport:1795)sketchyphoenix1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12914 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-22Added support for killmonster to fire OnMyMobDead optionally.sketchyphoenix1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12876 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-02- Added support for OnTouchNPC event, required for Monster Race. Script ↵zephyrus1-0/+1
commands need to be tested. Already tested sc_start. - Added status SC_WALKSPEED required in monster Race. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12752 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-08- Added some new items and headgears.zephyrus1-1/+1
- Changed the way DEF Potion and MDEF potion works to official. - Cleanups to Barricade Engine. It now can be used in WoE 2.0, i will release optional scripts soon. - Fixes to @noks. Now if the mob is targeting someone else the protection get lost. - Added new status effects icons to cash items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12693 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27Cleaning up the itemdb reload mess (see r12635, r12643, r12650, r12661, ↵ultramage1-5/+0
r12662, r12663) * the player data inventory-itemdb index is now refreshed using pc_setinventorydata() * mobdb will no longer initialize with nonexistent items, and mobs will no longer drop them in case of a reload * the clif_buylist() function once again hides invalid npc shop items * it is no longer possible to purchase nonexistent items from a npc shop * npc shop loading will not abort if there is a nonexistent item entry, it will just skip over it git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12665 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27Some major changes to @reloaditemdb to allow unloading of any item while map ↵Kevin1-0/+5
server is running. - Delete any item from inventory/cart/open storages that went missing during the reload. - Delete item from any shop that has this item. - Refresh item screen for anyone who has a shop open. - Delete mob db drop table references. - Delete item from storage during load if it isn't in the item db. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12661 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21* Changed the data field of timers from int to intptr.FlavioJS1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-07* Made script command 'flagemblem' and guild_emblem_change send an update of ↵FlavioJS1-1/+1
the emblem_id to the players in the area. - known bug: ui components that are displaying the emblem at the time (emblem in flag npc and emblem over head in gvg maps) are not updated, but putting the mouse over the target shows the new emblem * Modified script command 'guardian': - returns the id of the guardian - if guardian index isn't supplied, it generates a temporary guardian * Implemented support for temporary guardians (not saved with castle). * Added missing includes from r12520. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12525 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-24* Reorganized the contents of the mapserver's header files.ultramage1-1/+65
- map.h is no longer a generic dumping spot of all the shared structs, and instead, each such structure now resides in its logical component - map.h now only holds mostly map-related things (needs more cleaning) - there's still a lot of room for improvement (reorganization within individual header files, etc...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12429 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-20- Added SC_ARMOR_RESIST, used by Undead Scroll, gives you resistance against ↵zephyrus1-0/+1
elements and it's can be used with Resist Potions. - SC_ARMOR_RESIST and SC_BENEDICTIO ends if you change your armor. Tested on iRO. - If you call SC_ELEMENTALCHANGE with val3 = 1 it will use the level in val 1, and not a random value. * Barricades: - Fixed a bug when @reloadscript. Barricades should be destroyed too. - Unbreakable barricades are only wall type (not shootable) According to Doddler info. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12407 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-13- Added a fix for Abracadabra, this skills allways should use minimum a ↵zephyrus1-0/+4
Yellow Gem. - Added some code "suggestion" to handle the new Barricades, please test it with: - @barricade <x> <y> <size> <direction> <killable> <Event Name> - @killbarricade <Event Name> - If x and y are -1, it will use your current position. - Direction 0 Vertical 1 Horizontal. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12352 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-14- Added some new config settings: homunculus_autoloot, idle_no_autoloot, ↵zephyrus1-0/+1
max_guild_alliance. - Added a code to activate a Kill Steal protection and the required mapflags. * (I will explain this later on forums). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12203 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06Cleaned up mob_once_spawn() and mob_once_spawn_area().ultramage1-5/+2
- now they use mapid instead of mapname as input parameter - moved the responsibility to perform "this" -> mapid resolution to the caller - added a pair of swap() operations to prevent working with a negative-dimensioned area (fixes bugreport:87) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12022 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-22Fixed mob AI code iterating over non-mob objects without checking, when ↵ultramage1-1/+1
monster_ai flag 0x20 is set (caused by r11943) Cleaned up macros that wrap unit_stop_attack() (bugreport:357) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11957 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-03Tried to make sense out of timer.c ... and failedultramage1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11647 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed numerous /W4 warnings (and created more :)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-27* Loot code using charid's instead of id's in pick priority.FlavioJS1-1/+1
* 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-24- Changed Greed Scroll's type to 11 (all itemskill items should use this)skotlex1-3/+4
- 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-1/+1
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-17- Finally got some time to clean up and fix monster_ai&0x40 (chase through ↵skotlex1-1/+1
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-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-03- Merged @whereis from my server (displays normal spawn maps for given ↵skotlex1-0/+7
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-19* Cleaned/clarified some #include relationships between headersultramage1-7/+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-09- Moved damage logging to mob_log_damage, now non-damage targetted (or ↵skotlex1-0/+1
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-07-26* Cleaned up mob drop code, crashfix is still needed though...ultramage1-11/+5
* 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-05-04- Updated mob_poring.txt, by Spre.DZeroX1-1/+1
- Minor source edits, to accommodate the new DB file, mob_pouch.txt, for the Red Pouch of Surprise, by Spre. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10451 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-24- Modified the mob ai think time update after using skills from ↵skotlex1-0/+2
adelay/amotion to 100ms since the previous method adds a large delay before the AI activates again (which screws up with the timing of idle/walk skills) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10348 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-09- Added info on packet 0x86 (simple move packet). Not usable until a clear ↵FlavioJS1-3/+3
separation between entering sight/leaving sight/walking in sight is done. - Propagating const char* from the script engine. - ".gat" is appended to the map name before sending the changemapserver packet to the client. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9979 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21Applied a consistent look to all header files (copyright, ifdefs)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-16- Modified the "guardian" spawn script command, it no longer receives a ↵skotlex1-2/+1
"amount" argument (since that only leads to trouble), if the class is negative, it'll pick a random class the same way the monster spawn script command does, and if you pass a spawn position with coordinates equal or less to 0, a random spot in the map will be taken. However you can't use "this" as a map name anymore since these script commands do not need an attached player. - Guardian spawning will now fail if you attempt to spawn a guardian that already exists on the same position. - Collapsed clif_party_main_info and clif_party_join_info into a single function: clif_party_member_info - Collapsed config settings "sg_miracle_skill_min_duration" and "sg_miracle_skill_max_duration" into "sg_miracle_skill_duration", which defaults to an hour. - Miracle of the Sun, Moon and Stars can now retrigger to lenghten it's effect, and it is cancelled on warp/map-change. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9871 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-01- Added support for mob skill target 'randomtarget', when specified, it will ↵skotlex1-0/+1
pick a random enemy from within the skill's cast range. - Updated the mob_db so that all skills from non-moving mobs that specified 'target' as enemy will use 'randomtarget' instead. - Amon Ra's meteors now use randomtarget instead of self. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19- Reverted the mob ThinkTime update, that field is again aDelay as it ↵skotlex1-1/+0
apparently should be. - Fixed one small compilation error. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9522 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Massive EOL normalization & 'svn:eol-style native' flag setting for all ↵FlavioJS1-207/+207
txt/conf/h/c files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04- Fixed HVAN_INSTRUCT int bonuses.skotlex1-0/+1
- Renamed mob_db's "adelay" column to ThinkTime and made the mob.c code use it instead of MIN_MOBTHINKTIME. The adelay of mobs will also be equal to their thinktime unless their thinktime is less than their attack motion. - Cleaned the mob_db reading code a bit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9406 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-21- Corrected TripleAction's damage. It should do 150%*3 instead of 100*3% damage.skotlex1-2/+6
- Updated GS_CRACKER's stun chance using Doddler's info as reference. - GS_FLING won't reduce armor defense when used on players. - Added constant MAX_STEAL_DROP to determine up to which slot you can steal. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9286 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-05- Corrected SC_INTRAVISION not starting.skotlex1-1/+1
- 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-06-18- Fix for #102547Lance1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7235 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-18* [Removed]: Lance1-0/+1
- Large part of scripted mob control commands are removed. - Large part of scripted player control commands are removed. - Scripted mob slaves changing master ID. [Added]: - Unit control commands. - CALLBACK_NPCCLICK for scripted mobs, added this to db/const.txt too. - Macro RECURSIVE_MASTER_CHECK in battle.c [Modified]: - buildin_skilluseid and buildin_skillusepos -> buildin_unitskilluseid and buildin_unitskillusepos. - md->callback_flag to short (double word). [Lance] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7233 54d463be-8e91-2dee-dedb-b68131a5f0ec