summaryrefslogtreecommitdiff
path: root/src/map/atcommand.h
AgeCommit message (Collapse)AuthorFilesLines
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-14/+14
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-14/+14
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-23Follow up r16471 improved overall feature performance by making the bind ↵shennetsind1-5/+6
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/+13
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-18Super performance improvement to groups system, caching permissions levels ↵shennetsind1-0/+1
and atcommand permissions saving thousands of thousands of dbmap lookups. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16443 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-13 - Added `libconfig` (configuration file library: ↵gepard19841-21/+9
http://www.hyperrealm.com/libconfig/): - Updated VS9/10 project files. - Updated `configure` & `Makefile`s. - New GM, Commands & Permissions system: - '''This is a backwards compatibility breaking update''', please read tid:58877 - Replaced GM levels with Player Groups. - Commands permissions & other privileges now depend on group, not GM level. - `@help` command improvements: requires "commandname" param and shows more detailed info about commands. - Modified GM whisper system to deliver messages basing on permissions, not GM level. - Remote trade request is now possible only if player is allowed to use `@trade` command as well. - Added a proper permission to use `/changemaptype` command. - `clif_displaymessage` is now capable of displaying multiline messages. - All `ACMD_FUNC`s are static now, and the only way to invoke them is with `is_atcommand()`; all client commands (starting with `/`) are now translated into corresponding atcommands (with exception of `/kick` used on monster, as there is no atcommand to kill single monster). - Removed nonsense "bot check" triggering when player blocked (`/ex`) Server. - Merged `@monster`, `@monsterbig` and `@monstersmall`. - Improved flow of atcommand execution to avoid revealing info about online players or existing commands to non-privileged players. - Merged `atcommand` and `charcommand` script functions (`charcommand` is aliased to `atcommand`). - Fixed `atcommand` script function reading unknown memory area (possible access violation). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-01Added new @/# command aliases pattern, all aliases can now be ↵shennetsind1-1/+1
modified/added/removed in the front-end within atcommand_conf (no longer hardcoded). The aliases pattern was defined in this topic: tid:56343 atcommand_conf file rewrite/update belongs to Jguy and BrianL git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15343 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-14* Random accumulated bits and pieces.ai4rei1-1/+1
- Added checks/warnings to pc_paycash and pc_getcash (follow up to r12264). - Added missing packet_db.txt and packet length table entries for packet 0x0859 (follow up to r14799). - Added set of map_id2xx wrappers for map_id2bl for most common map objects, which return NULL when the bl-type is not the expected one (also updated map_id2nd to behave this way). - Fixed missing ',' in mob_skill_db.txt example (follow up to r14270). - Updated mapcache with recent maps (up to que_lhz). - Functions 'msg_txt' and 'job_name' now return a const pointer. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14813 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-02-21Changes to how right-click gm kick checks gm privileges:ultramage1-0/+1
* moved @kick gm level check to the part that kicks players * added @killmonster gm level check to the part that kills monsters * added missing reply to client in the part that unloads npcs git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14250 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-23 * Consolidated is_atcommand() and is_atcommand_sub()sketchyphoenix1-2/+1
- replaced gmlvl arg with a flag arg for internal/player generated checks. (dummy sds that used this arg are given gm levels) - each command check runs through is_atcommand() and is checked for its origin (internal or player generated) - charcommands are also parsed in this function. - script atcommand/charcommand function calls to is_atcommand() have been updated - also updated some clif/map functions calls to is_atcommand() * charcommands should now log properly with the target of the command included. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13545 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-23 * Added a few missing atcommands.sketchyphoenix1-1/+1
* Added more commands to configurations (bugreport:2565) * Added a missing charcommand symbol config to atcommand configs. * GM command configs under the old format will have a warning printed back to the console as being deprecated. * Other fixes/cleaning partially resolving bugreport:2549 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13409 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-12-18Removed charcommand code while allowing atcommand code to support its ↵sketchyphoenix1-1/+2
functionality. Charcommands still retain their '#' symbol but now looks for a character name as the first parameter instead of last. Atcommand configs now support charcommand level configurations by comma seperation (e.g. 60,99) As a result of this, all atcommands that don't affect multiple users already (@kickall, @doom, @mapexit) are capable of remote usage. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13403 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-02- The last, i hope, fix to the mail system.zephyrus1-0/+1
* kRO have a possible way to read mail by just sending the open mail window packet to the client. This protection adds a mapflag town, to set the only maps that allow mail operations. because there is no way to know when client closes the mail inbox window. * git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12279 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-14Applied a temp patch to make some npc-executed atcommands work again ↵ultramage1-0/+1
(bugreport:790). Added support for right-click-gm-menu kicking NPC objects. Removed redundant function npc_checknear2(). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12073 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-29Command code cleaning (refer to topic:169759)ultramage1-277/+22
* separated the execution part of command code into interface part and internal part to better see which checks are done and when (fixes problem where 'nocommand' mapflag blocked server npcs) * moved the internal commands list (array) to the end of the file, this let me discard that long block of ACMD_FUNC() declarations * removed enum AtCommandType from command headers and commands array; its purpose was perhaps to identify aliased commands, but apparently it was never finished because the rest of the code doesn't use it (also doing aliases like this is not a very good idea) * internally, commands are now referenced to using their function name * removed the @/# symbols from the command lists; all lookup functions will now properly deal with strings with- and without a command symbol (commands interface still requires the symbol tho', so TODO for later) * removed several unneeded commands (*id2 code, dmalloc debug commands) * reverted atcommand config from alphabetically-sorted to how it was before (with additional fixes; see /conf changelog) * added missing code for #dropall / #storeall * added a warning when trying to set gm level of an undefined command The structure of the commands table has changed, please adjust docs/guides to match the new format (sorry for the inconvenience). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11607 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-22- Added the new mail system. Requires optimization and tests.zephyrus1-7/+1
- Updated the maildb sql structure. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11548 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-16Fixed some problems making gcc error outultramage1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11223 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-15Getting some (mostly atcommand) code cleaning out of the way...ultramage1-2/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11222 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-03- Merged @whereis from my server (displays normal spawn maps for given ↵skotlex1-0/+1
mobs). This command should be working correctly considering I've been using it since July. I was meant to merge it as soon as I got my hard-drive back, but I kinda forgot @_@ - bonus3 autospell (and autospell when hit) will change the target to self when the skill to be casted is inf&4 (self skill). - Corrected script homevolution not making the homunculus /swt if it is invoked when not loyal. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11110 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-19* Cleaned/clarified some #include relationships between headersultramage1-1/+2
* Changed clif_sitting() to use 'bl' instead of 'sd' (for non-player objects) * Removed way messed-up script function 'unitdeadsit' * Tagged 'FIXME' lines written by myself git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11040 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15- Merged and completed Latio's work on server-side hot-key saving ↵skotlex1-0/+2
(http://www.eathena.ws/board/index.php?s=&showtopic=159388&view=findpost&p=884453) - Now hotkeys are stored server-side (table hotkey in SQL servers, file save/hotkeys.txt for TXT servers). You can disable this behaviour by commenting out the 'HOTKEY_SAVING' define in mmo.h - Fixed a few compilation warnings/errors. - Apply upgrade_svn11018.sql to create the hotkey table. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-24- The autoloot range check is no longer done unless AUTOLOOT_DISTANCE is ↵skotlex1-3/+2
defined (by default it is no longer defined) - Ganbantein now deletes individual skill cells instead of the whole skill in the area it is casted. - Modified the mob total damage code to prevent overflows when mobs receive over 2kM damage. - Made the dmg structure of the damage log an unsigned int rather than signed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10343 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-17Massive at+charcommand cleanup, big thanks to HiddenDragonDracoRPG1-43/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10272 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-12- Added debug command @displayskill. Should be used only by people searching ↵skotlex1-0/+1
for new skill IDs. - Now the bonus bAtkEle will be transferred directly to the weapon when the script is in the ammunition, and you are wielding a weapon that consumes ammo per atttack. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10232 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-07- Moved e_mail_check() and config_switch() to strlib.hultramage1-1/+0
- Synchronized the login servers a bit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10174 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-20- getpetinfo 5 will now return the pet's rename flag.skotlex1-0/+7
- Autoloot will now only work on items dropped a certain distance from the player. The distance is defined by AUTOLOOT_DISTANCE in atcommand.h and defaults to AREA_SIZE. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10039 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-07New mapcache system :xDracoRPG1-2/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9971 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21Applied a consistent look to all header files (copyright, ifdefs)ultramage1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-28Some misc cleanups (typos, formatting, forgotten changelog entry etc)ultramage1-16/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-27Simple cleanupultramage1-2/+0
- removed atcommands @w, @server_date/time, @red, @happyhappyjoyjoy, @shuffle - synced gm level of @jailfor, @charjailtime, @npcmove, @chardropall, @charstoreall, @send, @mute, @changelook, @exp and @nuke - added conf entries for @whozeny, @kamic, @tonpc, @petid, @identify, @adopt, @trade, @changelook, @send - reorganized the atcommand_athena.conf file a bit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9731 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-18- Modified the Storm Gust freeze counter code. It now takes into ↵skotlex1-0/+1
consideration the ID of the skill before increasing the counter, which should effectively yield the closest aproximation to official (even though the counter will reset if you step out of a SG and into another one, we do not know yet what should happen in such a case). - Added @homshuffle. It recalculates the homunculus stats, as if the homunc was sent back to level 1, and then releveled. This command is mean to help fix those previously created Homunculus that are much stronger than they should be. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9671 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-16- Added atcommand @homstats so you can check your homunculus stats and ↵skotlex1-0/+1
compare them to the minimum/maximum values that you could have at your current level. This command is meant to help figure out if homuncs are indeed getting a faster stat growth than they should have. - Fixed some of the default @ levels for hom related commands. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9663 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07- re-added the duplicit nj/gs name messages in msg_athenaultramage1-1/+1
- renamed atcommand_sub to is_atcommand_sub (charcommand too) - reformatted conf-tmpl's comments a bit - and a fix to the stable changelog to make my last commit more descriptive git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9625 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07Fixed npc commands atcommand & charcommand not working with a custom ↵toms1-1/+1
command_symbol git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9431 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Massive EOL normalization & 'svn:eol-style native' flag setting for all ↵FlavioJS1-335/+335
txt/conf/h/c files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-16* Edited atcommand and charcommand syntax. Now it doesn't need the useless ↵Lance1-1/+3
character name and ":". modified Changelog-Trunk.txt modified src/map/atcommand.c modified src/map/atcommand.h modified src/map/charcommand.c modified src/map/charcommand.h modified src/map/clif.c modified src/map/map.c modified src/map/script.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9230 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-08- Moved the duel functions to pc.c since they are so totally out of place in ↵skotlex1-3/+0
atcommand.c - Fixed Spider Web not ending when hit by a fireelemental attack. - Cast-time reductions from status changes will not be executed until right before casting, to prevent status changes from ending when attempting to cast and the attempt fails (invalid cells, not enough sp, wrong target, etc, etc) - Added check to prevent Wand of Hermod from seeking for a partner to encore, since the partner is supposed to be the warp. - Moved the duel auto-reject on logout from map_quit to unit_free - Corrected the mob spawn reading code so that the event-name can be up to 50 characters long (which is the actual event length) and so that it can read spaces within them, it will also strip the leading/trailing quotes if you use them so that the event is actually found on mob-death (so you can do stuff like "My NPC::OnDead" as a valid event). - Moved the homunc inherit speed from the master from status_calc_pc to LoadEndAck, since the hom's speed matches that of the master each time the master changes maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9173 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-29@showmobs = shows selected mobs on mini-mapLupus1-0/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-20- Fixed some Homunc issues with HR servers (capping some values)toms1-0/+1
- Added @hominfo command to obtain real values (not capped ones) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8378 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-13- Removed @itemcheck as it was totally pointless.skotlex1-1/+0
- Corrected states killer/killable being easily dispellable. - Fixed the totally wrong text messages being used for @killer/@killable related atcommands, added appropiate entries to msg_athena - Magic and Misc attacks will now get type "flee" when they do less than 1 damage, this blocks them from causing additional status effects when they are blocked. - Cleaned up a bit the Basilica code, it should now properly end when you walk. - Added an unnecessary qty check when inserting cards :P - Fixed some logs not working when you enabled all logs. - Corrected unmute being a level 60 command by default (should be 80) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8256 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-03- Cleaned up the last NJ update code.skotlex1-0/+1
- Added @ command `charspeed` - Fixed @jailfor using MAP_PRONTERA as jail instead of MAP_JAIL - Removed case for GS_SPREADATTACK on damage packets to see if the skill displays correctly now. - Corrected Deluge/Volcano/V. Gale overlaps so that the placing tiles are removed, NOT the ones who were already placed. - Made SC_SPEEDUP0 and SC_SPEEDUP1 use different icon IDs, to fix icon-confusion when both are enabled at a time. - Mob rude-attacked count is not reset now on picking a new char (gotta investigate this further) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8096 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-01- Cleaned up some more the SC_JAILED codeskotlex1-0/+3
- merged in atcommands jailfor, jailtime, charjailtime. Thanks to Meruru and Coltaro for the code. - Cleaned the code of atcommnds jail and unjail - Be warned that the code MAY contain bugs as I adjusted it to save the character's position before jailing, allowing the automatic unjailing to warp you back to the exact spot you were at before being jailed. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8038 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-18- Added atcommand @partyoption, lets you alter the party item-distribution ↵skotlex1-0/+1
type on the go. Usage is "@partyoption <pickup share> <item distribution>", where both arguments can be 0/1, yes/no, etc. - Updated @changeleader and @partyoption to use msg_Athena entries. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7737 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-07-17Orn's and Albator's Homunculus system, finally, YAY!!DracoRPG1-0/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-17Removed AtCommand_Monster and replaced it with AtCommand_Spawn for Skots ↵reddozen1-1/+1
[Reddozen] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-05-10- Rewrote/cleaned up trade.c for a more clean trading implementation.skotlex1-1/+1
- Added @request commands, sends a request to all connected GMs of lowest_gm_level or above as a whisper message. Defaults to gm level 20 users. - Made SC_COMBO status start delay attackabletime and walkdelay by sc's duration regardless of skill used (previously it was only for TK kicks, now it's for both those and Monk combos) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6542 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-29Added @noask command: enable/disable deals/invites autorejecting.LuzZza1-1/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6376 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-04-27- Added at command @commands, displays the list of commands available to you.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6313 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-14- Updated @rura/@warp. Now you can use both "@warp mapname x y" and "@warp ↵LuzZza1-0/+1
mapname,x,y". - Added command @tonpc (warp to NPC). - Fixed @where at-command. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5602 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-08- Items now store the top MAX_SEARCH drops from mobs and lists them through ↵skotlex1-0/+1
the new atcommand @whodrops. All merged from my server, of course =D git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5515 54d463be-8e91-2dee-dedb-b68131a5f0ec