537 Commits

Author SHA1 Message Date
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
ultramage
06f9538ece Added check to prevent crashing on logmes with no player attached (bugreport:1648).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12815 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-12 09:59:46 +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
ultramage
4ffe35e8bd Corrected definition of 'delitem' and 'delitem2', which prevented the optional accountid parameter from working (bugreport:1512).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12792 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-08 13:06:08 +00:00
ultramage
9568930e99 Fixed 'soundeffectall' not reading its params correctly, since r10844 (bugreport:1627).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12766 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-07 03:27:38 +00:00
Lupus
51b885b417 crashfix to attach/detach timers
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12748 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-31 07:23:43 +00:00
zephyrus
b37569c083 - Cleanups and a little fix to NPC Sizes (thanks to ultramage).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12745 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-30 12:01:59 +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
ultramage
836deebfb9 Fixed a script engine problem where warping away while having a menu window open and talking to an another npc with a menu would produce menu option count mismatch errors (bugreport:1208)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12703 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-12 09:18:24 +00:00
zephyrus
9bfb1ac1be - More scripts fixes.
- Some cleanups to the code.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12695 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-09 03:12:26 +00:00
zephyrus
31320fcc9d - Added some new items and headgears.
- Changed the way DEF Potion and MDEF potion works to official.
- Cleanups to Barricade Engine. It now can be used in WoE 2.0, i will release optional scripts soon.
- Fixes to @noks. Now if the mob is targeting someone else the protection get lost.
- Added new status effects icons to cash items.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12693 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-08 16:58:57 +00:00
ultramage
62cc01866b Replaced the very ineffective clif_foreachclient() with map_foreachpc() since they essentially do the same thing (bugreport:1174).
Rewrote map_foreachpc() so that its callback function signature now uses a more natural 'sd' instead of a DBKey/void* pair.
Rewrote atcommand_users() to use a single function, instead of depending on two helper functions and global objects.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12683 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02 15:08:14 +00:00
Kevin
2eabb3d1f7 Added script function hasquest.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12660 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-26 23:11:15 +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
2599064a46 * Fixed script strings not being handled properly (only skipped the \).
* Added skip_escaped_c to strlib.c/h.
* Fixed sv_unescape_c not handling hex/octal escapes properly.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12639 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-23 11:14:45 +00:00
FlavioJS
d903fda1c7 * Script parse errors displayed with one ShowError instead of several ShowMessage's.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12637 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-23 04:35:32 +00:00
FlavioJS
c880052f0f * Changed the data field of timers from int to intptr.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21 21:34:31 +00:00
toms
ccb23efe49 Made some cleanup in changesex
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21 16:19:25 +00:00
toms
443c56e21f Fixed a bug in (init/start/stop)npctimer
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-19 15:37:18 +00:00
toms
034920992e Use the same code for script commands getitem & getitem2 as @item to avoid bug in bugreport:1324 (non-stackable items are stacked)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12603 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-15 18:37:06 +00:00
Kevin
ffa3b60fc0 Finished most of the quest log code, still bits here and there but it's usable now.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12558 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-11 07:12:45 +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
94943b2b6a Adjusted eAthena code to compile cleanly in C++ mode.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-26 10:37:45 +00:00
ultramage
e2960e9af8 Partially fixed the mess in status.c.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12433 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-25 21:41:31 +00:00
zephyrus
fa64cdae0d - Added the official adoption method.
( Parents need to create a party, invite a novice/first class, both equip the wedding rings and someone just right click the future baby ).
- Fixed a bug sometimes client don't show job's bonus stats.
- Removed the problematic adoption script.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12389 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-18 04:32:20 +00:00
zephyrus
0c381f2877 - Auction System implementation completed.
- As mail system, this will need a "mapflag" or something to only allow auctions on some maps.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12325 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-08 20:11:28 +00:00
skotlex
92960a166f - Added config settings mob_active_time and boss_active_time, what they do is specify a duration during which monsters will keep running their active AI after all players have left their vecinity. Their current defaults are set to 0 (disabled).
-  Script induced status changes can now be reduced by stats/cards (but only trigger rate is reduced, not duration)
- Battle delay timers will now check if the target player has the invincible timer active or not.
- Adjusted mob_ai_sub_hard to return a bool indicating whether the AI was executed or not.
- Adjusted clif_damage and clif_skill_damage to set the endure type value based on dmotion and damage, rather than hardchecking for SC_ENDURE.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12315 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-07 15:02:32 +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
ultramage
ea94316689 Fixed 'cleararray' not able to erase array entry 127 (bugreport:864)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12253 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-27 22:04:11 +00:00
FlavioJS
e8c226e1f3 * Forgotten update to the definition of script command 'input'.
* Enabled DEBUG_MEMMGR only in DEBUG mode. 
* Made autotrading characters be kicked instead of reporting double login.
* Made create_session initialize session_data to NULL.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12218 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-19 16:55:13 +00:00
ultramage
8c92106315 some compilation warning fixes
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12206 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-15 12:22:03 +00:00
ultramage
b24b80c5c9 Getting rid of map_getallusers(), part 1
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12195 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-11 17:46:31 +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
ultramage
c2a02f48bd Fixed wrong message in item group loading code (bugreport:936)
Fixed 'charisalpha' not working for the first char (bugreport:940)
Disabled signed/unsigned warnings for visual studio 2005

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12186 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-08 10:23:24 +00:00
zephyrus
c4fb4f4361 - Some code cleanups.
- Added new Cell types (NoChat and NoDamage)
- Added JobChangeLevel and FreeSKPoints to #stats
- Added a Crash protection in clif_send with invalid fd values.
- Merged a missing update in TK Mission.
- Added script command 'getmapflag'
- Merged some new Status Change to Stable.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12175 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-04 18:23:57 +00:00
ultramage
8d811654b9 Fixed npc reloading crash (bugreport:889)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12166 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-02 08:16:53 +00:00
zephyrus
e3ee239077 - Fixed a serious zeny exploid on scripts. Please update!!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12153 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-30 09:14:58 +00:00
ultramage
88cfb8ff5a Fixed card removal script functions' 'extra card' bug (bugreport:786)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12075 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-14 13:25:41 +00:00
ultramage
f96f0d27a9 Removed the hardcoded limit for numeric npc input boxes (bugreport:811)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12074 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-14 12:01:58 +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
skotlex
5c4212300a - corrected duration of sphere mines to be 30 secs regardless of skill level
- Corrected duel_count/duel_list (you DON'T place variables in a .h file! That is what 'extern' is for)
- Script command warpportal now places a warp in its initial state (as if a real warp portal was casted)
- Updated dispell to also not remove the following effects: Hindsight, Inc Hit/Atk Rate (NPC_POWERUP), Nen, TK stances and tumble, warm and speedup1 (the other speed potion)
- Chase-walking characters can now loot.
- Hiding characters can't drop items now. 


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12036 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-09 16:08:57 +00:00
skotlex
9a2033c364 - Made the pc reg variables receive a const char* as the argument, since they duplicate the value anyway (and they were receiving const char* values from the setd function)
- Fixed Wand of Hermod not starting the SC_HERMOD status change (which blocks spells)
- Fixed a missing break in the cast cancel code.
- Fixed additional def/mdef from vit/int bonuses being lost when a status change that affects def/mdef triggers (for homunculus)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12033 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-08 13:30:43 +00:00
ultramage
144afd8189 Cleaned up mob_once_spawn() and mob_once_spawn_area().
- now they use mapid instead of mapname as input parameter
- moved the responsibility to perform "this" -> mapid resolution to the caller
- added a pair of swap() operations to prevent working with a negative-dimensioned area (fixes bugreport:87)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12022 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 16:37:06 +00:00
ultramage
65834585a8 Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, generated by ShowMessage(). It now works exactly like printf().
Removed/replaced all printf calls in the code.
Added a new flag to setting 'console_silent', for filtering debug messages.
Silenced the "Broken pipe found" and "Server running in debug mode" messages.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06 14:19:26 +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
ultramage
ca115ffc82 Removed map_data's block_count, as (quote Yor/ja2160), "Perhaps useful for debug, but uses memory AND CPU for nothing." (block lists are linked lists, they don't need count tracking)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12001 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-03 20:43:25 +00:00
FlavioJS
b465fb5f30 * Fixed get_val2 not using the stack, which automatically frees the data, causing memory leaks for string variables since r11976. (bugreport:723 , part of bugreport:714 and part of bugreport:708)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-30 21:14:09 +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