255 Commits

Author SHA1 Message Date
Lance
cb1ecd440c Fix my fix.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6110 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 13:30:58 +00:00
Lance
ff91dce499 * Missing lines in npc_parse_script!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6109 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 13:23:57 +00:00
Lance
af5bdf87c3 * Experimental npc_event_doall_sub with queue and npc_id allocation when needed.
* Added warnings to npc_scriptcont for easier debugging.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6106 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-16 12:10:53 +00:00
skotlex
dc8d892b45 - Added an Info message when pinging the SQL servers.
- Changed line terminators back to *nix on map.c because otherwise it's impossible to run a diff between the stable and trunk versions of the file.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-13 18:10:08 +00:00
skotlex
83ed424538 - Expanded the warp warning so that it also warns when a warps takes you to a non-walkable tile.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-12 17:30:04 +00:00
skotlex
07c8dd3902 - Fixed @movenpc
- Cleaned up and improved the lootsearch routine to pick nearest item.
- Added INVISIBLE_CLASS to the list of classes supported by npc_get_viewdata
- Fixed trying to set the view_data for npcs who are located on a map, but have no visual data.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5959 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08 17:56:31 +00:00
skotlex
8f20e263b2 - Added function status_change_init to initialize all the sc timers. Added sc_data initialization to the npc structures who were missing them.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5953 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08 06:48:16 +00:00
skotlex
491228d9cc - Added inter config connection_ping_interval which specifies interval in hours at which mysql_ping's must be done on all connection handles to keep the mysql connection alive. Defaults to 0 (disabled)
- Removed login sql handle from the map server as it isn't used for anything.
- Made the login sql handle on the char-sql server be used only when gm_read_method 1 is enabled.
- Small fixes to npc_enable, added BL_NPC handling on status_get_sc.
- Added a path_search check in map_random_dir, so that the random direction picked up doesn't goes through walls and all that.
- Some changes to close-confine, status start will fail when the source is not found or it doesn't has sc-data.
- pc_setoption no longer changes the character's class when mounting/dismounting, it only changes the view-class.
- The peco-crash-fix from the char servers is still needed. This packet must be wrong! We likely need to sniff it.
- Modified the char-txt server to modify the class of mounted characters to their non-mounted version. Added an upgrade_svn file to handle the class update on the sql tables.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5902 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-05 00:23:18 +00:00
skotlex
de8f8cb6f7 - Removed the flag variable from the npc_data structure. Disabled NPCs are now handled through nd->sc.option&OPTION_INVISIBLE checks. Should fix disable/enablenpc calls not working.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5889 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03 18:08:16 +00:00
skotlex
be26d920ed - Fixed npc_gettimerevent_tick returning the difference since the last triggered label instead of total elapsed time for the npc-timer.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5874 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-02 18:25:46 +00:00
Lance
85843bfe0f * Should not exit when you can't find an NPC file..
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5845 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 09:48:17 +00:00
Lance
008b473603 Fixed the dynamic shop system memory allocation and id_db problem. Added sample script.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5842 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-01 09:37:50 +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
79a1066e60 * Added execution of OnInterIfInit, OnCharIfInit and OnInterIfInitOnce on script reload.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5806 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-30 08:52:26 +00:00
skotlex
e94e165db7 - Applied a fix to not do xs/ys checks on npc_doevent when the npc is not on a map.
- You can't return to egg a pet that has run away now.
- Added ers support to the delayed mob drops.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5800 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-29 16:59:08 +00:00
skotlex
cb5e2ff339 - Added a debug function to locate all "looping warps"
- Some cleanup of the skill-use functions in clif.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5787 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-28 14:19:51 +00:00
skotlex
e324977ed8 - Cleaned up a bit the npc undercharging item warning to specify when it is displaying overcharge/discount prices instead of the actual values. It should also prevent overflows.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5737 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-24 20:44:36 +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
skotlex
22c298e647 - Removed a block of code from skill_check_condition that actually belongs to status_check_skilluse.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5651 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 18:58:41 +00:00
Lance
fc7ef5e632 Corrected nullpo_retv -> nullpo_ret since npc_unload is int.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5648 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 16:15:56 +00:00
Lance
1c65124338 Reappropriate my previous fix on map_foreachiddb, it's npc_unload's problem.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5647 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 16:14:29 +00:00
Lance
fc71db55ba * Fixed npc_cleanup_dbsub not removing key and caused pointer being freed problem.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5645 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-17 16:09:47 +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
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
0dfa4e1358 - Some small cleanups of how @reloadscript works.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5600 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-14 19:10:09 +00:00
skotlex
5f8c670ba3 - Added a few dummy times in skill_cast_db for some GS skills.
- Autoskills now won't trigger on maps where said skill are not allowed.
- Some compilation warning fixes


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5565 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-10 19:26:56 +00:00
Lance
71fc431888 * Fixed a variable loopback problem on NPC shop price checking routine.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5559 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-10 14:28:08 +00:00
skotlex
b9b3055897 - Fixed npc_event doing a map-check when the npc is not on any map.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-06 14:54:40 +00:00
skotlex
dc8dd724eb - Fixed missing baby-dancer job in exp2.txt
- Added function battle_set_walkdelay in charge of updating walkdelays of characters based on two criterias: when the delay is induced by damage, if the current walk delay isn't over yet, do not update it. If the delay is instead caused by a skill, then the current walk delay cannot be decreased, only increased.
- Removed the canmove tick reset on skill cast cancel; likewise it isn't updated on begin casting. pc_can_move uses a skilltimer check to know whether you can move or not.
- Added GrandCross's can't move delay of 900ms to skill_cast_db
- Added Finger Offensive's can't move delay of 200ms/lv to skill_cast_db


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5457 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-04 04:48:30 +00:00
skotlex
373436fbde - Added event 8 for mobspawns that should spawn with special ai set.
- Modified battle_check_target so that mobs with special ai's default enemy are mobs with no special ai.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5448 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-03 17:15:09 +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
skotlex
9399f60ace - Some fine-tuning of the warp portal code which prevents it from messing up other skills if you "precast" it.
- Fixed the weapon refine code using sd->skillid instead of sd->menuskill_id
- Fixed some npc_event error reports (three error where displaying at the exact same msg, making it impossible to tell which one of the three actually happened)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5356 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-21 15:59:38 +00:00
skotlex
3dbf70680c - Close confine won't get the bonus range on cast as other skills do due to exploits.
- Fixed a bug in setnpctimer checking out the wrong variable.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5347 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-20 18:22:04 +00:00
skotlex
1e07d35220 - Fixed startnpctimer starting multiple timers if the npc timer was already started.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5208 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-07 02:52:55 +00:00
skotlex
d69479b946 - Added define clif_deadsit to send the dead state into player packets if the player is in trick dead state.
- Venom Splasher always hits (but splash damage targets can still avoid it)
- Using autoloot with no arguments now toggles it between @autoloot 0 and @autoloot 100%
- Falcon Assault now takes Blitz Beat lv5 as base damage.
- Fixed pc_makesavestatus not updating status.option correctly.
- Corrected Waterball so that higher levels can do insane amount of hits.
- Altered slave behaviour. No more random walking, will stay within 2 cells of their master.
- Reverted the Summon Slave behaviour to not adjust level based on number of current slaves.
- Coma no longer sends SP to 1.
- Updated Meteor so that when level 11 or more is casted, the area over which meteors fall is tripled.
- Dark elemental characters are now inmune to Curse.
- Fixed sc_data saving to sql buffer building method. Thanks to its_sparky.
- Changed the map zone reading from using pow to a bit shift.
- Experience has now been changed to unsigned int, and is read as such from the dbs.
- Increased HT_DETECTING seek range to 7x7
- Added function map_foreachinrange which actually checks distance of nearing objects (unlike for each in area which uses a square area), may come handy for future code.
- Corrected Venom Splasher: Being hit does not cancels it, works at 75% or less of target's HP, being hit normally while under the count has a chance of causing poison. Damage is +400% + 50*lv%


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5204 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-06 18:38:51 +00:00
skotlex
1b71a1a4da - Small fix in pet_attack that would make pets not unlock their target in some situations.
- Fixed invisible shops. callshop scrip command now works!
- Added proper documentation of script command callshop


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5195 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-05 11:24:46 +00:00
Valaris
dacc1b195d * Crash fix in npc.c npc_timerevent.
was: struct timer_event_data *ted = (struct timer_event_data*)ted;
  changed: 	struct timer_event_data *ted = (struct timer_event_data*)data;
  Skotlex, I am assuming it's calling from the passed data var, If I'm wrong
  please fix it.  I just know what was there was definitely not correct. [Valaris]


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5168 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-03 01:51:44 +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
7d7c9b8324 - Fixed some includes in skill.c and npc.c, thanks to 252-rer for finding it out.
- Applied the entry reusage system to the battle delay damage structure.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5166 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-02 15:35:27 +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
171609d4a2 * Readded @disablenpc
* Fixed @reloadscript not removing old NPC's and monsters first
* Some changes in mob and NPC unloading
* Changed the original @disablenpc to @hidenpc

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1429 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-04-07 15:14:35 +00:00
amber
de69f62bf9 Fixed and tweaked error messages in npc parsing [MouseJstr]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1417 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-04-06 05:19:56 +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
dfd7258882 Fixe compile time problems with our mixed C++/C conformance
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1328 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-29 06:18:21 +00:00
celest
f9452b9683 * Fixed indoorsrwstable.txt reading
* Fixed @monsterbig/@monstersmall not working
* Fixed @killmonster2 not working

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-25 10:16:09 +00:00
celest
37851efb84 * Added 'map_charid2id'
* Changed monster damage logging to save char ID's
* Implemented 'event_script_type'
* Set Emsolute Develop as a learnable skill
* Updated 'require_glory_guild'
* Allow monsters to cast skills near themselves even when monster_nofootset is set to 'yes'
* Print number of online users in online.txt/.html even if there's only 1 user

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1282 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-24 15:31:28 +00:00