1805 Commits

Author SHA1 Message Date
skotlex
dddd48f15d - Modified the "guardian" spawn script command, it no longer receives a "amount" argument (since that only leads to trouble), if the class is negative, it'll pick a random class the same way the monster spawn script command does, and if you pass a spawn position with coordinates equal or less to 0, a random spot in the map will be taken. However you can't use "this" as a map name anymore since these script commands do not need an attached player.
- Guardian spawning will now fail if you attempt to spawn a guardian that already exists on the same position.
- Collapsed clif_party_main_info and clif_party_join_info into a single function: clif_party_member_info
- Collapsed config settings "sg_miracle_skill_min_duration" and "sg_miracle_skill_max_duration" into "sg_miracle_skill_duration", which defaults to an hour.
- Miracle of the Sun, Moon and Stars can now retrigger to lenghten it's effect, and it is cancelled on warp/map-change.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9871 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-16 19:30:28 +00:00
ultramage
cf3421d7f1 - Cleaned up clif_party_info a bit
- Reverted some of my mobdb code

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9870 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-15 23:22:30 +00:00
ultramage
d47a72bf9f Cleaned up set_reg and the surrounding code
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9869 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-15 20:54:36 +00:00
skotlex
dabaf379a9 - The default packet version is now 8. Clients from November2006 and before can no longer get past the char-server unless you change it back to 7.
- Fixed Storm Gust counter freezing on fourth hit instead of third.
- Fixed @homstats not taking into consideration that the stat growth decimals get discarded on level up (so the real minimum/maximum displayed was off).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9868 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-15 18:22:56 +00:00
skotlex
81b4f30221 - Applied Rayce's dangling pointer fix when returning a temporary npc string variable (those starting with .@)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9864 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-13 22:27:30 +00:00
skotlex
158c398cec - Required Weapon, ammo, and skill state are now only checked on begin casting, instead of both on begin and end casting.
- Now when autoguessing ammo consumption, the amount of ammo required is always one (making it require HIT number of arrows was rather high for things like Sonic Blows, specially when things like Arrow Vulcan only consume one arrow)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-13 17:32:47 +00:00
skotlex
c1044cf02f - Reverted Venom Splasher's element to take your weapon's
- reverted the item skill usage update since Flywings and the like do not use skill use scripts anymore.
- Restored tid when a castend-id skill becomes castend-pos, fixes certain skills, most notably Resurrect Homunculus.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9858 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-13 00:17:32 +00:00
FlavioJS
781fa7bb72 - A bit more work on Ticket #41.
- Added 'r' (variable reference) to the script argument definitions.
- Added a simple define for suspitious actions. (empty at the moment)
- Added clif_clearcart and moved sending cart packets to pc_setoption.
- clif_parse_ChangeCart checking the player level.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9857 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-13 00:07:24 +00:00
ultramage
6eb920bf96 Fixed clif_parse_GMmessage cutting off messages randomly (typo in r9778)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9856 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-12 22:03:55 +00:00
skotlex
dbfaad69ef - Fixed npc_check_areanpc, Wand of Hermod works now.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9854 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-12 18:38:10 +00:00
skotlex
68e1eb420a - Corrected range of self destruction / bio explosion to be equal to their splash range.
- Corrected Spider Web casting around caster instead of target's position
- Corrected a possible crash during login due to checking for the incorrect variable (lets pc_calc_status be invoked when it shouldn't)
- Reenabled the base status aspd calculation for homunc (status_calc_bl calculates battle_status, status_calc_homunculus calculates base_status, they are not the same!)
- Corrected the meaning of "skill_display_fail&2", made 2 the default setting.
- Added bounds checking to map_foreachincell
- Opt2 values (poison, blind, and so on) are now resent on warp/map-change
- Corrected description of isloggedin script command.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9853 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-12 18:02:41 +00:00
ultramage
725ed1909e - Fixed the inverted behavior of display_skill_fail, caused by r9823
- Commented out some duplicit homunculus speed calc code

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9852 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-12 02:46:00 +00:00
ultramage
06074c6046 Fixed @loadnpc not updating the script_event[] array
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9850 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-11 21:44:37 +00:00
ultramage
1ad9bb7c15 Fixed clif_party_message using an incorrect buffer length
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9845 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-11 00:16:06 +00:00
FlavioJS
1041f38037 * Cosmetic changes to the buildin section of script.c (use defines for function names/definitions).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9843 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-10 13:56:49 +00:00
skotlex
b09a064281 - Updated the 'unit walk' to functions so they stop your attack if it's possible to walk.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9837 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-09 19:50:57 +00:00
skotlex
971ea7e332 - Fixed char server SQL not sending the guild info update to other map servers when a new member is added.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-09 19:20:00 +00:00
ultramage
64fcacf6b3 - Added code for SQL that will automatically detect the ping interval at startup, and copy-pasted it around the code
- Removed the conf setting as it is not needed anymore

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9830 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08 23:26:00 +00:00
skotlex
eabdf9af64 - Spider web can again be recasted on target.
- Modified Spider Web so it can instantly retrap a target, rather than idling on the ground waiting for a new target.
- Cleaned up some the rude-attacked code, being attacked while under spider web now triggers rude-attacked.
- Sped up the FrostJoke/Scream message length chat check.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9828 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08 18:25:51 +00:00
ultramage
81c50c19b7 Added a missing null pointer check in clif_parse_globalmessage
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9827 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08 17:58:38 +00:00
ultramage
1aa9c5ceca - Fixed the new socket code, which was triggering the inactivity timeout on the servers' listening sockets
- Fixed the TURBO code not working since r4468 (parse func never called)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9826 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08 16:36:48 +00:00
ultramage
0729d61b56 * More aggressive cleaning up of the socket code
- removed unused session_data2 entry in sd
- added a new create_session() function, helps keep things cleaner (although it's ad-hoc and not perfect, since this is C)
- undid r4978 since it was getting in the way (re-add it if you need it)
- added defines for the recv, send and parse func pointers
- added null functions for the three actions, and made create_session() calls use those instead of NULL pointers; insignificant penalty and now:
- since all three funcs are always initialized, removed all those NULL checks 
- removed the efd set, since as the people from the developernet forums pointed out, it's only for out-of-band data and NOT for error checking (in fact, select() bails out without giving any info if it errors out)
- reorganized the randomly placed socket.c contents somewhat

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9822 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08 01:33:40 +00:00
skotlex
78d876f355 - Modified spider web so that the skill_unit_db flag restrictions may take place.
- Modified Spider web so that it can't be casted on top of another web.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9821 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07 23:23:53 +00:00
ultramage
3e4bef37b7 Wiped out the poorly written parse code from r2211
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9819 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07 20:30:22 +00:00
ultramage
148f3fca88 Cleaning up of the socket code
- Shuffled includes around for files that were leeching off of socket.h
- Added code that enforces standard shutdown behavior for sockets

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9817 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07 19:34:54 +00:00
skotlex
6597b8c74b - Updated the range of BioExplosion and Self Destruction so they count as ranged skills.
- Removed old script bonuses bMatk, bMatk1, bMatk2
- Fixed char-server not sending online notification when a party member logs in.
- When skill range by distance is set, the distance checked for is now 5 cells rather than 3.
- Fixed bMatkRate bonuses not applying to status earned modifications to int/matk.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9816 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07 17:46:50 +00:00
FlavioJS
c46f3cf135 - Removed deprecated console code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9815 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07 06:25:00 +00:00
FlavioJS
5c41bf4b04 - Moved CHAT_SIZE back to map.h because log_atcommand uses it on sql builds. (moved to clif.c in r9811) [FlavioJS]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9814 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07 05:20:22 +00:00
ultramage
6bf7170064 Cleaned up the script engine's get_val() function
- changed the long if-spaghetti into a compact switch statement
- changed its behavior so that it exits if !sd and it requires one
- upon exiting, it will now ensure that meaningful values get returned (the old code would return random memory / crash)
- removed many !sd checks since they are done at the beginning now

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9812 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07 01:49:28 +00:00
skotlex
c1d503fdcb - Moved define CHAT_SIZE to clif.c, added define CHATBOX_SIZE to specify that 70 char limit of the input area.
- Fixed #lvup having the gm level check backwards.
- Fixed the stormgust freeze counter going up even if the attack is blocked/cancelled.
- Updated mes_len_check to receive max expected size as well (clif.c)
- Cleaned up parsing functions for /mm, /resetskill, /resetstate, /item, /monster, /hide
- 


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9811 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06 21:49:00 +00:00
skotlex
4b7dcab0f2 - Cleaned up homunc attack request parsing. Homunculus no longer goes into auto-attack (ctrl+click) mode since the client does every attack request individually.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9805 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06 17:57:45 +00:00
skotlex
7946ebfc48 - Fixed char-server not sending party status update when a member logs on/off
- Fixed crash when parsing guild member information change from the char-server when the specified character is not found in the guild.
- Fixed MvP mobs giving exp when killed even if they shouldn't


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9802 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06 17:17:26 +00:00
ultramage
c5450173b1 Undid revision r9792 (npcshopattach)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9796 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06 00:32:40 +00:00
skotlex
29e3b9e204 - Fixed @lvup, #lvup not doing a stat reset and lowering your status points if you had 0 status points at that time.
- Fixed MvP exp and item rewards being given even when the mob_dead flag specifies you should not receive exp or items.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9795 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-06 00:03:16 +00:00
skotlex
facb8af27f - Updated the code so that now a range of a skill is determined by the skill's range in the db. Now only skills with less than 5 cells of range are melee.
- The inf2 parameter of the skill_db is now red as an hexadecimal.
- Updated comments and inf2 values of the skill_db to use the new format.
- Soul Change now can't be casted on self.
- Updated range of Grandcross, Granddarkness and Gospel to 5 so when they attack their attack type is counted as ranged.
- Splitted the super novice flag in two, to keep seperate counters for the chant and for the self-revival. The self-revive will now trigger only once per level per session, if you relog you can have it trigger again.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9794 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05 23:10:47 +00:00
ultramage
ed7e98e9d3 Applied Dj-Yhn's fix to 'npcshopattach'
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9792 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05 20:34:22 +00:00
skotlex
d2574dfd69 - Fixed a duplicate warp name in Rachel
- Fixed Venom Splasher not being Poison elemental
- Cleaned up #blv
- Fixed the skill tree not always updating when using @allskill
- Probably fixed the target-change on melee attack setting not working.
- Moved the deletion of the invincible timer when using skills so that it is not deleted for skills such as Ashura (when just selecting a target)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05 18:16:33 +00:00
FlavioJS
f652311f37 - Continuing the checking of script buildin functions and stop the script execution when an attached player is required but not found.
This task will be referenced as Ticket #41 from now on.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9790 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05 17:42:55 +00:00
ultramage
175d003c6f Updated the TXT login server's account id checker (it was still saying the minimum is 700000 instead of 2000000)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9788 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05 14:15:58 +00:00
ultramage
12a784cf17 Changed the 'getpartyleader' script command so that it returns a map name instead of the useless mapindex number.
Also fixed it so that it doesn't throw a 'args of aFree is not valid pointer' error (although I'm not at all sure that the fix is correct).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9787 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05 14:11:43 +00:00
ultramage
5f0de40e38 Removed the silly and misleading 'firewall detected' message
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9786 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-05 13:33:02 +00:00
ultramage
195b0f9870 Added missing vc6 project file
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9785 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-03 15:14:18 +00:00
ultramage
7d1e080338 Corrected a lie in the script documentation
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9784 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-03 13:41:18 +00:00
skotlex
a23da55db8 - Fixed the flag parameter not working on npcshopattach
- Modified unit_walktoxy so it accepts flag &4. When used, this flag will delay the walk request if the character is unable to move because of the can't walk delay. This is used for player and homunculus walk requests.
- Removed the delay walking code from clif.c as it's now handled by unit.c
- Added a possible crash protection in clif_skillfail when the player is without a connection.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9782 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-03 07:48:38 +00:00
ultramage
65796c8765 Fine-tuned the global message processing function
- now detects access-out-of-rfifo attempts (idea from eA++)
- uses the new CHAT_SIZE define to restrict message lengths
- detects Frost Joke/Dazzler and gives them more freedom (from Freya)
- more strict non-conformant message detection 
- logging every problem to the mapserver console

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9781 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-02 22:03:05 +00:00
skotlex
cc141e4bcb - Resetting skills will now automatically remove peco, falcon, cart and homunculus (vaporize).
- Fixed random mob picking choosing clones.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9780 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-02 20:59:09 +00:00
ultramage
84ad40528b * Restricted global messages to 255 characters (client shows only ~80 anyway, wanted to use 127 but frost joke's lines are longer than that ...)
- prevented using a ~22+kB long message to crash everyone on screen
- prevented faking the message length to cause an out-of-bounds access crash
- removed the unneccessary 'buf'ffer (inspiration from jAthena)
- Ref: http://www.eathena.ws/board/index.php?showtopic=137770

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9774 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-02 06:37:53 +00:00
ultramage
936937bd46 Corrected the chat system to allow 8-letter passwords
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-02 02:11:48 +00:00
ultramage
71ca66f8b1 Minor details (pdb file location, improved debug, npc typo)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9771 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-02 00:12:43 +00:00
skotlex
4130bdd3b8 - Cleaned up the npcshop(add/del) item script commands, fixed a possible dangling pointer crash caused by their improper use of realloc. They no longer automatically attach the script to the shop, and they will return true/false based on whether the shop was found or not.
- Added script command npcshopattach to enable attaching/detaching your script from any npc shop.
- Updated doc/script_commands.txt with entries for npcshopitem, npcshopadditem, npcshopdelitem and npcshopattach 


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9769 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-01 22:23:14 +00:00