1197 Commits

Author SHA1 Message Date
Lance
33916be18e * Fixed typo in skill.c: skill_clear_group
* Fixed command descriptions in script_commands.txt
* Cosmetic changes to script.c

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6289 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-26 08:03:03 +00:00
skotlex
d44188210b - Renamed skill_clear_element_field to skill_clear_group, it accepts a flag to determine what to erase. &1 for elemental fields, &2 for traps. Also rewrote how it works to prevent missing elements (since each time an element is erased, the array contents shift)
- Added battle config traps_setting to determine how traps should behave. With &1 traps are invisible if you didn't see them get set up. With &2 traps will be removed after changing maps. The default is 2.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6285 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25 23:58:19 +00:00
skotlex
3f18944b8d - When battle_damage's flag is &2, the flag 3 is passed to mob_damage so that it won't give exp nor items. NPC_SUICIDE was updated to reflect this.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6282 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25 20:47:26 +00:00
skotlex
6fff5230e5 - Moved the mapflag skill restrictions from skill_checkcondition to skillnotok, this makes auto-spells not work in maps where they aren't allowed.
- Added TK_HIGHJUMP to skillnotok, the skill is blocked in noteleport maps (with the exception of gvg ones)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6281 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25 20:36:26 +00:00
skotlex
f983dc57c3 - Modified and simplified the random item group format. It now is <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://svn.code.sf.net/p/rathena/svn/trunk@6275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25 18:05:40 +00:00
skotlex
5c222891f3 - Added script command escape_sql. It will return an escaped string for use 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://svn.code.sf.net/p/rathena/svn/trunk@6262 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24 23:09:12 +00:00
skotlex
9f19b5cfdc - Fixed skill_delayfix not altering delay at all after you reached 150.
- Applied ers to pet loot drops.
- Cleaned up the pet loot drop function.
- Mob skill state MSS_ANY won't include MSS_DEAD now.
- Added mob skill state MSS_ANYTARGET ("anytarget") which means any state (except dead) on which the mob has a target set.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6250 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-24 14:52:11 +00:00
skotlex
47d5784da3 - SC_CLOAKING's val4 now holds whether cloaking ends or not on attack.
- Implemented NPC_INVISIBLE, it starts SC_CLOAKING with val4 set to 1, skill duration is 30 secs.
- Moved uncloaking on attack from attack_timer_sub to battle_calc_weapon_attack.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-21 19:55:35 +00:00
skotlex
3ffd7ebdb9 - Updated the HP/SP leech structures to have race-data attached to them.
- Merged all leeching code to battle_drain function.
- Added an enum for races (they match the RC entries in const.txt, except they are in all caps)
- Cleaned up atk_mods and aspd_base to be MAX_WEAPON_TYPE sized rather than MAX_WEAPON_TYPE+1
- Simplified a bit the code for Signum Crucis
- Added script bonuses: 
	bonus3 bHPDrainRateRace,<Race>,<Activation Rate>,<Drain %>
	bonus3 bSPDrainRateRace,<Race>,<Activation Rate>,<Drain %>
	bonus2 bHPDrainValueRace,<Race>,<Value>
	bonus2 bSPDrainValueRace,<Race>,<Value>


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6221 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-21 18:42:35 +00:00
skotlex
91b4a76cbd - Cleaned up a bunch of GS/NJ skills
- Fixed Gatling Fever crashing server when used by non players.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6193 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-20 16:47:33 +00:00
skotlex
6b9fd3cf04 - Removed message 592 from trade.c
- 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://svn.code.sf.net/p/rathena/svn/trunk@6159 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-18 16:01:26 +00:00
skotlex
6ec369963a - skill_clear_unitgroup is now invoked in unit_remove_map only on death if the applicable battle setting is set. It is now also invoked in unit_free.
- Changed setting clear_unit_ondeath to a type 4 (bl-based) which defaults to BL_ALL.
- Fixed Absorb spirit sphere not working on mobs, thanks to Vividd.
- Cleared the ud->target on pc_stop_attack to prevent attack resuming an other such oddities.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6145 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17 23:54:49 +00:00
skotlex
7beb5f23c3 - Fixed TK_RUN having a cast-bar when attempting to stop-running and generating timer_delete errors when halting as well.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6135 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-17 15:51:38 +00:00
skotlex
3522a7f83e - Fixed Magnum break's animation not showing if the fire-elemental bonus did not start.
- Removed some last traces of waterlevel reading.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6120 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 18:00:27 +00:00
skotlex
1380ed55d3 - Fixed wrong check of Deluge + Suiton which broke the water-requirement check for skills.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6103 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 07:12:36 +00:00
skotlex
5b9305fe41 - Removed the ->prev != NULL checks in skill_attack due to the fact that the code should check elsewhere how it should behave (eg: if traps are not cleared on death, stepping on one afterwards SHOULD cause damage)
- Removed use of packet 0x1c9 for skill_unit display, except for Graffiti (which is the only unit which requires the much larger packet)
- clif_getareachar_skillunit will sent the unit_id of UNT_ATTACK_SKILLS for traps (this is to prevent them from displaying on the client)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-15 19:17:47 +00:00
skotlex
b59b68509f - Halved the aftercast delay of auto-casted spells.
- Allowed auto-spells to retrigger themselves.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6028 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13 04:05:38 +00:00
skotlex
0a5c14f801 - Changed slave chasing from using unit_walktobl to map_search_freecell + unit_walktoxy, since the previous behaviour makes all slaves always end up on the same cell.
- Changed some function declarations to take x,y arguments as short rather than int.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13 00:45:55 +00:00
skotlex
503a7759d0 - Added cast time to pick stone of 3 secs and 500ms delay
- Removed area of effect of Assumptio.
- Added "can't act" delay update when an auto-spell triggers.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6021 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12 19:49:26 +00:00
skotlex
df06ad84f3 - Fixed Landmine's level 1 duration.
- Cleaned up implementation of BlastMine and Claymore Trap.
- Added Freezing trap information to battle_calc_weapon attack.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5998 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12 02:03:31 +00:00
skotlex
a489ed4364 - Changed clif_damage/clif_skill_damage to return the walk-delay based on the passed on damage-delay.
- Changed battle_damage to accept the walk-delay as well.
- Removed the walk-delay timers from unit.c, merged them to battle_delay_damage.
- Traps will not be displayed when you walk within their range.
- Added HT_DETECTING revealing traps.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 23:58:55 +00:00
skotlex
3a0621b9ae - Added ers handling for skill_timerskill structures.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5995 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 20:33:19 +00:00
skotlex
0ef81c9d08 - Implemented use of ers for skill_unit_groups to reduce memory usage. NEEDS TESTING
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 18:45:43 +00:00
skotlex
c8ad3fbc64 - Fixed Looted items always dropping in quantities of 1.
- Removed the check that deletes Magnus Exorcism cells after they hit once.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5984 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 14:01:04 +00:00
skotlex
42c6f89d86 - Multiple optimizations to the unit_data auto-chase upgrade, also simplified the mob and pet ai routines.
- Simplified the walk routines to half the number of timers required for walking.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5982 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 04:10:41 +00:00
skotlex
e8a8c8fbb9 - Added the missing last_thinktime initialization to pets.
- Reverted the change in skill_Wall_check to let skills go over pits.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5973 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 23:14:00 +00:00
skotlex
3851b1299d - Fixed @npcmove not sending the correct packets to make the moving refresh client-side.
- Fixed mobs with aggressive + looter mode never looting.
- skill_wall_check now also checks for pits so that skill effects don't go through them.
- Now you can't leave/be-kicked from a guild inside guild castles.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 18:11:32 +00:00
skotlex
0ed5d38cdd - Small code cleanups. One should lower a bit function overhead when using mob_ai&32
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5967 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 16:33:11 +00:00
skotlex
3faa5d199f - Changed the default of multi_hit_delay from 230 to 80 which seems more official.
- Wedding recall skills are now blocked by the nomemo mapflag.
- Skill delay for weapon types is now based on adelay (ASPD) rather than amotion (ASPD/2)
- Removed ending Endure when casting Berserk, may fix the timer mismatch issues.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 05:50:43 +00:00
skotlex
1f0de23255 - Fixed skill_nocast_db reading so that when the same skill is specified multiple times, the blocked effects add up instead of replacing each other.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5960 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08 19:05:21 +00:00
skotlex
3b5c9e1f78 - Moved the devotion damage reduction to the block that only executes if flag is zero in battle_damage.
- skill_castcancel won't trigger on battle_damage when the passed flag is 1
- The flag in battle_heal is now used to determine whether Berserk blocks the healing or not.
- Moved the Fusion HP penalty to battle_calc_weapon_attack
- Some cleaning to use battle_heal/damage rather than pc_heal/damage where appropiate.
- cleaned up the deadly-poison hp reduction code.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5949 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-07 20:23:52 +00:00
skotlex
0837bb4f38 - Added missing creation/destruction of the expcache_ers in guild.c
- Unified status_remove_buffs/status_remove_debuffs into a single function.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5946 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-07 16:57:12 +00:00
skotlex
c94f569ab5 - Changed the default of skill_add_range to 0, said value now disables skill-range checking when casting ends.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5934 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-06 17:58:53 +00:00
skotlex
43dac339d7 - Fixed a compilation error due to a missing semicolon...
- TK ranking kicks can't be used on sucession now (can't use any of the kick skills twice in a row without using a different one first).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05 21:28:28 +00:00
skotlex
bb95eb8e36 - Modified the ammo checks so that ammo is consumed at the end of battle_calc_weapon_attack (should fix element being lost on final arrow).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5914 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05 21:07:42 +00:00
skotlex
f3d9444348 - Added a define list for weapon types in pc.h
- Cleaned up pc_checkallowskill and moved the Gatling fever check to it.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5912 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05 19:27:00 +00:00
skotlex
ac3277f2b2 - Moved skill_counter_additional_effect calls to trigger right after skill_additional_effect (which means they trigger at the end of the attack motion for physical attacks)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5888 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03 16:26:38 +00:00
skotlex
cabad21166 - Cleaned up (fixed?) a possible overflow in pc_isUseitem, thanks to foobar.
- When you have the wrong ammo-type equipped the skill-failed message is now "skill can't be used with this weapon", which is less misleading than "please equip arrows first".
- Corrected pet-equipment display (I originally assumed they went in the shield view-position, when they actually go in the head-bottom position).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5883 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03 14:13:13 +00:00
skotlex
b5203bb220 - Added a missing memset on ers_alloc'ing mob loot which was making data from looted items fill in normal drop info.
- Some more work on the display of Brandish Spear...


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5871 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-02 17:09:16 +00:00
skotlex
e7a2020fc5 - Moved the night icon invocation to clif_parse_LoadEndAck
- Changed function clif_set01e1 to clif_spiritball_single
- Removed clif_spawnpc as it wasn't really needed.
- Added clif_weather_check to handle the weather changes checks.
- Merged Larry's fix of using a timer to get rid of the glow-issue when you login to night-enabled map.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5863 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-02 08:27:14 +00:00
skotlex
76b9ca2fc1 - Fixed an error in the layout initialization of ice-wall. Thanks to Named for pointing it out.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5853 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 22:47:18 +00:00
skotlex
d336815c66 - Added function clif_changetraplook to handle changing the appearance of traps as they are triggered (rather than using clif_changelook which is meant for view_data objects)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5852 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 22:42:54 +00:00
skotlex
e9c44b50c8 - Added structure view_data to handle sprite information for all characters (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://svn.code.sf.net/p/rathena/svn/trunk@5833 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 02:23:56 +00:00
skotlex
a1eabcc481 - Fixed skill_require_db loading.
- Added a column to specify the amount of ammo required for skills that require ammo.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5831 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-31 18:19:10 +00:00
skotlex
ab0693cbcf - Changed the terminology from arrow to ammo for the last update.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5830 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-31 17:43:24 +00:00
skotlex
b1a0b58110 - Changed the look field of all arrows to 1.
- Added column "RequiredArrowType" to skill_require_db, set to 1 all arrow-based skills.
- Added support for ArrowType requirement on skills. It checks for having an item equipped on the arrow-slot who's view has to match with the required arrow-type (works the same way it does for weapons).
- Skills will automatically be ranged and arrow-types when they have a arrow-requirement.
- Skills will automatically consume arrows if used with a bow and the skill is an attack weapon-based skill even if the skill_require_db doesn't specifies arrow requirements (this is for stuff like backstab used with bows)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5829 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-31 17:22:06 +00:00
skotlex
e19503185b - Fixed an infinite recursion in the Wedding Recall skills.
- UNT_ATTACK_SKILLS unit packets won't be sent to the client as they are supposed to be invisible anyway.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5828 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-31 15:53:36 +00:00
skotlex
361d4018ee - Adjusted the range of Wall of Fog to 9 and Spider Web to 7
- Modified a bit the skill packets of Sharp-Shooting and Brandish Spear in hopes of fixing it.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5824 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-31 14:00:28 +00:00
skotlex
39d33a2f80 - the auth function in login.c won't jstrescapecpy passwords that were encrypted.
- Moved the Endure and Gravitation sc ends to battle_damage from pc_damage.
- Endure level 11 and above are now considered infinite-endure.
- Set the minimum pet hungry delay to 10
- modified function skill_delayfix to only receive skill/lv, actual time is now always acquired from skill_get_delay. It also now will never return a value below min_skill_delay_limit.
- Modified brandish spear so you won't see the skill-animation for every targetted mob. Also cleaned it up to use map_foreachincell calls.
- splitted skill_cast_fix into skill_cast_fix and skill_cast_fix_sc, the first does cast adjustments based on dex and server settings, the later only based on sc changes. Mobs use the later while everyone else use the former (which invokes the later when appropiate)
- Added the Steel Body icon to auto-berserk.
- Now you can't cast auto-counter while the previous one is active.
- For the duration of Berserk, infinite-endure is activated.
- Added Veider's suggestion to do a hack-report when players request the name of an invisible/cloaked character.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-30 15:50:54 +00:00
skotlex
b286e0af1e - Some cleaning of the mob_ai. Mobs should stop chasing once you are beyond their min_chase range. Improved rude-attacked checking when mobs can't move.
- range3 is now used as min-chase value of mobs.
- Added a debug message when status_change_timer fails.
- Fixed tick direct modifications increasing duration instead of decreasing it.
- Fixed inf2 of Jump-Kick to make it a "combo-skill" so that it may do a BCT_ENEMY check.
- When sd->state.skill_flag is set, auto-targetting through combo-skills is disabled. 
- You can't SG_FEEL maps already memorized.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5796 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-29 14:53:22 +00:00