420 Commits

Author SHA1 Message Date
skotlex
e66ac3dfce - Added a check to prevent Deluge/Volcano/Violent Gale from being placed on top of each other. Reverted the previous 'fix' where atk was being increased based on armor element rather than element of attack.
- Added flag 0x002 (no reiteration) to Deluge/Volcano/Violent Gale (skill_unit_db)
- Removed the noreturn mapflag check from script command warp.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7858 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-24 17:28:13 +00:00
skotlex
c914fc106a - Fixed buildin_isequip not working correctly with non-cards.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-23 16:40:46 +00:00
skotlex
7e68dd7948 - Added source reporting when you do an invalid int&str or str&int operation on a script.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7782 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-20 23:13:22 +00:00
DracoRPG
15dd140846 Orn's and Albator's Homunculus system, finally, YAY!!
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17 00:15:33 +00:00
skotlex
6ec9580e34 - Fixed the value range checks added by Zido on pc_bonus (some of them were even redundant...)
- Fixed script command "recovery".


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7654 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-13 13:55:58 +00:00
skotlex
a6c3f3a1fc - Coded @reset.
- Reenabled @changesex
- Added function pet_create_egg which handles creating pet eggs correctly (when passed item id is indeed a valid petegg). Applied this on @createitem and getitem.
- Cleaned up code of @item
- Added define UNKNOWN_ITEM_ID (512 = apple)
- Added IT_* enumation item_Types to identify said data from items.
- Cleaned up the itemdb_isequip functions. itemdb_isequip will now return if the item is equipable by players, itemdb_isstackable returns if the item can be stacked, and itemdb_isidentified returns if the item should drop identified.
- Added defines CARD0_PET/CARD0_FORGE/CARD0_CREATED to identify if a given item has "invalid" cards, added define function itemdb_isspecial to simplify this check.
- Removed itemdb.c considering item ids above 20000 as invalid.
- Cleaned up script commands getitem and card-counting related ones. 
- Cleaned up a bit more pc_isequip


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11 16:32:37 +00:00
blackhole89
c6d03de26b warpportal(x,y,"tmap",tx,ty) - Creates a skill warp portal on the map. battle_check_target modified to allow NPC-owned skill units to proceed.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7612 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-11 15:58:40 +00:00
skotlex
5251ce7944 - Fixed the char table having party/guild_id as smallint when they need int there. Thanks to hermematon for pointing it out (use svn_ugprade7580.sql)
- Applied k3dt fixes to pet-hatching, ice-wall check, and wedding skills.
- Fixed endow skills calling the skill no damage packet twice.
- Fixed a crash on warpwaitingpc when the chat-room is empty.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7580 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-08 17:13:39 +00:00
skotlex
a4d0df735d - Rewrote all the item restriction functions so that they will take into account slotted card restrictions as well.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7552 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06 21:22:20 +00:00
skotlex
31832cfdc7 - Added EQP_/EQI_ constants in pc.h to identify equip position and equip indexes, makes equipping related code much easier to read.
- Also cleaned up pc_equipitem. When dual wielding or equipping accessories, if the client actually specifies one of the two positions, it will be taken into account.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7550 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-06 18:47:11 +00:00
skotlex
33bbefb989 - Added mapflag "nochat" to prevent chatting rooms from being created.
- Corrected some of the sleep checks when the char id does not matches with the char-id expected by the script engine.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7423 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-30 16:53:56 +00:00
skotlex
1b7a54c893 - Moved item group enumeration from itemdb.h to map.h
- Cleanup in itemheal related code, fixed the item heal group bonus not working on Groups beyond 7.
- Fixed pet's loot not being moved to your inventory on logout.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7419 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-30 13:53:13 +00:00
Lance
a7644e81ac git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7393 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-29 12:34:32 +00:00
Lance
304665e8c0 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7392 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-29 09:14:35 +00:00
Lance
706355eda6 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7390 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-29 08:55:12 +00:00
Lance
671522e47c git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7389 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-29 08:51:13 +00:00
Lance
aa70823081 * [Fixed]
- Scripting system screwing up script position after mixing timers with menus. 
- NPC attached AI mobs display as alive when dead. 
- View data not updating after buildin_unitdeadsit. 
[Improved] 
- NPCE_LOADMAP to execute after all (area) objects are sent to the player. 
- Simplified scripting system. sd will now use pointer to the script state itself. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7388 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-29 08:47:14 +00:00
skotlex
3ce9e8c6e6 - Added a check in script command "set_option" so that invoking "set_option(0)" removes Cart/Peco/Falcon, as expected by scripts.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7381 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28 23:10:14 +00:00
skotlex
4f1911ae63 - Fixed indentation on int_pet.c (how did it got messed up?)
- Added mapflag "loadevent", now load-map script events will ONLY trigger on maps with this mapflag on, rather than every map.
- High Jump can now be used in all versus maps.
- Added Kaite's opt3 value, taken from jA
- Added state dirty == 2 to storages. Signals when a storage was sent for final saving. Said storage is removed from memory after the ack from the char-server, and they are sent to save if the map/char servers reconnect before the act arrives. In short: they are guaranteed to be saved after a char logs out.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7358 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-27 14:54:01 +00:00
Lance
fa2cd64215 * [Added]:
- buildin_unitkill just for kicks.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7338 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-26 04:32:50 +00:00
Lance
219f26b6a0 * [Optimized]:
- Setting of variables with defined scope in some frequently executed script events.
* [Added]: 
- Missing script_require_trigger flags for some power hungry events.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7325 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-24 02:41:32 +00:00
Lance
5ca017e91a git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7311 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-23 12:22:43 +00:00
Lance
ec2fc0e437 * [Fixed]:
- MAPREGSQL overloading SQL table with temperory map registries.
- Incorrect perfomance calculation for MAPREGSQL loading and saving. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7310 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23 11:47:27 +00:00
Lance
67ff295ba4 * [Removed]:
- Redundant mob name copying. (it's already copied in mob_parse_dataset)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7292 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-22 13:16:45 +00:00
Lance
a800be65ec git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7234 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-18 02:54:17 +00:00
Lance
61cf41923c * [Removed]:
- Large part of scripted mob control commands are removed.
- Large part of scripted player control commands are removed.
- Scripted mob slaves changing master ID.

[Added]: 
- Unit control commands.
- CALLBACK_NPCCLICK for scripted mobs, added this to db/const.txt too.
- Macro RECURSIVE_MASTER_CHECK in battle.c

[Modified]: 
- buildin_skilluseid and buildin_skillusepos -> buildin_unitskilluseid and buildin_unitskillusepos.
- md->callback_flag to short (double word).	[Lance]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7233 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-18 02:42:41 +00:00
Lance
58b728cc4a * [Added]:
- buildin_checkcell, buildin_mobwarp, buildin_pcattack.
* [Improved]:  
- buildin_skilluseid and buildin_skillusepos to accept a few more arguments.
- mob_script_callback to return sucess value.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-17 07:48:10 +00:00
Lance
971900f126 * [Added]:
- Added option #25 to buildin_setmobdata to set the callback_flag.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7203 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-16 14:46:15 +00:00
skotlex
63c259b4c8 - Fixed and cleaned up script command 'equip'
- Fixed 'autoequip' items.
- Fixed Aspd not being updated in your status window after Agi/Dex increasing statuses take effect.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7179 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-15 14:15:16 +00:00
blackhole89
f7fa729e23 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7164 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-14 17:13:56 +00:00
Lance
0ec9bef7cb * [Improved]:
- script_save_mapreg for MapregSQL Saving to display perfomance only in slow queries. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7150 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-14 08:00:48 +00:00
Lance
a51eda844c Another mistake.. shit
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7126 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13 10:45:43 +00:00
Lance
4a226bec3a Fix again >_<
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7125 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13 10:40:56 +00:00
Lance
a9d6cac947 Fix
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7124 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13 10:40:14 +00:00
Lance
161ef37fc6 Fix
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7122 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13 10:34:21 +00:00
Lance
63edd59586 Fix
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7121 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13 10:21:32 +00:00
Lance
7a27be9727 * [Fixed]:
- buildin_npcshopitem not allocating extra 1 block of terminator.
[Added]: 
- Modified versions of Dj-Yhn's buildin_npcshopdelitem and buildin_npcshopadditem 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7120 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-13 10:12:59 +00:00
Lance
c165ff1eb6 * [Optimized]:
- buildin_npcshopitem memory allocation to calculate before reallocating.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7105 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12 16:18:08 +00:00
skotlex
55df062534 - Added structure party_data and party_member_data to the map server to hold party-specific required information about parties including Monk/TK/SG/SN states and party member count.
- party Hp updates are no longer done each time the Hp is modified, but together with the party xy timer.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-10 03:58:15 +00:00
Lance
c9702bfa25 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7076 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-06-09 18:09:17 +00:00
Lance
73afac7540 * [Fixed]:
- Execution of sleep/sleep2 more than once will hang the script_state.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7075 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-09 16:10:44 +00:00
skotlex
d7a3b4d7e4 - Added pc_calcexp to calculate individual exp bonuses acquired from exp's source (race bonus cards, SG Exp skills, pk-mode higher level exp)
- pc_gain_exp now also receives the source of the exp, when said source exists, bonuses are applicated as needed.
- Added status_kill when capturing a mob, should take care of the mob not respawning after caputed.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7037 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 18:57:21 +00:00
Lance
dc71d18c29 * [Improved]:
- mob_dead not to remove script controlled monsters with player sprites. (can be removed later using removemob command, it can be resurrected too :D)
* [Added]:
- buildin_mobdeadsit :D 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-07 02:51:50 +00:00
Lance
26e1b07f72 [Fixed]:
- Restoration and saving of sd->npc_id must be done every time. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6904 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-01 00:50:22 +00:00
Lance
4d978e0930 [Fixed]:
- Logic errors in run_script

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6875 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 05:27:49 +00:00
Lance
8236d2c93f [Improved]:
- Fake NPC interface to use real NPCs.
- Scripting interface to restore and save sd->npc_id.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-31 03:52:56 +00:00
Lance
e266a08f7c [Optimized]:
- clif_specialeffect to use the enums.
[Improved]: 
- buildin_specialeffect and buildin_specialeffect2 to accept effect area definition.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6855 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30 18:13:16 +00:00
skotlex
1d027c8db8 - Removed the on-die specific code from unit_remove_map and placed it on the corresponding *_dead functions. unit_remove_map should never assume the char died, it is just a "remove from map" function.
- Updated status_damage to handle the general death code (clearing status changes, clearing skill related data, sending death packet, etc). The return value from the *_dead functions will tell it what to do or not with the object (death aborted, clear it from map/memory, etc)
- Cleaned up pc_dead to take advantage of the fact that status changes are not ended until after the function.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6852 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-30 17:06:55 +00:00
Lance
a28e9d802c [Optimized]
- Removed unused checks for unsigned data type and possible logic error for char type (gcc treats char as unsigned).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6814 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-29 09:53:45 +00:00
Lance
f77f199488 - Reverted buildin_setd to use NULL as reference.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6802 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-28 14:11:01 +00:00