summaryrefslogtreecommitdiff
path: root/src/map/npc.c
AgeCommit message (Collapse)AuthorFilesLines
2012-11-12-Add Homon-S skills, 1st implementation (all done except Eleanors)glighta1-74/+66
--Upd Skill conf to set land-limit for homonculus by default (ground skill limit) --Mv MH_HEILIGE_STANGE and MH_ANGRIFFS_MODUS skill from Eleanor to Bayeri -Enforce all zeny transaction to use pc_payzeny and pc_getzeny handlers, (auto log and clif) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16914 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-10- Modified *monster and *areamonster script commands to allow size and ai ↵momacabu1-9/+0
parameters. -- Event parameter now no longer works as size & ai replacement. -- If not defined, it'll assume the default size (0 = medium) and default ai (0 = none). - Changed all hardcoded AI states to recently created enum. Please test, if you find any bugs, report on our Bug Tracker. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16904 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-10- Fixed bugreport:6816, bugreport:6818, bugreport:6843, buying a Pet Egg is ↵momacabu1-4/+9
now working. Special thanks to Ind; - Fixed a bug where pet egg was not deleted properly after clearing the floor. - Adjusted comment from msg_athena.conf, these IDs are being used! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16897 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-10Minor improvement on npc_event_do_clock, moved it so that its only assigned ↵shennetsind1-19/+24
when its actually used git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-05- Added LOOK_*** script constants, same names as from map.hbrianluau1-2/+2
- Changed atcommand "@changelook" to changelook script command in custom quest_shop.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16862 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-05- Fixed OnSellItem not setting all the "@sold_card%d" arrays. (bugreport:6847)brianluau1-2/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16860 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29* Follow-up r16835: Some cleanup.euphyy1-13/+11
* Updated Hunting Missions script to v1.2b, which adds experience multipliers to config (custom\quests\hunting_missions.txt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16839 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-10-29-Add some src basic documentation.glighta1-25/+66
-Change some remaining -1 for status ending timer. -Move some hardcoded msg in msg_athena -Small optimisation on battle_attr_fix git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-10Fixed bugreport:6665 NPC timer will not stop anymore after running all timer ↵greenboxal21-30/+32
events. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16769 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-02Hello! few things.shennetsind1-1/+1
1) fixed bugreport:6603 - delayed clearunit now makes use of the ERS which is quite convenient for it speeds up due to the previous amount of mallocs that function would spend. 2) added extra debug information to the ERS system (before on any of its warnings we'd go OH MY GOD WHICH ONE OF THEM DID IT!!!), now upon allocation you give it a const, human-readable, name. 3) added support for options in the ERS system to save multiple/redudant processing in battle_delayed_damage and clif_clearunit_delayed and perhaps also in the future. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16736 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-02Follow up r16733 also the remaining fix for bugreport:6572, making ↵shennetsind1-0/+4
onagitinit be run on reload to refresh the flag's emblems git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-26Fixed error in npc_path_data reference counting resulting in the script ↵greenboxal21-1/+1
never getting really unloaded. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-24Fixed bugreport:6550 @unloadnpcfile now refreshes the hardcoded npc event ↵shennetsind1-0/+4
array (onpckillevent onpcdieevent etc) so that any unloaded references are properly removed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16697 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-22Major cleanup all over the place, made possible by mkbu95's scan-build ↵shennetsind1-5/+3
report he provided us with. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16687 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-17Follow up r16656 improved unloadnpcfile stuff performance-wise, making npcs ↵shennetsind1-13/+71
from the same file share the filepath reference rather than each having its own copy. Special Ultra Super Thanks to Trojal <3 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16657 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-08-17Added 2 (3) new atcommands:shennetsind1-14/+29
* @unloadnpcfile <file path> ** e.g. "@unloadnpcfile npc/cities/alberta.txt" unloads all npcs created by the npc/cities/alberta.txt file. * @addperm/@rmvperm <permission_name> ** e.g. "@addperm skill_unconditional" / "#rmvperm "player" skill_unconditional" git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16656 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-23Follow up r16471 improved overall feature performance by making the bind ↵shennetsind1-15/+10
list a pointer array, this also allows the system to have a unlimited amount of atcommand bind instances. also fixed a memory leak that'd be caused when npc_do_atcmd_event fails (e.g. when target npc is manually reloaded) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16485 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-22Added the ability to bind atcommands to NPC events (ex: NPCNAME::OnEvent); ↵cookiecrumbs1-0/+66
original version by ToastOfDoom however heavily modified by I enabling command level at the invoking/character (@/#) level and fixes to prevent console errors as well as fixes aimed to ensure compatibility with rAthena. Updated the script_commands.txt documentation with the following script commands: bindatcmd, unbindatcmd and useatcmd. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-11nothing noteworthy, really.shennetsind1-11/+12
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16397 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-31Fixed bugreport:5839 mapflag conflicts were displaying wrong messageshennetsind1-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16184 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-31Fixed bugreport:5804 Instances no longer leave "broken" timers behind. ↵shennetsind1-0/+2
Instances also will destroy themselves upon @reloadscript since they break at that. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16183 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-26- Follow up to r16147: check the price in the shop file, instead of ↵brianluau1-1/+1
id->value_buy. Thanks EvilPuncker! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16154 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-26Fixed bugreport:5658 Instance NPCs will now be cleared properly. ↵shennetsind1-1/+1
Super-Special Thanks to Pig321 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16153 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-25- Added a warning when NPC shops sell items for 0z (FREE!)brianluau1-0/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16147 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-19NPC Loaded by @loadnpc will now trigger their OnInit labels as they're loaded.shennetsind1-8/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16130 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-17Fixed bugreport:5757 Added missing Sorcerer Insignias, Credits to brAthenashennetsind1-3/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16115 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29A minor memory improvement, and some curly brace love.shennetsind1-9/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16008 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29Yet another performance improvement: Shut Down processing is now about to 7 ↵shennetsind1-19/+5
times faster. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16006 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29Follow up r16004 >_<" some not-supposed-to-be-comitted debug messages ↵shennetsind1-19/+11
slipped in. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16005 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-29reasonably-sized performance improvement: @reloadscript is about to 3 times ↵shennetsind1-23/+29
faster. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16004 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-28- Updated the script engine to make use of the DBMap* structure for storing ↵epoque111-2/+2
variables (for Ind <3) - Fixed missing new-lines at the end of various files causing warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15997 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-24Fixed memory leak on MvP tomb system, killer name now uses static buffer. ↵greenboxal21-1/+1
(bugreport:5615) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15954 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-21Added mvp tomb system.greenboxal21-0/+27
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15908 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-21Fixed bugreport:5586 SC_CAMOUFLAGE can be removed by using RA_CAMOUFLAGE ↵greenboxal21-1/+1
again, also portals won't warp players under this status. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15902 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-11Minor performance improvement. server no longer wastes processing time ↵shennetsind1-15/+21
creating the awfully long spawn packet when there is nobody in the map it is being spawned in (for mobs & npcs). this also makes server boot faster. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15856 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-11minor improvement on NPC parse processingshennetsind1-13/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15853 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-19 - Script label db now utilizes `DBMap`'s ability to store integer-type data ↵gepard19841-2/+2
(follow-up to r15682). - Some minor code cleanups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15734 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13Enhanced `DBMap` implementation to allow storing integer type data in ↵gepard19841-18/+27
addition to void pointers. - Added enum for data: `int`, `unsigned int` and `void*` - Replaced generic `void*` data with `DBData` struct to hold `int`, `unsigned int` or `void*` (member of `DBNode`) - Added `db_i2data`, `db_ui2data` and `db_ptr2data` functions to cast from `int`/`uint`/`void*` to `DBData` (used in `DBMap::put()`) - Added `db_data2i`, `db_data2ui` and `db_data2ptr` functions to get `int`/`uint`/`void*` from `DBData` - Enabled statistics for new functions in `db_stats` struct - `DBCreateData` functions (used in `DBMap::ensure()`) now return `DBData` instead of `void*` - `DBApply` functions (used in `DBMap::foreach()` and `DBMap::destroy()`) now take `DBData*` as a parameter instead of `void*` - `DBMatcher` functions (used in `DBMap::getall()`) now take `DBData` as a parameter instead of `void*` - `DBReleaser` functions now take `DBData` as parameter instead of `void*` - Default releasers release data if it is `void*` (`DB_DATA_PTR`) type - `DBIterator` functions: `first()`, `last()`, `next()` and `prev()` now return `DBData*` instead of `void*` - `DBIterator::remove()` now returns `int` (1 if node was found and removed, 0 otherwise) instead of `void*` and takes an extra `DBData*` parameter for the data of removed entry - `DBMap::get()` and `DBMap::ensure()` now return `DBData*` instead of `void*` - `DBMap::remove()` and `DBMap::put()` now return `int` (1 if node already existed, 0 otherwise) instead of `void*` and take an extra `DBData*` parameter for the data of removed entry - `DBMap::put()` now takes `DBData` as parameter instead of `void*` - `DBMap::getall()` now puts data into `DBData**` buffer instead of `void**` buffer - Updated macros: - (`i`/`ui`/`str`)`db_get` and (`i`/`ui`/`str`)`db_ensure` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by `DBMap::get()` - added (`i`/`ui`/`str`)`db_iget` and (`i`/`ui`/`str`)`db_uiget` that get `DBData` from `DBMap` and extract `int`/`unsigned int` from it (with `db_data2i`/`db_data2ui`) - `db_put`, `idb_put`, `uidb_put` and `strdb_put` data params were wrapped with `db_ptr2data` to match new signature of `DBMap::put()` (`DBData` instead of `void*`) - added (`i`/`ui`/`str`)`db_iput` and (`i`/`ui`/`str`)`db_uiput` that put `int`/`unsigned int` into `DBMap` (first wrapping it with `DBData`) - added `NULL` in place of extra parameter for removed data in `db_remove` macros - `dbi_first`, `dbi_last`, `dbi_next` and `dbi_prev` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by these `DBIterator` functions - Updated `DBMap` documentation, and fixed a dozen of typos in it. - Updated rest of rA code to reflect `DBMap` changes (mostly required signature changes of `DBCreateData` and `DBApply` functions). - Fixed a bug where `DBMap::put()` would return data of a deleted entry. - Removed some unnecessary pointer casts. - Increased `showmsg.c` static buffer size to fit entire DBMap stats report. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-09Code cleanup: replaced `DBIterator` function calls with macros where possible. gepard19841-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15668 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-02Minor NPC code cleanup: timer labels.gepard19841-72/+25
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15648 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-29Some NPC code cleanup (event labels).gepard19841-57/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15640 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-17Fixed bug with official npc idle timer thing, bugreport:5343shennetsind1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15598 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-14Removed deprecated memory manager macros (follow-up to r14916).gepard19841-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-31 * Added display name to warps created with `@addwarp`, so their name is ↵gepard19841-1/+1
visible in `@mapinfo 2` (bugreport:1491). * `@mapinfo 2` now also displays unique NPC name if it's different than display name. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15534 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed more trailing tabs.brianluau1-6/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed trailing tabs, and fixed some spacing.brianluau1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15524 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-14Fix to progressbar exploit, bugreport:5199shennetsind1-0/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15442 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-14Fixed problem with OnTouch on NPC ID 139, blame on r14993, bugreport:5206shennetsind1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15441 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-11Picklog improvements:gepard19841-16/+4
- now it is finally possible to log every item players gain or lose - added 3 log types: `I` for auctioned items, `B` for buying shop transactions and `X` for all other items transactions that don't fall into another category (for detailed explanation on all log types read `conf/log_athena.conf`) - it also fixes items being logged as picked up/gained by player when in fact they were dropped on the ground due to full inventory git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15420 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-09Fixed battle configs `boss_delay_spawn`, `plant_delay_spawn` and ↵gepard19841-23/+2
`mob_delay_spawn` not being properly applied if changed during runtime (with `@reloadbattleconf` or `setbattleflag`) (bugreport:5204) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15416 54d463be-8e91-2dee-dedb-b68131a5f0ec