summaryrefslogtreecommitdiff
path: root/npc/other/Global_Functions.txt
AgeCommit message (Collapse)AuthorFilesLines
2018-10-21Updated getiteminfo and setiteminfo.Dastgir1-0/+37
Added ITR_TRADE (Trade restriction) for both script commands
2017-11-12Rewrite F_GetArmorType to reflect the fact that ITEMINFO_LOC returns a bitmaskHaru1-27/+72
The function now handles multi-slot headgears and other uncommon cases better. Signed-off-by: Haru <haru@dotalux.com>
2017-11-12Add F_GetAmmoType global function, counterpart to F_GetWeaponType for ↵Haru1-0/+25
ammunitions Both functions have now been updated to only check the subtype if the item type is correct (IT_AMMO for F_GetAmmoType, IT_WEAPON for F_GetWeaponType) Signed-off-by: Haru <haru@dotalux.com>
2017-11-12Add type constants for the getiteminfo()/setiteminfo() buildinsHaru1-48/+49
Replacements are as follows: 0 => ITEMINFO_BUYPRICE 1 => ITEMINFO_SELLPRICE 2 => ITEMINFO_TYPE 3 => ITEMINFO_MAXCHANCE 4 => ITEMINFO_SEX 5 => ITEMINFO_LOC 6 => ITEMINFO_WEIGHT 7 => ITEMINFO_ATK 8 => ITEMINFO_DEF 9 => ITEMINFO_RANGE 10 => ITEMINFO_SLOTS 11 (Subtype, for weapons and ammunitions) => ITEMINFO_SUBTYPE 11 (ViewSprite, for other item types) => ITEMINFO_VIEWSPRITE (NOT AVAILABLE YET) 12 => ITEMINFO_ELV 13 => ITEMINFO_WLV 14 => ITEMINFO_VIEWID 15 => ITEMINFO_MATK (NOT AVAILABLE YET - this was documented but never implemented) Calls to getiteminfo() and setiteminfo() have been replaced with the newly introduced constants. Other constants (such as W_ weapon subtypes) in related code have been replaced as well, to improve code readability. This fixes an issue in the Eden Tutorial script "Tutorial Goal", where ITEMINFO_ATK was accidentally used instead of ITEMINFO_WEIGHT. Note: calls to getiteminfo or setiteminfo with numeric type arguments in third party scripts must be replaced with the respective constants. The use of numeric literals is no longer recommended, and those values may change in the future without notice. See the getiteminfo documentation for details. Signed-off-by: Haru <haru@dotalux.com>
2017-09-03Update F_GetArmorType()Emistry Haoyan1-3/+16
- update missing equip types.
2017-05-28remove the pow buildin from existing scriptsgumi1-4/+4
2017-03-05Update Global Function - Remove F_SexEmistry Haoyan1-10/+0
- not using in any script, could be easily replace by simply if-else condition.
2016-09-02change *strcharinfo to use constantsAsheraf1-1/+1
2016-02-29Replaced the SEX_FEMALE/SEX_MALE constants to scripts, where appropriateEmistry1-1/+4
2015-12-20Add color constants for announcement and mesAnnieRuru1-0/+8
Added F_MesColor helper function Closes #897 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-17Standardize the comments in Global_Functions.txtAnnieRuru1-6/+4
follow up https://github.com/HerculesWS/Hercules/commit/d4832df6929653561e6867149e4ecaa63a860cbe
2015-12-15Standardized header in scripts (part 14)Haru1-111/+75
- Now including GPL-compliant license/copyright info - Restored some missing copyrights - Other scripts folders Signed-off-by: Haru <haru@dotalux.com>
2015-12-13Add 'F_ShuffleNumbers' as Global FunctionAnnieRuru1-0/+30
2015-11-17Add some FAQ documentation that some script command can return valueAnnieRuru1-4/+4
- getitemname can return "null" - getmapusers can return -1 and fix the bad ... misleading global function example
2015-09-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-16/+9
Signed-off-by: Haru <haru@dotalux.com>
2015-07-15Follow up d93ed2a26dab220632d523caea0358d33dda7051Emistry1-6/+20
Returns a number with commas based on precision of digits and custom separator. -- callfunc "F_InsertComma",<number>{,<precision>,<separator>} Examples: callfunc("F_InsertComma",7777777{,<precision>,<separator>}) // returns "7,777,777" callfunc("F_InsertComma",1000000000,3,","}) // returns "1,000,000,000" callfunc("F_InsertComma",1000000000,3,"_"}) // returns "1_000_000_000" callfunc("F_InsertComma",1000000000,4) // returns "10,0000,0000"
2015-07-14Added F_InserCommaEmistry1-0/+13
Merge from rAthena. Returns a number with commas between every three digits.
2014-11-02Replaced 'set' with direct assignment where applicable (common folder)Haru1-83/+83
Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Removed trailing whitespace (scripts)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2013-11-10Follow-up to 857bdc4f98be6cd1e185a24565d6b6b54752b9b4Haru1-11/+11
- Consolidated case in remaining variables, labels, constants. Signed-off-by: Haru <haru@dotalux.com>
2013-10-24Update to last rAthena npc.Michieru1-56/+46
Fix some typos change sc_bleeding to -> sc_blooding Updated RE EXP for quests_brasilis.txt
2013-02-03Updated more placeholders and fixed some spacing issues.Mysteries1-3/+1
2012-08-01Full npc folder reorganization. (I hope I didn't break anything D:)daegaladh1-0/+355
-Now common scripts goes to the main npc folder, and pre-re-only/re-only ones goes to their respective folders. -NPCs with practically the same script but little differences have been left in the main folder and uses the command checkre() for the differences. -For those NPCs with different coordinates but same script, the script has been left in the main folder but the NPCs splitted as duplicates. -All pre-renewal files has been reverted back to their pre-renewal behavior. TODO: -Correct pre-re quest rewards. -Check for pre-re/re differences in mapflags. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16545 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-07-08Okie ladies and gentleman if this commit breaks anything it's jman's and ↵shennetsind1-355/+0
maki's fault, yes, blame them. Fixing pre-re / re npc support, moving /config/ folder to src root so other servers may also make use of the #define renewal dir and other stuff. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16382 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-25- Standardized script headers, starting with /npc/custom/brianluau1-3/+10
http://rathena.org/wiki/Script_header git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15262 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-24- Replaced all occurrences of "eAthena" to "rAthena" stringmercurial1231-2/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15251 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-08- Removed extra slashes in item_db.txt (bugreport:4686)brianluau1-2/+2
- Removed punctuation from Time2Str script function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14655 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-18- Fixed some small typos.brianluau1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14382 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-14* Quest log kill count now updated properly. (Added from topic 253813)L0ne_W0lf1-0/+36
* More battleground editing, and some bug fixes. - * ALL BATTLEGROUNDS ARE NOW ACTIVE BY DEFAULT. PLEASE CONTINUE TESTING * - Rewrote the Badge Exchange NPC in bg_common.txt, is official now. - Other changes to the bg_common folder, including disabled GM NPC. - Completely rewrote Flavius for the most part, from ground up. - Moved old Flavius battlegrounds to /custom/battleground folder. - Restored original bg_common, and KVM to /custom/battleground - Fixed wall bugs in Tierra Gorge, and added an oninit to the timers. - Other minor tweaks to both Tierra Gorge and KVM scripts. - Fixed the pseudo-cooldown on KVM not working properly, I hope. - Added global time2str function which will be used later in Endless tower. * Applied Epoque's mapflag clean up, which removes flags from scripts. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14374 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-03* A rather large overhaul of the battlegrounds.L0ne_W0lf1-1/+54
- in bg_common.txt, stripped out KvM npcs, fixed coordinates. - Needs to be tested, none of the BG files are on by default. - Created subfolder battleground/KvM/ which now holds KVM files. - Added kvm_enter.txt, which warps players to the waiting rooms. - Added kvm_item_pay.txt, which holds the point redemption NPC. - Made the KvM battlegrounds work closer to official, needs work. * Corrected variable typos in the acolyte arena. (bugreport:4374) * Corrected donpcevent typo in the party arena. (bugreport:4374) * Added two global functions which will return equip data as strings. - F_GetWeaponType: returns the type of weapon by 'look', (ie "Dagger") - F_GetArmorType: returns the kind of armor via 'equip loc'. (ie "Armor") * Fixed duplicate documentation for getitemslot. (bugreport:4362) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14369 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-12* Completely rescripted the DTS warp service based on the aegis 11.3 file.L0ne_W0lf1-2/+7
- Updated F_ClearGarbage to erase obsolete DTS player variables. - Moved Cool Corp. Staff NPCs to Lighthalzen (cities/lighthalzen.txt.) - Now everyone can enjoy the global broadcast "every-hour-nag" to vote! - Note: Upon loading ALL prior DTS global variables are erased. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13764 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-14* Uncommented all novice map, and added mapflags.L0ne_W0lf1-0/+13
* Additionally; changed starting map from new_zone to new_1-1. * Large update to the novice grounds. Fixed bugreport:1666 - Updated notice ground warps to reflect the above map-usage change. - Additionally; NPCs now give EXP (base/job) dependant on your level. - All prior novice ground progress will be lost, and variables cleared. - NPCs give class specific items, but not the soulbound ones, yet. - Fixed the mob count for the novice ground maps. - Added all the old novice training ground vars to F_ClearGarbage git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12833 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-06-08fixed 4 bugs in Blacksmith job quest, put some garbage var to clear. Fixed a ↵Lupus1-1/+5
typo in Bard Job q git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12791 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-03Updated Valkirye, Global_Functions, Turtle Island Quest varsLupus1-83/+12
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12463 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-25Added proper checks to adoption processing (followup to r12428).ultramage1-1/+1
Cleaned up some code / fixed some typos. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12432 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-15Updated Poring Tower to not refinable. (bugreport: 1050)Paradox924X1-5/+3
Renamed custom Stylist to Stylist#customstylist to avoid conflicts with official one. (bugreport: 1042 Updated Airship Typing Challenge to not fail you when you get both strings correct. (bugreport: 1008) Fixed Job_Change Function to properly jobchange babies. (bugreport: 943) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12368 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-28* Removed "F_CheckMaxCount" as it seems "checkweight". preforms the ↵L0ne_W0lf1-18/+1
aforementioned check in addition to checking weight. * Updated 2004 headgear quests to use checkweight. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12256 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-28* Implemented new function F_CheckMaxCount.L0ne_W0lf1-1/+20
- Checks if you have enough room in your inventory to accept items * Updated 2004 headgear quests to fully official. - Implemented usage of F_checkMaxCount in the 2004 headgear quests. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12255 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-31* Fixed north prontera kafra having an empty warp listultramage1-1/+1
* Removed junk &#1038;A text from the 2004 headgears * Changed deprecated Job_Alchem to Job_Alchemist (see r10904) * Fixed a typo in a geffen city npc (Job_Merhcant) * Fixed a typo in the Jobmaster custom script (Job_Gunsliger) * Fixed one old eAAC Quest Warper bug (warp to nonwalkable coords) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10940 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-31* Added the "F_BlockHigh" function back in, as it's still used by 2-x job ↵L0ne_W0lf1-1/+1
quests. - Fix the assassin job quest item reward bug. Cheap fix until it's rewritten. * Added official Pang Voice skill quest for bards. Further official 2-x skill quests to come. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10938 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-29More eof eols (followup to r10401); skipping /npc/custom and /npc/samplesultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10402 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-20Added npc/sample/npc_live_dialogues.txt how to use Global_Functions.txtLupus1-22/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10035 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-15removed all .GAT from all the scripts and testedLupus1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10018 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-22- Simplified the global function "getJobName"skotlex1-162/+2
- Simplified function agitcheck so it isn't crash prone. Now it takes no arguments, and will return whether WoE is on or not. - Updated bundled scripts as required for this change. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9559 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05- Massive EOL normalization & 'svn:eol-style native' flag setting for all ↵FlavioJS1-485/+485
txt/conf/h/c files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-30Removed garbage vars from Shinokas questLupus1-0/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9372 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24Cleaned up global permanent variables in Airship QuestKarLaeda1-0/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9306 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-16Added official Ninja Job questLupus1-1/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9224 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-01Cleared a bit 'clear garbage' function. Update novice grounds with correct ↵Lupus1-24/+0
kafra tickets git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9115 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-26added new TK job quest, added Rachel city NPC!, added louyang guideLupus1-2/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9074 54d463be-8e91-2dee-dedb-b68131a5f0ec