522 Commits

Author SHA1 Message Date
ultramage
fba253dc73 Added missing checks to stop an infinite free cash point exploit. (bugreport:4139)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14266 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-03-21 10:08:40 +00:00
Inkfish
27801bb67f 2010/02/06
* Added official packet to display received expirience. (info provided by papkil)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14240 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-06 05:08:37 +00:00
ultramage
e441bae997 Corrected a variable defined in a header file.
Cleaned up a bad case of variable recycling.
Separated the ALL_WEWISH case from the unrelated sage skill cases (undo of r14183).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14190 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-08 00:41:29 +00:00
Inkfish
5485daa6df * NPC event code cleanups.
- removed the 'OnMyMobDead' dead code. It's never supported though documented.
- removed the 'feature' that events only trigger when the player is in the OnTouch area IF it's specified. 
  It's never documented and breaks official scripts.
- some cleanups and bug fixes to OnTouch_.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14173 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-26 12:01:19 +00:00
ultramage
ada5a13abe Fixed instances not initializing after reloadscript (bugreport:3522).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-24 17:15:23 +00:00
skotlex
c92ff591f1 - Applied the renewal client support patch from Diablo (eA forum topic 222623)
- Added support for strcharinfo(3) to retrieve the player's map
- Added script command "searchitem" for name item searches.
- Moved PACKETVER to src/common/mmo.h as it's needed by the char-server now
- Changed the status valX from int to long so that it won't break for pointer-storage in other architectures.
- Moved the change party leader code to party.c
- A few bugfixes or packet field completions based on my past experience messing around with my server.



git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14155 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-19 18:19:09 +00:00
Inkfish
da07c3b06e Reverted renaming foreach functions and create a new one for OnTouch so that last commit will hopefully break NOTHING in use.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-25 11:20:47 +00:00
Inkfish
42987f61ad * Implemented the official version of 'OnTouch' named as 'OnTouch_'.(it can be defined in script_athena.conf)
* Adapted 'map_foreachinarea' to 'map_forsomeinarea' so that it allows you to specify the number of bl you wanna operate on.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14097 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-25 09:38:33 +00:00
ultramage
fa2f34ed86 Reverted the previous change to OnTouch not triggering for invisible chars.
While this is the official behavior for OnTouch (as opposed to OnTouch2 which we don't have), this change would break npcs that assume you can't just walk past them cloaked.
If there is a real need for implementing this behavior in the future, it should be done in a backwards-compatible way if possible (although, inverting the meaning of OnTouch/OnTouch2 would cause a lot of confusion).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14096 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-24 10:45:36 +00:00
Inkfish
7b46d2c473 * 'OnTouch' script shouldn't trigger when you are invisible.(same as warps)
* Fixed character doesn't stop walking when walking into OnTouch area of an NPC who doesn't have an OnTouch label. (bugreport:2700)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14095 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-24 03:03:30 +00:00
zephyrus
515cd8685c - Fixes and optimization to instancing. Thanks to Saithis
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14006 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-14 14:03:53 +00:00
zephyrus
6b710571ad - Optimization to instance system.
* Removed the crc feature to generate instance npc names. The instance npc name will be "dup_" + instanceid + "_" + srcnpcid.
* Removed the big array under map structure and coded in a different way. It was only used to generate map names, but i just used the instance_id + "origin map name".
* Moved all instance features to separated files.
* Moved the npc duplication for instances into npc.c as Ultramage says (removed npcname_db from npc.h).
* Added recomendations for scripts commands by Saithis.
- Testing required, i will prepare Endless Tower script soon. I hope this do almost anything in bugreport 3276.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-12 21:44:02 +00:00
Inkfish
f9b0729dfa Fixed when dynamic_mobs is active, reloading script right after the last player having left a map leads to permanet mobs not spawning on that map.(bugreport:2736)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13921 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-30 14:27:02 +00:00
zephyrus
33e1fbbd66 - Instancing System (Thanks to Sirius White who did most of the code, with some of my work to implement client side information, some optimizations and bugfixes). Also thanks to contributions from UEAUP team and Orcao.
- Fixed a bug on areamobuseskill and changed it to make it as Aegis.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13901 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-20 17:56:01 +00:00
Inkfish
d7d626e578 Now we can use 'boss_monster' to summon whatever monsters that need to be radared by Convex Mirror. (bugreport:2653)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-25 13:05:59 +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
ultramage
4acc0932f2 Removed the undocumented custom level feature from monster spawn lines (bugreport:3076).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-15 07:33:39 +00:00
Inkfish
c36c82150a * A typo on my last commit
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13748 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-10 03:13:47 +00:00
Inkfish
b6f136a75d * Now if an NPC is unloaded, only the timer of the player attached to this npc will be deleted.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13747 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-10 02:44:02 +00:00
Inkfish
bb1c9d92de * Fixed NPC timer errors
- ted->rid is not initialized for global timer
- timer_id is not set to INVALID_TIMER when timer is deleted
- run script after next event is arranged

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13746 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-09 16:12:28 +00:00
Inkfish
a366ac53ce * Fixed some known and unknown player attached NPC timer problems
- Attached timer now can be stopped properly.
- Attached timer will now stop if the NPC is unloaded. (bugreport:2510)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13744 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-09 01:45:11 +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
8704a43725 * Players now cannot be revived during pvp respawn delay
* Fix a logical problem on my last commit

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13720 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-03 04:41:04 +00:00
Inkfish
a43c9e581b * Fix several npctimer issues (bugreport:1619, bugreport:1730)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13718 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-03 04:06:53 +00:00
zephyrus
94fbb46238 - Battleground mapflags:
* 1 = no scoreboard (as Tierra Valley is).
* 2 = scoreboard enable (as Flavius and KvM requires).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13594 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-03-17 22:39:22 +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
FlavioJS
ad963e52e6 * Fixed impropper filling of w4 in npc_parsesrcfile when there are less than 4 fields. (bugreport:1063)
* Simplified atcommand_spiritball. (deprecated msg_txt 204 and 205)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13538 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-19 16:57:01 +00:00
FlavioJS
1a2d2c0d4e * Changed npc_get_new_npc_id to ensure that it never returns invalid/used ids.
- npc_get_new_npc_id is used to generate ids for npcs/mobs/homunculus/mercenaries/pets. If the server runs for long enough (years to months or less, depending on settings), the auxiliary variable npc_id will eventually overflow and go negative, then go through the range of object ids, then through the range of account ids. This can lead to all sorts of random crashes and memory leaks.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13481 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-23 17:49:44 +00:00
ultramage
47fad03c47 Added a missing break; in pc_setstat, messing up LUK increasing (see r13460) (bugreport:2697).
Corrected clif_bladestop(), void function returning a value (see r13471) (bugreport:2698).
Fixed npcs with touch area not stopping walk timers (see r6516) (bugreport:2700).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13480 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-23 11:53:52 +00:00
ultramage
95d25086a6 Mobs with nonzero spawn time can now be cached as well, saving some more cpu/memory (bugreport:1197).
Fixed dynamic mobs being unloaded without stopping their respawn timer.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13445 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13 10:38:54 +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
FlavioJS
d55642d64c * Extended how duplicates work: (based on Orcao's work in bugreport:2361) [FlavioJS]
- you can duplicate warps/shops/cashshops/npcs (before only npcs could be duplicated)
- warp duplicates inherit the target location
- shop/cashshop duplicates inherit the item list
- npc duplicates inherit the script code (backward compatible behaviour)
- updated script_commands.txt with the information

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13407 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-20 22:57:29 +00:00
FlavioJS
7ae74b588b * Hunted down improper uses of va_list variables.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22 23:54:34 +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
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
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
249d1350e5 Fixed a bug in the npc shop code, where requesting an item that wasn't on the list caused the server to keep scanning past the list's array bounds.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12980 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-22 16:09:20 +00:00
FlavioJS
cdda61ce1b * Added const to the return value of get_timer.
* Added a maximum timer interval. Avoids server shutdowns being delayed for ~10 seconds under some circumstances on windows.
* Replaced the fake timer heap (ordered array) with a binary min heap.

(actually, this is just a merge and has been in use for months)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12926 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-09 01:25:19 +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
159e55e3d1 Fixed cash shop not using points to make up the cash difference when purchasing an item.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12853 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-18 10:39:20 +00:00
zephyrus
e595e1f69f - Little cleanup to OnTouchNPC.
- Updating Release of Wish script.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12757 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-04 13:13:34 +00:00
zephyrus
5c7a1807e4 - Added support for OnTouchNPC event, required for Monster Race. Script commands need to be tested. Already tested sc_start.
- Added status SC_WALKSPEED required in monster Race.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12752 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-02 15:54:50 +00:00
FlavioJS
1be6ba4a63 * Changes to map_foreach* functions:
- removed the unecessary use of va_copy in map_foreachpc
- applied the same function pattern to map_foreachmob and map_foreachiddb
- created map_foreachnpc
- extended the behaviour of map_foreach* functions to stop iterating when func returns -1
(also added missing changelog entries from ultramage >.>)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12684 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-05-02 17:14:00 +00:00
ultramage
7a9a3a12bb Cleaning up the itemdb reload mess (see r12635, r12643, r12650, r12661, r12662, r12663)
* the player data inventory-itemdb index is now refreshed using pc_setinventorydata()
 * mobdb will no longer initialize with nonexistent items, and mobs will no longer drop them in case of a reload
 * the clif_buylist() function once again hides invalid npc shop items
 * it is no longer possible to purchase nonexistent items from a npc shop
 * npc shop loading will not abort if there is a nonexistent item entry, it will just skip over it

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12665 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 11:06:55 +00:00
Kevin
26a70ed737 Some major changes to @reloaditemdb to allow unloading of any item while map server is running.
- Delete any item from inventory/cart/open storages that went missing during the reload.
- Delete item from any shop that has this item.
- Refresh item screen for anyone who has a shop open.
- Delete mob db drop table references.
- Delete item from storage during load if it isn't in the item db.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12661 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-27 07:18:21 +00:00
toms
c79a5092eb Fixed bugreport:1223 (Invalid Items In Shops Are Processed Incorrectly)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12650 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-25 07:47:29 +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
2577ffdf25 * Fixed a bug when unloading a npc near a shop.
* Fixed npc_buylist not giving/checking the good item when it was an item_avail in the shop (the real one was added in inventory).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-18 14:33:31 +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