765 Commits

Author SHA1 Message Date
Inkfish
a366ac53ce * Fixed some known and unknown player attached NPC timer problems
- Attached timer now can be stopped properly.
- Attached timer will now stop if the NPC is unloaded. (bugreport:2510)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13744 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-09 01:45:11 +00:00
brianluau
8c09676863 - Removed a duplicate entry in item_trade.txt (bugreport:2720)
- Documented more script commands and fixed some typos. 
(bugreport:1554, bugreport:2619, bugreport:2692, bugreport:3034)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13732 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-07 09:07:22 +00:00
brianluau
53998c9f3d * Added the md5() script command. (follow up to r13719)
- Changed kafra storage password to be stored as md5 hash in #kafra_code$.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13728 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-04 08:22:53 +00:00
brianluau
a11e789e0a - Fixed some typos in the script command documentation. (bugreport:2547)
- Fixed a misleading message in the custom Job Changer. (bugreport:682)
- Updated some NPC's facing directions. (bugreport:3030)
- Added missing newline in some ShowWarning(). (bugreport:2940)
- Fixed SC_BOSSMAPINFO time being off by 1 minutes (bugreport:3035)
Now, the seconds are rounded up to the next whole minute.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13713 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-02 20:23:30 +00:00
Kisuka
c9c3700399 - Added missing bonuses for 'Maiden Hat'. (bugreport:2826)
- Fixed an issue with Battleground Exchange NPC. (bugreport:2839)
- Fixed an issue with Platinum Skills NPC. (bugreport:2847)
- Fixed some typos and engrish in iRO Experience quests.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13578 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-12 09:20:58 +00:00
sketchyphoenix
21b7ebe262 Updated script_commands.txt with the book reading command info.
Added/reworded/removed comments to/in/from r13450

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13451 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-15 12:31:10 +00:00
Kisuka
18841adcc2 Some bug fixes. (bugreport:2558, bugreport:2588, bugreport:2583, bugreport:2587)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13416 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-27 16:53:31 +00:00
FlavioJS
d55642d64c * Extended how duplicates work: (based on Orcao's work in bugreport:2361) [FlavioJS]
- you can duplicate warps/shops/cashshops/npcs (before only npcs could be duplicated)
- warp duplicates inherit the target location
- shop/cashshop duplicates inherit the item list
- npc duplicates inherit the script code (backward compatible behaviour)
- updated script_commands.txt with the information

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13407 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-20 22:57:29 +00:00
sketchyphoenix
76ff905e03 Removed charcommand code while allowing atcommand code to support its functionality.
Charcommands still retain their '#' symbol but now looks for a character name as the first parameter instead of last.
Atcommand configs now support charcommand level configurations by comma seperation (e.g. 60,99)
As a result of this, all atcommands that don't affect multiple users already (@kickall, @doom, @mapexit) are capable of remote usage.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13403 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-18 02:36:01 +00:00
FlavioJS
f74b445add * Updated script_commands.txt
* Made scripts terminate with an error: (fixes bugreport:2429)
- when getitem/getitem2 tries to delete more items than the player has
- when trying to set Zeny to a negative number.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13368 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-11 04:02:48 +00:00
Paradox924X
2df3de1596 Removed leftovers of "bLoseSPWhenUnequip" and "bDamageWhenUnequip" -- deprecated in r6204.
Item 2385 was still using bLoseSPWhenUnequip -- fixed.
npc/custom/events/xmas_rings_event.txt still uses both in conjunction with setitemscript. Someone will need to make it so equip and/or unequip scripts change be changed as well, or find an alternative solution.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13327 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-28 00:50:32 +00:00
L0ne_W0lf
331e0a0a15 Enabled WoE SE to be run independently of WoE. Let's see how long it is before something blows up, or Ultramage pulls out his hair while cursing my existence.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13202 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-09 17:33:10 +00:00
ultramage
cf57c2fc20 Removed hardcoded equip position names from getequipname (bugreport:2156).
Now it's the npc's responsibility to store and display the names.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13171 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-01 08:06:46 +00:00
zephyrus
c1fa49b7e6 - New invisible walls system (for WOE SE and Battlegrounds).
- New script commands for this system "setwall" and "delwall"
- Added other scripts commands "changelook" (can be used to try clothes colors, hair styles, headgears, etc without saving this on logout).
- Added getmobdrops to request a list of drop and rate of an specified class.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13101 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-20 20:56:35 +00:00
ultramage
dcc2cdb5da Split off mapreg code from script.c
* new mapserver files, mapreg.h, mapreg_txt.c, mapreg_sql.c
 * removed MAPREGSQL from project files / makefiles
 * mapreg storage engine is now fully dependent on the server type
 * added config settings mapreg_txt and mapreg_db to inter config
 * added get_str() function to complement add_str()
 * fixed txt mapreg code allowing too long variable names

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13081 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-15 11:14:45 +00:00
ultramage
a9a32d2da8 Added updated client effects list.
Corrected some doc/npc typos.
Reindented some mob AI code.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13074 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-12 05:45:35 +00:00
ultramage
115c5b6896 Removed the mob controller system, now a customization (see topic:194375).
The system consists of
 * script command to spawn a controlled mob
 * script commands to attach npcs to such mobs and manipulate their AI
 * a page of documentation for these commands
 * callbacks at various source code locations that invoke the attached npcs
 * two npc examples

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13021 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-31 05:37:40 +00:00
sketchyphoenix
d218e11636 Added support for killmonster to fire OnMyMobDead optionally.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12876 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-22 14:22:08 +00:00
sketchyphoenix
1cb87e882f * Modified *killmonsterall to support a new argument that will allow it to kill monsters using the new OnMyMobDead behavior (in order to avoid breaking older scripts) (bugreport:1734)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-22 00:27:30 +00:00
FlavioJS
57cfa2d794 * Extended script command 'set' to return the variable reference (topic:190602).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12871 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-21 21:46:24 +00:00
FlavioJS
625f9f62fd * Added support for skill names to script commands:
- skill, addtoskill, guildskill, getskilllv, getgdskilllv, itemskill, petskillattack, petskillattack2, petskillsupport, skilleffect, npcskilleffect, unitskilluseid, unitskillusepos
- bonus/bonus2/bonus3/bonus4/bonus5 for bonuses bAutoSpell, bSkillAtk, bSkillHeal, bAutoSpellWhenHit, bAddSkillBlow, bCastrate

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12814 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-12 09:30:12 +00:00
zephyrus
2da8086509 - Added support for NPC with different sizes (setnpcdisplay).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12744 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-29 13:07:54 +00:00
toms
c68d9e2a7d * Modified delitem/delitem2 to have the same behaviour as getitem/getitem2 (optional account_id parameter) bugreport:1035
* Modified doc in consequence

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12648 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-25 06:54:53 +00:00
FlavioJS
cd1f48cc9e * Made script command 'flagemblem' and guild_emblem_change send an update of the emblem_id to the players in the area.
- known bug: ui components that are displaying the emblem at the time (emblem in flag npc and emblem over head in gvg maps) are not updated, but putting the mouse over the target shows the new emblem
* Modified script command 'guardian':
- returns the id of the guardian
- if guardian index isn't supplied, it generates a temporary guardian
* Implemented support for temporary guardians (not saved with castle).
* Added missing includes from r12520.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12525 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-07 21:04:28 +00:00
ultramage
ea403a9f9a Added proper script constants and documentation for the 'checkcell' command. (topic:183035)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-27 18:27:22 +00:00
ultramage
9c07918456 Added proper checks to adoption processing (followup to r12428).
Cleaned up some code / fixed some typos.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12432 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-25 09:56:18 +00:00
L0ne_W0lf
3b801b284a Corrected cashshop description. (#FREEPOINTS->#KAFRAPOINTS)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12348 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-12 15:33:29 +00:00
skotlex
8ae4bd12ad - Updated firepillar so it cannot be placed on top of others.
- Updated the firepillar code so it behaves like the other traps.
- Changed the default format for @me and @main to avoid crashes on the newer clients.
- Fixed the char-sql server so it returns a valid 'not found' packet when attempting to load a non-existing homunculus.
- Fixed jump to use 0,0 for random coordinates rather than -1,-1
- Added missing \n to error reporting in getmonsterinfo
- Additional status changes now only get triggered if the attack did damage, not if they get absorbed.
- Fixed a logical comparison in unit_free to properly remove pets/homuncs when their intimacy is reduced to 0.
- Properly set the opt3 value for Moonlight, Changeundead and Soul Link
- Fixed the "no equip" flag of cards not being properly applied when attemting to equip items.
- Added a check to avoid invoking pet menu entries when the pet is incuvated.
- Fixed the session_data de-association in chrif_auth_delete
- Cleaned chrif_auth_ok so that the latest received char info is kept when previous char login data was already in there.
- Corrected docs mentioning non-existing flag 'mf_nopvp'


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-04 18:04:04 +00:00
L0ne_W0lf
631a93c854 Woopth. Fixed spelling. ;P Should be a bit clearer now.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12269 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-29 05:57:09 +00:00
L0ne_W0lf
ceb2dce73f Added some information and documentation for cash shop.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12268 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-29 05:44:26 +00:00
L0ne_W0lf
66071c3330 * Removed "F_CheckMaxCount" as it seems "checkweight". preforms the aforementioned check in addition to checking weight.
* Updated 2004 headgear quests to use checkweight.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12256 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-28 04:46:29 +00:00
FlavioJS
549684872d * Expanded the script command 'input': (bugreport:811)
- two new optional arguments 'min' and 'max'
- return value indicating if it's in the correct range
- config variables for the default value of the arguments: 'input_min_value' and 'input_max_value' in script_athena.conf

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12192 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-11 10:40:52 +00:00
skotlex
ced9aada8c - Fixed getmonsterinfo to return "null" when returning the name of a non-existing mob instead of -1.
- Extended the status_percent_damage define to include a bolean to specify whether or not the target can be killed from it.
- Corrected CR_CULTIVATION to fail when the target cell has some BL_CHAR on it already.
- Changed the meaning of 'flag' in status_percent_change, to enable differentiation between damage that can kill the object and damage that cannot.
- Script command percentheal will no longer kill the player if the specified amount is negative (and not -100).


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12051 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-10 22:02:33 +00:00
ultramage
e7bb626a80 Modified the map_setcell() code to to use a boolean flag instead of needing SET_ / CLR_ pairs of defines (topic:174323).
Also removed script object 'setcell', added script function 'setcell'.
- Now you can manipulate cell information without needing @loadnpc
- You can also manipulate the terrain ('gat') type itself, using the new cell_walkable, cell_shootable and cell_water constants
  (currently the implementation uses bit flags too, so to get the type you want, you need to adjust the flags one by one)
- This breaks current scripts, so please adjust places that use setcell
  (also be sure to _only_ use predefined constants, not direct numbers)
- Details can be found in the script reference.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-04 12:41:49 +00:00
FlavioJS
b6c11a8282 * Corrected description of scope and npc variables in script_commands.txt.
* Made temporary character string variables not have a limited length. (now all temporary string variables don't have limited length)
* Made temporary character variables reuse free positions.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11984 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-27 05:47:50 +00:00
ultramage
f32a0b4355 Corrected mistakes in script_commands.txt (bugreport:373)
- reformatted the file header (less junk more info)
- corrected "$" variable description saying that it always uses save/mapreg.txt
- added missing OnMinute: reference
- corrected OnLoadMapEvent saying 'loadmap' is the mapflag to use (should be 'loadevent')
- fixed getcharid() script example doing the opposite of what it said it was doing
- corrected getmonsterinfo() saying its parameter was an 'item id'
- corrected attachrid() saying "use character id as parameter" when RIDs are account ids
- placed commands from the 'RoVeRT' block to where they logically belong
- re-phrased the documentation to npc timers

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11948 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-19 12:04:42 +00:00
ultramage
1e6922174e Guardian hp handling code removal (see bugreport:342)
- removed guardian hp from the castle data structure, database, savefiles and various script functions (use upgrade_svn11914.sql)
- removed guardian hp calculation and manipulation from the castle manager npc, now the hp values are updated by the server itself (glitch: when castle defense changes, all guardians are healed to full)
- tweaked script function 'guardianinfo' to provide some data needed by the manager npc (currently available are hp, maxhp and visibility); also, it doesn't need a player attached to execute anymore
The whole thing is experimental, use at your own risk (seems to work though...)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-14 23:38:11 +00:00
skotlex
9d353fba9b - Added query_logsql script command to perform sql commands using the log db connection.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11892 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-11 22:37:07 +00:00
skotlex
fc7b4eaef0 - The default event script behaviour is to trigger on labels rather than NPCs now.
- Removed several script config options which break NPC compatibility when you mess with them (event_script_type, event_requires_trigger, die_event_name, kill_pc_event_name, kill_mob_event_name, logout_event_name, login_event_name, loadmap_event_name, baselvup_event_name, joblvup_event_name)
- LoadMap events no longer set the variable "@maploaded$" to the name of the new map.
- Optimized/simplified the code now that the previous config options were removed.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11859 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-06 12:59:12 +00:00
FlavioJS
508ffb82d9 * Renamed fakenpcname to setnpcdisplay, fixed and extended it.
- See doc/script_commands.txt for information on how to use it

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11779 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-22 16:06:39 +00:00
ultramage
17eb2f7764 Added script function 'strnpcinfo', for increased npc awareness (originally from jAthena).
Updated script reference doc.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11650 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-03 22:07:47 +00:00
zephyrus
baa7b210d9 - Removed some mail config settings and atcommands not required anymore.
- Added documentation for script commands: openmail and homshuffle.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11554 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-22 21:24:15 +00:00
Playtester
ddfbc69bfe Fixed some typos and updated Atroce Card
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11521 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-19 22:29:13 +00:00
skotlex
a1becae58f - Added bonusautoscript and bonusautoscript2. These are used to attach a script to a player which gets executed on attack (or when attacked). Required for several of the more recent items.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11519 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-19 20:31:57 +00:00
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