summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStreusel <advance_me@hotmail.de>2013-02-10 19:47:34 -0800
committerStreusel <advance_me@hotmail.de>2013-02-10 19:47:34 -0800
commitaac4234c5cbc791cf4b127bd5d64db97bd384430 (patch)
tree6d026a70514d13ae95bb6dcd7205716a3dfb15c9
parent4495b78c59df97b516695fdccffad91deb98ad3b (diff)
parent56a20bb18d6fde61bb82cf160a131eb54d464148 (diff)
downloadhercules-aac4234c5cbc791cf4b127bd5d64db97bd384430.tar.gz
hercules-aac4234c5cbc791cf4b127bd5d64db97bd384430.tar.bz2
hercules-aac4234c5cbc791cf4b127bd5d64db97bd384430.tar.xz
hercules-aac4234c5cbc791cf4b127bd5d64db97bd384430.zip
Merge github.com:Mysteries/Hercules
-rw-r--r--conf/battle/skill.conf8
-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
-rw-r--r--src/map/skill.c4
-rw-r--r--src/map/status.c2
-rw-r--r--src/map/unit.c6
13 files changed, 71 insertions, 43 deletions
diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf
index 0dd97610e..622ce7877 100644
--- a/conf/battle/skill.conf
+++ b/conf/battle/skill.conf
@@ -276,7 +276,7 @@ invincible.nodamage: no
// Default: yes
dancing_weaponswitch_fix: yes
-// Skill Trap Type
-// 0: (official) traps only makes player unable to move after its walk path is complete, and it activates other traps on the way.
-// 1: trap makes player stop moving right when stepping over it.
-skill_trap_type: 0
+// Skill Trap Type (GvG)
+// 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 41379cd26..085e29625 100644
--- a/db/re/job_db1.txt
+++ b/db/re/job_db1.txt
@@ -219,9 +219,9 @@
4082, 35000,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, 35000,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, 38000,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, 20000,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, 20000,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, 20000,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, 20000,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"),
diff --git a/src/map/skill.c b/src/map/skill.c
index 4b9484609..ba720da42 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11459,7 +11459,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
const struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
if( td )
sec = DIFF_TICK(td->tick, tick);
- if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type ) {
+ if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type || !map_flag_gvg(src->bl.m) ) {
unit_movepos(bl, src->bl.x, src->bl.y, 0, 0);
clif_fixpos(bl);
}
@@ -13072,7 +13072,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
break;
case ST_RIDING:
- if(!pc_isriding(sd) || !pc_isridingdragon(sd)) {
+ if(!pc_isriding(sd) && !pc_isridingdragon(sd)) {
clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 0;
}
diff --git a/src/map/status.c b/src/map/status.c
index 0ee993de4..97b7c61a1 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8663,7 +8663,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
unit_stop_walking(bl,1);
break;
case SC_ANKLE:
- if( battle_config.skill_trap_type )
+ if( battle_config.skill_trap_type || !map_flag_gvg(bl->m) )
unit_stop_walking(bl,1);
break;
case SC_HIDING:
diff --git a/src/map/unit.c b/src/map/unit.c
index 1d37704e0..60de14093 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -353,7 +353,7 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
map_random_dir(bl, &ud->to_x, &ud->to_y);
if(ud->walktimer != INVALID_TIMER) {
- if( !battle_config.skill_trap_type && sc && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
+ if( !battle_config.skill_trap_type && sc && map_flag_gvg(bl->m) && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
return 0;
// When you come to the center of the grid because the change of destination while you're walking right now
// Call a function from a timer unit_walktoxy_sub
@@ -430,7 +430,7 @@ int unit_walktobl(struct block_list *bl, struct block_list *tbl, int range, int
map_random_dir(bl, &ud->to_x, &ud->to_y);
if(ud->walktimer != INVALID_TIMER) {
- if( !battle_config.skill_trap_type && sc && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
+ if( !battle_config.skill_trap_type && sc && map_flag_gvg(bl->m) && sc->data[SC_ANKLE] ) // Ankle disallows you from changing your path
return 0;
ud->state.change_walk_target = 1;
set_mobstate(bl, flag&2);
@@ -938,7 +938,7 @@ int unit_can_move(struct block_list *bl) {
)
return 0;
- if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || !unit_is_walking(bl) ) ) // Ankle only stops you after you're done moving
+ if( sc->data[SC_ANKLE] && ( battle_config.skill_trap_type || ( !map_flag_gvg(bl->m) && !unit_is_walking(bl) ) ) ) // Ankle only stops you after you're done moving
return 0;
if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && !(sc->opt1 == OPT1_CRYSTALIZE && bl->type == BL_MOB))