summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-02-10 01:34:04 +0100
committerGitHub <noreply@github.com>2020-02-10 01:34:04 +0100
commitd762e0255b63def0a20db15d386c332d5fb93dd1 (patch)
tree3be31ba3a73295bd3d655d27643a248e9abe60a6
parente164b55dbb908c0006f0ca4e2e74e9995f318d57 (diff)
parentcaae14cae60f27594a2dbf4c41076330be1afd5e (diff)
downloadhercules-d762e0255b63def0a20db15d386c332d5fb93dd1.tar.gz
hercules-d762e0255b63def0a20db15d386c332d5fb93dd1.tar.bz2
hercules-d762e0255b63def0a20db15d386c332d5fb93dd1.tar.xz
hercules-d762e0255b63def0a20db15d386c332d5fb93dd1.zip
Merge pull request #2616 from Kenpachi2k13/issue#819
Modified itemskill() script command to be usable like AEGIS' SkillToMe command.
-rw-r--r--db/pre-re/item_db.conf307
-rw-r--r--db/re/item_db.conf314
-rw-r--r--doc/script_commands.txt25
-rw-r--r--src/common/HPMDataCheck.h1
-rw-r--r--src/map/clif.c34
-rw-r--r--src/map/itemdb.h2
-rw-r--r--src/map/packets_struct.h12
-rw-r--r--src/map/pc.c35
-rw-r--r--src/map/pc.h14
-rw-r--r--src/map/script.c58
-rw-r--r--src/map/script.h10
-rw-r--r--src/map/skill.c76
-rw-r--r--src/map/skill.h1
-rw-r--r--src/map/unit.c46
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc54
18 files changed, 589 insertions, 414 deletions
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf
index 38833636d..3e760b62a 100644
--- a/db/pre-re/item_db.conf
+++ b/db/pre-re/item_db.conf
@@ -1159,7 +1159,7 @@ item_db: (
Id: 601
AegisName: "Wing_Of_Fly"
Name: "Fly Wing"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 60
Weight: 50
BuyingStore: true
@@ -1169,7 +1169,7 @@ item_db: (
Id: 602
AegisName: "Wing_Of_Butterfly"
Name: "Butterfly Wing"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 300
Weight: 50
BuyingStore: true
@@ -1199,7 +1199,7 @@ item_db: (
Id: 605
AegisName: "Anodyne"
Name: "Anodyne"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 100
BuyingStore: true
@@ -1212,7 +1212,7 @@ item_db: (
Id: 606
AegisName: "Aloebera"
Name: "Aloevera"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1500
Weight: 100
BuyingStore: true
@@ -1254,7 +1254,7 @@ item_db: (
Id: 610
AegisName: "Leaf_Of_Yggdrasil"
Name: "Yggdrasil Leaf"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 4000
Weight: 100
BuyingStore: true
@@ -1264,7 +1264,7 @@ item_db: (
Id: 611
AegisName: "Spectacles"
Name: "Magnifier"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 40
Weight: 50
BuyingStore: true
@@ -2040,7 +2040,7 @@ item_db: (
Id: 686
AegisName: "Earth_Scroll_1_3"
Name: "Level 3 Earth Spike"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2053,7 +2053,7 @@ item_db: (
Id: 687
AegisName: "Earth_Scroll_1_5"
Name: "Level 5 Earth Spike"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2066,7 +2066,7 @@ item_db: (
Id: 688
AegisName: "Cold_Scroll_1_3"
Name: "Level 3 Cold Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2079,7 +2079,7 @@ item_db: (
Id: 689
AegisName: "Cold_Scroll_1_5"
Name: "Level 5 Cold Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2092,7 +2092,7 @@ item_db: (
Id: 690
AegisName: "Fire_Scroll_1_3"
Name: "Level 3 Fire Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2105,7 +2105,7 @@ item_db: (
Id: 691
AegisName: "Fire_Scroll_1_5"
Name: "Level 5 Fire Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2118,7 +2118,7 @@ item_db: (
Id: 692
AegisName: "Wind_Scroll_1_3"
Name: "Level 3 Lightening Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2131,7 +2131,7 @@ item_db: (
Id: 693
AegisName: "Wind_Scroll_1_5"
Name: "Level 5 Lightening Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2144,7 +2144,7 @@ item_db: (
Id: 694
AegisName: "Ghost_Scroll_1_3"
Name: "Level 3 Soul Strike"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2157,7 +2157,7 @@ item_db: (
Id: 695
AegisName: "Ghost_Scroll_1_5"
Name: "Level 5 Soul Strike"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2170,7 +2170,7 @@ item_db: (
Id: 696
AegisName: "Fire_Scroll_2_1"
Name: "Level 1 Fire Ball"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2183,7 +2183,7 @@ item_db: (
Id: 697
AegisName: "Fire_Scroll_2_5"
Name: "Level 5 Fire Ball"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2196,7 +2196,7 @@ item_db: (
Id: 698
AegisName: "Fire_Scroll_3_1"
Name: "Level 1 Fire Wall"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2209,7 +2209,7 @@ item_db: (
Id: 699
AegisName: "Fire_Scroll_3_5"
Name: "Level 5 Fire Wall"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2222,7 +2222,7 @@ item_db: (
Id: 700
AegisName: "Cold_Scroll_2_1"
Name: "Level 1 Frost Diver"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -65857,7 +65857,7 @@ item_db: (
Id: 12000
AegisName: "Cold_Scroll_2_5"
Name: "Level 5 Frost Diver"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -65870,7 +65870,7 @@ item_db: (
Id: 12001
AegisName: "Holy_Scroll_1_3"
Name: "Level 3 Heal"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -65883,7 +65883,7 @@ item_db: (
Id: 12002
AegisName: "Holy_Scroll_1_5"
Name: "Level 5 Heal"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -65896,7 +65896,7 @@ item_db: (
Id: 12003
AegisName: "Holy_Scroll_2_1"
Name: "Level 1 Teleport"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -66056,7 +66056,7 @@ item_db: (
Id: 12019
AegisName: "Holy_Egg"
Name: "Holy Egg"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 150
Script: <" itemskill ALL_RESURRECTION,2; ">
@@ -66065,7 +66065,7 @@ item_db: (
Id: 12020
AegisName: "Water_Of_Darkness"
Name: "Cursed Water"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 30
BuyingStore: true
@@ -66156,7 +66156,7 @@ item_db: (
Id: 12029
AegisName: "Gloomy_Box"
Name: "Box of Gloom"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 200
BuyingStore: true
@@ -66195,7 +66195,7 @@ item_db: (
Id: 12032
AegisName: "Box_Of_Storm"
Name: "Box of Storms"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 200
BuyingStore: true
@@ -67217,7 +67217,7 @@ item_db: (
Id: 12114
AegisName: "Elemental_Fire"
Name: "Elemental Converter"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
BuyingStore: true
@@ -67227,7 +67227,7 @@ item_db: (
Id: 12115
AegisName: "Elemental_Water"
Name: "Elemental Converter"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
BuyingStore: true
@@ -67237,7 +67237,7 @@ item_db: (
Id: 12116
AegisName: "Elemental_Earth"
Name: "Elemental Converter"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
BuyingStore: true
@@ -67247,7 +67247,7 @@ item_db: (
Id: 12117
AegisName: "Elemental_Wind"
Name: "Elemental Converter"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
BuyingStore: true
@@ -68322,7 +68322,7 @@ item_db: (
Id: 12200
AegisName: "Event_Cake"
Name: "X-mas Cake"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 50
Script: <" itemskill PR_MAGNIFICAT,3; ">
@@ -68609,10 +68609,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,240000,10;
- ">
+ Script: <" itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12216
@@ -68633,14 +68630,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- if(Hp>15) {
- skilleffect AL_INCAGI,0;
- sc_start SC_INC_AGI,240000,10;
- heal -15,0;
- }
-
- ">
+ Script: <" itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12217
@@ -68661,14 +68651,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- if(countitem(523)>0) {
- skilleffect PR_ASPERSIO,0;
- sc_start SC_ASPERSIO,180000,5;
- delitem 523,1;
- }
-
- ">
+ Script: <" itemskill(PR_ASPERSIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12218
@@ -68689,10 +68672,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- sc_start SC_ASSUMPTIO,100000,5;
- skilleffect HP_ASSUMPTIO,0;
- ">
+ Script: <" itemskill(HP_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12219
@@ -68713,10 +68693,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- skilleffect SN_WINDWALK,0;
- sc_start SC_WINDWALK,250000,5;
- ">
+ Script: <" itemskill(SN_WINDWALK, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12220
@@ -68737,14 +68714,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- .@type = getiteminfo(getequipid(EQI_HAND_R),11);
- if (.@type==6||.@type==7||.@type==8) {
- skilleffect BS_ADRENALINE,0;
- sc_start SC_ADRENALINE,150000,5;
- }
-
- ">
+ Script: <" itemskill(BS_ADRENALINE, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12221
@@ -68919,16 +68889,15 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 0,5;
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,240000,10;
+ percentheal(0, 5);
+ itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
Id: 12236
AegisName: "Choco_Tart"
Name: "Chocolate Tart"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 100
Nouse: {
@@ -69701,9 +69670,8 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 5,0;
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,120000,5;
+ percentheal(5, 0);
+ itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -69718,9 +69686,8 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 5,0;
- skilleffect AL_INCAGI,0;
- sc_start SC_INC_AGI,120000,5;
+ percentheal(0, 5);
+ itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -70073,7 +70040,7 @@ item_db: (
Id: 12311
AegisName: "Large_Spray_Of_Flowers"
Name: "Huge Spray Of Flowers"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 100
Trade: {
nodrop: true
@@ -70192,7 +70159,7 @@ item_db: (
Id: 12323
AegisName: "N_Fly_Wing"
Name: "Novice Fly Wing"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Trade: {
nodrop: true
notrade: true
@@ -70212,7 +70179,7 @@ item_db: (
Id: 12324
AegisName: "N_Butterfly_Wing"
Name: "Novice Butterfly Wing"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Trade: {
nodrop: true
notrade: true
@@ -70232,7 +70199,7 @@ item_db: (
Id: 12325
AegisName: "N_Magnifier"
Name: "Novice Magnifier"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Trade: {
nodrop: true
notrade: true
@@ -70599,7 +70566,7 @@ item_db: (
Id: 12350
AegisName: "Angeling_Potion"
Name: "Angeling Potion"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 100
BuyingStore: true
@@ -70614,16 +70581,15 @@ item_db: (
sitting: true
}
Script: <"
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,120000,5;
- itemskill AL_ANGELUS,5;
+ itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
+ itemskill(AL_ANGELUS, 5);
">
},
{
Id: 12351
AegisName: "Shout_Megaphone"
Name: "Scream Megaphone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 50
BuyingStore: true
@@ -70968,8 +70934,8 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 3, 0;
- itemskill PR_GLORIA, 2;
+ percentheal(3, 0);
+ itemskill(PR_GLORIA, 2, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -70984,8 +70950,8 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 0, 3;
- itemskill PR_MAGNIFICAT, 1;
+ percentheal(0, 3);
+ itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -71057,7 +71023,7 @@ item_db: (
Id: 12384
AegisName: "Rainbow_Ruby_Water"
Name: "Rainbow Ruby"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 50
Trade: {
nodrop: true
@@ -71078,7 +71044,7 @@ item_db: (
Id: 12385
AegisName: "Rainbow_Ruby_Fire"
Name: "Rainbow Ruby"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 50
Trade: {
nodrop: true
@@ -71099,7 +71065,7 @@ item_db: (
Id: 12386
AegisName: "Rainbow_Ruby_Wind"
Name: "Rainbow Ruby"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 50
Trade: {
nodrop: true
@@ -71120,7 +71086,7 @@ item_db: (
Id: 12387
AegisName: "Rainbow_Ruby_Earth"
Name: "Rainbow Ruby"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 50
Trade: {
nodrop: true
@@ -71141,7 +71107,7 @@ item_db: (
Id: 12388
AegisName: "Runstone_Crush"
Name: "Rhydo Runestone For Apprentice"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -71166,7 +71132,7 @@ item_db: (
Id: 12389
AegisName: "Runstone_Storm"
Name: "Pertz Runestone For Apprentice"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -71182,16 +71148,15 @@ item_db: (
sitting: true
}
Script: <"
- //if(strcharinfo(PC_MAP)=="job3_rune02") {
- // itemskill RK_STORMBLAST,1;
- //}
+ //if (strcharinfo(PC_MAP) == "job3_rune02")
+ // itemskill(RK_STORMBLAST, 1, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
Id: 12390
AegisName: "Runstone_Millennium"
Name: "Verkana Runestone For Apprentice"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -71207,9 +71172,8 @@ item_db: (
sitting: true
}
Script: <"
- //if(strcharinfo(PC_MAP)=="job3_rune02") {
- // itemskill RK_MILLENNIUMSHIELD,1;
- //}
+ //if (strcharinfo(PC_MAP) == "job3_rune02")
+ // itemskill(RK_MILLENNIUMSHIELD, 1, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -71285,7 +71249,7 @@ item_db: (
Id: 12396
AegisName: "Fools_Day_Box"
Name: "Gift Box?"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 10
Trade: {
@@ -71314,7 +71278,7 @@ item_db: (
Id: 12397
AegisName: "Fools_Day_Box2"
Name: "Gift Box?"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 10
Trade: {
@@ -71326,17 +71290,27 @@ item_db: (
sitting: true
}
Script: <"
- .@temp = rand(1,10);
- if (.@temp == 1) itemskill TF_DETOXIFY,1;
- else if (.@temp == 2) itemskill TF_PICKSTONE,1;
- else if (.@temp == 3) itemskill BA_FROSTJOKER,1;
- else if (.@temp == 4) itemskill DC_SCREAM,1;
- else if (.@temp == 5) percentheal 50,50;
- else if (.@temp == 6) getitem Jellopy,1;
- else if (.@temp == 7) itemskill AL_RUWACH,1;
- else if (.@temp == 8) specialeffect(EF_BEGINASURA, AREA, playerattached());
- else if (.@temp == 9) specialeffect(EF_MVP, AREA, playerattached());
- else specialeffect(EF_CURSEATTACK, AREA, playerattached());
+ .@temp = rand(1, 10);
+ if (.@temp == 1)
+ itemskill(TF_DETOXIFY, 1, ISF_INSTANTCAST | ISF_CASTONSELF);
+ else if (.@temp == 2)
+ itemskill(TF_PICKSTONE, 1);
+ else if (.@temp == 3)
+ itemskill(BA_FROSTJOKER, 1);
+ else if (.@temp == 4)
+ itemskill(DC_SCREAM, 1);
+ else if (.@temp == 5)
+ announce(strcharinfo(PC_NAME) + " shouts : I am a fool!!!", bc_all, C_WHITE);
+ else if (.@temp == 6)
+ getitem(Jellopy, 1);
+ else if (.@temp == 7)
+ itemskill(AL_RUWACH, 1);
+ else if (.@temp == 8)
+ specialeffect(EF_BEGINASURA, AREA, playerattached());
+ else if (.@temp == 9)
+ specialeffect(EF_MVP, AREA, playerattached());
+ else
+ specialeffect(EF_CURSEATTACK, AREA, playerattached());
">
},
{
@@ -71437,9 +71411,8 @@ item_db: (
noauction: true
}
Script: <"
- percentheal 30,30;
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,140000,5;
+ percentheal(30, 30);
+ itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -71533,9 +71506,8 @@ item_db: (
Weight: 10
BuyingStore: true
Script: <"
- sc_start SC_ATTHASTE_POTION1, 1800000, 0;
- sc_start SC_INC_AGI, 140000, 5;
- skilleffect AL_INCAGI, 0;
+ sc_start(SC_ATTHASTE_POTION1, 1800000, 0);
+ itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -73225,34 +73197,34 @@ item_db: (
Id: 12706
AegisName: "Lucky_Cookie01"
Name: "Lucky Cookie"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 100
Nouse: {
sitting: true
}
- Script: <" itemskill PR_GLORIA,5; ">
+ Script: <" itemskill(PR_GLORIA, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12707
AegisName: "Lucky_Cookie02"
Name: "Lucky Cookie"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 100
Nouse: {
sitting: true
}
- Script: <" itemskill PR_MAGNIFICAT,1; ">
+ Script: <" itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12708
AegisName: "Lucky_Cookie03"
Name: "Lucky Cookie"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 100
Nouse: {
sitting: true
}
- Script: <" itemskill PR_IMPOSITIO,3; ">
+ Script: <" itemskill(PR_IMPOSITIO, 3, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12709
@@ -73481,7 +73453,7 @@ item_db: (
Id: 12725
AegisName: "Runstone_Nosiege"
Name: "Nauthiz Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -73508,7 +73480,7 @@ item_db: (
Id: 12726
AegisName: "Runstone_Rhydo"
Name: "Raido Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -73535,7 +73507,7 @@ item_db: (
Id: 12727
AegisName: "Runstone_Verkana"
Name: "Berkana Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -73562,7 +73534,7 @@ item_db: (
Id: 12728
AegisName: "Runstone_Isia"
Name: "Isa Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -73588,7 +73560,7 @@ item_db: (
Id: 12729
AegisName: "Runstone_Asir"
Name: "Othila Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -73614,7 +73586,7 @@ item_db: (
Id: 12730
AegisName: "Runstone_Urj"
Name: "Uruz Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -73640,7 +73612,7 @@ item_db: (
Id: 12731
AegisName: "Runstone_Turisus"
Name: "Thurisaz Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -73666,7 +73638,7 @@ item_db: (
Id: 12732
AegisName: "Runstone_Pertz"
Name: "Wyrd Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -73693,7 +73665,7 @@ item_db: (
Id: 12733
AegisName: "Runstone_Hagalas"
Name: "Hagalaz Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 100
Weight: 100
Job: {
@@ -74680,7 +74652,7 @@ item_db: (
Id: 12928
AegisName: "J_Aspersio_5_Scroll"
Name: "Sacred Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
Trade: {
@@ -75337,7 +75309,7 @@ item_db: (
Id: 12968
AegisName: "Emergency_Scroll1"
Name: "Emergency Level 1 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
Script: <" itemskill GD_EMERGENCYCALL,1; ">
@@ -75346,7 +75318,7 @@ item_db: (
Id: 12969
AegisName: "Emergency_Scroll2"
Name: "Emergency Level 2 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
Script: <" itemskill GD_EMERGENCYCALL,1; ">
@@ -75355,7 +75327,7 @@ item_db: (
Id: 12970
AegisName: "Emergency_Scroll3"
Name: "Emergency Level 3 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
Script: <" itemskill GD_EMERGENCYCALL,1; ">
@@ -92154,7 +92126,7 @@ item_db: (
Id: 14512
AegisName: "Meteor_10_Scroll"
Name: "Meteor Storm Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill WZ_METEOR,10; ">
},
@@ -92162,7 +92134,7 @@ item_db: (
Id: 14513
AegisName: "Storm_10_Scroll"
Name: "Storm Gust Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill WZ_STORMGUST,10; ">
},
@@ -92170,7 +92142,7 @@ item_db: (
Id: 14514
AegisName: "Vermilion_10_Scroll"
Name: "Lord of Vermilion Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill WZ_VERMILION,10; ">
},
@@ -92178,7 +92150,7 @@ item_db: (
Id: 14515
AegisName: "Lex_Aeterna_Scroll"
Name: "Lex Aeterna Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill PR_LEXAETERNA,1; ">
},
@@ -92186,7 +92158,7 @@ item_db: (
Id: 14516
AegisName: "Magnificat_5_Scroll"
Name: "Magnificat Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill PR_MAGNIFICAT,5; ">
},
@@ -92196,7 +92168,7 @@ item_db: (
Name: "Chemical Protection Helm Scroll"
Type: "IT_USABLE"
Weight: 10
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5; ">
+ Script: <" itemskill(AM_CP_HELM, 5); ">
},
{
Id: 14518
@@ -92204,7 +92176,7 @@ item_db: (
Name: "Chemical Protection Shield Scrol"
Type: "IT_USABLE"
Weight: 10
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5; ">
+ Script: <" itemskill(AM_CP_SHIELD, 5); ">
},
{
Id: 14519
@@ -92212,7 +92184,7 @@ item_db: (
Name: "Chemical Protection Armor Scroll"
Type: "IT_USABLE"
Weight: 10
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5; ">
+ Script: <" itemskill(AM_CP_ARMOR, 5); ">
},
{
Id: 14520
@@ -92220,7 +92192,7 @@ item_db: (
Name: "Chemical Protection Weapon Scroll"
Type: "IT_USABLE"
Weight: 10
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5; ">
+ Script: <" itemskill(AM_CP_WEAPON, 5); ">
},
{
Id: 14521
@@ -92240,7 +92212,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1; ">
+ Script: <" itemskill(BS_REPAIRWEAPON, 1); ">
},
{
Id: 14522
@@ -92310,12 +92282,12 @@ item_db: (
Id: 14529
AegisName: "Greed_Scroll"
Name: "Greed Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Nouse: {
sitting: true
}
- Script: <" itemskill BS_GREED,1; ">
+ Script: <" itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14530
@@ -93088,7 +93060,7 @@ item_db: (
Id: 14587
AegisName: "Repair_Scroll_"
Name: "Equipment Repair Spell Book"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -93108,7 +93080,7 @@ item_db: (
Id: 14588
AegisName: "Pty_Blessing_Scroll"
Name: "Party Blessing 10 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 10
Weight: 10
Trade: {
@@ -93117,13 +93089,13 @@ item_db: (
noselltonpc: true
nogstorage: true
}
- Script: <" itemskill CASH_BLESSING,10; ">
+ Script: <" itemskill(CASH_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14589
AegisName: "Pty_Inc_Agi_Scroll"
Name: "Party Increase Agi 10 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 10
Weight: 10
Trade: {
@@ -93132,13 +93104,13 @@ item_db: (
noselltonpc: true
nogstorage: true
}
- Script: <" itemskill CASH_INCAGI,10; ">
+ Script: <" itemskill(CASH_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14590
AegisName: "Pty_Assumptio_Scroll"
Name: "Party Assumptio 5 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 10
Weight: 10
Trade: {
@@ -93147,7 +93119,7 @@ item_db: (
noselltonpc: true
nogstorage: true
}
- Script: <" itemskill CASH_ASSUMPTIO,5; ">
+ Script: <" itemskill(CASH_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14591
@@ -93193,7 +93165,7 @@ item_db: (
Id: 14593
AegisName: "Magic_Power_Scroll"
Name: "Mystical Amplification Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -93207,13 +93179,13 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <" itemskill HW_MAGICPOWER,10; ">
+ Script: <" itemskill(HW_MAGICPOWER, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14594
AegisName: "Quagmire_Scroll"
Name: "Quagmire Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -93306,6 +93278,7 @@ item_db: (
Nouse: {
sitting: true
}
+ Script: <" itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14600
@@ -95521,7 +95494,7 @@ item_db: (
Id: 22540
AegisName: "Runstone_Lux"
Name: "Lux Anima Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 4f5be9de5..86bfe9f90 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -1177,7 +1177,7 @@ item_db: (
Id: 601
AegisName: "Wing_Of_Fly"
Name: "Fly Wing"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 60
Weight: 50
BuyingStore: true
@@ -1187,7 +1187,7 @@ item_db: (
Id: 602
AegisName: "Wing_Of_Butterfly"
Name: "Butterfly Wing"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 300
Weight: 50
BuyingStore: true
@@ -1220,7 +1220,7 @@ item_db: (
Id: 605
AegisName: "Anodyne"
Name: "Anodyne"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 100
BuyingStore: true
@@ -1233,7 +1233,7 @@ item_db: (
Id: 606
AegisName: "Aloebera"
Name: "Aloevera"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1500
Weight: 100
BuyingStore: true
@@ -1277,7 +1277,7 @@ item_db: (
Id: 610
AegisName: "Leaf_Of_Yggdrasil"
Name: "Yggdrasil Leaf"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 4000
Weight: 100
BuyingStore: true
@@ -1287,7 +1287,7 @@ item_db: (
Id: 611
AegisName: "Spectacles"
Name: "Magnifier"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 40
Weight: 50
BuyingStore: true
@@ -2066,7 +2066,7 @@ item_db: (
Id: 686
AegisName: "Earth_Scroll_1_3"
Name: "Level 3 Earth Spike"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2079,7 +2079,7 @@ item_db: (
Id: 687
AegisName: "Earth_Scroll_1_5"
Name: "Level 5 Earth Spike"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2092,7 +2092,7 @@ item_db: (
Id: 688
AegisName: "Cold_Scroll_1_3"
Name: "Level 3 Cold Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2105,7 +2105,7 @@ item_db: (
Id: 689
AegisName: "Cold_Scroll_1_5"
Name: "Level 5 Cold Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2118,7 +2118,7 @@ item_db: (
Id: 690
AegisName: "Fire_Scroll_1_3"
Name: "Level 3 Fire Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2131,7 +2131,7 @@ item_db: (
Id: 691
AegisName: "Fire_Scroll_1_5"
Name: "Level 5 Fire Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2144,7 +2144,7 @@ item_db: (
Id: 692
AegisName: "Wind_Scroll_1_3"
Name: "Level 3 Lightening Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2157,7 +2157,7 @@ item_db: (
Id: 693
AegisName: "Wind_Scroll_1_5"
Name: "Level 5 Lightening Bolt"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2170,7 +2170,7 @@ item_db: (
Id: 694
AegisName: "Ghost_Scroll_1_3"
Name: "Level 3 Soul Strike"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2183,7 +2183,7 @@ item_db: (
Id: 695
AegisName: "Ghost_Scroll_1_5"
Name: "Level 5 Soul Strike"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2196,7 +2196,7 @@ item_db: (
Id: 696
AegisName: "Fire_Scroll_2_1"
Name: "Level 1 Fire Ball"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2209,7 +2209,7 @@ item_db: (
Id: 697
AegisName: "Fire_Scroll_2_5"
Name: "Level 5 Fire Ball"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2222,7 +2222,7 @@ item_db: (
Id: 698
AegisName: "Fire_Scroll_3_1"
Name: "Level 1 Fire Wall"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -2235,7 +2235,7 @@ item_db: (
Id: 699
AegisName: "Fire_Scroll_3_5"
Name: "Level 5 Fire Wall"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -2248,7 +2248,7 @@ item_db: (
Id: 700
AegisName: "Cold_Scroll_2_1"
Name: "Level 1 Frost Diver"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -85556,7 +85556,7 @@ item_db: (
Id: 12000
AegisName: "Cold_Scroll_2_5"
Name: "Level 5 Frost Diver"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -85569,7 +85569,7 @@ item_db: (
Id: 12001
AegisName: "Holy_Scroll_1_3"
Name: "Level 3 Heal"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -85582,7 +85582,7 @@ item_db: (
Id: 12002
AegisName: "Holy_Scroll_1_5"
Name: "Level 5 Heal"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2000
Weight: 10
BuyingStore: true
@@ -85595,7 +85595,7 @@ item_db: (
Id: 12003
AegisName: "Holy_Scroll_2_1"
Name: "Level 1 Teleport"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 10
BuyingStore: true
@@ -85755,7 +85755,7 @@ item_db: (
Id: 12019
AegisName: "Holy_Egg"
Name: "Holy Egg"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 150
Script: <" itemskill ALL_RESURRECTION,2; ">
@@ -85764,7 +85764,7 @@ item_db: (
Id: 12020
AegisName: "Water_Of_Darkness"
Name: "Cursed Water"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 30
BuyingStore: true
@@ -85855,7 +85855,7 @@ item_db: (
Id: 12029
AegisName: "Gloomy_Box"
Name: "Box of Gloom"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 200
BuyingStore: true
@@ -85894,7 +85894,7 @@ item_db: (
Id: 12032
AegisName: "Box_Of_Storm"
Name: "Box of Storms"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 1000
Weight: 200
BuyingStore: true
@@ -86856,7 +86856,7 @@ item_db: (
Id: 12114
AegisName: "Elemental_Fire"
Name: "Elemental Converter"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
BuyingStore: true
@@ -86866,7 +86866,7 @@ item_db: (
Id: 12115
AegisName: "Elemental_Water"
Name: "Elemental Converter"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
BuyingStore: true
@@ -86876,7 +86876,7 @@ item_db: (
Id: 12116
AegisName: "Elemental_Earth"
Name: "Elemental Converter"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
BuyingStore: true
@@ -86886,7 +86886,7 @@ item_db: (
Id: 12117
AegisName: "Elemental_Wind"
Name: "Elemental Converter"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
BuyingStore: true
@@ -87965,7 +87965,7 @@ item_db: (
Id: 12200
AegisName: "Event_Cake"
Name: "X-mas Cake"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 50
Script: <" itemskill PR_MAGNIFICAT,3; ">
@@ -88252,10 +88252,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,240000,10;
- ">
+ Script: <" itemskill(AL_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12216
@@ -88276,13 +88273,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- if(Hp>15) {
- skilleffect AL_INCAGI,0;
- sc_start SC_INC_AGI,240000,10;
- heal -15,0;
- }
- ">
+ Script: <" itemskill(AL_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12217
@@ -88303,13 +88294,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- if(countitem(523)>0) {
- skilleffect PR_ASPERSIO,0;
- sc_start SC_ASPERSIO,180000,5;
- delitem 523,1;
- }
- ">
+ Script: <" itemskill(PR_ASPERSIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12218
@@ -88330,10 +88315,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- sc_start SC_ASSUMPTIO,100000,5;
- skilleffect HP_ASSUMPTIO,0;
- ">
+ Script: <" itemskill(HP_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12219
@@ -88354,10 +88336,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- skilleffect SN_WINDWALK,0;
- sc_start SC_WINDWALK,250000,5;
- ">
+ Script: <" itemskill(SN_WINDWALK, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12220
@@ -88378,13 +88357,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <"
- .@type = getiteminfo(getequipid(EQI_HAND_R),11);
- if (.@type==6||.@type==7||.@type==8) {
- skilleffect BS_ADRENALINE,0;
- sc_start SC_ADRENALINE,150000,5;
- }
- ">
+ Script: <" itemskill(BS_ADRENALINE, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12221
@@ -88559,16 +88532,15 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 0,5;
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,240000,10;
+ percentheal(0, 5);
+ itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
Id: 12236
AegisName: "Choco_Tart"
Name: "Chocolate Tart"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 100
Nouse: {
@@ -89360,9 +89332,8 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 5,0;
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,120000,5;
+ percentheal(5, 0);
+ itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -89377,9 +89348,8 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 5,0;
- skilleffect AL_INCAGI,0;
- sc_start SC_INC_AGI,120000,5;
+ percentheal(0, 5);
+ itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -89732,7 +89702,7 @@ item_db: (
Id: 12311
AegisName: "Large_Spray_Of_Flowers"
Name: "Huge Spray Of Flowers"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 100
Trade: {
nodrop: true
@@ -89894,7 +89864,7 @@ item_db: (
Id: 12323
AegisName: "N_Fly_Wing"
Name: "Novice Fly Wing"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Trade: {
nodrop: true
notrade: true
@@ -89913,7 +89883,7 @@ item_db: (
Id: 12324
AegisName: "N_Butterfly_Wing"
Name: "Novice Butterfly Wing"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Trade: {
nodrop: true
notrade: true
@@ -89932,7 +89902,7 @@ item_db: (
Id: 12325
AegisName: "N_Magnifier"
Name: "Novice Magnifier"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Trade: {
nodrop: true
notrade: true
@@ -90233,7 +90203,7 @@ item_db: (
Id: 12350
AegisName: "Angeling_Potion"
Name: "Angeling Potion"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 100
BuyingStore: true
@@ -90241,16 +90211,15 @@ item_db: (
sitting: true
}
Script: <"
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,120000,5;
- itemskill AL_ANGELUS,5;
+ itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
+ itemskill(AL_ANGELUS, 5);
">
},
{
Id: 12351
AegisName: "Shout_Megaphone"
Name: "Scream Megaphone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 50
BuyingStore: true
@@ -90578,8 +90547,8 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 3, 0;
- itemskill PR_GLORIA, 2;
+ percentheal(3, 0);
+ itemskill(PR_GLORIA, 2, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -90594,8 +90563,8 @@ item_db: (
sitting: true
}
Script: <"
- percentheal 0, 3;
- itemskill PR_MAGNIFICAT, 1;
+ percentheal(0, 3);
+ itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -90665,7 +90634,7 @@ item_db: (
Id: 12384
AegisName: "Rainbow_Ruby_Water"
Name: "Rainbow Ruby"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 50
Trade: {
nodrop: true
@@ -90686,7 +90655,7 @@ item_db: (
Id: 12385
AegisName: "Rainbow_Ruby_Fire"
Name: "Rainbow Ruby"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 50
Trade: {
nodrop: true
@@ -90707,7 +90676,7 @@ item_db: (
Id: 12386
AegisName: "Rainbow_Ruby_Wind"
Name: "Rainbow Ruby"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 50
Trade: {
nodrop: true
@@ -90728,7 +90697,7 @@ item_db: (
Id: 12387
AegisName: "Rainbow_Ruby_Earth"
Name: "Rainbow Ruby"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 50
Trade: {
nodrop: true
@@ -90749,7 +90718,7 @@ item_db: (
Id: 12388
AegisName: "Runstone_Crush"
Name: "Rhydo Runestone For Apprentice"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -90774,7 +90743,7 @@ item_db: (
Id: 12389
AegisName: "Runstone_Storm"
Name: "Pertz Runestone For Apprentice"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -90790,16 +90759,15 @@ item_db: (
sitting: true
}
Script: <"
- if(strcharinfo(PC_MAP)=="job3_rune02") {
- itemskill RK_STORMBLAST,1;
- }
+ if (strcharinfo(PC_MAP) == "job3_rune02")
+ itemskill(RK_STORMBLAST, 1, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
Id: 12390
AegisName: "Runstone_Millennium"
Name: "Verkana Runestone For Apprentice"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -90815,9 +90783,8 @@ item_db: (
sitting: true
}
Script: <"
- if(strcharinfo(PC_MAP)=="job3_rune02") {
- itemskill RK_MILLENNIUMSHIELD,1;
- }
+ if (strcharinfo(PC_MAP) == "job3_rune02")
+ itemskill(RK_MILLENNIUMSHIELD, 1, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -90890,7 +90857,7 @@ item_db: (
Id: 12396
AegisName: "Fools_Day_Box"
Name: "Gift Box?"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 10
Nouse: {
@@ -90914,24 +90881,34 @@ item_db: (
Id: 12397
AegisName: "Fools_Day_Box2"
Name: "Gift Box?"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 10
Nouse: {
sitting: true
}
Script: <"
- .@temp = rand(1,10);
- if (.@temp == 1) itemskill TF_DETOXIFY,1;
- else if (.@temp == 2) itemskill TF_PICKSTONE,1;
- else if (.@temp == 3) itemskill BA_FROSTJOKER,1;
- else if (.@temp == 4) itemskill DC_SCREAM,1;
- else if (.@temp == 5) percentheal 50,50;
- else if (.@temp == 6) getitem Jellopy,1;
- else if (.@temp == 7) itemskill AL_RUWACH,1;
- else if (.@temp == 8) specialeffect(EF_BEGINASURA, AREA, playerattached());
- else if (.@temp == 9) specialeffect(EF_MVP, AREA, playerattached());
- else specialeffect(EF_CURSEATTACK, AREA, playerattached());
+ .@temp = rand(1, 10);
+ if (.@temp == 1)
+ itemskill(TF_DETOXIFY, 1, ISF_INSTANTCAST | ISF_CASTONSELF);
+ else if (.@temp == 2)
+ itemskill(TF_PICKSTONE, 1);
+ else if (.@temp == 3)
+ itemskill(BA_FROSTJOKER, 1);
+ else if (.@temp == 4)
+ itemskill(DC_SCREAM, 1);
+ else if (.@temp == 5)
+ announce(strcharinfo(PC_NAME) + " shouts : I am a fool!!!", bc_all, C_WHITE);
+ else if (.@temp == 6)
+ getitem(Jellopy, 1);
+ else if (.@temp == 7)
+ itemskill(AL_RUWACH, 1);
+ else if (.@temp == 8)
+ specialeffect(EF_BEGINASURA, AREA, playerattached());
+ else if (.@temp == 9)
+ specialeffect(EF_MVP, AREA, playerattached());
+ else
+ specialeffect(EF_CURSEATTACK, AREA, playerattached());
">
},
{
@@ -91042,9 +91019,8 @@ item_db: (
noauction: true
}
Script: <"
- percentheal 30,30;
- skilleffect AL_BLESSING,0;
- sc_start SC_BLESSING,140000,5;
+ percentheal(30, 30);
+ itemskill(AL_BLESSING, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -91145,9 +91121,8 @@ item_db: (
Weight: 10
BuyingStore: true
Script: <"
- sc_start SC_ATTHASTE_POTION1,1800000,0;
- sc_start SC_INC_AGI,140000,5;
- skilleffect AL_INCAGI,0;
+ sc_start(SC_ATTHASTE_POTION1, 1800000, 0);
+ itemskill(AL_INCAGI, 5, ISF_INSTANTCAST | ISF_CASTONSELF);
">
},
{
@@ -94478,34 +94453,34 @@ item_db: (
Id: 12706
AegisName: "Lucky_Cookie01"
Name: "Lucky Cookie"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 100
Nouse: {
sitting: true
}
- Script: <" itemskill PR_GLORIA,5; ">
+ Script: <" itemskill(PR_GLORIA, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12707
AegisName: "Lucky_Cookie02"
Name: "Lucky Cookie"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 100
Nouse: {
sitting: true
}
- Script: <" itemskill PR_MAGNIFICAT,1; ">
+ Script: <" itemskill(PR_MAGNIFICAT, 1, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12708
AegisName: "Lucky_Cookie03"
Name: "Lucky Cookie"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 100
Nouse: {
sitting: true
}
- Script: <" itemskill PR_IMPOSITIO,3; ">
+ Script: <" itemskill(PR_IMPOSITIO, 3, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 12709
@@ -94735,7 +94710,7 @@ item_db: (
Id: 12725
AegisName: "Runstone_Nosiege"
Name: "Nosiege Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -94762,7 +94737,7 @@ item_db: (
Id: 12726
AegisName: "Runstone_Rhydo"
Name: "Rhydo Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -94789,7 +94764,7 @@ item_db: (
Id: 12727
AegisName: "Runstone_Verkana"
Name: "Verkana Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -94816,7 +94791,7 @@ item_db: (
Id: 12728
AegisName: "Runstone_Isia"
Name: "Isia Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -94842,7 +94817,7 @@ item_db: (
Id: 12729
AegisName: "Runstone_Asir"
Name: "Asir Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -94867,7 +94842,7 @@ item_db: (
Id: 12730
AegisName: "Runstone_Urj"
Name: "Urj Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -94893,7 +94868,7 @@ item_db: (
Id: 12731
AegisName: "Runstone_Turisus"
Name: "Turisus Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -94918,7 +94893,7 @@ item_db: (
Id: 12732
AegisName: "Runstone_Pertz"
Name: "Pertz Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -94944,7 +94919,7 @@ item_db: (
Id: 12733
AegisName: "Runstone_Hagalas"
Name: "Hagalas Runestone"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
@@ -95561,7 +95536,7 @@ item_db: (
Id: 12796
AegisName: "Red_Booster"
Name: "Red Boost"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 20
Weight: 10
Trade: {
@@ -95699,7 +95674,7 @@ item_db: (
Id: 12812
AegisName: "Snow_Flip"
Name: "Snow Flip"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill ECL_SNOWFLIP,1; ">
},
@@ -95707,7 +95682,7 @@ item_db: (
Id: 12813
AegisName: "Peony_Mommy"
Name: "Peony Mamy"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill ECL_PEONYMAMY,1; ">
},
@@ -95715,7 +95690,7 @@ item_db: (
Id: 12814
AegisName: "Slapping_Herb"
Name: "Sadagui"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill ECL_SADAGUI,1; ">
},
@@ -95723,7 +95698,7 @@ item_db: (
Id: 12815
AegisName: "Yggdrasil_Dust"
Name: "Sequoia Dust"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Script: <" itemskill ECL_SEQUOIADUST,1; ">
},
@@ -96644,7 +96619,7 @@ item_db: (
Id: 12928
AegisName: "J_Aspersio_5_Scroll"
Name: "Sacred Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
Trade: {
@@ -97364,7 +97339,7 @@ item_db: (
Id: 12968
AegisName: "Emergency_Scroll1"
Name: "Emergency Level 1 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
Trade: {
@@ -97382,7 +97357,7 @@ item_db: (
Id: 12969
AegisName: "Emergency_Scroll2"
Name: "Emergency Level 2 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
Trade: {
@@ -97400,7 +97375,7 @@ item_db: (
Id: 12970
AegisName: "Emergency_Scroll3"
Name: "Emergency Level 3 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 10
Trade: {
@@ -121608,7 +121583,7 @@ item_db: (
Id: 14512
AegisName: "Meteor_10_Scroll"
Name: "Meteor Storm Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -121625,7 +121600,7 @@ item_db: (
Id: 14513
AegisName: "Storm_10_Scroll"
Name: "Storm Gust Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -121642,7 +121617,7 @@ item_db: (
Id: 14514
AegisName: "Vermilion_10_Scroll"
Name: "Lord of Vermilion Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -121659,7 +121634,7 @@ item_db: (
Id: 14515
AegisName: "Lex_Aeterna_Scroll"
Name: "Lex Aeterna Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -121676,7 +121651,7 @@ item_db: (
Id: 14516
AegisName: "Magnificat_5_Scroll"
Name: "Magnificat Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -121704,7 +121679,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),237,5; ">
+ Script: <" itemskill(AM_CP_HELM, 5); ">
},
{
Id: 14518
@@ -121721,7 +121696,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),235,5; ">
+ Script: <" itemskill(AM_CP_SHIELD, 5); ">
},
{
Id: 14519
@@ -121738,7 +121713,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),236,5; ">
+ Script: <" itemskill(AM_CP_ARMOR, 5); ">
},
{
Id: 14520
@@ -121755,7 +121730,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),234,5; ">
+ Script: <" itemskill(AM_CP_WEAPON, 5); ">
},
{
Id: 14521
@@ -121775,7 +121750,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <" unitskilluseid getcharid(CHAR_ID_ACCOUNT),108,1; ">
+ Script: <" itemskill(BS_REPAIRWEAPON, 1); ">
},
{
Id: 14522
@@ -121899,7 +121874,7 @@ item_db: (
Id: 14529
AegisName: "Greed_Scroll"
Name: "Greed Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -121914,7 +121889,7 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <" itemskill BS_GREED,1; ">
+ Script: <" itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14530
@@ -123024,7 +122999,7 @@ item_db: (
Id: 14587
AegisName: "Repair_Scroll_"
Name: "Equipment Repair Spell Book"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -123044,7 +123019,7 @@ item_db: (
Id: 14588
AegisName: "Pty_Blessing_Scroll"
Name: "Party Blessing 10 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 10
Weight: 10
Trade: {
@@ -123056,13 +123031,13 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" itemskill CASH_BLESSING,10; ">
+ Script: <" itemskill(CASH_BLESSING, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14589
AegisName: "Pty_Inc_Agi_Scroll"
Name: "Party Increase Agi 10 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 10
Weight: 10
Trade: {
@@ -123074,13 +123049,13 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" itemskill CASH_INCAGI,10; ">
+ Script: <" itemskill(CASH_INCAGI, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14590
AegisName: "Pty_Assumptio_Scroll"
Name: "Party Assumptio 5 Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 10
Weight: 10
Trade: {
@@ -123092,7 +123067,7 @@ item_db: (
nomail: true
noauction: true
}
- Script: <" itemskill CASH_ASSUMPTIO,5; ">
+ Script: <" itemskill(CASH_ASSUMPTIO, 5, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14591
@@ -123138,7 +123113,7 @@ item_db: (
Id: 14593
AegisName: "Magic_Power_Scroll"
Name: "Mystical Amplification Scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -123152,13 +123127,13 @@ item_db: (
Nouse: {
sitting: true
}
- Script: <" itemskill HW_MAGICPOWER,10; ">
+ Script: <" itemskill(HW_MAGICPOWER, 10, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14594
AegisName: "Quagmire_Scroll"
Name: "Quagmire scroll"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Weight: 10
Trade: {
nodrop: true
@@ -123261,6 +123236,7 @@ item_db: (
Nouse: {
sitting: true
}
+ Script: <" itemskill(BS_GREED, 1, ISF_INSTANTCAST | ISF_CASTONSELF); ">
},
{
Id: 14600
@@ -148348,7 +148324,7 @@ item_db: (
Id: 22540
AegisName: "Runstone_Lux"
Name: "Lux Anima Rune"
- Type: "IT_DELAYCONSUME"
+ Type: "IT_USABLE"
Buy: 2
Weight: 100
Job: {
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 4004e5cd2..8308f4771 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -5651,21 +5651,38 @@ set with 'disable_items'.
---------------------------------------
-*itemskill(<skill id>, <skill level>, {flag})
-*itemskill("<skill name>", <skill level>, {flag})
+*itemskill(<skill id>, <skill level>{, <flag>})
+*itemskill("<skill name>", <skill level>{, <flag>})
This command meant for item scripts to replicate single-use skills in
usable items. It will not work properly if there is a visible dialog
window or menu.
If the skill is self or auto-targeting, it will be used immediately.
Otherwise, a target cursor is shown.
-Flag is a optional param and, when present, the command will not check for
-skill requirements.
+Optional value <flag> is a bitmask to manipulate how the skill is casted.
+Since <flag> is a bitmask, the flags can be summed up.
+Possible flags are:
+ - 0x00 - ISF_NONE - Skill is casted as if has been used from skill tree.
+ (Same like <flag> was omitted.)
+ - 0x01 - ISF_IGNORECONDITIONS - Skill requirements are ignored and not consumed
+ - 0x02 - ISF_INSTANTCAST - Skill is casted instantaneously.
+ - 0x04 - ISF_CASTONSELF - Skill is forcefully casted on invoking character,
+ without showing the target selection cursor.
+
+Important: Items which use itemskill() should be of type IT_USABLE.
+ If the item type is IT_DELAYCONSUME and ISF_IGNORECONDITIONS is set,
+ the item won't be consumed when using the item!
// When Anodyne is used, it will cast Endure, Level 1, as if the actual skill
// has been used from skill tree.
itemskill(SM_ENDURE, 1);
+// Instantaneously cast Level 10 Increase Agility on invoking character,
+// without checking/consuming skill requirements.
+ itemskill(AL_INCAGI, 10, ISF_IGNORECONDITIONS | ISF_INSTANTCAST | ISF_CASTONSELF);
+// Instaed of using the constants, one could also do it like this:
+ itemskill(AL_INCAGI, 10, 7);
+
---------------------------------------
*itemeffect(<item id>)
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 11f79a11b..d2e491ad2 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -685,6 +685,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_ADD_ITEM_TO_STORE", sizeof(struct PACKET_ZC_ADD_ITEM_TO_STORE), SERVER_TYPE_MAP },
{ "PACKET_ZC_ADD_MEMBER_TO_GROUP", sizeof(struct PACKET_ZC_ADD_MEMBER_TO_GROUP), SERVER_TYPE_MAP },
{ "PACKET_ZC_ADD_SKILL", sizeof(struct PACKET_ZC_ADD_SKILL), SERVER_TYPE_MAP },
+ { "PACKET_ZC_AUTORUN_SKILL", sizeof(struct PACKET_ZC_AUTORUN_SKILL), SERVER_TYPE_MAP },
{ "PACKET_ZC_BAN_LIST", sizeof(struct PACKET_ZC_BAN_LIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_BAN_LIST_sub", sizeof(struct PACKET_ZC_BAN_LIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_CASH_ITEM_DELETE", sizeof(struct PACKET_ZC_CASH_ITEM_DELETE), SERVER_TYPE_MAP },
diff --git a/src/map/clif.c b/src/map/clif.c
index 868117a96..660c516d7 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6754,21 +6754,28 @@ static void clif_item_refine_list(struct map_session_data *sd)
/// 0147 <skill id>.W <type>.L <level>.W <sp cost>.W <atk range>.W <skill name>.24B <upgradeable>.B
static void clif_item_skill(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv)
{
- int fd;
-
nullpo_retv(sd);
- fd=sd->fd;
- WFIFOHEAD(fd,packet_len(0x147));
- WFIFOW(fd, 0)=0x147;
- WFIFOW(fd, 2)=skill_id;
- WFIFOL(fd, 4)=skill->get_inf(skill_id);
- WFIFOW(fd, 8)=skill_lv;
- WFIFOW(fd,10)=skill->get_sp(skill_id,skill_lv);
- WFIFOW(fd,12)=skill->get_range2(&sd->bl, skill_id,skill_lv);
- safestrncpy(WFIFOP(fd,14),skill->get_name(skill_id),NAME_LENGTH);
- WFIFOB(fd,38)=0;
- WFIFOSET(fd,packet_len(0x147));
+ int fd = sd->fd;
+
+ WFIFOHEAD(fd, sizeof(struct PACKET_ZC_AUTORUN_SKILL));
+
+ struct PACKET_ZC_AUTORUN_SKILL *p = WFIFOP(fd, 0);
+ int type = skill->get_inf(skill_id);
+
+ if (sd->state.itemskill_castonself == 1 && skill->is_item_skill(sd, skill_id, skill_lv))
+ type = INF_SELF_SKILL;
+
+ p->packetType = HEADER_ZC_AUTORUN_SKILL;
+ p->skill_id = skill_id;
+ p->skill_type = type;
+ p->skill_lv = skill_lv;
+ p->skill_sp = skill->get_sp(skill_id, skill_lv);
+ p->skill_range = skill->get_range2(&sd->bl, skill_id, skill_lv);
+ safestrncpy(p->skill_name, skill->get_name(skill_id), NAME_LENGTH);
+ p->up_flag = 0;
+
+ WFIFOSET(fd, sizeof(struct PACKET_ZC_AUTORUN_SKILL));
}
/// Adds an item to character's cart.
@@ -12926,6 +12933,7 @@ static void clif_parse_UseSkillMap(int fd, struct map_session_data *sd)
pc->delinvincibletimer(sd);
skill->castend_map(sd,skill_id,map_name);
+ pc->itemskill_clear(sd);
}
static void clif_parse_RequestMemo(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index d2592af4e..5f0790b10 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -95,6 +95,8 @@ enum item_itemid {
ITEMID_ALOEBERA = 606,
ITEMID_SPECTACLES = 611,
ITEMID_POISON_BOTTLE = 678,
+ ITEMID_EARTH_SCROLL_1_3 = 686,
+ ITEMID_EARTH_SCROLL_1_5 = 687,
ITEMID_EMPTY_BOTTLE = 713,
ITEMID_EMPERIUM = 714,
ITEMID_YELLOW_GEMSTONE = 715,
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 31b28e831..b604c77b8 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -3873,6 +3873,18 @@ struct PACKET_ZC_STATE_CHANGE {
DEFINE_PACKET_HEADER(ZC_STATE_CHANGE, 0x0119);
#endif
+struct PACKET_ZC_AUTORUN_SKILL {
+ int16 packetType;
+ uint16 skill_id;
+ uint32 skill_type;
+ uint16 skill_lv;
+ uint16 skill_sp;
+ uint16 skill_range;
+ char skill_name[NAME_LENGTH];
+ char up_flag;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_AUTORUN_SKILL, 0x0147);
+
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris
diff --git a/src/map/pc.c b/src/map/pc.c
index f6edb5e3c..c96e957c7 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5257,6 +5257,14 @@ static int pc_useitem(struct map_session_data *sd, int n)
#endif
if( battle_config.item_restricted_consumption_type && sd->status.inventory[n].expire_time == 0 ) {
clif->useitemack(sd,n,sd->status.inventory[n].amount-1,true);
+
+ // If Earth Spike Scroll is used while SC_EARTHSCROLL is active, there is a chance to don't consume the scroll. [Kenpachi]
+ if ((nameid == ITEMID_EARTH_SCROLL_1_3 || nameid == ITEMID_EARTH_SCROLL_1_5)
+ && sd->sc.count > 0 && sd->sc.data[SC_EARTHSCROLL] != NULL
+ && rnd() % 100 > sd->sc.data[SC_EARTHSCROLL]->val2) {
+ return 0;
+ }
+
pc->delitem(sd, n, 1, 1, DELITEM_NORMAL, LOG_TYPE_CONSUME);
}
return 0;
@@ -5302,11 +5310,37 @@ static int pc_useitem(struct map_session_data *sd, int n)
script->run_use_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id);
script->potion_flag = 0;
+ // If Earth Spike Scroll is used while SC_EARTHSCROLL is active, there is a chance to don't consume the scroll. [Kenpachi]
+ if ((nameid == ITEMID_EARTH_SCROLL_1_3 || nameid == ITEMID_EARTH_SCROLL_1_5) && sd->sc.count > 0
+ && sd->sc.data[SC_EARTHSCROLL] != NULL && rnd() % 100 > sd->sc.data[SC_EARTHSCROLL]->val2) {
+ removeItem = false;
+ }
+
if (removeItem)
pc->delitem(sd, n, 1, 1, DELITEM_NORMAL, LOG_TYPE_CONSUME);
return 1;
}
+/**
+ * Sets state flags and helper variables, used by itemskill() script command, to 0.
+ *
+ * @param sd The character's session data.
+ * @return 0 if parameter sd is NULL, otherwise 1.
+ */
+static int pc_itemskill_clear(struct map_session_data *sd)
+{
+ nullpo_ret(sd);
+
+ sd->itemskill_id = 0;
+ sd->itemskill_lv = 0;
+ sd->state.itemskill_conditions_checked = 0;
+ sd->state.itemskill_no_conditions = 0;
+ sd->state.itemskill_no_casttime = 0;
+ sd->state.itemskill_castonself = 0;
+
+ return 1;
+}
+
/*==========================================
* Add item on cart for given index.
* Return:
@@ -12648,6 +12682,7 @@ void pc_defaults(void)
pc->unequipitem_pos = pc_unequipitem_pos;
pc->checkitem = pc_checkitem;
pc->useitem = pc_useitem;
+ pc->itemskill_clear = pc_itemskill_clear;
pc->skillatk_bonus = pc_skillatk_bonus;
pc->skillheal_bonus = pc_skillheal_bonus;
diff --git a/src/map/pc.h b/src/map/pc.h
index a3a3ee48d..e940c3310 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -240,6 +240,10 @@ struct map_session_data {
unsigned int refine_ui : 1;
unsigned int npc_unloaded : 1; ///< The player is talking with an unloaded NPCs (respawned tombstones)
unsigned int lapine_ui : 1;
+ unsigned int itemskill_conditions_checked : 1; // Used by itemskill() script command, to prevent second check of conditions after target was selected.
+ unsigned int itemskill_no_conditions : 1; // Used by itemskill() script command, to ignore skill conditions and don't consume them.
+ unsigned int itemskill_no_casttime : 1; // Used by itemskill() script command, to cast skill instantaneously.
+ unsigned int itemskill_castonself : 1; // Used by itemskill() script command, to forcefully cast skill on invoking character.
} state;
struct {
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;
@@ -643,6 +647,15 @@ END_ZEROED_BLOCK;
bool achievements_received;
// Title
VECTOR_DECL(int) title_ids;
+
+ /*
+ * itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime/itemskill_castonself abuse prevention.
+ * If a skill, casted by itemskill() script command, is aborted while target selection,
+ * the map server gets no notification where these states could be unset.
+ * Thus we need this helper variables to prevent abusing these states for next skill cast.
+ */
+ int itemskill_id;
+ int itemskill_lv;
};
#define EQP_WEAPON EQP_HAND_R
@@ -1021,6 +1034,7 @@ END_ZEROED_BLOCK; /* End */
void (*unequipitem_pos) (struct map_session_data *sd, int n, int pos);
int (*checkitem) (struct map_session_data *sd);
int (*useitem) (struct map_session_data *sd,int n);
+ int (*itemskill_clear) (struct map_session_data *sd);
int (*skillatk_bonus) (struct map_session_data *sd, uint16 skill_id);
int (*skillheal_bonus) (struct map_session_data *sd, uint16 skill_id);
diff --git a/src/map/script.c b/src/map/script.c
index b77e6a376..c1eb2e8b7 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10985,33 +10985,51 @@ static BUILDIN(guildopenstorage)
return true;
}
-/*==========================================
- * Make player use a skill trought item usage
- *------------------------------------------*/
-/// itemskill <skill id>,<level>{,flag
-/// itemskill "<skill name>",<level>{,flag
+/**
+ * Makes the attached character use a skill by using an item.
+ *
+ * @code{.herc}
+ * itemskill(<skill id>, <skill level>{, <flag>});
+ * itemskill("<skill name>", <skill level>{, <flag>});
+ * @endcode
+ *
+ */
static BUILDIN(itemskill)
{
- int id;
- int lv;
struct map_session_data *sd = script->rid2sd(st);
+
if (sd == NULL || sd->ud.skilltimer != INVALID_TIMER)
return true;
- id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
- lv = script_getnum(st,3);
-/* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */
-#if 0
- if( !script_hasdata(st, 4) ) {
- if( !skill->check_condition_castbegin(sd,id,lv) || !skill->check_condition_castend(sd,id,lv) )
+ sd->skillitem = script_isstringtype(st, 2) ? skill->name2id(script_getstr(st, 2)) : script_getnum(st, 2);
+ sd->skillitemlv = script_getnum(st, 3);
+ sd->state.itemskill_conditions_checked = 0; // Skill casting items will check the conditions prior to the target selection in AEGIS. Thus we need a flag to prevent checking them twice.
+
+ int flag = script_hasdata(st, 4) ? script_getnum(st, 4) : ISF_NONE;
+
+ sd->state.itemskill_no_conditions = ((flag & ISF_IGNORECONDITIONS) == ISF_IGNORECONDITIONS) ? 1 : 0; // Unset in pc_itemskill_clear().
+
+ if (sd->state.itemskill_no_conditions == 0) {
+ if (skill->check_condition_castbegin(sd, sd->skillitem, sd->skillitemlv) == 0
+ || skill->check_condition_castend(sd, sd->skillitem, sd->skillitemlv) == 0) {
return true;
+ }
+
+ sd->state.itemskill_conditions_checked = 1; // Unset in pc_itemskill_clear().
}
-#endif
- sd->skillitem=id;
- sd->skillitemlv=lv;
- clif->item_skill(sd,id,lv);
+
+ sd->state.itemskill_no_casttime = ((flag & ISF_INSTANTCAST) == ISF_INSTANTCAST) ? 1 : 0; // Unset in pc_itemskill_clear().
+ sd->state.itemskill_castonself = ((flag & ISF_CASTONSELF) == ISF_CASTONSELF) ? 1 : 0; // Unset in pc_itemskill_clear().
+
+ // itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime/itemskill_castonself abuse prevention. Unset in pc_itemskill_clear().
+ sd->itemskill_id = sd->skillitem;
+ sd->itemskill_lv = sd->skillitemlv;
+
+ clif->item_skill(sd, sd->skillitem, sd->skillitemlv);
+
return true;
}
+
/*==========================================
* Attempt to create an item
*------------------------------------------*/
@@ -27838,6 +27856,12 @@ static void script_hardcoded_constants(void)
script->set_constant("MADO_ROBOT", MADO_ROBOT, false, false);
script->set_constant("MADO_SUITE", MADO_SUITE, false, false);
+ script->constdb_comment("itemskill option flags");
+ script->set_constant("ISF_NONE", ISF_NONE, false, false);
+ script->set_constant("ISF_IGNORECONDITIONS", ISF_IGNORECONDITIONS, false, false);
+ script->set_constant("ISF_INSTANTCAST", ISF_INSTANTCAST, false, false);
+ script->set_constant("ISF_CASTONSELF", ISF_CASTONSELF, false, false);
+
script->constdb_comment("Renewal");
#ifdef RENEWAL
script->set_constant("RENEWAL", 1, false, false);
diff --git a/src/map/script.h b/src/map/script.h
index 8d7669d68..857d22c61 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -565,6 +565,16 @@ enum mado_type {
};
/**
+ * Option flags for itemskill() script command.
+ **/
+enum itemskill_flag {
+ ISF_NONE = 0x00,
+ ISF_IGNORECONDITIONS = 0x01, // Ignore skill conditions and don't consume them.
+ ISF_INSTANTCAST = 0x02, // Cast skill instantaneously.
+ ISF_CASTONSELF = 0x04, // Forcefully cast skill on invoking character without showing the target selection cursor.
+};
+
+/**
* Structures
**/
diff --git a/src/map/skill.c b/src/map/skill.c
index 0f0a72dce..a8dbefbd7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4190,6 +4190,11 @@ static void skill_castend_type(int type, struct block_list *src, struct block_li
skill->castend_damage_id(src, bl, skill_id, skill_lv, tick, flag);
break;
}
+
+ struct map_session_data *sd = BL_CAST(BL_PC, src);
+
+ if (sd != NULL)
+ pc->itemskill_clear(sd);
}
/*==========================================
@@ -13989,6 +13994,22 @@ static bool skill_is_combo(int skill_id)
return false;
}
+/**
+ * Checks if a skill is casted by an item (itemskill() script command).
+ *
+ * @param sd The charcater's session data.
+ * @param skill_id The skill's ID.
+ * @param skill_lv The skill's level.
+ * @return true if skill is casted by an item, otherwise false.
+ */
+static bool skill_is_item_skill(struct map_session_data *sd, int skill_id, int skill_lv)
+{
+ nullpo_retr(false, sd);
+
+ return (sd->skillitem == skill_id && sd->skillitemlv == skill_lv
+ && sd->itemskill_id == skill_id && sd->itemskill_lv == skill_lv);
+}
+
static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv)
{
struct status_data *st;
@@ -13997,9 +14018,17 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s
nullpo_ret(sd);
+ if (skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL)
+ return 0;
+
if (sd->chat_id != 0)
return 0;
+ if ((sd->state.itemskill_conditions_checked == 1 || sd->state.itemskill_no_conditions == 1)
+ && skill->is_item_skill(sd, skill_id, skill_lv)) {
+ return 1;
+ }
+
if (pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id) {
//GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex]
sd->state.arrow_atk = skill->get_ammotype(skill_id)?1:0; //Need to do arrow state check.
@@ -14041,24 +14070,21 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s
if( (i = sd->itemindex) == -1 ||
sd->status.inventory[i].nameid != sd->itemid ||
sd->inventory_data[i] == NULL ||
- !sd->inventory_data[i]->flag.delay_consume ||
sd->status.inventory[i].amount < 1
) {
//Something went wrong, item exploit?
sd->itemid = sd->itemindex = -1;
return 0;
}
+
//Consume
sd->itemid = sd->itemindex = -1;
- if( skill_id == WZ_EARTHSPIKE && sc && sc->data[SC_EARTHSCROLL] && rnd()%100 > sc->data[SC_EARTHSCROLL]->val2 ) // [marquis007]
- ; //Do not consume item.
- else if( sd->status.inventory[i].expire_time == 0 ) // Rental usable items are not consumed until expiration
+ if (sd->status.inventory[i].expire_time == 0 && sd->inventory_data[i]->flag.delay_consume == 1) // Rental usable items are not consumed until expiration
pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_CONSUME);
}
- return 1;
}
- if( pc_is90overweight(sd) ) {
+ if (pc_is90overweight(sd) && sd->skillitem != skill_id) { /// Skill casting items ignore the overweight restriction. [Kenpachi]
clif->skill_fail(sd, skill_id, USESKILL_FAIL_WEIGHTOVER, 0, 0);
return 0;
}
@@ -14182,9 +14208,6 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s
}
}
- if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL )
- return 0;
-
require = skill->get_requirement(sd,skill_id,skill_lv);
//Can only update state when weapon/arrow info is checked.
@@ -14932,7 +14955,7 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s
return 0;
}
- if( require.sp > 0 && st->sp < (unsigned int)require.sp) {
+ if (require.sp > 0 && st->sp < (unsigned int)require.sp && sd->skillitem != skill_id) { /// Skill casting items and Hocus-Pocus skills don't consume SP. [Kenpachi]
clif->skill_fail(sd, skill_id, USESKILL_FAIL_SP_INSUFFICIENT, 0, 0);
return 0;
}
@@ -14990,6 +15013,11 @@ static int skill_check_condition_castend(struct map_session_data *sd, uint16 ski
if (sd->chat_id != 0)
return 0;
+ if ((sd->state.itemskill_conditions_checked == 1 || sd->state.itemskill_no_conditions == 1)
+ && skill->is_item_skill(sd, skill_id, skill_lv)) {
+ return 1;
+ }
+
if( pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill_id ) {
//GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex]
sd->state.arrow_atk = skill->get_ammotype(skill_id)?1:0; //Need to do arrow state check.
@@ -15017,14 +15045,8 @@ static int skill_check_condition_castend(struct map_session_data *sd, uint16 ski
return 0;
break;
}
- /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */
-#if 0
- if( sd->state.abra_flag ) // Casting finished (Hocus-Pocus)
- return 1;
-#endif
- if( sd->skillitem == skill_id )
- return 1;
- if( pc_is90overweight(sd) ) {
+
+ if (pc_is90overweight(sd) && sd->skillitem != skill_id) { /// Skill casting items ignore the overweight restriction. [Kenpachi]
clif->skill_fail(sd, skill_id, USESKILL_FAIL_WEIGHTOVER, 0, 0);
return 0;
}
@@ -15197,6 +15219,9 @@ static int skill_consume_requirement(struct map_session_data *sd, uint16 skill_i
nullpo_ret(sd);
+ if (sd->state.itemskill_no_conditions == 1 && skill->is_item_skill(sd, skill_id, skill_lv))
+ return 1;
+
req = skill->get_requirement(sd,skill_id,skill_lv);
if (type&1) {
@@ -15205,9 +15230,15 @@ static int skill_consume_requirement(struct map_session_data *sd, uint16 skill_i
case MC_IDENTIFY:
req.sp = 0;
break;
+ case WZ_EARTHSPIKE:
+ if (sd->sc.count > 0 && sd->sc.data[SC_EARTHSCROLL] != NULL) // If Earth Spike Scroll is used while SC_EARTHSCROLL is active, 10 SP are consumed. [Kenpachi]
+ req.sp = 10;
+
+ break;
default:
- if( sd->state.autocast )
+ if (sd->state.autocast == 1 || sd->skillitem == skill_id) /// Skill casting items and Hocus-Pocus skills don't consume SP. [Kenpachi]
req.sp = 0;
+
break;
}
@@ -15285,12 +15316,6 @@ static struct skill_condition skill_get_requirement(struct map_session_data *sd,
if( !sd )
return req;
-#if 0 /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */
- if( sd->state.abra_flag )
-#else // not 0
- if( sd->skillitem == skill_id )
-#endif // 0
- return req; // Hocus-Pocus don't have requirements.
sc = &sd->sc;
if( !sc->count )
@@ -21602,6 +21627,7 @@ void skill_defaults(void)
skill->cast_fix_sc = skill_castfix_sc;
skill->vf_cast_fix = skill_vfcastfix;
skill->delay_fix = skill_delay_fix;
+ skill->is_item_skill = skill_is_item_skill;
skill->check_condition_castbegin = skill_check_condition_castbegin;
skill->check_condition_castend = skill_check_condition_castend;
skill->consume_requirement = skill_consume_requirement;
diff --git a/src/map/skill.h b/src/map/skill.h
index 188a1c927..eff9ed7fc 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2019,6 +2019,7 @@ struct skill_interface {
int (*cast_fix_sc) ( struct block_list *bl, int time);
int (*vf_cast_fix) ( struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv);
int (*delay_fix) ( struct block_list *bl, uint16 skill_id, uint16 skill_lv);
+ bool (*is_item_skill) (struct map_session_data *sd, int skill_id, int skill_lv);
int (*check_condition_castbegin) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
int (*check_condition_castend) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
int (*consume_requirement) (struct map_session_data *sd, uint16 skill_id, uint16 skill_lv, short type);
diff --git a/src/map/unit.c b/src/map/unit.c
index 482440978..29a01aea7 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1041,11 +1041,15 @@ static int unit_stop_walking(struct block_list *bl, int flag)
static int unit_skilluse_id(struct block_list *src, int target_id, uint16 skill_id, uint16 skill_lv)
{
- return unit->skilluse_id2(
- src, target_id, skill_id, skill_lv,
- skill->cast_fix(src, skill_id, skill_lv),
- skill->get_castcancel(skill_id)
- );
+ int casttime = skill->cast_fix(src, skill_id, skill_lv);
+ int castcancel = skill->get_castcancel(skill_id);
+ int ret = unit->skilluse_id2(src, target_id, skill_id, skill_lv, casttime, castcancel);
+ struct map_session_data *sd = BL_CAST(BL_PC, src);
+
+ if (sd != NULL)
+ pc->itemskill_clear(sd);
+
+ return ret;
}
static int unit_is_walking(struct block_list *bl)
@@ -1418,15 +1422,8 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill
}
}
- if (sd) {
- /* temporarily disabled, awaiting for kenpachi to detail this so we can make it work properly */
-#if 0
- if (sd->skillitem != skill_id && !skill->check_condition_castbegin(sd, skill_id, skill_lv))
-#else
- if (!skill->check_condition_castbegin(sd, skill_id, skill_lv))
-#endif
- return 0;
- }
+ if (sd != NULL && skill->check_condition_castbegin(sd, skill_id, skill_lv) == 0)
+ return 0;
if (src->type == BL_MOB) {
const struct mob_data *src_md = BL_UCCAST(BL_MOB, src);
@@ -1609,6 +1606,9 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill
if (!ud->state.running) //need TK_RUN or WUGDASH handler to be done before that, see bugreport:6026
unit->stop_walking(src, STOPWALKING_FLAG_FIXPOS);// even though this is not how official works but this will do the trick. bugreport:6829
+ if (sd != NULL && sd->state.itemskill_no_casttime == 1 && skill->is_item_skill(sd, skill_id, skill_lv))
+ casttime = 0;
+
// in official this is triggered even if no cast time.
clif->useskill(src, src->id, target_id, 0,0, skill_id, skill_lv, casttime);
if( casttime > 0 || temp )
@@ -1678,11 +1678,15 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill
static int unit_skilluse_pos(struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv)
{
- return unit->skilluse_pos2(
- src, skill_x, skill_y, skill_id, skill_lv,
- skill->cast_fix(src, skill_id, skill_lv),
- skill->get_castcancel(skill_id)
- );
+ int casttime = skill->cast_fix(src, skill_id, skill_lv);
+ int castcancel = skill->get_castcancel(skill_id);
+ int ret = unit->skilluse_pos2(src, skill_x, skill_y, skill_id, skill_lv, casttime, castcancel);
+ struct map_session_data *sd = BL_CAST(BL_PC, src);
+
+ if (sd != NULL)
+ pc->itemskill_clear(sd);
+
+ return ret;
}
static int unit_skilluse_pos2(struct block_list *src, short skill_x, short skill_y, uint16 skill_id, uint16 skill_lv, int casttime, int castcancel)
@@ -1807,6 +1811,10 @@ static int unit_skilluse_pos2(struct block_list *src, short skill_x, short skill
}
unit->stop_walking(src, STOPWALKING_FLAG_FIXPOS);
+
+ if (sd != NULL && sd->state.itemskill_no_casttime == 1 && skill->is_item_skill(sd, skill_id, skill_lv))
+ casttime = 0;
+
// in official this is triggered even if no cast time.
clif->useskill(src, src->id, 0, skill_x, skill_y, skill_id, skill_lv, casttime);
if( casttime > 0 ) {
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index c1fb15810..7996a59f9 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6184,6 +6184,8 @@ typedef int (*HPMHOOK_pre_pc_checkitem) (struct map_session_data **sd);
typedef int (*HPMHOOK_post_pc_checkitem) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_useitem) (struct map_session_data **sd, int *n);
typedef int (*HPMHOOK_post_pc_useitem) (int retVal___, struct map_session_data *sd, int n);
+typedef int (*HPMHOOK_pre_pc_itemskill_clear) (struct map_session_data **sd);
+typedef int (*HPMHOOK_post_pc_itemskill_clear) (int retVal___, struct map_session_data *sd);
typedef int (*HPMHOOK_pre_pc_skillatk_bonus) (struct map_session_data **sd, uint16 *skill_id);
typedef int (*HPMHOOK_post_pc_skillatk_bonus) (int retVal___, struct map_session_data *sd, uint16 skill_id);
typedef int (*HPMHOOK_pre_pc_skillheal_bonus) (struct map_session_data **sd, uint16 *skill_id);
@@ -7330,6 +7332,8 @@ typedef int (*HPMHOOK_pre_skill_vf_cast_fix) (struct block_list **bl, double *ti
typedef int (*HPMHOOK_post_skill_vf_cast_fix) (int retVal___, struct block_list *bl, double time, uint16 skill_id, uint16 skill_lv);
typedef int (*HPMHOOK_pre_skill_delay_fix) (struct block_list **bl, uint16 *skill_id, uint16 *skill_lv);
typedef int (*HPMHOOK_post_skill_delay_fix) (int retVal___, struct block_list *bl, uint16 skill_id, uint16 skill_lv);
+typedef bool (*HPMHOOK_pre_skill_is_item_skill) (struct map_session_data **sd, int *skill_id, int *skill_lv);
+typedef bool (*HPMHOOK_post_skill_is_item_skill) (bool retVal___, struct map_session_data *sd, int skill_id, int skill_lv);
typedef int (*HPMHOOK_pre_skill_check_condition_castbegin) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv);
typedef int (*HPMHOOK_post_skill_check_condition_castbegin) (int retVal___, struct map_session_data *sd, uint16 skill_id, uint16 skill_lv);
typedef int (*HPMHOOK_pre_skill_check_condition_castend) (struct map_session_data **sd, uint16 *skill_id, uint16 *skill_lv);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 53ba3403c..6d8776f18 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -4764,6 +4764,8 @@ struct {
struct HPMHookPoint *HP_pc_checkitem_post;
struct HPMHookPoint *HP_pc_useitem_pre;
struct HPMHookPoint *HP_pc_useitem_post;
+ struct HPMHookPoint *HP_pc_itemskill_clear_pre;
+ struct HPMHookPoint *HP_pc_itemskill_clear_post;
struct HPMHookPoint *HP_pc_skillatk_bonus_pre;
struct HPMHookPoint *HP_pc_skillatk_bonus_post;
struct HPMHookPoint *HP_pc_skillheal_bonus_pre;
@@ -5854,6 +5856,8 @@ struct {
struct HPMHookPoint *HP_skill_vf_cast_fix_post;
struct HPMHookPoint *HP_skill_delay_fix_pre;
struct HPMHookPoint *HP_skill_delay_fix_post;
+ struct HPMHookPoint *HP_skill_is_item_skill_pre;
+ struct HPMHookPoint *HP_skill_is_item_skill_post;
struct HPMHookPoint *HP_skill_check_condition_castbegin_pre;
struct HPMHookPoint *HP_skill_check_condition_castbegin_post;
struct HPMHookPoint *HP_skill_check_condition_castend_pre;
@@ -11631,6 +11635,8 @@ struct {
int HP_pc_checkitem_post;
int HP_pc_useitem_pre;
int HP_pc_useitem_post;
+ int HP_pc_itemskill_clear_pre;
+ int HP_pc_itemskill_clear_post;
int HP_pc_skillatk_bonus_pre;
int HP_pc_skillatk_bonus_post;
int HP_pc_skillheal_bonus_pre;
@@ -12721,6 +12727,8 @@ struct {
int HP_skill_vf_cast_fix_post;
int HP_skill_delay_fix_pre;
int HP_skill_delay_fix_post;
+ int HP_skill_is_item_skill_pre;
+ int HP_skill_is_item_skill_post;
int HP_skill_check_condition_castbegin_pre;
int HP_skill_check_condition_castbegin_post;
int HP_skill_check_condition_castend_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 0904a1dac..672b94dd8 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2440,6 +2440,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->unequipitem_pos, HP_pc_unequipitem_pos) },
{ HP_POP(pc->checkitem, HP_pc_checkitem) },
{ HP_POP(pc->useitem, HP_pc_useitem) },
+ { HP_POP(pc->itemskill_clear, HP_pc_itemskill_clear) },
{ HP_POP(pc->skillatk_bonus, HP_pc_skillatk_bonus) },
{ HP_POP(pc->skillheal_bonus, HP_pc_skillheal_bonus) },
{ HP_POP(pc->skillheal2_bonus, HP_pc_skillheal2_bonus) },
@@ -2996,6 +2997,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->cast_fix_sc, HP_skill_cast_fix_sc) },
{ HP_POP(skill->vf_cast_fix, HP_skill_vf_cast_fix) },
{ HP_POP(skill->delay_fix, HP_skill_delay_fix) },
+ { HP_POP(skill->is_item_skill, HP_skill_is_item_skill) },
{ HP_POP(skill->check_condition_castbegin, HP_skill_check_condition_castbegin) },
{ HP_POP(skill->check_condition_castend, HP_skill_check_condition_castend) },
{ HP_POP(skill->consume_requirement, HP_skill_consume_requirement) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 78702bedb..b50d86180 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -63360,6 +63360,33 @@ int HP_pc_useitem(struct map_session_data *sd, int n) {
}
return retVal___;
}
+int HP_pc_itemskill_clear(struct map_session_data *sd) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if (HPMHooks.count.HP_pc_itemskill_clear_pre > 0) {
+ int (*preHookFunc) (struct map_session_data **sd);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemskill_clear_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_pc_itemskill_clear_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.pc.itemskill_clear(sd);
+ }
+ if (HPMHooks.count.HP_pc_itemskill_clear_post > 0) {
+ int (*postHookFunc) (int retVal___, struct map_session_data *sd);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_itemskill_clear_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_pc_itemskill_clear_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd);
+ }
+ }
+ return retVal___;
+}
int HP_pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) {
int hIndex = 0;
int retVal___ = 0;
@@ -78137,6 +78164,33 @@ int HP_skill_delay_fix(struct block_list *bl, uint16 skill_id, uint16 skill_lv)
}
return retVal___;
}
+bool HP_skill_is_item_skill(struct map_session_data *sd, int skill_id, int skill_lv) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if (HPMHooks.count.HP_skill_is_item_skill_pre > 0) {
+ bool (*preHookFunc) (struct map_session_data **sd, int *skill_id, int *skill_lv);
+ *HPMforce_return = false;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_item_skill_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_skill_is_item_skill_pre[hIndex].func;
+ retVal___ = preHookFunc(&sd, &skill_id, &skill_lv);
+ }
+ if (*HPMforce_return) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.skill.is_item_skill(sd, skill_id, skill_lv);
+ }
+ if (HPMHooks.count.HP_skill_is_item_skill_post > 0) {
+ bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, int skill_id, int skill_lv);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_is_item_skill_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_skill_is_item_skill_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sd, skill_id, skill_lv);
+ }
+ }
+ return retVal___;
+}
int HP_skill_check_condition_castbegin(struct map_session_data *sd, uint16 skill_id, uint16 skill_lv) {
int hIndex = 0;
int retVal___ = 0;