summaryrefslogtreecommitdiff
path: root/src/map/script.c
AgeCommit message (Collapse)AuthorFilesLines
2017-06-24make buildin_recovery more versatilegumi1-14/+48
2017-06-24Merge pull request #1765 from mekolat/swap2Haru1-4/+7
fix for #1761
2017-06-24Merge pull request #1775 from dastgir/bug/card_removeHaru1-77/+43
Fixes remove card bug
2017-06-09fix another memory leak introduced by 5ceccb7gumi1-0/+2
2017-06-09WhitespaceDastgir1-35/+33
2017-06-09Fixed a bug where removing a card from successremovecards andDastgir1-44/+12
failedremovecards were also removing item options.
2017-06-05fix loss of reference in buildin_swapgumi1-4/+7
2017-06-05fix memory leak introduced by 5ceccb7gumi1-0/+4
2017-06-03flag misceffect() as deprecatedgumi1-1/+1
2017-06-03flag specialeffect2() as deprecatedgumi1-1/+1
2017-06-03allow to use specialeffect() on any unit, and to send to any playergumi1-10/+26
2017-06-03Merge pull request #1684 from Smokexyz/refine-updateHaru1-8/+26
Enriched refine chance correction
2017-06-03Merge pull request #1747 from mekolat/param2Haru1-8/+14
patch for readparam()
2017-06-03Merge pull request #1753 from mekolat/string2Haru1-0/+38
new buildins: isstr, getarrayindex
2017-06-03Merge pull request #1736 from mekolat/group2Haru1-0/+40
new buildin: add_group_command
2017-06-01add buildin getarrayindex()gumi1-0/+17
2017-06-01add buildin isstr()Andrei Karas1-0/+21
2017-05-28add buildin add_group_command()gumi1-0/+40
2017-05-28flag the pow() buildin as deprecatedgumi1-1/+1
2017-05-28add exponentiation operatorgumi1-0/+6
2017-05-28allow to pass actual params to getparamgumi1-8/+14
2017-05-27Merge pull request #1722 from Smokexyz/mmo_charstatus-fixHaru1-1/+9
Dismemberment of `storage_data` from `mmo_charstatus`.
2017-05-22Add storage_data reception, parsing and sending to/from the map-server.Smokexyz1-1/+9
Remove loading and saving of storage_data through char.c Re-declaration of structure storage_data as a vector. Re-code of portions in the map-server using storage_data. A new approach is taken by saving the loaded storage data from sql into memory for the duration of the session, thereby removing the need of querying the database to re-load all items everytime a storage save routine is issued from the map-server. Saving of storage items is done through a new function that significantly reduces the number of queries compared to char_memitemdata_tosql(), and therefore run-time speed. This method potentially reduces the number of update and delete queries from MAX_STORAGE (which could be >= 600) times to literally 1. Storage items are stored in a dynamically allocated array and handled accordingly. struct mmo_charstatus size reduces by 34,800 bytes. Update pc_checkitem() with masks for item checks. `sd->state.itemcheck` has been changed to `sd->itemcheck` of type `enum pc_checkitem_types` `battle/items.conf` has been updated to reflect configuration changes. Further updates to assert a successful reception of storage data in related functions.
2017-05-21Refine rate correction from kRO.smokexyz1-8/+26
Normal Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941553&curpage=1 Enriched Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941565&curpage=1 Event Normal Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941558&curpage=1 Event Enriched Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941567&curpage=1
2017-05-12add channel handler eventsgumi1-0/+51
2017-05-09Merge pull request #1699 from Jedzkie/11-SummerCostumeHaru1-0/+1
Implemented Official Summer 2 Costume
2017-05-04Merge pull request #1717 from mekolat/vault2Haru1-0/+2
expose the bank vault to the script engine
2017-04-29Merge pull request #1712 from mekolat/canuse2Haru1-0/+91
add permission checking buildins, expose PC permission constants
2017-04-27Merge pull request #1711 from mekolat/checkoption2Haru1-8/+32
allow checkoption et al to check another player
2017-04-25expose bank vault to the script enginegumi1-0/+2
2017-04-25add permission checking buildinsgumi1-0/+91
add has_permission() add can_use_command() expose PC permission constants
2017-04-25Merge pull request #1689 from Jedzkie/2-GiantFlyWingHaru1-58/+65
Implemented official Giant Fly Wing Effect
2017-04-24allow checkoption et al to check another playergumi1-8/+32
2017-04-24Removed hard coded values on @cashmount and setcashmount.Jedzkie1-9/+17
2017-04-24Fix some issues in the unit controlling script commandsHaru1-110/+101
- Fixes some issues detected by coverity (UDT_TYPE not working in getunitdata, invalid comparisons due to type mismatch) - Fixes some incorrect typecasts This is a follow-up to a6ca899ac (PR #1584) Signed-off-by: Haru <haru@dotalux.com>
2017-04-23Implemented official Giant Fly Wing EffectJedzkie1-58/+65
Update the *warpparty script commmand, credits to Dastgir Coding-style fixes & whitespace adjustments in warpparty part in script.c
2017-04-23Merge pull request #1584 from Smokexyz/masterHaru1-0/+1600
Implementation of unit controlling script commands.
2017-04-19Implemented Official Summer 2 CostumeJedzkie1-0/+1
Added summer2_ignorepalette configuration
2017-04-13add missing _pc in set_reggumi1-4/+4
2017-04-12fix 1b0d3bd "add getvariableofpc() buildin"gumi1-1/+0
2017-04-12fix a16fbb3 "allow character and account variables to reference another ↵gumi1-26/+139
registry"
2017-04-11Fixes a minor typo in buildin_setequipoptionsmokexyz1-2/+2
Related to the order of the arguments.
2017-04-09Merge pull request #1598 from Smokexyz/IROHaru1-2/+243
Implementation of Item Options System.
2017-04-09Merge pull request #1657 from mekolat/getunits2Haru1-0/+100
add getunits() buildin
2017-04-08add getunits() buildingumi1-0/+100
2017-04-04Implementation of unit controlling script commands.Smokexyz1-0/+1600
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-2/+243
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-31Merge pull request #1544 from HerculesWS/1543-fixsmokexyz1-6/+8
getstatus() Update
2017-03-28add gettimer() buildingumi1-0/+95
2017-03-12Merge pull request #1610 from mekolat/timer2Haru1-17/+37
allow the PC timer buildins to run on another player