157 Commits

Author SHA1 Message Date
Lance
e051037bce * Dynamic shops support with script callback. (needs testing)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5841 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 07:29:54 +00:00
Lance
f2e352bb0f * Fixed compiler warnings.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 05:30:12 +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
Lance
343deba71c * April fool! Improved soundeffectall script command. (No, this is not a lie)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5832 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 02:11:23 +00:00
foruken
57ce40d17a Added year day return in gettime function. gettime(8) returns 1~366
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5816 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-30 18:09:09 +00:00
skotlex
323a04f86d - Modified script commands atcommand/charcommand to execute even if there 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://svn.code.sf.net/p/rathena/svn/trunk@5738 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 21:02:44 +00:00
Lance
b8116f49db * Minor cleanups.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5712 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-23 07:08:31 +00:00
skotlex
7a8371273a - Merged the unit_data structure from jA for handling unit-related data (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://svn.code.sf.net/p/rathena/svn/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22 23:58:16 +00:00
Lance
0e1c1ec72e * Fixed event_kill_pc to behave like what it should instead of another replication of event_death. Added script function rid2name to convert bl ids to name.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5663 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-19 05:14:59 +00:00
Lance
6ef4e75bb4 * Recoded getmobdata script function. Fixed mob_damage typo sd -> mvp_sd. Cleanep up confusing indentation in clif.c.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5661 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-19 04:36:53 +00:00
Lupus
9a51949029 added script function 'getmonsterinfo'
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5659 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-18 14:41:02 +00:00
Lance
e804a51220 * Fixed misleading and inaccurately documented events and added a missing flag.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5649 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 16:47:21 +00:00
skotlex
a8aba5331a - removed auto-attaching of player-run scripts in initnpctimer. You must use attachnpctimer!
- updated juperos elevator script to invoke attachnpctimer as it should be.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5643 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 13:42:14 +00:00
Lance
ceea8fde6c * Final fix on Juperos NPC.
* 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://svn.code.sf.net/p/rathena/svn/trunk@5638 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 06:39:58 +00:00
Lance
2d6182f027 * Fixed compiler warning in script.c get_mob_data.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5635 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 03:47:08 +00:00
Lance
d5cf7d95e0 * mob_chat_sub fix. Added buildin_pcblockmove.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5628 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16 16:08:01 +00:00
Lance
46bdee18f9 * BL_PC and BL_MOB control script commands (experimental).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5627 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16 15:39:49 +00:00
skotlex
8955a37a9b - Added mapflag nodrop, fixed mapflag notrade.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-15 21:07:00 +00:00
skotlex
d842b9f68d - Fixed script command warpparty looking for an attached player even when it is not needed.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5592 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-13 20:16:27 +00:00
skotlex
445fa07fa2 - Some corrections due to the guild skill position change.
- Removed file todo-for-stable as it's impossible to keep it updated :X


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5479 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-07 04:15:39 +00:00
Lance
18b0a014dd * Fixed easter.txt typo.
* Extended summon command to enable custom timeouts.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5461 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-05 09:36:10 +00:00
skotlex
db973e2998 - The rate passed to status_change_start must now be in 0->10000 range.
- Added macros sc_start and sc_start4 to simplify invocation of status_change_start.
- Cleaned the active guild skills, requirements moved to skill_check_require, should now be usable by non-players as well (pets/mobs).
- Updated skill_cast_db time info. Magnum's time2 is skill-block time, St. Recovery/ Cure's time2 is the confuse/blind duration, added NPC_POWERUP/NPC_AGIUP durations, Napalm Vulcan's time2 is curse length, and most of Tarot Card's effects last time2 as well.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5454 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-04 01:54:56 +00:00
skotlex
d770421a9d - Trick dead now ends on logout
- Added mapflag nocommand which blocks @/# commands unless your gm level is above gm_skill_unconditional's level.
- Fixed weapon scripts not being executed unless the weapon was forged.
- gm_skill_unconditional is now a no/gm-level setting instead of yes/no


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5446 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-03 14:38:13 +00:00
Lance
7f378f29f8 - Fixed typo in script.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-03 08:40:24 +00:00
Lance
348f88c110 * IDE error.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5442 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-03 08:05:28 +00:00
skotlex
c64fbb45b5 - Hopefully fixed the compile error due to the mapregsql_handle...
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-02 21:33:26 +00:00
skotlex
bb7a50a009 - Fixed item pickup not picking anything unless you were in a party with item distribution set o.O
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5423 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-02 13:49:18 +00:00
Lance
acb95c4f12 * Mapregsql will now fully depend on mmysql_handle.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5421 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-02 08:20:45 +00:00
Lance
16a1b9d809 * Optimized strcharinfo to use switch. Looks like Skot fixed the crash already XD.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-02 08:12:27 +00:00
skotlex
b7ebda3ccd - Silence will only block skills when they have begun casting, not when the cast bar is done.
- opt1 status will block skills when they are done casting only if the sc_castcancel option is set.
- strcharinfo now returns blank instead of crashing the map server when there's no player attached.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5417 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-01 21:35:46 +00:00
skotlex
343577ac3b - Checked and fixed the script engine barking when you try to have a label with the same name as a const.txt defined parameter.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5415 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-01 19:44:37 +00:00
skotlex
9321f524fc - Turn Undead and Offensive Resurrection should now work on undead players.
- Fixed the range checking of Repair weapon
- Rude attacked is now also triggered when you hit a target that can't move out of their melee attack range.
- Mob ai will attempt to do a long-range attacked condition skill before unlocking a target when it is attacked and said target is out of melee range of a non-walking mob.
- Corrected mobskill event to set the target_id before triggering.
- Moved MSC_SKILLUSED trigger to mobskill_event which is triggered in battle_calc_damage. It is also triggered on skill_castend_nodamage_id
- Added party_share_loot for handling party-share loot. it should now work with autoloot as well.
- Fixed skill_break_rate breaking stuff even if the rate is 0.
- pc_stopwalking will not send a fixpos packet if you are sitting.
- mob_can_reach rude-attacked condition now uses the mob's field of view.
- SC_NOCHAT is automatically started on pc_authok if manner is negative.
- Map server now refuses to start if you try to define a label with the same name as some const.txt defined character parameter.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5414 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-01 18:18:32 +00:00
Lance
c2273620ad * Added script command 'setbattleflag'.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5407 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-01 07:15:33 +00:00
Lance
c46f652b8e * Added autoequip flag check (added script command 'autoequip' to manipulate in script.c) for pc_takeitem in pc.c If it impacts on perfomance, please remove it.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5401 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-28 13:08:53 +00:00
Lance
465ab78484 * Added script command 'equip' to equip items.
* Fixed dependancies in map-server compiling (VC7.1).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5400 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-28 12:32:02 +00:00
skotlex
bc1aad166c - Added sd variables menuskill_id/menuskill_lv to store menu-based selections. These are used now to check the validity of skill use instead of sd->skillid/sd->skilllv
- Affected skills/packets: AC_MAKINGARROW/ AL_WARP/ AL_TELEPORT/ AM_PHARMACY (all refine functions)/ MC_IDENTIFY/ BS_REPAIRWEAPON/ SA_TAMINGMONSTER/ SA_AUTOSPELL/ WS_WEAPONREFINE/ SG_FEEL
- Removed feel_lv and repair_target variables as now they are handled by the previous two new variables.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5345 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-20 17:34:48 +00:00
skotlex
eafb17b8fe - Fixed the memory leak on opt_2str as pointed out by End of Exam
- Fixed a few char SQL memory leaks as pointed out by End of Exam


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5307 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-17 13:36:49 +00:00
skotlex
59e17a948b - Modified PA_GOSPEL so that the random damage attack becomes a BF_MISC attack.
- Added pc_resetskill when lowering job level and there's not enough skpoints to substract.
- Fixed compile error of SG_FUSION in pc.c
- Modified pc_resetskill to receive a flag to indicate if it should or not do status_calc_pc and send skill block updates. Meant to optimize performance when used in the middle of a larger update.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5269 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-13 16:54:24 +00:00
skotlex
d25d952fc6 - Cleaned up and reorganized status_change_start. Now it also receives the success % rate (0->100)
- Added local function status_get_sc_tick which takes care of reducing the effect duration as need is be.
- Modified status_get_sc_def to handle defense against all related statuses, now returns defense on a scale where 10000 is 100%.
- Added time2 to pangvoice, it is the player effect's duration while time1 is for the mon's effect.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5227 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-08 16:56:53 +00:00
Valaris
8e410ec582 * Added some of eAIRC bot code, written by me and LittleWolf. It is disabled and has no configuration options yet, as it is not finished. [Valaris]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5201 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-05 17:53:53 +00:00
skotlex
36ff68ba2f - Fixed the reported map when there is an error in report_src (script.c)
- Earth attacks now work on hidden enemies.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5175 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-03 18:53:26 +00:00
skotlex
28c32a9532 - Improved the NPC timer system to enable to have multiple timers going on at a time with different players attached to each. Now npc event timers are of two types: attached or global. The global timers don't have a player attached and can be started/halted by anyone. The character timers have a player attached, and they can only be stopped by a script that has the same player attached.
- Now player attached scripts will auto-abort when the atteched player quits the map server.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-02 21:26:53 +00:00
skotlex
697d29d7d4 - Fixed a typo bug in SC_STAR_COMFORT handling.
- Fixed a possible crash bug in SC_POISONREACT handling.
- Simplified the skill trigger code for ST_PRESERVE, SG_FUSION, SG_*_COMFORT
- Unified the status change variables into a single structure (sc_count, opt1, opt2, opt3, option, and the array of status change data) which should make it easier to handle sc related stuff.
- TK_DODGE now won't trigger if your opt1 is set ;)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5154 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-01 17:17:09 +00:00
Komurka
05eba2d392 * Added 'restricted' mapflag, based on lordalfa patch
- you can set restriction zone on map (see mapflag/restricted.txt)
- you can turn off item usage on certain restricted map in item_noequip.txt
- you can turn off skill usage on certain restricted map in skill_nocast_db.txt

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5115 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-30 14:24:26 +00:00
Valaris
2178a86317 AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:10:48 +00:00
Valaris
fd99753f8e Clearing trunk.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:00:45 +00:00
celest
eba2fb10e6 * Skip partner checking when calculating status with Marionette Control on
* Fixed plagiarised skills become unuseable after saving character
* Fixed double skill fail messages for stone curse
* Added modulus by zero check to rand()

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1419 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-04-06 09:00:18 +00:00
amber
107001247d Fixed some memory corruptions [MouseJstr]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1370 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-04-01 06:16:28 +00:00
celest
05e31aee3c * Fixed a bug with InitTimer/StopTimer
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-31 17:21:24 +00:00
amber
13eeee2ee6 More C/C++ Conformance fixes
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1334 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-29 16:46:19 +00:00