104 Commits

Author SHA1 Message Date
skotlex
f5464dccc0 - Added a check to prevent Blind from ending while standing on a fog of wall.
- The mob Slave ai will be executed now even when the slave has a target. This will allow for "instant" warping to the master when it changes maps or teleports. if the slave has a target already, it won't unlock it and chase back to the master or anything like that.
- Removed a couple of checks that prevents item ids above 20000. However, remember that the max id is still ~32k or the client is the one who's gonna crash!


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7799 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-21 14:05:27 +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
skotlex
7040dc1031 - One closer inspection, removed that clear in itemdb_reload for a foreach call again. And modified itemdb_load to scrap the dummy item entry from the item_db and replace it with proper data for the item.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7597 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-10 15:16:20 +00:00
skotlex
4bbce8d776 - itemdb_reload will clear the itemdb before reloading info instead of only clearing the scripts now.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7596 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-10 14:54:44 +00:00
skotlex
41e3ff9044 - itemdb_exists will now return NULL for item_id 0.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-07 18:32:28 +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
6775ca1476 - Corrected Musical Strike having a different damage equation from Throw Arrow.
- Some minor cleanup of Soul Change 
- Added state rewarp to players. It gets set when a pc_setpos call is triggered while the player is changing maps so that when the player finish loading the map, it is inmediately rewarped to where it has been rewarped/recalled to.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7370 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-28 14:30:47 +00:00
skotlex
95aa55a3e6 - Modified pc_setoption so that it will correctly update sprite AND clothes color when mounting/unmounting changing into/from xmas/wedding sprites.
- Allowed itemdb_exists to return the dummy item. Enables "invalid" items to be sold, traded, dropped, etc.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7321 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23 23:31:55 +00:00
skotlex
ee1f6f4283 - Standarized PF_MEMORIZE to be 50% cast time on all skills (instead of -50% for targetted skills and -66% for ground skills >.>)
- Cleared up the comment on what item_check does and how it works.
- Changed the pointer dummy_item to a normal struct variable.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7316 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-23 16:11:51 +00:00
skotlex
7e10a0586c - Added IG_LottoBox for that tricky Lotto Box item.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7227 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-17 17:13:57 +00:00
skotlex
0158ab793e - Fixed npc_checknear's distance check returning the opposite of what it should (false when the range is correct and viceversa)
- SL_STIN/SL_STUN have dex-reducable casting times now.
- Added a warning on item loading when an item is of equippable type but has no equippable position.
- Turning an alliance to an opposition won't work now during WoE
- Slaves can summon other mobs now. The only ones who can't do this are player summoned mobs.
- Merged the following functions for faster processing of items:
  clif_storageitemlist + clif_storageequiplist = clif_storagelist
  clif_guildstorageitemlist + clif_guildstorageequiplist = clif_guildstoragelist
  clif_itemlist + clif_equiplist = clif_inventorylist
- Increased max knockback value support to 25.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7109 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-06-12 21:14:28 +00:00
Lance
a7e5993400 * WARNING: New scripting system contains memory leak
TODO: Free all scripts using script_free_code() instead of old methods. 

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6690 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-22 12:15:49 +00:00
skotlex
0f3de92a52 - Added function stristr to strlib.c, used by mob.c and item_db.c for case-insensitive seeks.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6345 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-28 14:36:55 +00:00
Vicious
198047d6b7 updated the db to X.2/X.3's itemsummonlist.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6277 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25 19:29:52 +00:00
skotlex
f983dc57c3 - Modified and simplified the random item group format. It now is <GroupID>,<ItemID>,<Rate>, where Rate normally is 1, greater numbers is the equivalent of adding the line multiple times.
- Added constants to identify all groups to db/const.txt
- Cleaned up and updated item_db to use these new constants (warning: item_db.sql needs to be updated!)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-25 18:05:40 +00:00
skotlex
c69118e1e5 - Added two columns to item_db: equip_script and unequip_script are scripts that are executed once when the corresponding item is equipped or unequipped respectively.
- Removed bonuses bDamageWhenUnequip, bLoseSPWhenUnequip
- Updated sql-files/item_db.sql with latest.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6204 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-20 23:24:20 +00:00
skotlex
254d003229 - Fixed various include lines in the map server (of the type <include "nullpo.h"> -> <include "../common/nullpo.h">)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5985 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 14:24:46 +00:00
Lance
a71b9f858b * Temperory replaced strtoll to strtoul until the function changes.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5983 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-11 06:22:51 +00:00
skotlex
db62926e5b - Changed use of strtol to strtoll as strtol's result is just a signed int, and we need to parse values above 0x7FFFFFFF
- Corrected Knives being usable by Gunslinger. SQL users use upgrade_svn5972.sql to ugprade that.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5972 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-09 22:52:06 +00:00
skotlex
7015c8578f - Modified the equip_job field in the item_db to be a hexadecimal value for easier handling.
- Updated item_db.sql to this new file format (even though it's equip_jobs field is still a integer)
- Added upgrade_svn5951.sql for those who would like to convert their existing items.
- Added doc/item_db.txt to explain each of the fields in db/item_db.txt


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5951 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-08 06:08:29 +00:00
skotlex
1d5b54e996 - Hopefully fixed the wedding item-trade restriction.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5939 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-06 23:02:31 +00:00
skotlex
b4c3de9686 - Oops, the overflow mentioned by foobar was actually because the equippable base-jobs field was unsigned short when we now need it to be unsigned int. Fixed now.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5884 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-03 14:17:53 +00:00
skotlex
a387f9ba5f - itemdb_exists and itemdb_searchname should now ignore dummy_item matches.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5755 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-26 05:59:25 +00:00
skotlex
0ada26b85f - Small change in the random item reading function, may fix @itemdbreload messing up random item searches.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5630 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-16 17:29:23 +00:00
blackhole89
82fec3e7e0 missing } near line 449
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5562 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-10 16:45:46 +00:00
skotlex
bc1362c571 - Cleaned-up the random item reading routine. Fixed a overflow bug when one of the files has too many random items.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5560 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-10 15:07:13 +00:00
skotlex
26374a61c1 - Moved a bunch of sc_effects that should be cancelled on hit from mob_damage/pc_damage to battle_damage.
- Changed ITEM_NAME_LENGTH to 50.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5533 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-09 16:54:36 +00:00
skotlex
fbda66933a - Added functions mobdb_searchname_array and itemdb_searchname_array which return an array of matches.
- Modified @iteminfo and @mobinfo to search and display various matches instead of just one.
- Constant MAX_SEARCH in map.h defines the max size of search results.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5512 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-08 15:16:48 +00:00
Vicious
d2a34c42cc some NJ/GS fix.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5509 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-08 05:18:46 +00:00
Komurka
0fc8a2651c * Updated item_bluebox.txt, item_giftbox.txt, item_violetbox.txt, item_db.txt, mob_db.txt, added item_cookie_bag.txt
- new databases from Aegis 10.2
- implemented Cookie Bag item
- added missing mobs
- note: yes, I know that random item databases can be shorter (item_bluebox.txt, item_violetbox.txt, item_cookie_bag.txt, but not with current implementation of item randomizing
  for expamle:
	- there are 9285 items in item_bluebox.txt, and 1000000/9285 = real value
	- so line with Red Potion would contain rate = 1000000/9285*12 = real value (can't be)
  I think it's better to have bigger db, and do ONE rand check, than shorter and check it even 1000 times ~~ (in function itemdb_searchrandomid) so please, don't mess with them, or change them
* Changed MAX_RANDITEM from 2000 to 10000 to fit new databases
- Added reading of new file - item_cookie_bag.txt

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5341 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-20 12:42:24 +00:00
skotlex
7e716db3aa - Made Land Protector Block Hammerfall.
- More signed/unsigned comparison fixes.
- Added dummy_item variable to itemdb. It will be used on all itemdb_searches that do not yield a valid item from the db.
- Added itemdb_load, which is the one used for item_db loading (if the item does not exists, it'll be created)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5270 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-02-13 18:58:14 +00:00
Valaris
2178a86317 AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EVERYTHING ELSE
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:10:48 +00:00
Valaris
fd99753f8e Clearing trunk.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29 16:00:45 +00:00
celest
88cfcb9432 * Added base code for loading Ser's UPNP plugin
* Added 'idle_no_share' to battle_athena.conf
* Added item_findingore.txt

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1343 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-30 17:10:03 +00:00
amber
dfd7258882 Fixe compile time problems with our mixed C++/C conformance
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1328 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-29 06:18:21 +00:00
celest
b9a1f0d7fd Check changelog ^^
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1267 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-03-22 16:31:56 +00:00
celest
fea0900092 * Corrected Spiral Pierce's hits in the skill_db
* Moved /common/*.o into a obj folder when compiling 
* Updated core and map server to jA 1094~1115

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1162 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-02-22 16:08:24 +00:00
celest
a32145fde2 * Added bSubSize, bHPGainValue, and bDamageWhenUnequip
* Updated bSPDrainValue/Rate
* Set baby class players' size to 0(small)
* Fixed item_db2.txt reading printing wrong number of entries read
* Fixed @allskill not giving the newer stalker, whitesmith and creator skills

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1139 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-02-19 08:04:33 +00:00
(no author)
c372b3de89 more compile errors
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-02-05 06:02:39 +00:00
(no author)
200bd8bb6a * When loading shop scripts automatically check if the prices can be exploited with OC/DC
* If the buying price provided in item_db.txt is above 2x higher than selling price for an item no need to reset and redetermine the buying price

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1024 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-02-03 11:20:57 +00:00
(no author)
778e804dd6 update
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2005-01-23 20:38:44 +00:00
amber
0452a9c55f cxx updates
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@861 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-29 19:18:18 +00:00
amber
d8dd831efb update
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@821 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-27 16:29:44 +00:00
celest
dd73260a55 git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@814 54d463be-8e91-2dee-dedb-b68131a5f0ec 2004-12-27 11:30:53 +00:00
celest
8ed4627b91 Corrected a bad error in itemdb_read_itemslottable
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-27 11:30:00 +00:00
amber
f2f5ab96fc Cleanup
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@800 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-26 23:54:44 +00:00
celest
8e6ce45a5b * Fixed reading itemslottable.txt causing cards to become unuseable
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@729 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-22 14:01:27 +00:00
celest
fa6ecf8890 * Updated most of map-server to 1082
* Removed my own additions for skill delays using aspd
* Adapted skill_range_leniency to jA's code
* Fixed drop rates only limited to multiples of 100's
* Added missing code for castle_defense_rate
* Removed pc_undead_nofreeze
* Updated unrefineable items table
* Added 3 new script commands
* Added SC_SpeedUp0
* Merged itemdb_read for SQL and TXT
* Removed itemdb_read_cardillustnametable limited to TXT only
* Added reading itemslotcounttable.txt from the GRF to auto set number of slots per item
* Added a display message when reading itemslottable from the GRF
* Added options in battle_athena.conf to enable/disable reading the GRF

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@699 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-21 12:27:02 +00:00
celest
439a6b11ac * Updated Acid Terror, Sword Reject, Double Strafe
* Replaced checking whether items can be refined or not with a new function
* Fixed npctalk outputting to chat [celest]
* Allowed some values in script_config to be customised in script_athena.conf

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@654 54d463be-8e91-2dee-dedb-b68131a5f0ec
2004-12-20 10:57:30 +00:00
mc_cameri
474756f471 git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@643 54d463be-8e91-2dee-dedb-b68131a5f0ec 2004-12-19 17:00:07 +00:00