1645 Commits

Author SHA1 Message Date
skotlex
6e0309bb2c - Applied Rayce's suggestions and fixes to the script engine (http://www.eathena.ws/board/index.php?showtopic=129185)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9554 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21 18:12:29 +00:00
skotlex
afd7345d86 - Some cleaning to the character deletion code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9552 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21 17:49:27 +00:00
skotlex
39a8fa2eb6 - Changed a certain snprintf to strncpy, you really really really REALLY shouldn't use snprintf with a format argument that may contain unpredictable string sequences!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21 15:44:39 +00:00
skotlex
6e34fdb6ed - Added back cropping the attack delay to attack motion for those weird mobs that have a aDelay less than their aMotion time.
- Made the Note 4 comment clearer in the battle config files.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9548 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21 14:18:48 +00:00
FlavioJS
a2021e550b - Added a 1-node cache to db. Removed party_cache and guild_cache since now the database has a cache.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9545 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21 02:32:51 +00:00
FlavioJS
15258dfdb0 - Moved md5calc to common
- Answered Skotlex's question and fixed "warning: comparison is always false due to limited range of data type" by restricting script words to ASCII characters only.
- Applied "svn:eol-style native" to makefiles and project files

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9544 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21 01:16:30 +00:00
skotlex
edbb476bf9 - Fixed ISSPACE and ISALPHA casting their returned value to a char. These are "bool" functions, and as such return an non-zero int as result, casting them to char just... really messes things up when the returned value is out of the CHAR_MAX/CHAR_MIN range!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9538 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 16:43:46 +00:00
skotlex
6bbec4a65d - Added an answer to a FlavioJS's comment, and added a question myself (npc.c/script.c respectively)
- Fixed add_str in script.h not being updated to const char as well. But why do we really need such a script-engine low-level function exposed to the rest of files? :/
- Moved the strip unequip code to before deleting the timer, this fixes trying to "re-strip" someone causing the skill to fail and on top of that terminate their current strip effect.
- Added an ugly work around to the issue of skills with additional effect causing opt1 status when they have just terminated them (in short, you shouldn't be able to hit someone with, say, sleep, and then have the same skill cause them stun, since both are opt1 values).
- Reading of TK Mission variables will now happen if you are a TK-class character regardless of whether you know TK_MISSION or not. Should fix being able to reset skills to reset your Mission data.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9537 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 15:54:11 +00:00
FlavioJS
72bebf27fc - Now root script functions calls can have parenthesis (will take any parenthesis after the function as the start of the argument list).
This means "func (exp),exp;" isn't valid anymore and has to be changed to "func exp,exp;" or "func((exp),exp);" or something like that.
- Updated swordman.txt and knight.txt accordingly.

Only changed this because it was very annoying when I was creating the sample localized npc.
Don't expect more changes unless something similar happens again. Bottom line: we're in soft feature freeze and moving to eApp...

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9536 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 11:50:44 +00:00
FlavioJS
78b52bbb4b - Replaced our fix for "mes ();" crashing by jA's version. see trunk[8867] and stable[8927]
- Merged the fix for & having the same precedence as << and >> from jA.
- Merged the C_OP3 operator from jA: test ? if_true : if_false

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9533 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 09:09:21 +00:00
FlavioJS
40b389bc42 - Changed the script source from unsigned char* to const char*.
- Updated plugins Makefile.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9532 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 07:17:18 +00:00
skotlex
d882e5030b - Reverted the mob ThinkTime update, that field is again aDelay as it apparently should be.
- Fixed one small compilation error.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9522 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19 13:41:25 +00:00
FlavioJS
43256aa77e - Cleanups or minor changes.
- Now addtick_timer invokes settick_timer, so keep an eye for whatever timer issues it's supposed to have.
- Removed the flush_fifo from clif_parse_TickSend until the socket problems are fixed.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9521 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19 09:15:00 +00:00
FlavioJS
2afbde751d - Updated POS2 macros. The 6th byte is subx0 and suby0
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9520 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18 20:45:58 +00:00
skotlex
12242c1bdc - Added hom_setting to specify which homunculus 'quirks' are in effect. The default activates all of them, if you set them to 0 then homuncs will not be treated in any special matter, pretty much like standard mobs. if I missed any 'quirky' homunc behaviour from it, report it so it can be added to the list.
- Made flooritem_lifetime a int so you can specify much longer life times (the default of 60k was already very close to the max of 65k)
- Removed monster_ai 0x80 since it's now handled by hom_setting.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9519 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18 20:12:59 +00:00
skotlex
224e07c6cc - When walking into a Guild Dungeon your pvp_points will be set to 5 so you have to die twice before being warped out.
- If jobchanging while disguised, the disguise will be removed, since it can't be kept and still calculate correctly the new job class to use.
- Fuuma shurikens are now unbreakable code-wise (like all maces, books, etc)
- Applied Meruru's patch to increase speed of easy path seeks.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9518 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18 19:15:41 +00:00
FlavioJS
dd6a713c36 - Cosmetic changes to db.
- Fixed the unused MAPINDEX_AUTOADD section in mapindex.c (mapindex.h wasn't being included)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9515 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18 15:06:51 +00:00
FlavioJS
08424f7e76 - Moved packet_len_table values to packet_db[SERVER].
- When an invalid packet_ver is found, all it's entries are discarted intead of just stopping the parsing.

whew, I'm glad regular expressions exist. =D
I'd also like to apologize for the previous revision.
That build wouldn't work because I commented out the contents of packet_len_table, resulting in packet sizes being 0 (or whatever is the default value for variables).
Got lazy, won't happen again... =X

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9507 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-16 03:20:40 +00:00
FlavioJS
25cd5a05f4 - Increased MAX_PACKET_DB to 0x300 and added a warning for when packet ids greater than MAX_PACKET_DB are found.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9506 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-16 00:22:08 +00:00
skotlex
b9fd36a7cd - There will be now warnings printed when a shop sells an item which's buy price is 20z, since those usually are "rare" items with no buyying price set. Note that this reports one fake, and that is the selling of a certain shuriken that indeed costs 20z.
- Most likely fixed client crash when xmas/wedding status runs out.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9505 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-15 18:13:37 +00:00
skotlex
36f6c8122e - Removed "mobs being enemies of each other all the time" because, even though mobs can hit each other as they should, they will refuse to use support skills on enemies, which breaks several of their skills. Mobs can't both help and attack someone tagged as enemy D: I guess eA is just too smart to emulate Aegis's sloppy coding.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9500 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-14 18:20:08 +00:00
skotlex
b8a2a5f905 - Added function skill_strip to handle stripping code. The RG strip skills and GS_DISARM use it now.
- Modified the strip-related status changes so they handle removing the equipped item instead of leaving it up to the skill-code. They return 0 when nothing could be stripped.
- Cleaned some the MD_DETECTOR code.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-14 18:15:24 +00:00
skotlex
6a95b7a245 - Additional damage bonuses (True Sight, EDP, Assassin Link, Crusader Link, Card skill damage bonuses) are now applied independently of each other, which lets them stack.
- Some minor cleanings on the code vecinity.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9492 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-13 21:20:14 +00:00
toms
8bd7d2873e Modified flush_fifo so the code do what is written in the comment
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9489 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-13 16:09:13 +00:00
skotlex
0c362fa90f - Modified flush_fifo so you can decide whether to block the current thread or not until the data is sent. The server-tick reply no longer blocks the current thread.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9486 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-13 13:45:52 +00:00
skotlex
938772f848 - Fixed mobs being unable to attack anything... @.@
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9484 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-13 13:18:42 +00:00
skotlex
b3c1a24503 - Fixed a bug in the new knockback additional packet.
- Commented out the new knockback skill additional packet as it makes most skills not display an animation.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9482 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 22:47:27 +00:00
skotlex
6d6615b687 - Mobs now by default are "everyone's" enemy, so mobs are able to hit each another.
- Added monster_ai&0x400 to use the previous 'smart' criteria that prevents mobs from fighting each another.
- Moved "unsetting" the angry mode from the mob_ai to the mob_damage function, where it'll work regardless of who hits the mob.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9481 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 21:38:34 +00:00
skotlex
ce46f70410 - Modifed a bit the clif_change_look function, it should fix crashes with the Xmas sprite when changing maps.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9478 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 16:33:26 +00:00
skotlex
f7d506f645 - Fixed skills displaying a 32k damage when used while disguised.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9476 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 16:27:49 +00:00
FlavioJS
129e97d6c9 - Minor changes to ers.
- Removed unused/hardly used cbasetypes typedefs.
- Updated txt-converter's makefile to include utils.o

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9473 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 15:24:20 +00:00
skotlex
e3d9258754 - Updated npc_event_dequeue to free up your current npc information, and not just the npc_id
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9472 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 15:05:17 +00:00
skotlex
84f8ec45d5 - Modified the skill damage packet and the knockback packets to mimic aegis sent packets for such skills.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 14:53:53 +00:00
skotlex
04b76739c4 - Removed CART_MASK as OPTION_CART can take care of that.
- Moved the OPTION_MASK define to status.h
- Reverted the knockback implementation to use clif_slide instead of clif_fixpos


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9469 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 13:53:36 +00:00
skotlex
a0bad51812 - Added various guild packet related missing checks
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9467 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-11 20:43:34 +00:00
skotlex
9bd4913d7e - simplified the code for @autoloot
- made @hominfo display the six basic stats. 
- Simplified the MD_DETECTOR checks, since now all insects/demons have it set, and it's no longer needed to check for the race.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9464 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-11 18:40:14 +00:00
Playtester
914a102822 Updated sql files
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9459 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-11 17:22:16 +00:00
skotlex
705e960a79 - Spirit of Sin and Enchant Deadly Poison now stack.
- Fixed skill damage card bonuses not working on magic skills.
- Moved the setting of sd->npc_id = 0 in npc_dequeue to the beginning, since this function is called when a script is cancelled (TODO: but when this happens, shouldn't the previously ongoing script also be free'd?)
- Made homunc's speed be recalculated when you respawn it from rest state.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9453 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-11 16:04:24 +00:00
toms
01b6c052c6 Fixed @revive not reviving the good char
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9448 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-11 10:19:12 +00:00
FlavioJS
d4185ce10e - Added more helpfull error messages when packet_ver=-1. (no more "clif_parse: Disconnecting session #XX for not having latest client version (has version -1)." messages)
- Joined normal and MINICORE's main function.
- Put malloc_init() first and malloc_final() last as it's needed for Show* in display_title().

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9446 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-10 19:23:04 +00:00
FlavioJS
b524f75cd0 - Reversed revision #9415 (messages with server_tick field being sent as soon as possible) since it didn't fix the client synchronization issue.
- clif_parse_TickSend is sent immediately so the client gets accurate "pings"

Note: in Changelog, for my changes, if they're grouped together and in the same day I'm only gonna "sign" the bottom line.
All unsigned lines are assumed to be from the same person of the previous line (below). (easier searches =P)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-09 15:57:22 +00:00
skotlex
7a607a433a - Now you can request a trade regardless of the state of the target trader.
- The trade will now fail when you accept it and either character is speaking with an npc, vending or has the storage open.
- Cleaned up some the trade ack function, added proper replies to some fail cases.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9438 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-08 15:05:48 +00:00
skotlex
2d7b67257e - Fixed crash when looters became full.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9437 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-08 14:43:47 +00:00
skotlex
e906a6f074 - Moved attackedcount to md->state and made it an unsigned char.
- Autospell delay time is now the skill's full delay. 
- Removed variable attackedplayers, since Aegis is state driven, the best approximation to Aegis would be to use the last player that hit the mob.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-08 13:43:48 +00:00
FlavioJS
7ecc1ab6e1 - Fixed ladmin's linux compilation and moved some platform specific defines to cbasetypes.h
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9435 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07 23:59:26 +00:00
skotlex
e81a812069 - Cleaned up implementation of NPC_EMOTION/NPC_EMOTION_ON. Now val0 is the emotion, val1 sets the mode, val2 adds to the mode, val3 removes from the mode. val4 asks to remove the previous mode change.
- Updated the mob skill reading code so it accepts hexadecimals in the 'val' fields. Also, it will optimize the NPC values so that when you set a mob's mode to their db mode, it will just remove the previous mode.
- NPC_EMOTION_ON will now automatically move it's new mode to val2 since it should add a mode, and if this mode doesn't has the aggressive bit, it will remove it. See this "ancient" hypothesis on how NPC_EMOTION_ON should work for the details:
	http://www.eathena.ws/board/index.php?showtopic=63606
- Updated mob_skill_db to account for the updated mob modes on NPC_EMOTION skills.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9433 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07 16:42:25 +00:00
toms
912fc7a427 Fixed npc commands atcommand & charcommand not working with a custom command_symbol
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9431 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07 12:55:00 +00:00
skotlex
3f3172a720 - Changed the order of view-change packets for SC xmas/wedding, should fix crashing if you change into xmas suit while in fighting stance.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9427 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 21:30:45 +00:00
skotlex
8b8aa14493 - Renamed the mob mode Cast-Sensor Melee to Cast-Sensor idle since these mobs really should only be cast-sensing when they are not after another target.
- Added a Aegis Mob Type -> eA Mode table conversion to the mob modes doc.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 21:11:12 +00:00
Playtester
3e4765f481 Updated sql-files
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9424 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-06 18:34:33 +00:00