summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <notind@gmail.com>2013-02-10 19:48:17 -0800
committershennetsind <notind@gmail.com>2013-02-10 19:48:17 -0800
commitdff5f3f362f09dbeb8d60b19a4d53d34ca1f8087 (patch)
tree6c3aa9dfa71e3c4e464fc86f611c40088bf8edd3
parent7a8857cbf73d589ded8ef7bcf000063ad0ef1432 (diff)
parent56a20bb18d6fde61bb82cf160a131eb54d464148 (diff)
downloadhercules-dff5f3f362f09dbeb8d60b19a4d53d34ca1f8087.tar.gz
hercules-dff5f3f362f09dbeb8d60b19a4d53d34ca1f8087.tar.bz2
hercules-dff5f3f362f09dbeb8d60b19a4d53d34ca1f8087.tar.xz
hercules-dff5f3f362f09dbeb8d60b19a4d53d34ca1f8087.zip
Merge pull request #9 from Mysteries/master
Fixed a few Typos and merged rAthena changes
-rw-r--r--conf/battle/skill.conf6
-rw-r--r--db/job_db2.txt6
-rw-r--r--db/pre-re/job_db1.txt6
-rw-r--r--db/pre-re/skill_tree.txt6
-rw-r--r--db/re/job_db1.txt6
-rw-r--r--db/re/skill_tree.txt6
-rw-r--r--doc/ea_job_system.txt30
-rw-r--r--doc/script_commands.txt9
-rw-r--r--npc/custom/events/cluckers.txt7
-rw-r--r--src/map/script.c18
10 files changed, 64 insertions, 36 deletions
diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf
index ecb2dd00a..622ce7877 100644
--- a/conf/battle/skill.conf
+++ b/conf/battle/skill.conf
@@ -277,6 +277,6 @@ invincible.nodamage: no
dancing_weaponswitch_fix: yes
// Skill Trap Type (GvG)
-// 0: (official) traps in GvG only makes player unable to move after its walk path is complete, and it activates other traps on the way.
-// 1: trap in GvG makes player stop moving right when stepping over it.
-skill_trap_type: 0
+// 0: (official) Traps in GvG only make player stop moving after its walk path is complete, and it activates other traps on the way.
+// 1: Traps in GvG make player stop moving right when stepping over it.
+skill_trap_type: 0 \ No newline at end of file
diff --git a/db/job_db2.txt b/db/job_db2.txt
index 97e34ddc6..ef1b4edbd 100644
--- a/db/job_db2.txt
+++ b/db/job_db2.txt
@@ -237,9 +237,9 @@
4082,0,3,4,1,4,5,0,0,3,0,4,0,1,5,0,6,0,0,4,5,0,0,2,4,0,4,3,0,0,1,5,0,6,2,0,0,4,4,0,1,3,3,0,5,1,4,0,1,5,0
// Royal Guard (Gryphon) (Trans)
4083,0,3,4,1,4,5,0,0,3,0,4,0,1,5,0,6,0,0,4,5,0,0,2,4,0,4,3,0,0,1,5,0,6,2,0,0,4,4,0,1,3,3,0,5,1,4,0,1,5,0
-// Ranger (Waug) (Regular)
+// Ranger (Warg) (Regular)
4084,5,4,4,2,0,0,2,5,4,0,0,3,3,3,0,0,5,2,0,0,4,3,5,0,0,1,1,0,0,5,2,3,0,0,0,4,4,4,2,0,0,0,2,5,2,0,0,0,4,2
-// Ranger (Waug) (Trans)
+// Ranger (Warg) (Trans)
4085,5,4,4,2,0,0,2,5,4,0,0,3,3,3,0,0,5,2,0,0,4,3,5,0,0,1,1,0,0,5,2,3,0,0,0,4,4,4,2,0,0,0,2,5,2,0,0,0,4,2
// Mechanic (Mado) (Regular)
4086,6,1,0,0,1,0,6,2,5,4,0,0,4,6,0,0,2,0,3,3,4,5,0,0,3,6,0,0,3,0,1,1,3,6,0,0,4,4,0,0,0,3,3,1,1,0,0,5,2,0
@@ -275,7 +275,7 @@
4109,4,4,5,3,4,0,0,0,0,1,1,4,4,3,5,0,0,0,5,2,2,4,3,5,0,0,0,0,0,4,5,3,1,0,0,0,0,0,4,5,2,0,0,5,3,4,6,6,6,4
// Baby Royal Guard (Gryphon)
4110,0,3,4,1,4,5,0,0,3,0,4,0,1,5,0,6,0,0,4,5,0,0,2,4,0,4,3,0,0,1,5,0,6,2,0,0,4,4,0,1,3,3,0,5,1,4,0,1,5,0
-// Baby Ranger (Waug)
+// Baby Ranger (Warg)
4111,5,4,4,2,0,0,2,5,4,0,0,3,3,3,0,0,5,2,0,0,4,3,5,0,0,1,1,0,0,5,2,3,0,0,0,4,4,4,2,0,0,0,2,5,2,0,0,0,4,2
// Baby Mechanic (Mado)
4112,6,1,0,0,1,0,6,2,5,4,0,0,4,6,0,0,2,0,3,3,4,5,0,0,3,6,0,0,3,0,1,1,3,6,0,0,4,4,0,0,0,3,3,1,1,0,0,5,2,0
diff --git a/db/pre-re/job_db1.txt b/db/pre-re/job_db1.txt
index 87ece7a51..d25f0891a 100644
--- a/db/pre-re/job_db1.txt
+++ b/db/pre-re/job_db1.txt
@@ -229,9 +229,9 @@
4082, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
// Royal Guard (Gryphon) (Trans)
4083, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
-// Ranger (Waug) (Regular)
+// Ranger (Warg) (Regular)
4084, 27000,85 ,500 ,400 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
-// Ranger (Waug) (Trans)
+// Ranger (Warg) (Trans)
4085, 27000,85 ,500 ,400 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
// Mechanic (Mado) (Regular)
4086, 30000,90 ,500 ,400 ,400 ,600 ,650 ,2000 ,2000 ,2000 ,650 ,650 ,675 ,675 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
@@ -267,7 +267,7 @@
4109, 28000,150 ,500 ,300 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
// Baby Royal Guard (Gryphon)
4110, 28000,110 ,700 ,470 ,400 ,500 ,500 ,550 ,600 ,600 ,700 ,700 ,650 ,700 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
-// Baby Ranger (Waug)
+// Baby Ranger (Warg)
4111, 27000,85 ,500 ,400 ,400 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,600 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
// Baby Mechanic (Mado)
4112, 30000,90 ,500 ,400 ,400 ,600 ,650 ,2000 ,2000 ,2000 ,650 ,650 ,675 ,675 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000
diff --git a/db/pre-re/skill_tree.txt b/db/pre-re/skill_tree.txt
index 7cd30f961..f1954a2bc 100644
--- a/db/pre-re/skill_tree.txt
+++ b/db/pre-re/skill_tree.txt
@@ -4151,7 +4151,7 @@
4083,2323,5,2311,3,0,0,0,0,0,0,0,0 //LG_EARTHDRIVE#Earth Drive#
4083,2324,5,2318,3,2319,3,0,0,0,0,0,0 //LG_HESPERUSLIT#Hesperus Lit#
4083,2325,5,2315,3,2321,4,2322,5,0,0,0,0 //LG_INSPIRATION#Inspiration#
-//Ranger (Waug) (Regular)
+//Ranger (Warg) (Regular)
4084,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
4084,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
4084,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
@@ -4204,7 +4204,7 @@
4084,2252,1,2248,1,0,0,0,0,0,0,0,0 //RA_VERDURETRAP#Verdure Trap#
4084,2253,5,2237,1,0,0,0,0,0,0,0,0 //RA_FIRINGTRAP#Firing Trap#
4084,2254,5,2237,1,0,0,0,0,0,0,0,0 //RA_ICEBOUNDTRAP#Icebound Trap#
-//Ranger (Waug) (Trans)
+//Ranger (Warg) (Trans)
4085,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
4085,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
4085,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
@@ -5232,7 +5232,7 @@
4110,2323,5,2311,3,0,0,0,0,0,0,0,0 //LG_EARTHDRIVE#Earth Drive#
4110,2324,5,2318,3,2319,3,0,0,0,0,0,0 //LG_HESPERUSLIT#Hesperus Lit#
4110,2325,5,2315,3,2321,4,2322,5,0,0,0,0 //LG_INSPIRATION#Inspiration#
-//Baby Ranger (Waug)
+//Baby Ranger (Warg)
4111,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
4111,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
4111,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
diff --git a/db/re/job_db1.txt b/db/re/job_db1.txt
index 767621cac..ef035063a 100644
--- a/db/re/job_db1.txt
+++ b/db/re/job_db1.txt
@@ -219,9 +219,9 @@
4082, 28000,110 ,700 ,470 ,440 ,510 ,490 ,530 ,540 ,540 ,520 ,560 ,480 ,480 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
// Royal Guard (Gryphon) (Trans)
4083, 28000,110 ,700 ,470 ,440 ,510 ,490 ,530 ,540 ,540 ,520 ,560 ,480 ,480 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
-// Ranger (Waug) (Regular)
+// Ranger (Warg) (Regular)
4084, 27000,85 ,500 ,400 ,440 ,540 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
-// Ranger (Waug) (Trans)
+// Ranger (Warg) (Trans)
4085, 27000,85 ,500 ,400 ,440 ,540 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
// Mechanic (Mado) (Regular)
4086, 30000,90 ,500 ,400 ,440 ,640 ,690 ,2000 ,2000 ,2000 ,490 ,520 ,520 ,520 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
@@ -257,7 +257,7 @@
4109, 28000,150 ,500 ,300 ,440 ,540 ,560 ,590 ,620 ,560 ,620 ,640 ,490 ,490 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
// Baby Royal Guard (Gryphon)
4110, 28000,110 ,700 ,470 ,440 ,510 ,490 ,530 ,540 ,540 ,520 ,560 ,480 ,480 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,490
-// Baby Ranger (Waug)
+// Baby Ranger (Warg)
4111, 27000,85 ,500 ,400 ,440 ,540 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,530 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,520
// Baby Mechanic (Mado)
4112, 30000,90 ,500 ,400 ,440 ,640 ,690 ,2000 ,2000 ,2000 ,490 ,520 ,520 ,520 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,2000 ,500
diff --git a/db/re/skill_tree.txt b/db/re/skill_tree.txt
index 0353c263e..b8b1cb86b 100644
--- a/db/re/skill_tree.txt
+++ b/db/re/skill_tree.txt
@@ -4151,7 +4151,7 @@
4083,2323,5,2311,3,0,0,0,0,0,0,0,0 //LG_EARTHDRIVE#Earth Drive#
4083,2324,5,2318,3,2319,3,0,0,0,0,0,0 //LG_HESPERUSLIT#Hesperus Lit#
4083,2325,5,2315,3,2321,4,2322,5,0,0,0,0 //LG_INSPIRATION#Inspiration#
-//Ranger (Waug) (Regular)
+//Ranger (Warg) (Regular)
4084,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
4084,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
4084,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
@@ -4204,7 +4204,7 @@
4084,2252,1,2248,1,0,0,0,0,0,0,0,0 //RA_VERDURETRAP#Verdure Trap#
4084,2253,5,2237,1,0,0,0,0,0,0,0,0 //RA_FIRINGTRAP#Firing Trap#
4084,2254,5,2237,1,0,0,0,0,0,0,0,0 //RA_ICEBOUNDTRAP#Icebound Trap#
-//Ranger (Waug) (Trans)
+//Ranger (Warg) (Trans)
4085,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
4085,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
4085,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
@@ -5232,7 +5232,7 @@
4110,2323,5,2311,3,0,0,0,0,0,0,0,0 //LG_EARTHDRIVE#Earth Drive#
4110,2324,5,2318,3,2319,3,0,0,0,0,0,0 //LG_HESPERUSLIT#Hesperus Lit#
4110,2325,5,2315,3,2321,4,2322,5,0,0,0,0 //LG_INSPIRATION#Inspiration#
-//Baby Ranger (Waug)
+//Baby Ranger (Warg)
4111,1,9,0,0,0,0,0,0,0,0,0,0 //NV_BASIC#Basic Skill#
4111,142,1,0,0,0,0,0,0,0,0,0,0 //NV_FIRSTAID#First Aid#
4111,43,10,0,0,0,0,0,0,0,0,0,0 //AC_OWL#Owl's Eye#
diff --git a/doc/ea_job_system.txt b/doc/ea_job_system.txt
index e25f10689..034b4a617 100644
--- a/doc/ea_job_system.txt
+++ b/doc/ea_job_system.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Skotlex
//===== Current Version: =====================================
-//= 20120610
+//= 2013-02-10
//===== Description: =========================================
//= A reference description of eA's inner job system (for use
//= in scripts through the eaclass and roclass script commands).
@@ -19,7 +19,7 @@ Preface:
The eA Job System:
-------------------------------------------------------------------------------
- Since the code also required to do this kind of checks for various skills (The Soul Linker Spirit buffs specially come to mind), an alternate job ID system was developed, which attempts to make more sense and make it easier to check where a particular job stands in relation to the rest.
+ Since the code also required to do this kind of checks for various skills (the Soul Linker Spirit buffs specifically come to mind), an alternate job ID system was developed, which attempts to make more sense and make it easier to check where a particular job stands in relation to the rest.
The scheme consists in that every job can be broken down by 3 criteria:
@@ -84,53 +84,57 @@ If we had used addition, we would have gotten a completely different result.
The EAJL (eA Job Level) constants
-------------------------------------------------------------------------------
- There are a few constants which can be used to filter out and make job comparisons easier.
+ There are a few constants which can be used to filter out and make job comparisons easier. The comparisons involve eA job IDs, not classic job IDs, using the eaclass() command explained in the next section.
+
+ set @eac, eaclass();
EAJL_2_1:
Checks if the class is a 2-1 class:
- if (@job&EAJL_2_1)
+ if (@eac&EAJL_2_1)
mes "Using the classic 2-1 job, huh?";
EAJL_2_2:
- Checks if the class is 2-2.
+ Checks if the class is a 2-2 class:
+ if (@eac&EAJL_2_2)
+ mes "Oh, a 2-2 job!";
EAJL_2:
Checks if the class is a 2nd Class. If the check fails, you can be sure the character is a first class.
- if (!(@job&EAJL_2))
+ if (!(@eac&EAJL_2))
mes "Will you wait until Job 50 to change?";
EAJL_UPPER:
Check if a class is Rebirth/Advanced:
- if(@job&EAJL_UPPER)
+ if(@eac&EAJL_UPPER)
mes "It must have taken you a LONG time...";
EAJL_BABY:
Check if a class is an adopted class.
- if (@job&EAJL_BABY)
+ if (@eac&EAJL_BABY)
mes "Don't you hate being weak?";
EAJL_THIRD:
Checks if a class is a third job.
- if(@job&EAJL_THIRD)
+ if(@eac&EAJL_THIRD)
mes "Wow, you've really grown!";
EAJ_UPPERMASK:
The upper mask can be used to "strip" the upper/baby characteristics of a class, used when you want to know if someone is a certain class regardless of rebirth/adopted status. For example, the following code would go through for Monks, Champions and Baby Monks:
- if ((@job&EAJ_UPPERMASK) == EAJ_MONK)
+ if ((@eac&EAJ_UPPERMASK) == EAJ_MONK)
mes "Aren't knuckles such a cool weapon?";
Note that if instead of EAJ_MONK you used EAJ_CHAMPION or EAJ_BABY_MONK, the check would had never passed, since the upper/baby state has been removed from the original job when checking.
EAJ_BASEMASK:
This mask strips also the 2nd class attributes. It can be used to check against the basic job of a character. For example, the following code would go through for Merchants (+Baby Merchant and High Merchant), Blacksmiths (+Baby blacksmiths and Whitesmith) and Alchemist (+Baby Alchemist and +Creator):
- if ((@job&EAJ_BASEMASK) == EAJ_MERCHANT)
+ if ((@eac&EAJ_BASEMASK) == EAJ_MERCHANT)
mes "Why I can't have discount like you guys do?";
Note that, like before, if you try to check versus any of the other classes (High merchant, blacksmith, etc) instead of basic merchant, the check will always fail for the same reasons previously explained.
EAJ_THIRDMASK:
This mask strips 3rd class attributes. It will give the "normal" class of a third job, regardless of rebirth/adopted status. When used on non-third class characters, it will return the second job, or, if that also doesn't exist, the first.
- if ((@job&EAJ_THIRDMASK) == EAJ_WARLOCK_T)
+ if ((@eac&EAJ_THIRDMASK) == EAJ_WARLOCK_T)
mes "You've gone through rebirth, I see.";
The script commands eaclass, roclass:
@@ -189,5 +193,5 @@ About Novices and Super Novices:
So as you can see, on this job system, the Super Novice is treated as the 2-1 job of a Novice, and the Novice job it's at the same level of the other 1st jobs. Even though that may seem like a hindrance, it makes it very easy to add a check to discard Novice types from a quest:
- if ((@job&EAJ_BASEMASK) == EAJ_NOVICE)
+ if ((eaclass()&EAJ_BASEMASK) == EAJ_NOVICE)
//Novice class detected.
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 3c93490bb..cd08e618c 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3545,7 +3545,7 @@ warg and 0 if they don't.
---------------------------------------
-*checkvending({"<player name>"})
+*checkvending({"<Player Name>"})
*checkchatting({"<Player Name>"})
Checks if the player is vending or in a chatroom.
@@ -3570,6 +3570,13 @@ Examples:
---------------------------------------
+*checkidle({"<Player Name>"})
+
+ Returns the time, in seconds, that the specified player has been idle.
+ Name is optional, and defaults to the attached player if omitted.
+
+---------------------------------------
+
*agitcheck()
*agitcheck2()
diff --git a/npc/custom/events/cluckers.txt b/npc/custom/events/cluckers.txt
index bc9899488..cf296cb18 100644
--- a/npc/custom/events/cluckers.txt
+++ b/npc/custom/events/cluckers.txt
@@ -1,11 +1,9 @@
-//===== rAthena Script =======================================
+//===== Hercules Script =======================================
//= Cluck! Cluck! Boom!
//===== By: ==================================================
//= Keale
//===== Current Version: =====================================
//= 1.2a
-//===== Compatible With: =====================================
-//= rAthena SVN
//===== Description: =========================================
//= Click the chicken and try retrieve the item at a low
//= chance. If you fail he will nuke, freeze, stone,
@@ -108,8 +106,9 @@ OnTimer30000:
end;
OnTimer40000:
announce "GO! Click the chicken to get the prize!",bc_blue;
+ stopnpctimer;
if (!$cluck_item_id) set $cluck_item_id,512;
if (!$cluck_item_amount) set $cluck_item_amount,1;
set .startcluck,1;
end;
-}
+} \ No newline at end of file
diff --git a/src/map/script.c b/src/map/script.c
index a6d588113..b89121ee4 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14968,6 +14968,23 @@ BUILDIN_FUNC(checkchatting) // check chatting [Marka]
return 0;
}
+BUILDIN_FUNC(checkidle)
+{
+ TBL_PC *sd = NULL;
+
+ if (script_hasdata(st, 2))
+ sd = map_nick2sd(script_getstr(st, 2));
+ else
+ sd = script_rid2sd(st);
+
+ if (sd)
+ script_pushint(st, DIFF_TICK(last_tick, sd->idletime));
+ else
+ script_pushint(st, 0);
+
+ return 0;
+}
+
BUILDIN_FUNC(searchitem)
{
struct script_data* data = script_getdata(st, 2);
@@ -17689,6 +17706,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(roclass,"i?"), //[Skotlex]
BUILDIN_DEF(checkvending,"?"),
BUILDIN_DEF(checkchatting,"?"),
+ BUILDIN_DEF(checkidle,"?"),
BUILDIN_DEF(openmail,""),
BUILDIN_DEF(openauction,""),
BUILDIN_DEF(checkcell,"siii"),