summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
AgeCommit message (Collapse)AuthorFilesLines
2017-04-24Remove conf dir.Andrei Karas1-9625/+0
2017-04-23Merge pull request #1584 from Smokexyz/masterHaru1-0/+146
Implementation of unit controlling script commands.
2017-04-09Merge pull request #1598 from Smokexyz/IROHaru1-0/+44
Implementation of Item Options System.
2017-04-08add getunits() buildingumi1-0/+34
2017-04-04Implementation of unit controlling script commands.Smokexyz1-0/+146
Setunitdata <GID>, <DataType>, <Val1> {, <Val2>, <Val3>} Getunitdata <GUID>, <DataType> {, <Variable>} Getunitname <unit id> Setunitname <unit id>, <name> Performs alteration and retrieval of real-time unit data for a game object of the types - NPCs, Pets, Monsters, Homunuculus', Mercenaries, Elementals. Applicable data types (available as script constants) - UDT_TYPE: Unit Type value (BL_MOB, BL_NPC, BL_PET, BL_ELEM, BL_MER, BL_HOM) UDT_SIZE: Unit Size UDT_LEVEL: Level UDT_HP: Current HP UDT_MAXHP: Max HP UDT_SP: SP UDT_MAXSP: MAX SP UDT_MASTERAID: Master Account ID (for Summons) UDT_MASTERCID: Master Char ID (for Summons) UDT_MAPIDXY: Warp a Unit to a map. UDT_WALKTOXY: Make a unit walk to certain co-ordinates. UDT_SPEED: Unit Speed UDT_MODE: Mode (Mobs) UDT_AI: Unit AI Type UDT_SCOPTION: Status Options. UDT_SEX: mm Sex. UDT_CLASS: Class of the unit. UDT_HAIRSTYLE: Hair Style of the unit. UDT_HAIRCOLOR: Hair Color. UDT_HEADBOTTOM: Headgear Bottom Sprite. UDT_HEADMIDDLE: Headgear Middle Sprite. UDT_HEADTOP: Headegar Top Sprite. UDT_CLOTHCOLOR: Cloth Color. UDT_SHIELD: Shield Sprite. UDT_WEAPON: Weapon Sprite. UDT_LOOKDIR: Face direction. UDT_CANMOVETICK:Stop a unit from move for n seconds. UDT_STR: Unit STR. UDT_AGI: Unit AGI. UDT_VIT: Unit VIT. UDT_INT: Unit INT. UDT_DEX: Unit DEX. UDT_LUK: Unit LUK. UDT_ATKRANGE: Attack range of a unit. UDT_ATKMIN: Min Atk of a unit. UDT_ATKMAX: Max Atk of a unit. UDT_MATKMIN: Min MATK of a unit. UDT_MATKMAX: Max MATK of a unit. UDT_DEF: DEF. UDT_MDEF: MDEF. UDT_HIT: HIT. UDT_FLEE: FLEE. UDT_PDODGE: Perfect Dodge. UDT_CRIT: Critical Rate. UDT_RACE: Race. (Eg. string constants RC_DemiHuman or Integer 7). UDT_ELETYPE: Element. (Eg. string constants Ele_Neutral or Integer 0). UDT_ELELEVEL: Element Level (int). UDT_AMOTION: AMotion Rate (int). UDT_ADELAY: ADelay Rate (int). UDT_DMOTION: DMotion Rate (int). UDT_HUNGER: Hunger Rate (int) - for summons. UDT_INTIMACY: Intimacy Rate (int) - for summons. UDT_LIFETIME: LifeTime (int) - for summons. UDT_MERC_KILLCOUNT: Kill count for mercenaries (int). UDT_STATPOINT: Status Points (int) - for npcs. Addition of AI constants as well. Documentation is included. Credits: [rA](https://github.com/rathena/rathena/commit/2cee5b6ff1bf53c4ae53bc1278b09ae84b8a0a76) & [Smokexyz](https://github.com/Smokexyz)
2017-04-04Implementation of Item Options System.Smokexyz1-0/+44
Allows the infusing of equipments with bonus item options. This feature is constrained to clients of packet versions greater than or equal to `20150226`. Item Options and their effects are defined server-side in `db/item_options.conf` and client side in `data/luafiles514/lua files/datainfo/addrandomoptionnametable.lub` The ID of the option must tally with the correct index of the description provided in the client side lua file to avoid bugs. IT_OPT_* keys and MAX_ITEM_OPTIONS macro are also exported from the source as constants. An additional flag `disable_options` has been added to sql, and as `DisableOptions: true/false (boolean, defaults to false !!for equipments only!!)` to item_db.conf files. Script commands documentation is also included. SQL file updates are included. Credits: [Smokexyz](https://github.com/Smokexyz) Style and Script Fixes by [Asheraf](https://github.com/Asheraf) Initial design Idea by [secretdataz](https://github.com/secretdataz)
2017-03-28add gettimer() buildingumi1-10/+39
2017-03-12Merge pull request #1610 from mekolat/timer2Haru1-4/+5
allow the PC timer buildins to run on another player
2017-03-12Minor optimizations for the warpguild implementationHaru1-1/+1
Follow-up to ebb77e29f343531b508f8c37b32826afbb5f240d Signed-off-by: Haru <haru@dotalux.com>
2017-03-12Merge pull request #1496 from Emistry/scriptcommand_warpguildHaru1-1/+4
Updated *warpguild() script command.
2017-03-07update documentation for the timer buildinsgumi1-4/+5
2017-03-05Merge pull request #1589 from mekolat/strinfo2Haru1-2/+10
allow strcharinfo() and strnpcinfo() to take a GID
2017-03-05Update *warpguild() script command.Emistry Haoyan1-1/+4
- Added optional parameter to warp member from target map. - Update to loop guild member using `g->member[]` data.
2017-02-26add getvariableofpc() buildingumi1-0/+21
2017-02-26Revert "allow to get vars of other players with getd"gumi1-3/+2
This reverts commit eb5fc0076764d2f604e6a484fe144988f6e9da9b.
2017-02-26Merge pull request #1586 from mekolat/getd2Ridley1-2/+3
Allow getd to get vars if other players
2017-02-26Added option to show classchange only to one player (#1587)Guilherme G. M1-18/+9
* Added option to show classchange only to one player
2017-02-25allow strcharinfo() and strnpcinfo() to take a GIDgumi1-2/+10
2017-02-25allow to get vars of other players with getdgumi1-2/+3
2017-02-25add chr() and ord() buildinsgumi1-0/+20
2017-01-02Update *waitingroom script document (#1537)Emistry Haoyan1-1/+1
- when trigger event label, it run as *donpcevent() not *doevent(), no player are attached to the script when it's triggering the event.
2016-12-02Merge pull request #1405 from Emistry/scriptcommand_makeitem2Haru1-1/+26
Add *makeitem2 script command.
2016-10-16Merge pull request #1476 from Asheraf/documentationRidley1-0/+1
missing type at setlook documentation
2016-10-16Change *getcharid to use constantsAsheraf1-32/+32
2016-10-13missing type at setlook documentationAsheraf1-0/+1
2016-09-12Add script command navigateto. Add packet for this command.Andrei Karas1-0/+33
Based on rAthena commits: commit 4f13007fec7f08c265620a71c3bc4806d186c0f1 Author: Lemongrass3110 <lemongrass@kstp.at> Date: Sun Mar 6 21:48:47 2016 +0100 commit 809f220b9f5ef70ee062ee56ae6e8d5f56cb5d32 Author: aleos89 <aleos89@users.noreply.github.com> Date: Sun Mar 6 16:15:54 2016 -0500 commit 179f73424934d528ebe494dfb66503c182eacb09 Author: aleos89 <aleos89@users.noreply.github.com> Date: Sun Mar 6 16:10:15 2016 -0500
2016-08-31Merge branch 'master' of https://github.com/HerculesWS/Hercules into ↵Emistry Haoyan1-8/+8
scriptcommand_makeitem2
2016-08-29*strnpcinfo now uses constantsAsheraf1-8/+8
- NPC_NAME for the whole npc name including hidden part - NPC_NAME_VISIBLE for the visible part of the npc name - NPC_NAME_HIDDEN for the hidden part of the npc name - NPC_NAME_UNIQUE for the npc unique name - NPC_MAP for npc map
2016-08-28Update *makeitem2 script commandEmistry Haoyan1-1/+26
- squash commits. - fix conflicts during rebase. - fix travis build warnings.
2016-08-21Syntax clean up in the script documentationHaru1-1652/+1680
- Changed all function calls to encourage parenthesized calls - Replaced numbers with constants where appropriate - Removed some incorrect remarks Signed-off-by: Haru <haru@dotalux.com>
2016-08-20Updated references to the old config in the documentationHaru1-32/+37
Signed-off-by: Haru <haru@dotalux.com>
2016-07-21Remove duplicate entry for getnameditem function on script commands ↵Reid1-19/+0
documentation.
2016-06-25Added mesf() command (combination of mes() and sprintf())Haru1-0/+17
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Removed the uncommon (and useless) multi-argument variant of mes()Haru1-9/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-06-25Re-implemented BUILDIN(sprintf)Haru1-4/+69
- The function now checks its arguments, rather than passing them to the system implementation (safer against arbitrary memory access or wrong variable type) - Implemented positional ('%1$d') specifiers (POSIX style) - See script_commands.txt for details about the supported format specifiers. Signed-off-by: Haru <haru@dotalux.com>
2016-04-11Fix a typo in script_commands.txt,Reid1-1/+1
getskillv -> getskilllv.
2016-02-29Added gender-related constants SEX_MALE/SEX_FEMALEEmistry1-3/+6
2016-01-16Remove VAR_ constantsAnnieRuru1-2/+2
- there are 2 same constants for setlook script command, remove the wrong one - VAR_ constant added by lone_wolf is invalid https://github.com/HerculesWS/Hercules/commit/f4278f36db32f35e535a0ea8feb1cf83ca95019e, so use the LOOK_ constant
2016-01-13Converted const.txt to libconfig formatHaru1-40/+43
- This is necessary for upcoming improvements Signed-off-by: Haru <haru@dotalux.com>
2016-01-05Add *swap script commandAnnieRuru1-0/+13
- extremely useful when writing algorithm functions Closes #1012 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-31Replaced leftover -1 view IDs with FAKE_NPCHaru1-8/+8
Signed-off-by: Haru <haru@dotalux.com>
2015-12-26Add *setgroupid script commands.Emistry1-0/+8
Useful for scripts that temporary adjust the group id of players.
2015-12-22Throw error when variable name length too longAnnieRuru1-1/+2
2015-12-22Update *dispbottom script command to allow 0xRRGGBB colorAnnieRuru1-3/+4
Closes #858 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-22Update *message script command to allow to use account IDAnnieRuru1-2/+3
Signed-off-by: Haru <haru@dotalux.com>
2015-12-20*explode return array size.Emistry1-2/+4
http://herc.ws/board/topic/7489-explode-to-push-arraysize/ Closes #700 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-20Add color constants for announcement and mesAnnieRuru1-6/+13
Added F_MesColor helper function Closes #897 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-18Add *getunittype and update *getmapxyAnnieRuru1-20/+38
- unlike rathena, hercules' getunittype use the value from getmapxy - getmapxy now can search object position using GID Closes #871 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-18*Fix the misleading label name lengthAnnieRuru1-6/+4
2015-12-18*Correct the wrong example for *queueoptAnnieRuru1-1/+1