653 Commits

Author SHA1 Message Date
Inkfish
1d90917604 * Implemented script command "areamobuseskill" and skill NPC_INVINCIBLE and NPC_INVINCIBLEOFF. (topic:217330)
* Using items no longer cancels invincibility(but using target and ground skills through items does). (bugreport:3259)
* Fixed Butterfly Wings not working during GVG. (bugreport:3264)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13897 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-19 13:26:50 +00:00
Inkfish
4e360035fc Fixed a crash due to script's backup state not being stored/restored properly. (follow up to r13846)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13850 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-06 00:59:30 +00:00
Inkfish
c10a8581a5 * Job_Battle_Manual and Battle_Manual can be used simultaneously.
* Fixed "sleep" after "attachrid" (a different rid) halts the script.(bugreport:3181)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13846 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-05 15:55:37 +00:00
Inkfish
dc7f470790 * Fixed turning off a skill needed to meet the requirements. (bugreport:3175)
* Skills used through items not having aftercast delay or cast time now don't overwrite the former canact_tick. (topic:220921)
* Multiple autoscripts now can trigger at once.
* Applied a temp fix for autoscripts crashing server.(bugreport:3154)
* Implemented SC_JEXPBOOST (thanks to GMJobbie for the diff). (bugreport:3177)
* Implemented SC_IGNOREDEF. (topic:217330)
* SC_DEFRATIOATK won't affect boss monsters. (topic:217330)
* Fixed skip_teleport_lv1_menu made lv2 skip menu as well. (bugreport:3183)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13844 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-05 00:22:12 +00:00
Inkfish
c61942c8cd Fixed losing skill list after base change. (bugreport:3106)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13812 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-25 10:32:06 +00:00
ultramage
34def63ece Cleaning/fixing the previous commits a bit
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13775 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15 11:41:40 +00:00
skotlex
418f0d9200 - Fixed a bunch of invalid memory access bugs as reported by Valgrind.
- Updated unit_stop_walking to not move character an extra cell when it is already half-way there unless flag 0x4 is        passed. (bugreport:3078)
- Fixed the monster MD_CASTSENSOR code not correctly setting the monster's aggressive state.
- Corrected a few compiler warnings
- Changed a bit the code for SC_BOSSMAPINFO so it is not so hideously ugly.



git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13774 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15 10:27:05 +00:00
zephyrus
15a8174e29 - Rental items now can be stackable items too.
- Added @font command to test kRO fonts. (Client side requires : Langtype 0 / Hex + Fonts Files on the data folder).
- Rental now announces with a maximum time to fix a problem with 1 month or more rentals.
- Reduced amount of calculations of Flee on map change (only if required).
- More security on Rental items.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13761 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-12 16:47:12 +00:00
Inkfish
0aa94a295f * Clean up for npc timer code
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13738 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-07 14:52:22 +00:00
Inkfish
ed83c8817d * Added check on stackable items to 'checkweight' (bugreport:1569, bugreport:2756, bugreport 2994) [Inkfish]
* Fixed flee penalty wasn't applied for battleground and wouldn't be restored on map change [Inkfish]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13735 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-07 10:38:00 +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
Inkfish
8cd8f32c78 * Fix 'awake' not working (bugreport:2580)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13717 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-03 02:59: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
zephyrus
f3ca760a29 - Missing cleanup from the previous BG code removal.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13637 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-29 18:52:44 +00:00
zephyrus
5ddd4d08fe - Implementing official battleground "emblem" crossed swords icon.
- Removing the custom guild packets from Battleground as they are not needed anymore.
- Scripts updated.
- In this way, you get "battle cursor" over your same team, but that's how official does.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13635 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-29 16:49:52 +00:00
ultramage
71fbf3e1a4 Added correct packets for the food item creation window.
Added script command 'cooking' to activate this window and applied it to the 5 cooking kit items.
Renamed the cooking quest variable to cooking_q to avoid a naming collision with the new script command.
(You need to manually rename all occurences of this variable in your txt-savefile/sql-database if you want to preserve player progress.)
The code still relies on the messy skill_produce_mix logic and still uses completely custom equations. To be fixed in a separate commit.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13628 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-25 21:59:55 +00:00
zephyrus
ed5eee1dcb - Implemented new item and bonuses for Kreiger Von Midgard rewards.
* Execute script on skill (bonusautoscript3)
* Add effect on skill (bAddEffOnSkill)
* Execute skill on skill (bAutoSpellOnSkill)
- Fixed some boxes Rental time according to item descriptions.
- Implemented SC_ITEMSCRIPT, a status that gives you temporally the effect of an item. Check items 14597 to 14605 if you want to get the idea.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13596 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-18 02:50:39 +00:00
zephyrus
7fd0aa832a - Implemented official battlechat packets (thanks to Pakpil).
- Implemented the scoreboard packets (thanks to Pakpil).
- Updates to Tierra Valley according to official info.
* There are no barricades around each base, barricades are in the middle left path.
* There is another graveyard used for the owners of the middle base, with faster spawn (each 20 seconds).
* I added a flag respawn in the middle, currently I don't know if this if official or not, but it allows each team recapture the middle base.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13593 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-17 22:32:49 +00:00
ultramage
9c6c292775 Small edits to battleground code (bugreport:2816)
- removed bg_idle_announce setting (could be considered later)
- moved crystal protection code to battle_calc_bg_damage
- removed mob state 'inmunity' in favor of a script-based solution
- removed unneeded 'setmobdata' (fixes collision with mob controller)
- added svn:eol-style native for battleground code

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13565 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-04 17:26:07 +00:00
zephyrus
e9153a3c17 - Fixed item Nemesis.
- Fixed Tarot Card being used on Emperium.
- First Part of BattleGround Implementation (please wait).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-26 21:27:12 +00:00
zephyrus
7311750f56 - Bugreport #2800 ( Atcommands usables without restriction :S )
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13547 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-25 06:04:18 +00:00
sketchyphoenix
23f462ad60 Replaced giving dummy sd gm levels in script commands atcommand and charcommand with a check by internal flag.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13546 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-24 01:17:36 +00:00
sketchyphoenix
35dbe82eea * Consolidated is_atcommand() and is_atcommand_sub()
- replaced gmlvl arg with a flag arg for internal/player generated checks. (dummy sds that used this arg are given gm levels)
	- each command check runs through is_atcommand() and is checked for its origin (internal or player generated)
	- charcommands are also parsed in this function.
	- script atcommand/charcommand function calls to is_atcommand() have been updated
	- also updated some clif/map functions calls to is_atcommand()
	* charcommands should now log properly with the target of the command included.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13545 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-23 18:32:43 +00:00
FlavioJS
ddf501b224 * Made mob_timer_delete check the deletetimer in the mob.
* Added missing delete_timer's every time deletetimer is being set. (except when allocating)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13544 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-23 16:36:58 +00:00
ultramage
a6d6739409 Fixed card remover commands not preserving item rental time.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13531 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-16 00:38:57 +00:00
ultramage
54d610302d Applied patch to getitem2/delitem2 to handle charid embedding correctly (bugreport:2735).
Added missing codepage option for ipban module in login_athena.conf.
Converted dbghelpplug project in vs9 directory to vs9 format.
Updated effects list doc with new data from 2009/01/21a sakexe.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13523 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-12 12:27:59 +00:00
zephyrus
ede9af3b29 - Implemented new item bonus scripts required for battlegrounds.
- Battlegrounds items rewards for Tierra Valley and Flavius done (but autoscript rate is suggested - 5%).
- Restricted trade/storage/drop for those items.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13490 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-25 19:50:02 +00:00
FlavioJS
89d683d668 * Changes to the script engine:
- new stack datatype script_retinfo for C_RETINFO to hold all the return state info that was being stored in the stack. (the script engine in 64bit-ready now)
- pop_stack is responsible for adjusting all the stack pointers.
- push_* returns the created script_data.
- 'return' only converts to value scope variables of the current scope.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13427 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-31 15:54:33 +00:00
FlavioJS
cb8ef12df8 * Changes to the script engine:
- script ends when run_func can't find the buildin command. (script engine error)
- run_script_main doesn't change RERUNLINE to RUN automatically, the buildin command that set it is responsible for that now. The buildin command can use this to detect a rerun.
- created functions to alloc/free a script_state.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13426 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-30 03:27:46 +00:00
zephyrus
d33dce2ac2 - Book reading script command.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13417 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-28 17:08:51 +00:00
sketchyphoenix
b9a1343eaa * Added a few missing atcommands.
* Added more commands to configurations (bugreport:2565)
	* Added a missing charcommand symbol config to atcommand configs.
	* GM command configs under the old format will have a warning printed back to the console as being deprecated.
	* Other fixes/cleaning partially resolving bugreport:2549

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13409 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-23 02:06:21 +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
0e6e32a833 * Fixed a memory leak when returning a string variable in the script engine. (since r9864/r9865, fixes bugreport:2488)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13388 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-27 01:04:14 +00:00
FlavioJS
72542d65cc * Hunted down the simpler 64bit pointer truncations.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13380 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22 15:44:17 +00:00
ultramage
ae7050eb1a Added setting of state.speed_changed in script function 'npcspeed'.
Should fix the walking npc display problem (bugreport:2434).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13378 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-20 20:50:50 +00:00
zephyrus
bd429b5a92 - Some "expire_time" = 0 considerations. Please update. (Bugreport 2451)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13373 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-17 15:43:13 +00:00
zephyrus
c830a56da3 - Item Rental System.
Script Usage:
- rentitem <itemid>,<seconds>;
- rentitem <itemname>,<seconds>;

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13370 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-16 16:14:30 +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
L0ne_W0lf
cd70b692e7 Changed how mobcount works since it wasn't counting last mob death. (bugreport:2419)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-08 00:33:58 +00:00
ultramage
caa8b3ed2a some minor tweaks to previous commits
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13355 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-06 06:40:14 +00:00
Sara
61c3fbb337 Fix of accident in 13353
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13354 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-06 04:46:51 +00:00
Sara
f772c39910 * Fixed the maximum level of Create Elemental Converter. (bugreport:2326) [Sara]
* Fixed issue preventing you from changing to the original cart when using Change Cart. (bugreport:2383) [Sara]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-06 04:30:35 +00:00
ultramage
98ba2dd843 Small cleanup of r13332 (bugreport:2368).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13337 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-30 06:06:28 +00:00
Paradox924X
787268e492 Made script command "unequip" call status_calc_pc. Thanks to Orcao. (bugreport:2368).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13332 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-28 05:50:48 +00:00
ultramage
90ad9f3a8c Fixed chat_createnpcchat() not checking if a chatroom already exists, producing memleaks in certain situations (bugreport:2325).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13269 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-08 13:15:35 +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
zephyrus
879ada0f6c - Renamed createmercenary to mercenary_create.
- Added other required mercenary script commands for official script.
- New Constants entries for this script.
- Update to missing configuration on mercenary skills.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13195 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-06 15:21:25 +00:00
zephyrus
c562d05efc - More code for mercenaries and starting work on restrictions.
* Heal and Sanctuary skills have their effectiveness on mercenaries reduced by 50%.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13183 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-09-01 22:19:18 +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
f0439c9f56 - Implemented script commands for mercenary items (mercenary_heal and mercenary_sc_start).
- Fixed a bug crashing server with mercenary.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13159 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-31 21:05:35 +00:00