420 Commits

Author SHA1 Message Date
ultramage
aa3f4c7b18 Fixed a typo in script engine erroring when working with char params
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10848 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-03 19:26:08 +00:00
ultramage
8db83e248a - Re-coded 'soundeffectall'; removed the third parameter ('coverage')
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10844 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-03 15:15:23 +00:00
FlavioJS
f8e09d76d0 * Defined out a problematic piece code in conv_num.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10843 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-03 01:54:46 +00:00
FlavioJS
bde6a0ca4b * Added reporting of constant and param script data.
* Fixed an incorrect check in menu script command.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10842 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-03 00:18:51 +00:00
ultramage
1ed7f6c584 Cleaned up some parts of the code.
Removed obsolete script function 'hasitems'.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01 15:26:53 +00:00
FlavioJS
a75ec9a547 * Changed the string hash of the script engine to SDBM.
* Reporting information about script data when an error occurs.
* More work on ticket #41 (array functions).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-26 21:03:31 +00:00
FlavioJS
2d1ad607c3 * Fixed script command sc_end not supporting the extra argument as stated in script_commands.txt.
* Script command getarg supports an extra argument with a default value that is returned if the requested argument doesn't exist.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10773 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-15 21:26:17 +00:00
FlavioJS
3e13b73efe git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10706 54d463be-8e91-2dee-dedb-b68131a5f0ec 2007-06-06 16:53:09 +00:00
ultramage
e1397576e6 - Fixed missing client update when 'return to savepoint' fails
- Fixed a bad copy-paste from r10028 letting players escape jail (char was dead on login, so statuses (SC_JAILED) couln't be applied)
- Added clif_standing() to clif_sitting(), and used them in clif.c
- Cleaned up clif.c a bit - clif_clearchar->clif_clearunit_area, clif_clearchar_id->clif_clearunit_single

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-03 14:43:34 +00:00
FlavioJS
f68f40f94d * Displaying op names instead of numbers in script engine errors.
* Fixed a bug introduced in the last rework of the fame ranking.
* Created safestrncpy that ensures the string is nul-terminated.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10667 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-06-02 20:19:40 +00:00
ultramage
0b618b9425 - Fixed @statall giving you +99 stats instead of setting them to 99
- Fixed npctalk and @npctalk displaying the # part of the name

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25 20:54:47 +00:00
ultramage
ffbf79b895 Reformatting, warning fixes, unsigned char removal
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25 19:37:58 +00:00
ultramage
dfdb5368c7 Corrected some weird fgets() statements, plus reformatted them
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25 15:21:53 +00:00
ultramage
301d493855 - Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast time and delay reducibility by item scripts (cards and such)
- Fixed Martyr's Reckoning never triggering for gms with all skills
- Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter 
- Made gm_skill_unconditional bypass skill blocking (guild timer, etc)
- Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059)
- Changed a few memsets to strncpy (reading past buffer is a bad idea)
- Sped up some memset operations (multiples of 4 are faster)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-23 21:23:36 +00:00
ultramage
4228b025e7 - Fixed one missed malloc->aMallocA typo, causing memory deallocation problems
- Some small trunk-stable formatting synchronization

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10595 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-20 20:40:34 +00:00
ultramage
711d01a128 Reformatting @_@
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19 15:50:41 +00:00
ultramage
16671ef54f * Added Global chat and Main chat logging
- lowered the priority of the 'logging off during gw' filter

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10580 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19 13:26:02 +00:00
ultramage
bac04aa3aa Corrected the problem with countitem2 (value wrapped-around in one case but not in the other, making comparisons fail)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10573 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19 07:46:57 +00:00
FlavioJS
e54e285849 * Fixed warpwaitingpc not working (bug introduced in r10471).
there was a "sd != NULL" where it should be "sd == NULL"

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-07 05:18:39 +00:00
toms
ede6014fb9 Removed an unused variable in script.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10491 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-06 09:21:13 +00:00
FlavioJS
bc088a5ad8 * Removed the dependency on winsock.h for definitions, it's all winsock2.h now.
* Minor documentation/re-coding in chat.c.
* More work on ticket #41.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-05 14:50:07 +00:00
FlavioJS
c292b087b5 * Internal changes to the script engine:
- modulus division detects division by 0.
  dividing by zero stops the script and gives an error
- underflow/overflow messages differentiated (warnings)
- when a script function doesn't return a value, a C_NOP value is pushed 
  instead (avoids stack corruption)
- op_add merged with op_2+op_2num/op2_str
- better type checking in the operators, int/string is never assumed.
  The script ends when an invalid type is found.
- other minor code cleanups

Changes made in consequence of:
Ref: http://www.eathena.ws/board/index.php?s=&showtopic=149237&view=findpost&p=823195

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10379 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-28 09:57:29 +00:00
skotlex
b6e3783be6 - Updated the skill_db, some mob skills seem to be better to a range of -9 than 9.
- Corrected the pet_db information for Xmas Goblin and Rice Cake.
- Replaced all struct map_session_data to TBL_PC in script.c
- Pressure no longer vaporizes plants.
- Corrected pc_setregstr to handle a null str argument.
- Corrected @reloadbattleconf causing a add_timer_func "already existing function" error.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10326 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-23 19:08:34 +00:00
FlavioJS
f4907979c1 * Extended the functionality of StringBuf - length and appending a string.
* menu/select/prompt script functions support grouped and empty options.
  The selected option number is consistent with them.
* More work on ticket #41.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10316 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-22 15:45:37 +00:00
skotlex
36a86d07e4 - Corrected crash if itemskill is used without an attached player.
- Removed range checks for autospells as per UltraMage Aegis tests.
- Added chatID skill fail check to skill_check_condition
- Corrected @refresh not re-displaying your spirit spheres nor re-setting your cloth dye.
- Now the "number of attackers" in mob_dead is counted only from online characters on the same map.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10307 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-22 03:11:04 +00:00
skotlex
e120c937cc - Updated the autospell bonus scripts so you don't have to specify all the attack type criteria. If neither of BF_LONG/BF_SHORT is specified, the spell will trigger on both. If neither of BF_WEAPON/BF_MAGIC/BF_MISC is specified, the spell will trigger on BF_WEAPON, if neither of BF_NORMAL/BF_SKILL is specified, BF_SKILL is used if the trigger is BF_MAGIC/BF_MISC and BF_NORMAL is used if the attack is BF_WEAPON. This way the default when nothing is specified is BF_NORMAL|BF_WEAPON|BF_SHORT|BF_LONG.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10300 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-21 19:12:11 +00:00
skotlex
bdaf348a6d - Expanded the autospell structure to hold a flag, which contains the required Battle Flag conditions required for a skill to trigger.
- Added the required constants to const.txt to specify the autospell trigger properties.
- Added bonus5 bAutoSpell/bAutoSpellWhenHit. The new parameter is used to specify when the spell should trigger (melee/range + weapon/magic/misc attack), see item_bonus for details.
- Applied use of packet 0x28a (clif_changeoption2) to transmit opt3 changes. 


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10278 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-17 15:43:40 +00:00
skotlex
0aa57161b9 - Modified spirit of Wizard so that the consumption of 'Fragments' when blocking bounced spells will only consume 1 Fragment per skill casted, regardless of how many hits were reflected.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10207 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-10 16:19:32 +00:00
skotlex
b6bfcce712 - Modified status_get_sc_def to handle both rate and tick reductions. This way it can take care of the fact that curse rate/duration reductions are not reduced by the same stats.
- Removed wrong defines status_get_sc_def_[mdef/vit/int/luk], they actually had a rather undefined behaviour.
- The pc_max_status_def mob_max_status_def configs are now set on a 1-100% scale instead of 1.00-100.00%


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10206 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-10 15:34:49 +00:00
skotlex
e939ffd654 - Fixed crash if a script does a%0
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10200 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-09 20:27:01 +00:00
FlavioJS
a91b77d781 * Recoded and renamed the trim function in strlib to normalize_name. (didn't behave like a standard trim function, see function comment for what it does)
* Added a proper trim function to strlib.

* Other minor cleanups.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10199 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-09 20:21:17 +00:00
ultramage
5d3ea3da27 * Played around with MinGW a bit today...
- adjusted code so that it handles mingw-specific compatibility problems
- adjusted the makefile, mingw is not a subset of cygwin
* As an experiment Corrected many /W4 warnings on the txt login server

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10192 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-09 00:46:55 +00:00
ultramage
87c0efdc89 - Moved e_mail_check() and config_switch() to strlib.h
- Synchronized the login servers a bit

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10174 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-07 04:21:29 +00:00
DracoRPG
7c8f12ccd5 I'm still here!
Rewrote fame ranking lists- changed MAP_NAME_LENGTH to 12, now there's MAP_NAME_LENGTH_EXT at 16 for
	  uses where there is / may be the .gat extension, code adjusted accordingly
- moved map_normalize_name to mapindex_normalize_name so that everything
	  handling map names uses the same extension-removing function
- greatly enhanced the map cache generator, complete documentation on the
	  tool and the map cache format can be found in doc/
- the map cache format changed a bit as a consequence, but of course a new
	  valid one is included (contains latest Nameless Island maps)
- fixed a duplicate entry in map index


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06 17:22:40 +00:00
ultramage
dec82b6120 - Fixed the server crashing on startup due to bad define
- Fixed the server crashing on a timer-queued disguise / undisguise (no sd check)
- re-added the item_group_list for consistency's sake, moved to itemdb.h (after some hacking to remove the ugly map.h dependency)
- Removed some overly verbose item group messages & code

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10112 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-01 21:15:57 +00:00
FlavioJS
43a375ad89 * Added all the missing defines for ctype.h functions and converted all the direct uses to the defines.
Ref: http://www.eathena.ws/board/index.php?showtopic=145235

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-30 06:16:08 +00:00
skotlex
cbac96a819 - Corrected a pretty serious typo in script.c
- Corrected the change that made Coma not be reduced by mdef making Stone, Freeze and Decrease Agi be reduced by luck rather than mdef.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10090 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-29 21:28:35 +00:00
toms
d57ed274ca Continued script.c cleanup
Added defines script_pushstr and script_pushconststr to have the same syntax as integers
Added defines script_getref, data_islabel, data_isfunclabel to increase code readability

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10088 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-29 16:11:40 +00:00
skotlex
640ef63c2b - Added defines script_getnum and script_getstr to further simplify variable reading code.
- Applied mass replacing of text to enforce usage of script_hasdata, script_getnum, script_getstr and data_isstring defines where possible.
- Cleaned up the 'input' command code.
- Minor other cleanups in script.c
- Removed OPTION_SIGHTTRASHER as there's no indication this value exists.
- Corrected OPTION_XMAS since 2007 clients have split it up from OPTION_FLYING (on previous clients both were the same option value)
- Removed GRF_PATH_FILENAME references (it wasn't used anymore)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10085 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-28 17:29:02 +00:00
ultramage
06f0d60116 Some generic typo fixes (src and npc)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10054 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-22 21:03:19 +00:00
skotlex
f441021b95 - Corrected setitemscript so it actually changes the script as requested instead of causing dangling pointers.
- Cleaned up unitattack
- Made packet_ver_flag's description use hexadecimal values for the packet versions, and changed the default to 0xFFFF.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10047 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-21 21:13:47 +00:00
skotlex
a102344894 - getpetinfo 5 will now return the pet's rename flag.
- Autoloot will now only work on items dropped a certain distance from the player. The distance is defined by AUTOLOOT_DISTANCE in atcommand.h and defaults to AREA_SIZE.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-20 16:02:22 +00:00
skotlex
3ee61db52f - Removed Magic Rod's cast bar.
- Corrected warning on login sql.
- Gravitation no longer causes damage flinch.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10038 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-20 14:59:16 +00:00
skotlex
2907fa6467 - Removed the last argument from skillitem, the skill name passed to the client should always be of the type "AL_HEAL" anyway.
- Added skill ITEM_ENCHANTARMS, this is what weapon enchanting items should use.
- Corrected itemskill calls in the item_db, also made the weapon enchanting items invoke the ITEM_ENCHANTARMS skill. Corrected Holy Egg not being type 11 (delay consume)
- Updated item_db.sql with item_db information.
- Added support for specifying different elements per skill level in the skill_db
- Added bonus bNoKnockback
- Corrected typo in bonus bSubRace2 (it was called bSPSubRace2 for some reason)
- Corrected login sql server not resetting your account state to 0 when the banuntil duration expires.
- Corrected use of UINT_MAX instead of INT_MAX in some jailing check.
- Made the skillatk bonus it's own function, it can now be used to boost Heal/Sanctuary/Potion Pitcher and Slim Pitcher as well.
- Cleaned up TK_WARMWIND to use the element acquired from the skill_db rather than hardcoded values.
- Corrected Teleport's save map entry being sent without the .gat extension.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10031 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-19 19:44:21 +00:00
toms
3e25d536cf Globalised use of script_pushint and script_getdata in script.c
Little clean of unused variables in script.c

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10026 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-18 21:35:42 +00:00
FlavioJS
14e2d760f9 * Script engine:
- calling functions without using the return value doesn't generate warnings
  - more work on Ticket #41
* Took care of two warnings and a minor change to the makefile.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10025 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-18 16:07:16 +00:00
FlavioJS
b7f0cc8905 - Corrected the structure and added info on the skill fail packet (0x110).
- Added packet 0x223 as clif_upgrademessage (not used yet).
- More work on Ticket #41.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10013 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-15 13:49:25 +00:00
DracoRPG
58dcd187b0 Mapcache update, should polish off remaining bugs
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-13 20:24:08 +00:00
skotlex
29cb0abe60 - Added player not attached crash prevention to countitem/countitem2
- Probably corrected delitem not deleting pet eggs at all.
- Possibly nullpo fix on npcskilleffect
- Corrected a warning when using #fakename
- Hopefully fixed hidenpc/disablenpc not working on Guild flag sprites.
- Mob skill state "anytarget" no longer triggers when the mob has an item-target (looting).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9991 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-11 22:21:34 +00:00
skotlex
ddfc677c99 - @storage/@gstorage will no longer work if you have a trade or a storage opened already.
- Cleaned up a bit @gstorage
- Added a bunch of npc functions required to properly handle moving the NPC cells when an npc is moved from it's previous location.
- Added npc_setcells to handle setting down the NPC cells of ontouch npcs.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9990 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-11 20:02:42 +00:00