summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
AgeCommit message (Collapse)AuthorFilesLines
2006-08-03Fix a bug in atcommand_charspeedtoms1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8100 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-03- Cleaned up the last NJ update code.skotlex1-2/+51
- Added @ command `charspeed` - Fixed @jailfor using MAP_PRONTERA as jail instead of MAP_JAIL - Removed case for GS_SPREADATTACK on damage packets to see if the skill displays correctly now. - Corrected Deluge/Volcano/V. Gale overlaps so that the placing tiles are removed, NOT the ones who were already placed. - Made SC_SPEEDUP0 and SC_SPEEDUP1 use different icon IDs, to fix icon-confusion when both are enabled at a time. - Mob rude-attacked count is not reset now on picking a new char (gotta investigate this further) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8096 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-02Fixed homunculus error messagetoms1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8073 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-01- Cleaned up some more the SC_JAILED codeskotlex1-37/+270
- merged in atcommands jailfor, jailtime, charjailtime. Thanks to Meruru and Coltaro for the code. - Cleaned the code of atcommnds jail and unjail - Be warned that the code MAY contain bugs as I adjusted it to save the character's position before jailing, allowing the automatic unjailing to warp you back to the exact spot you were at before being jailed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8038 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-31Little fix on dueltoms1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8014 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-31Added possibility to restrict duel usage to same maptoms1-0/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8013 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-26- @pettalk will now fail when muted.skotlex1-0/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7893 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-25- Fixed duel accept invite sending the packet before the duel data is set ↵skotlex1-4/+4
(resulting in a packet that noone receives). Thanks to Toms for finding it out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7881 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-22- Applied Toms's suggested corrections to homun code.skotlex1-9/+5
- Corrected Cannibalize/Marine Sphere ignoring the selected summon spot. - Fixed looting pets ignoring the item pick-up priority of other players. - Should have fixed a signess warning in login txt. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7828 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-22- Added blocking of @me when muted or in berserk status.skotlex1-0/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7822 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-21- Small bug fixes found during merging to stable process, includes correct ↵skotlex1-1/+1
HP scaling when hp-meter is enabled and max hp is above SHRT_MAX git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7802 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-20- corrected @homlevel up and one entry in the homun exp table as reported on ↵skotlex1-0/+1
the forums by Albator. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7770 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-20- Should have fixed @refine applying multiple times to equipment that uses ↵skotlex1-0/+8
multiple equip slots. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7762 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Added atcommand @partyoption, lets you alter the party item-distribution ↵skotlex1-7/+58
type on the go. Usage is "@partyoption <pickup share> <item distribution>", where both arguments can be 0/1, yes/no, etc. - Updated @changeleader and @partyoption to use msg_Athena entries. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7737 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Added a proper check to make aggressive mobs never override homun targets ↵skotlex1-2/+2
regardless of distance. - Removed a bunch of homun-related variables that are not needed at all. The alive condition is removed, now the code checks for the hp value to know if the homun is alive or not. - Cleaned up a bit the skill-id function, homun skill checks (such as delay and skill-lv learned) should be correct now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7727 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Updated mob_db.sql to current mob_db.txt data.skotlex1-3/+2
- Some cleaning on chrif.c - The char-server will allow off-line character saves when said char is tagged for final-save (this is the scenario when the char-map reconnect). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7722 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17atcommand_follow is now more verbose.Euph1-3/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7711 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17Orn's and Albator's Homunculus system, finally, YAY!!DracoRPG1-0/+169
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-13- Fixed @storeall and @charstoreall failing when the target character ↵skotlex1-7/+23
already had the storage open. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7656 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Made @monsterignore be an universal ignore. Means you cannot be targetted ↵skotlex1-3/+4
as an enemy by anything. Also added alias "@battleignore" which does the same as monsterignore. - Fixed magic power setting your min matk as max-matk. - Modified the packets involved in @fakename in hopes it'll refresh correctly on nearby clients now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7620 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Fixed clif_parse not checking for func_parse before sending data to the ↵skotlex1-39/+25
connected clients. This in turn required various code-rewrites in: - duel related messaging functions (added clif targets DUEL/DUEL_WOS). - intif whisper to gm function - day/night timers - Rewrote the parse_console function to stop allocating/deallocating memory on every call. - Modified chrif_charselectreq to receive the player's ip among the data. - Added function clif_disp_message, which is the same as clif_disp_onlyself, except you can specify the targets (it sends a guild-chat packet) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7617 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11- Coded @reset.skotlex1-33/+31
- Reenabled @changesex - Added function pet_create_egg which handles creating pet eggs correctly (when passed item id is indeed a valid petegg). Applied this on @createitem and getitem. - Cleaned up code of @item - Added define UNKNOWN_ITEM_ID (512 = apple) - Added IT_* enumation item_Types to identify said data from items. - Cleaned up the itemdb_isequip functions. itemdb_isequip will now return if the item is equipable by players, itemdb_isstackable returns if the item can be stacked, and itemdb_isidentified returns if the item should drop identified. - Added defines CARD0_PET/CARD0_FORGE/CARD0_CREATED to identify if a given item has "invalid" cards, added define function itemdb_isspecial to simplify this check. - Removed itemdb.c considering item ids above 20000 as invalid. - Cleaned up script commands getitem and card-counting related ones. - Cleaned up a bit more pc_isequip git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-08- Fixed mobinfo displaying exp as signed ints rather than unsigned.skotlex1-1/+1
- Added status_check_visibility to check if an object is within range of view of another. Nothing more, nothing less. It's used by unit movement to check whether you can continue chasing your target or not when the "chase target" directive is given. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7582 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06- Added EQP_/EQI_ constants in pc.h to identify equip position and equip ↵skotlex1-1/+1
indexes, makes equipping related code much easier to read. - Also cleaned up pc_equipitem. When dual wielding or equipping accessories, if the client actually specifies one of the two positions, it will be taken into account. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-05- Updated @refine to take account of MAX_REFINE, thanks to Omega... GM ↵skotlex1-25/+25
Designer. - Also optimized the @refine loop for better performance. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7537 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28- Cleaned up a bit the code for @itemskotlex1-39/+37
- Fixed character/storage being sent to be saved TWICE when you logged out while the storage is opened. - Added save_settings map config. Specifies after which events do characters get saved (defaults to all): 1 - Trade successful, 2 - Vending transaction, 4 - Closing storage/guild storage, 8 - hatching a pet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7375 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27- Corrected the element of hunter traps.skotlex1-5/+5
- Deadly Poison now also reduces def2 by 25% - Changed skill_setmapcell to use skill splash rather than range. - Cleaned up a bit skill_moonlit, now it knocks back the correct amount of cells. - Fixed @mi displaying always 0 instead of the mob's class. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7351 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23- Fixed @autoloot being off by 0.01% when entering a manual value.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7303 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22- Corrected autoloot so that you can specify rate with decimal precision ↵skotlex1-14/+7
("@autoloot 0.01" should work) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7294 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-21* [Added]: Lance1-1/+1
- DNS (WAN) sync for those pesky disconnections (dynamic ip renewal). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16- Corrected @speed to alter your base speed instead of battle one. Means the ↵skotlex1-2/+2
change remains for much longer (until status_calc_pc is invoked, which could be due to equipping/unequipping stuff) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7214 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13- Updated clif_disp_onlyself to not use dynamic memory and write directly to ↵skotlex1-1/+1
the player's buffer. - Updated @noask to also tell the rejected what he has just rejected (added msg_athena entries for each of the different requests) - Since noask already does a player lookup, updated the corresponding parsing functions to take the player rather than the player id (prevents double lookups) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7117 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12- @heal no longer displays a healing animation. Fixes the client believing ↵skotlex1-4/+4
you couldn't be healed more than 32K. - Now you can use any skills (except encore/dancing ones) while under Longing for Freeding. - Now you can use any skills while under Marionette Control. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7111 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12- Fixed npc_checknear's distance check returning the opposite of what it ↵skotlex1-3/+1
should (false when the range is correct and viceversa) - SL_STIN/SL_STUN have dex-reducable casting times now. - Added a warning on item loading when an item is of equippable type but has no equippable position. - Turning an alliance to an opposition won't work now during WoE - Slaves can summon other mobs now. The only ones who can't do this are player summoned mobs. - Merged the following functions for faster processing of items: clif_storageitemlist + clif_storageequiplist = clif_storagelist clif_guildstorageitemlist + clif_guildstorageequiplist = clif_guildstoragelist clif_itemlist + clif_equiplist = clif_inventorylist - Increased max knockback value support to 25. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7109 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10- Added structure party_data and party_member_data to the map server to hold ↵skotlex1-26/+26
party-specific required information about parties including Monk/TK/SG/SN states and party member count. - party Hp updates are no longer done each time the Hp is modified, but together with the party xy timer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09- Fixed @mapinfo displaying incorrectly maps with nosave which send you back ↵skotlex1-1/+3
to your last savepoint. - Moved guild_exp_rate from a mapserver battle config setting to a char server config. It no longer modifies the total taxed exp as seen on the guild information window, but directly modifies the exp that the guild earns. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7074 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-08- Fixed @skilltree printing out Unknown job for most targets used.skotlex1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7056 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Fixed item info not displaying the found item id... ~.~skotlex1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7036 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07- Fixed item info not displaying the weight value properly.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7035 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-05Fixed @mi/@mobinfo not showing the name collumns correclyshadow1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6974 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-02Typo fix.LuzZza1-2/+2
Added VC6 project files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6929 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01- Fixed @mobinfo displaying the wrong element.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6913 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Rewrote/cleaned up @petfriendly.skotlex1-27/+15
- Cleaned up final part of status_calc_pc (flags 2/4 do not exist) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6857 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30[Optimized]: Lance1-20/+9
- clif_specialeffect to use the enums. [Improved]: - buildin_specialeffect and buildin_specialeffect2 to accept effect area definition. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6855 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30- Removed the on-die specific code from unit_remove_map and placed it on the ↵skotlex1-3/+2
corresponding *_dead functions. unit_remove_map should never assume the char died, it is just a "remove from map" function. - Updated status_damage to handle the general death code (clearing status changes, clearing skill related data, sending death packet, etc). The return value from the *_dead functions will tell it what to do or not with the object (death aborted, clear it from map/memory, etc) - Cleaned up pc_dead to take advantage of the fact that status changes are not ended until after the function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6852 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29[Optimized] Lance1-5/+2
- Removed unused checks for unsigned data type and possible logic error for char type (gcc treats char as unsigned). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6814 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-28- Added functions status_revive, pc_revive and mob_revive to handle revival ↵skotlex1-40/+19
(it doesn't handles player respawning, though) - Corrected alive, raisemap, raiseall to use these functions. - Updated resurrection/mob-kaizel to use status_revive - Added SC_BLADESTOP to the skill enum at the beginning of status.c (fixes Bladestop causing an unknown status change message) - Fixed MSS_DEAD state skills not triggering. - Corrected some compilation warnings on the merc.* files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-27- Added structure status_data which holds status-related information (str, ↵skotlex1-57/+59
agi, etc, speed, amotion, adelay, dmotion, weapon-damage, race, size, etc) and weapon_atk structure with the weapon specific info (atk, atk2, element) to be used by all combat structures (TODO: Homun needs to be updated to use it) - Cleaned up TBL_PC, TBL_MOB, TBL_PC and mob_db structures to use status_data. - Set the NPC-Change Attribute duration on Time1, updated their max to 1 in the db. - Berserk's HP cost interval is now defined as time2. - Split damage received functions into pc_damage/pc_dead and mob_damage/mob_dead - Rewrote the @heal related functions to use the new status_* healing functions. - Added status functions to deal with damage and healing (status_damage, status_heal, status_percent_change) and a bunch of defines for easier handling of them (status_percent_heal, status_percent_damage, status_fix_damage, status_kill, etc) - Splitted mob_once_spawn into two. mob_once_spawn_sub creates the mob instance without spawning it. - Added defines for Elements (ELE_*) - Modified battle_calc_(weapon/magic/misc)_attack to use the status data structure. - Rewrote and cleaned up battle_calc_misc_attack - Merged config options pc_attack_attr_none, mob_attack_attr_none, pet_attack_attr_none into attack_attr_none (type 4) - Removed config options player_defense_type, monster_defense_type, pet_defense_type in favor of weapon_defense_type - Cleaned up pet.c to stop invoking status_calc_pc when unnecessary - Modified skill_calc_heal to take into account the MEDITATION bonus. - Cleaned up code of Adjustment, Madness Cancel and other GS/NJ skills inside skill_check_condition - Added status change SC_MODECHANGE which handles mob state changes (this SC is continous until manually ended, eg: like Weight50) - Modified Slim Pitcher so it will work when casted by non-players. Will now also work with SP-healing items. - Rewrote Freedom of Cast code to use function status_freecast_switch to switch adelay/speed when cast begins/ends. - Modified Magic Power to store amplified MATK/MATK2 in val3/val4 for easier updating when used in conjunction with ground skills. - Fixed Asura Strike being usable from within a combo regardless of combo skill. - Modifed SC_DANCING to store speed-change in val3 (it is shared with skill duration...) - Added StatusChangeFlagTable to store which statuses are changed by each SC - Added SCB_* constants to specify the different stats that each sc changes. SCB_PC is the only one that means a change hardcoded in status_calc_pc, the rest are handled by status_calc_bl - Added some helper functions to simplify with basic status calculations (status_base_atk, status_calc_misc, status_base_pc_maxhp, status_base_pc_maxsp) - Added status_calc_mob which calculates initial status and special base status alterations (HP changes, stat changes due to big/small mobs, etc) - Made all the status_calc functions static. - Added status_calc_bl_sub_pc for PC related calculations that must happen after status-change adjustments. - Added status_calc_bl which does status-change related calculations using as base the base_status of the bl object and the SCB_* flag passed. - Added status_get_status_data and status_get_base_status to retrieve the bl objects current status_data and basic status_data (current never returns null, instead it returns a dummy structure with basic data) - The main switch in status_change_start now only sets the tick and val values, therefore it is skipped when loading (flag&4) - Cleaned up status_change_start and replaced many of the ex-japanese comments for english ones. - Changed Hiding to store the speed penalty on val3. val4 stores interval SP cost. - Changed Chase Walk to store Speed adjustment on val3, sp cost in val4 - Changed Cloaking to store speed penalty on val3, val4&2 signals wall-present, val4&1 is infinite cloaking. - Changed Wind walk to store speed bonus on val3 - Rewrote Marionette Control to store the status to add/substract in val3/val4, it now works on anyone (players/mobs) - Changed Improve concentration to store Card bonuses (which are not counted for total % increase) on val3/val4 - Changed SC_ADRENALINE, SC_CONCENTRATION, SC_ANGELUS, SC_IMPOSITIO, SC_MELTDOWN, SC_TRUESIGHT, SC_SUN_COMFORT, SC_MOON_COMFORT, SC_STAR_COMFORT, SC_QUAGMIRE, SC_GATLINGFEVER to store the bonus modifiers in their val values rather than calculate them in status_calc_* - Status_change_start/end will use clif_status_load rather than clif_status_change when related bl is not on a map. - Modified status_change_timer to use the status_charge function rather than directly substracting SP - Added SC_ELEMENTALCHANGE to modify someone's base defense element. - pc_clean_skilltree will now also remove item-granted skills. - Learning skills will now only invoke status_calc_pc when the skill is passive. - Cleaned up pc_steal_coin - Cleaned up pc_check_base/job_lvup to only invoke the lv-up related packets and functions ONCE regardless of skill-levls earned. - Cleaned up pc_ regen related functions. - Made player-sprite mobs have item pickup animation and walkdelay when taking items. - Cleaned up mob_dead code. - Removed paramb, parame from struct map_session_data, replaced them by param_bonus[6],param_equip[6] - mob special ai state 3 signals summon flora. - Moved petDB pet_hungry_timer vars from TBL_PC to TBL_PET - Cleaned up some pet functions, made the menu functions receive as argument both pet and master. - Clones will copy a player's base status rather than battle status (so status-change alterations are not cloned) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-25added noVending mapflag. Tested. + custom Market Place NPC, fixed MSG stringsLupus1-5/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6755 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-10- Rewrote/cleaned up trade.c for a more clean trading implementation.skotlex1-0/+23
- Added @request commands, sends a request to all connected GMs of lowest_gm_level or above as a whisper message. Defaults to gm level 20 users. - Made SC_COMBO status start delay attackabletime and walkdelay by sc's duration regardless of skill used (previously it was only for TK kicks, now it's for both those and Monk combos) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6542 54d463be-8e91-2dee-dedb-b68131a5f0ec