71 Commits

Author SHA1 Message Date
FlavioJS
613b8a5b65 * Clarified how npc names work in script_commands.txt.
* Fixed a forgotten "return 0;" that stopped the parsing of the file after the first "script" of the file is parsed sucessfully (caused by r11502).
* Applied the same parsing and restrictions of npc names to warps, duplicates and shops (other code expects unique names for them too).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11508 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18 14:21:46 +00:00
FlavioJS
a8d7143d0e * Loot code using charid's instead of id's in pick priority.
* configure script using svn:eol-style LF and require mysql/pcre when --with-mysql/pcre is used.

Added a forgotten file from r11311. (script_commands.txt)
Note: charid's are globally unique, id's are equal for characters in the same account.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11312 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-27 15:24:06 +00:00
FlavioJS
b848357f20 * Added a sanity check for MAX_ZENY (doesn't compile if too big).
* Redid the buildin_query_sql function. (fixes bugreport:81).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11268 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-22 01:43:08 +00:00
skotlex
8105f340a2 - Applied various crash-protections to script commands that deal with the equip-position array.
- Corrected and simplified the skill_magic_reflect function. Fixed damage reflection being based on the caster rather than the target.
- Potions are now usable inside Gospel by the casting Paladin (as per Aegis tests done by AuronX)
- The unequip script command now takes a position from 1 to 10 rather than 0 to 9 (to make it consistant with all the other equip position related script commands)
- Added the EQI_* constants to db/const.txt in a format usable by the equip-position related script commands.
- Updated some items to use the new EQI constants.
- Also updated doc/script_commands.txt to refer to the EQI list.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11230 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-17 19:13:58 +00:00
ultramage
5351aad3a6 Fixed missing 'name' parameter in 'duplicate' script command documentation.
Added npc_test_duplicate.txt to /samples.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-15 15:26:56 +00:00
ultramage
562e687322 Added config option 'quest_exp_rate' to adjust exp gained by the 'getexp' script command (followup to r11165).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11171 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-10 18:11:10 +00:00
skotlex
7233562a1a - Removed bonus bAddEffWhenHitShort as it is unneeded and unused.
- Corrected getpetinfo so it actually returns "null" when there's no pet and you request the name (the docs state it so).
- Also cleaned up a bit getpetinfo
- Added gethominfo (which behaves in the same way as getpetinfo).
- The 'maxcount' skill_db field now can store independant values per skill-level, required for Kamaitachi since it uses different range values per level.
- Corrected bonus3 bAutoSpell(WhenHit) to select target enemy (rather than self) for skills with inf self and inf2 'don't target self' (aka: auto-select target skills).
- Corrected map_foreachinpath to do a wall check for targets beyond the initially selected tile.
- Corrected Kamaitachi's range to be 9, and the path range to be 4+SkillLv


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11169 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-10 17:07:35 +00:00
ultramage
e7e0ddde9d Fixed certain typos in src/npc/doc files
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11102 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-01 08:14:36 +00:00
ultramage
025bcc1f28 Fixed a documentation mistake in 'areamonster' (missing argument).
Fixed incorrect sprite used for twintowers event npc.
Fixed a mistake in changelog.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11074 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-24 09:06:39 +00:00
ultramage
e476015e82 Set proper limits to drop rates to prevent integer overflow.
Minor details cleanup.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19 16:28:24 +00:00
Paradox924X
fe3ee37d0b Fixed a small error in the script_commands documentation about getpartyleader.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10995 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-13 17:39:39 +00:00
skotlex
9e9847a83e - Fixed some missing max levels for npc skills
- Expanded isloggedin script command to support an optional argument (char id)
- Expanded warpparty command to accept target "Leader", this will warp the party to the leader.
- Added a summon structure to handle non-dead-branch mob-groups since the current implementation totally fails for mob groups that don't have MANY integrants
- Fixed mobs not attempting an IDLE skill right before unlocking a target.
- Removed a useless variable in the pet_data structure


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10961 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08 01:55:58 +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
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
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
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
DracoRPG
e572506f1a Cleaned up the doc folder. Removed outdated, untranslated, useless files and began normalizing a bit other ones~
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-19 11:08:28 +00:00
ultramage
f6cc6e26d3 - Added missing header to mapcache.c
- Fixed a documentation typo for 'makeitem'

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10184 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-08 12:28:03 +00:00
ultramage
a61e02cc29 Updated the server's PCRE components to 7.0
- dll, library, header
- cleaned the only existing example and moved it to /samples
- changed its interface a bit, now it uses $@ instead of $ to store the parsed result
- /!\ adjust your scripts if you are using npc regexp parsing /!\

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10170 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06 22:15:19 +00:00
ultramage
6867d93866 typos: recieve -> receive
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10163 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-05 19:02:52 +00:00
ultramage
3d30bfa551 - Corrected multiple "WoE has begun" announces
- Removed some poor coding from the gunslinger job script
- Fixed some engrish
- Added missing changelog edit

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10114 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-01 21:26:39 +00:00
ultramage
478b4b58e8 Fixed typos from previous revisions :)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-30 17:01:53 +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
Lupus
3b7ccf4d14 removed all .GAT from configs, docs and examples
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-15 20:51:30 +00:00
skotlex
8c52b6b21d - Now when a player logs out while it's running an attached npctimer, OnTimerQuit of that npc will be invoked.
- Updated scripts_command to add info on OnTimerQuit
- Corrected the double login check in pc_authok


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9926 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-27 02:30:55 +00:00
ultramage
32618b7ddd Corrected some typos and small details
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9912 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-25 03:23:45 +00:00
Lupus
454742c1c0 merged dancer quest from trunk, updated script doc
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9911 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-24 22:12:54 +00:00
skotlex
cf8685131d - Minor cleanups
- Adjusted menu-based skills so you can't reuse the same skill until you've dealt with the menu.
- Adjust autospells so that removing an autospell works when the script of the card that removes the autospell is triggered before the script that adds the spell.
- The "requested name of gm-hidden char" warning will not be displayed when the object in question is an NPC (since you can use Intravision to do this).
- Corrected the header format for invisible npcs.
- Venom Knife no longer takes into accounts cards or EDP.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9905 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-23 18:41:56 +00:00
ultramage
84cb63e650 Minor stuff (typos, socket.c, junk in login reply packet)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9886 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21 13:09:22 +00:00
skotlex
5ed686f6a8 - Updated the Dancer job quest to attach a player to the main timer script.
- Updated script commands startnpctimer, stopnpctimer, initnpctimer so you can attach a player to them, this is done because the attach/detach functions can't be used to attach to a different script than the one currently running.
- Some script code cleaning
- Updated the script_command reference with the new flag values of [start/stop/init]npctimer.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9872 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-16 20:53:05 +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
FlavioJS
b8bc4928ac - Corrected/updated info on Xor/setd/getd/callfunc/callsub/return and updated some examples to use "better" code.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-09 19:57:20 +00:00
ultramage
1de2ea7630 Updated some info in script_commands:
- updated 'cutin' (removed lies, removed outdated bmp list)
- removed 'cutincard' since eA no longer implements it

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9832 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-09 14:16:16 +00:00
eaac
05def906dd eAAC has checked the source and added missing commands to the script_commands.txt (the long-awaited mob control suit made by Lance, for example), also explained the logical operators AND,OR,XOR, left and right shift. We also sorted the commands according to what they do.
I'd also like feedback of the new version, to either me, Trancid or Dj-Yhn, to see what should be changed or what is incorrect / missing.

~erKURITA.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9831 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-09 02:09:33 +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
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
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
ultramage
e034ce07bb Typo hunt
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9684 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-21 12:12:04 +00:00
ultramage
dc139362e8 Small typo fixes
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9638 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-09 18:19:26 +00:00
FlavioJS
4b78fc3c9f - Changes to script buildin functions:
* functions checking if a player is attached as soon as possible.
  * functions that required a player attached and would crash if none was 
    there terminate the script now. (others keep the current behaviour to 
    maintain full backward compatibility)
  * removed the unused flag argument in guildskill.
  * bonus,bonus2,bonus3,bonus4 use the same function now (remains the same 
    script-wise)
  * added an optional parameter to setcart,setfalcon,setriding so it's 
    possible to remove the cart/falcon/mount or select a specific cart
  * other cleanups

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9636 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-09 17:31:13 +00:00
ultramage
3433d36c12 Updated the documentation to match the agitcheck() behavior
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9628 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07 17:42:41 +00:00
FlavioJS
2bd2fbacbe - added info about sleep,sleep2,awake commands and updated the variables section (hopefully all info is correct)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9603 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-01 18:47:59 +00:00
FlavioJS
0cf60d9ca1 - Updated getitem and guardian entries in script_commands.txt.
- Fixed getitem trying to get <character ID> from the wrong argument.
- Now getitem can be run on scripts without a player attached if <character ID> is specified.
- Now the two last arguments of guardian are optional and independant of each other ("<event label>" and <guardian index>). This way the previous implementation and script_commands definition are still valid code.
- Now buildin function names and argument definitions are checked for validity before adding the function to the script engine.
  Argument definitions follow the pattern:
    (v|s|i|l)*\?*\*?
    v - value (string or int)
    s - string
    i - int
    l - label
    ? - one optional parameter
    * - unknown number of optional parameters

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-31 09:22:25 +00:00
FlavioJS
637ae9a4dc - Massive EOL normalization & 'svn:eol-style native' flag setting for all txt/conf/h/c files.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05 13:23:07 +00:00
Lance
e04b0c735a Documentation update to atcommand
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9232 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-16 15:42:11 +00:00
Lance
3847e1c0e8 * For the sake of avoiding confusion, all script events are named with prefix 'On' from now on.
modified   Changelog-Trunk.txt
modified   conf-tmpl/script_athena.conf
modified   doc/pccommand_list.txt
modified   doc/script_commands.txt
modified   npc/custom/Lance/FR_HallOfFame.c
modified   npc/sample/PCLoginEvent.txt


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9231 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-16 15:39:27 +00:00
Lupus
dc65b3bc38 added Halloween Event, fixed seals quest, updated Pavianne KAfra
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8957 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-10 15:39:05 +00:00
skotlex
ee19937202 - Reloading scripts will no longer eliminate mobs with no respawn data. Watch out for duplicating Treasure Boxes?
- Some cleaning of npc_final
- Made speed_add_rate a linearly stacking increase.
- Corrected a possible overflow when using show_mob_info to display the mob's up as a percent.
- Corrected the documentation for checkoption/checkoption1/checkoption2


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8792 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-18 14:43:04 +00:00
Lupus
59e39f1b71 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8698 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-09-11 05:01:48 +00:00
skotlex
a9e7abfc20 - Corrected script_commands description of getequipid, it returns -1, not 0 on fail.
- Fixed the mob-id check during pet_db loading, it will also now print when a pet is not loaded due to having an invalid mob class specified.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8587 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-02 01:43:23 +00:00