653 Commits

Author SHA1 Message Date
zephyrus
5df63da5e7 - Implemented Mercenary Scrolls (item_db)
- There are some little problems, like remaining time going to 0, but you can summon it, make it walk, follow you.
- Feel free to test it.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13126 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-24 22:45:32 +00:00
zephyrus
c5cc2257d3 - Moving all content of Homunculus code to a proper file Homunculus.c/h
- Update of all project files.

NOTE: All functions on homunculus.c should be renamed i think, to remove all the merc_*.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13122 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-24 15:00:26 +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
zephyrus
6b6ef43c4b - Removed my barricade implementation. Not required in WoE SE.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13097 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-20 19:40:53 +00:00
ultramage
420cee95d9 Some cleaning in script.c
- documentation of functions translation of japanese comments
- usage of const char* instead of char* where appropriate
- removal of unused isstr() function

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13083 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-15 17:08:52 +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
dac1c2d2df Removed unused guardian hp columns from the guild castles table in main.sql (should have been done in r11915).
Corrected incorrect use of the datetime column in the `login` table (bugreport:1962). Refreshed txt account savefile.
Cleaned up some random minor source code glitches.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13030 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-01 07:05:16 +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
ultramage
aed027a0d4 Small cleanup of script.c
* removed DEBUG_FUNCIN (some tracing code for expression parsing)
 * cleaned up the hashing functions code a bit
 * removed SCRIPT_HASH_PJW since it gives results identical to SCRIPT_HASH_ELF
 * switched the hashing function used to ELF, since on current eathena it gives strictly better results than all others (w.r.t. entry count in buckets whose size is above the expected average)
 - note: ELF behaves very poorly if SCRIPT_HASH_SIZE is changed to 1024, others don't.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13018 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-30 13:40:47 +00:00
ultramage
54dc1c0f1a Removed the IRC bot system, now a customization (see topic:194306)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13014 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-30 02:24:04 +00:00
ultramage
6c8cf8d611 Replaced occurences of '-1' with the more appropriate 'INVALID_TIMER' value where appropriate.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12998 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26 14:22:28 +00:00
sketchyphoenix
263261d9f6 * Moved the mob killmonster flag to a more appropriate area. (bugreport:1795)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12914 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-05 07:54:53 +00:00
zephyrus
fc312a5088 - Added support to Cash Shop for script command callshop
- Fixed a bug in OnTouchNPC
- Cleanup in barricade code.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12896 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-29 15:16:51 +00:00
ultramage
7444eb572c Random assortment of various small corrections and tweaks.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12894 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-29 06:00:05 +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
03a1f29549 Forgot to switch function names out from r12873 >_>
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12874 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-22 00:39:13 +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
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