summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-09 17:25:53 -0200
committershennetsind <ind@henn.et>2014-01-09 17:25:53 -0200
commit56649bda4b2f62cf42847830546b5856234b3178 (patch)
tree1ccf6f09b6620d95a177468bbee9cd0d428c1218
parentb79a9d7efa9213e3c791ec356bf21b712878d1aa (diff)
parent763102b807239809d318add3fae5629bfd50a78b (diff)
downloadhercules-56649bda4b2f62cf42847830546b5856234b3178.tar.gz
hercules-56649bda4b2f62cf42847830546b5856234b3178.tar.bz2
hercules-56649bda4b2f62cf42847830546b5856234b3178.tar.xz
hercules-56649bda4b2f62cf42847830546b5856234b3178.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
-rw-r--r--3rdparty/libconfig/extra/gen/scanner.l2
-rw-r--r--3rdparty/libconfig/scanner.c2
-rw-r--r--doc/item_db.txt2
-rw-r--r--doc/sample/bank_test.txt103
-rw-r--r--doc/sample/basejob_baseclass_upper.txt6
-rw-r--r--doc/sample/checkoption.txt12
-rw-r--r--doc/sample/delitem2.txt28
-rw-r--r--doc/sample/getequipcardid.txt15
-rw-r--r--doc/sample/getequipid.txt10
-rw-r--r--doc/sample/getiteminfo.txt8
-rw-r--r--doc/sample/getmonsterinfo.txt8
-rw-r--r--doc/sample/gstorage_test.txt46
-rw-r--r--doc/sample/localized_npc.txt87
-rw-r--r--doc/sample/npc_dynamic_shop.txt78
-rw-r--r--doc/sample/npc_extend_shop.txt369
-rw-r--r--doc/sample/npc_live_dialogues.txt31
-rw-r--r--doc/sample/npc_shop_test.txt40
-rw-r--r--doc/sample/npc_test_array.txt48
-rw-r--r--doc/sample/npc_test_chat.txt2
-rw-r--r--doc/sample/npc_test_checkweight.txt214
-rw-r--r--doc/sample/npc_test_duplicate.txt10
-rw-r--r--doc/sample/npc_test_func.txt12
-rw-r--r--doc/sample/npc_test_npctimer.txt8
-rw-r--r--doc/sample/npc_test_npctimer2.txt8
-rw-r--r--doc/sample/npc_test_pcre.txt8
-rw-r--r--doc/sample/npc_test_quest.txt22
-rw-r--r--doc/sample/npc_test_setitemx.txt75
-rw-r--r--doc/sample/npc_test_setmapflag.txt20
-rw-r--r--doc/sample/npc_test_skill.txt12
-rw-r--r--doc/sample/npc_test_time.txt2
-rw-r--r--doc/sample/npc_trader_sample.txt36
-rw-r--r--sql-files/item_db.sql634
-rw-r--r--sql-files/item_db_re.sql724
-rw-r--r--src/map/battle.c29
-rw-r--r--src/map/clif.c8
-rw-r--r--src/map/npc.c21
-rw-r--r--src/map/npc.h1
-rw-r--r--src/map/script.c5250
-rw-r--r--src/map/script.h4
-rw-r--r--src/map/skill.c78
-rw-r--r--src/map/status.c24
-rw-r--r--src/map/status.h1
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Hooks.inc42
45 files changed, 4178 insertions, 3967 deletions
diff --git a/3rdparty/libconfig/extra/gen/scanner.l b/3rdparty/libconfig/extra/gen/scanner.l
index 66364e019..bf527e596 100644
--- a/3rdparty/libconfig/extra/gen/scanner.l
+++ b/3rdparty/libconfig/extra/gen/scanner.l
@@ -89,7 +89,7 @@ static unsigned long long fromhex(const char *s)
static int fromihex(const char *s) {
unsigned long l = strtoul(s, NULL, 16);
if (l > INT32_MAX)
- l = INT32_MAX;
+ l &= INT32_MAX;
return (int)l;
}
diff --git a/3rdparty/libconfig/scanner.c b/3rdparty/libconfig/scanner.c
index c3a717ff0..44a7d69dd 100644
--- a/3rdparty/libconfig/scanner.c
+++ b/3rdparty/libconfig/scanner.c
@@ -628,7 +628,7 @@ static unsigned long long fromhex(const char *s)
static int fromihex(const char *s) {
unsigned long l = strtoul(s, NULL, 16);
if (l > INT32_MAX)
- l = INT32_MAX;
+ l &= INT32_MAX;
return (int)l;
}
diff --git a/doc/item_db.txt b/doc/item_db.txt
index 50b7523cc..30aa845f3 100644
--- a/doc/item_db.txt
+++ b/doc/item_db.txt
@@ -139,7 +139,7 @@ Upper: Equippable upper-types. Uses the following bitmasks:
Gender: Gender restriction. 0 is female, 1 is male, 2 for both (default value).
-Loc: Equipment's placement. A value needs to be spevified if the item is an
+Loc: Equipment's placement. A value needs to be specified if the item is an
equipment piece. Values are:
2^0 001 = Lower Headgear
diff --git a/doc/sample/bank_test.txt b/doc/sample/bank_test.txt
index 8b29abd93..5cdf319ca 100644
--- a/doc/sample/bank_test.txt
+++ b/doc/sample/bank_test.txt
@@ -3,12 +3,12 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20070315
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Contains commands needed for a basic bank.
//============================================================
-prontera,162,188,1 script Bank Test 112,{
+prontera,162,188,1 script Bank Test 4_F_KAFRA6,{
cutin "kafra_06",2;
mes "[Bank Test]";
@@ -16,51 +16,64 @@ prontera,162,188,1 script Bank Test 112,{
mes "You can only deposit a minimal of";
mes "1000z. What do you want to do?";
next;
- menu "Deposit",BANK_IN,"Withdraw",BANK_OUT,"Exit",B_EXIT2;
-BANK_IN:
- mes "[Bank Test]";
- mes "You must deposit the same of less";
- mes "amount of zeny that you carry.";
- mes "How much do you want to deposit?";
- next;
- input @kafrabank;
-
- if(@kafrabank<1000) goto B_EXIT2;
- set @kafrabank2,@kafrabank*1/100;
- if(@kafrabank+@kafrabank2>Zeny) goto BANK_F;
- set Zeny,Zeny-@kafrabank-@kafrabank2;
- set #kafrabank,#kafrabank+@kafrabank;
- mes "You now have: ^135445" + @kafrabank2 + "z^000000";
+ switch (select("Deposit","Withdraw","Exit")) {
+ case 1:
+ mes "[Bank Test]";
+ mes "How much do you want to deposit?";
+ next;
+ input .@kafrabank;
- goto B_EXIT;
-BANK_OUT:
- if(#kafrabank==0) goto BANK_F2;
- mes "[Bank Test]";
- mes "You can only withdraw equally or below this quantity:";
- mes "^135445" + #kafrabank + "^000000z";
- mes "How much do you want to withdraw?";
- next;
- input @kafrabank;
+ if (.@kafrabank < 1000) {
+ mes "[Bank Test]";
+ mes "The minimum deposit is 1000z";
+ next;
+ break;
+ }
+ if (.@kafrabank > Zeny) {
+ mes "[Bank Test]";
+ mes "You don't have enough money.";
+ next;
+ break;
+ }
+ Zeny -= .@kafrabank;
+ #kafrabank += .@kafrabank;
+ mes "[Bank Test]";
+ mes "You now have ^135445" + Zeny + "z^000000";
+ mes "and your bank account ^135445" + #kafrabank + "z^000000";
+ next;
+ break;
+ case 2:
+ if (#kafrabank == 0) {
+ mes "[Bank Test]";
+ mes "Your bank account is currently empty, you can't withdraw.";
+ next;
+ break;
+ }
+ mes "[Bank Test]";
+ mes "Current balance: ^135445" + #kafrabank + "^000000z";
+ mes "How much do you want to withdraw?";
+ next;
+ input .@kafrabank;
- if(@kafrabank<1) goto B_EXIT2;
- if(@kafrabank>#kafrabank) goto BANK_F;
- set #kafrabank,#kafrabank-@kafrabank;
- set Zeny,Zeny+@kafrabank;
-
- goto B_EXIT;
-
-BANK_F:
- mes "[Bank Test]";
- mes "You can't withdraw more than ^135445"+ #kafrabank + "^000000z.";
- goto B_EXIT2;
-BANK_F2:
- mes "[Bank Test]";
- mes "Your account is empty, you may not withdraw at this time.";
- goto B_EXIT2;
+ if (.@kafrabank < 1)
+ break;
+ if (.@kafrabank > #kafrabank) {
+ mes "[Bank Test]";
+ mes "You can't withdraw more than ^135445"+ #kafrabank + "^000000z.";
+ next;
+ break;
+ }
+ #kafrabank -= .@kafrabank;
+ Zeny += .@kafrabank;
+ mes "[Bank Test]";
+ mes "You now have ^135445" + Zeny + "z^000000";
+ mes "and your bank account ^135445" + #kafrabank + "z^000000";
+ next;
+ break;
+ case 3:
+ break;
+ }
-B_EXIT:
- mes "Thanks for using depositing";
-B_EXIT2:
mes "Good bye!";
cutin "kafra_06",255;
close;
diff --git a/doc/sample/basejob_baseclass_upper.txt b/doc/sample/basejob_baseclass_upper.txt
index 8e2501e09..80cc23fc7 100644
--- a/doc/sample/basejob_baseclass_upper.txt
+++ b/doc/sample/basejob_baseclass_upper.txt
@@ -3,12 +3,12 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20110123
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Outputs the values of class constants.
//============================================================
-prontera,155,177,1 script Tell Me 725,{
+prontera,155,177,1 script Tell Me 4_F_JOB_ASSASSIN,{
mes "[Tell Me]";
mes "Class: " + Class;
mes "BaseClass: " + BaseClass;
diff --git a/doc/sample/checkoption.txt b/doc/sample/checkoption.txt
index 8f0f96d9f..77c0a3105 100644
--- a/doc/sample/checkoption.txt
+++ b/doc/sample/checkoption.txt
@@ -3,15 +3,17 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20070315
+//= 20131225
//===== Description: =========================================
//= Demonstrates the 'checkoption' command.
//============================================================
-prontera,156,89,6 script test_checkoption 117,{
+prontera,156,89,6 script test_checkoption 4_F_KAFRA1,{
mes "Please enter a value of type!";
- input @value;
- if(checkoption(@value) == 1) mes "True!";
- else if(checkoption(@value) == 0) mes "False!";
+ input .@value;
+ if(checkoption(.@value) == 1)
+ mes "True!";
+ else if(checkoption(.@value) == 0)
+ mes "False!";
close;
}
diff --git a/doc/sample/delitem2.txt b/doc/sample/delitem2.txt
index 9e74d76e7..46e3e42c7 100644
--- a/doc/sample/delitem2.txt
+++ b/doc/sample/delitem2.txt
@@ -3,37 +3,37 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20070315
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates the 'delitem2' command.
//============================================================
-prontera,160,182,5 script Delitem2 51,{
+prontera,160,182,5 script Delitem2 1_M_BARD,{
mes "Item ID?";
next;
- input @nameid;
+ input .@nameid;
mes "Amount?";
next;
- input @amount;
+ input .@amount;
mes "Identified? (0:no, 1:yes)";
next;
- input @iden;
+ input .@iden;
mes "Refined how many times?";
next;
- input @ref;
+ input .@ref;
mes "Attribute? (0:normal, 1:broken)";
next;
- input @attr;
+ input .@attr;
mes "4 cards (one after another)...";
next;
- input @c1;
- input @c2;
- input @c3;
- input @c4;
+ input .@c1;
+ input .@c2;
+ input .@c3;
+ input .@c4;
mes "Your command is:";
- mes "delitem2 "+@nameid+","+@amount+","+@iden+","+@ref+","+@attr+","+@c1+","+@c2+","+@c3+","+@c4;
+ mes "delitem2 "+.@nameid+","+.@amount+","+.@iden+","+.@ref+","+.@attr+","+.@c1+","+.@c2+","+.@c3+","+.@c4;
next;
- delitem2 @nameid,@amount,@iden,@ref,@attr,@c1,@c2,@c3,@c4;
+ delitem2 .@nameid,.@amount,.@iden,.@ref,.@attr,.@c1,.@c2,.@c3,.@c4;
mes "And here is the moment when your item should disappear! :P";
close;
}
diff --git a/doc/sample/getequipcardid.txt b/doc/sample/getequipcardid.txt
index 6b435f41f..8f7d7f27d 100644
--- a/doc/sample/getequipcardid.txt
+++ b/doc/sample/getequipcardid.txt
@@ -3,18 +3,19 @@
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates the 'getequipcardid' command.
//============================================================
-prontera,155,177,4 script Check My Hat 810,{
+prontera,155,177,4 script Check My Hat 1_M_SIGNROGUE,{
mes "Checking your head...";
if (getequipisequiped(1)) {
- set @id,getequipid(1);
- set @ref,getequiprefinerycnt(1);
- mes "Your hat is... "+getitemname(@id)+"...";
- if(@ref) mes "It has been refined "+@ref+" times.";
+ .@id = getequipid(1);
+ .@ref = getequiprefinerycnt(1);
+ mes "Your hat is... "+getitemname(.@id)+"...";
+ if(.@ref)
+ mes "It has been refined "+.@ref+" times.";
mes "Card Slot 0:"+getequipcardid(1,0)+" 1:"+getequipcardid(1,1);
mes "Card Slot 2:"+getequipcardid(1,2)+" 3:"+getequipcardid(1,3);
close;
diff --git a/doc/sample/getequipid.txt b/doc/sample/getequipid.txt
index 6a2ef342f..6543d7932 100644
--- a/doc/sample/getequipid.txt
+++ b/doc/sample/getequipid.txt
@@ -3,14 +3,14 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates the 'getequipid' command.
//============================================================
-prontera,161,181,6 script GetEquipID Sample 105,{
+prontera,161,181,6 script getequipid Sample 8W_SOLDIER,{
mes "[GetEquipID Sample]";
- for(set .@i,1; .@i<11; set .@i,.@i+1)
- mes "GetEquipID(" + .@i + ") : " + getequipid(1);
+ for (.@i = 1; .@i < 11; ++.@i)
+ mes "getequipid(" + .@i + ") : " + getequipid(1);
close;
}
diff --git a/doc/sample/getiteminfo.txt b/doc/sample/getiteminfo.txt
index 632999f3b..89f9a66b5 100644
--- a/doc/sample/getiteminfo.txt
+++ b/doc/sample/getiteminfo.txt
@@ -3,12 +3,12 @@
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates the 'getiteminfo' command.
//============================================================
-prontera,156,179,6 script test_getiteminfo 117,{
+prontera,156,179,6 script test_getiteminfo 4_F_KAFRA1,{
mes "Please enter an item ID.";
input .@value;
@@ -17,7 +17,7 @@ prontera,156,179,6 script test_getiteminfo 117,{
mes "Item ID: "+.@value+" ^nItemID^"+.@value;
mes "Current item info:";
- for(set .@id,0; .@id<14; set .@id,.@id+1)
+ for (.@id = 0; .@id < 14; ++.@id)
mes " getiteminfo("+.@value+","+.@id+") = "+getiteminfo(.@value,.@id);
close;
}
diff --git a/doc/sample/getmonsterinfo.txt b/doc/sample/getmonsterinfo.txt
index 471af9e5c..064f1fc71 100644
--- a/doc/sample/getmonsterinfo.txt
+++ b/doc/sample/getmonsterinfo.txt
@@ -3,12 +3,12 @@
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates the 'getmonsterinfo' command.
//============================================================
-prontera,156,179,6 script test_getmonsterinfo 117,{
+prontera,156,179,6 script test_getmonsterinfo 4_F_KAFRA1,{
mes "Please enter a monster ID.";
input .@value;
if(getmonsterinfo(.@value,MOB_LV)<0 || getmonsterinfo(.@value,MOB_NAME)=="Dummy") {
@@ -17,7 +17,7 @@ prontera,156,179,6 script test_getmonsterinfo 117,{
}
mes "Monster ID: "+.@value+" '"+getmonsterinfo(.@value,MOB_NAME)+"'";
mes "Current Monster info:";
- for(set .@id,0; .@id<23; set .@id,.@id+1)
+ for (.@id = 0; .@id < 23; ++.@id)
mes " getmonsterinfo("+.@value+","+@id+") = "+getmonsterinfo(.@value,@id);
close;
}
diff --git a/doc/sample/gstorage_test.txt b/doc/sample/gstorage_test.txt
index b8f9fe2c4..8b1a1c0e6 100644
--- a/doc/sample/gstorage_test.txt
+++ b/doc/sample/gstorage_test.txt
@@ -3,42 +3,34 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20070315
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Contains commands needed for a guild warehouse NPC.
//============================================================
-prontera,165,188,4 script Guild Warehouse 112,{
+prontera,165,188,4 script Guild Warehouse 4_F_KAFRA6,{
cutin "kafra_06",2;
mes "[Guild Warehouse Coupler]";
- mes "This is the guild warehouse coupler service.";
+ mes "This is the guild warehouse coupler service.";
mes "You will not receive zeny for this is a test.";
next;
- menu "Access Guild Warehouse", GS_OPEN, "Exit", GS_EXIT3;
+ if (select("Access Guild Warehouse","Exit") != 1) {
+ mes "[Guild Warehouser]";
+ mes "Come back whenever you want.";
+ cutin "kafra_06", 255;
+ close;
+ }
-GS_OPEN:
- set @flag,guildopenstorage(0);
- if(@flag == 1) goto GS_EXIT1;
- if(@flag == 2) goto GS_EXIT2;
- goto GS_EXIT4;
-
-GS_EXIT1:
- mes "[Guild Warehouse]";
- mes "The guild warehouse is being used right now.";
- mes "Please wait a while, then come back.";
- goto GS_EXIT4;
-
-GS_EXIT2:
- mes "[Guild Warehouse]";
- mes "You can't use this service if you're not in a guild!";
- goto GS_EXIT4;
-
-GS_EXIT3:
- mes "[Guild Warehouser]";
- mes "Come back whenever you want.";
-
-GS_EXIT4:
+ .@flag = guildopenstorage;
+ if (.@flag == 1) {
+ mes "[Guild Warehouse]";
+ mes "The guild warehouse is being used right now.";
+ mes "Please wait a while, then come back.";
+ } else if(.@flag == 2) {
+ mes "[Guild Warehouse]";
+ mes "You can't use this service if you're not in a guild!";
+ }
cutin "kafra_06",255;
close;
}
diff --git a/doc/sample/localized_npc.txt b/doc/sample/localized_npc.txt
index 91bf46062..82a08fa35 100644
--- a/doc/sample/localized_npc.txt
+++ b/doc/sample/localized_npc.txt
@@ -1,23 +1,23 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Sample localized NPC
-//===== By: ==================================================
+//===== By: ==================================================
//= Hercules Dev Team
-//===== Current Version: =====================================
-//= v1.0
-//===== Description: =========================================
+//===== Current Version: =====================================
+//= v1.1
+//===== Description: =========================================
//= Example of a localized NPC.
-//=
+//=
//= There are many ways to do it, this is just one option.
-//= The player has a global account variable ##_langid_ that
+//= The player has a global account variable ##_langid_ that
//= identifies the it's language.
-//=
+//=
//= The default language should always have langid 0.
-//= When a message isn't found for the player's langid
+//= When a message isn't found for the player's langid
//= (strlen = 0), the message from langid 0 is used instead.
-//=
-//= Each message is identified by a string that must only
+//=
+//= Each message is identified by a string that must only
//= contain valid variable name characters.
-//=
+//=
//= void setlang(int langid)
//= - sets the player's language
//= int getlang(void)
@@ -28,16 +28,16 @@
//= - returns the localized text of name
//= void mes2(string name)
//= - displays the localized text of name
-//=
-//===== Additional Comments: =================================
+//=
+//===== Additional Comments: =================================
//= To use this globally, just put the functions in Global_Functions.txt
-//============================================================
+//============================================================
//////////////////////////////////////////////////////////////
/// Sets the language of the player account.
/// @param langid Languange identifier (0 for default)
function script setlang {
- set ##_langid_, getarg(0);
+ ##_langid_ = getarg(0);
return;
}
@@ -54,15 +54,15 @@ function script getlang {
/// @param langid Language identifier (0 for default)
/// @param text Text message
function script setmes2 {
- set $@mes2_name$, getarg(0);
- set $@mes2_langid, getarg(1);
- set $@mes2_text$, getarg(2);
- set $@mes2_var$, "$@__"+ $@mes2_name$ +"_"+ $@mes2_langid +"$";
+ .@mes2_name$ = getarg(0);
+ .@mes2_langid = getarg(1);
+ .@mes2_text$ = getarg(2);
+ .@mes2_var$ = "$@__"+ .@mes2_name$ +"_"+ .@mes2_langid +"$";
- //debugmes "setmes2 \""+ $@mes2_var$ +"\", \""+ $@mes2_text$ +"\";";
+ //debugmes "setmes2 \""+ .@mes2_var$ +"\", \""+ .@mes2_text$ +"\";";
// set the localized text
- setd $@mes2_var$, $@mes2_text$;
+ setd .@mes2_var$, .@mes2_text$;
return;
}
@@ -73,14 +73,14 @@ function script setmes2 {
/// @param langid Language identifier (0 for default)
/// @return Text message
function script getmes2 {
- set $@mes2_name$, getarg(0);
- set $@mes2_langid, getarg(1);
- set $@mes2_var$, "$@__"+ $@mes2_name$ +"_"+ $@mes2_langid +"$";
- set $@mes2_text$, getd($@mes2_var$);
+ .@mes2_name$ = getarg(0);
+ .@mes2_langid = getarg(1);
+ .@mes2_var$ = "$@__"+ .@mes2_name$ +"_"+ .@mes2_langid +"$";
+ .@mes2_text$ = getd(.@mes2_var$);
- //debugmes "getmes2(\""+ $@mes2_var$ +"\")=\""+ $@mes2_text$ +"\"";
+ //debugmes "getmes2(\""+ .@mes2_var$ +"\")=\""+ .@mes2_text$ +"\"";
- return $@mes2_text$;
+ return .@mes2_text$;
}
//////////////////////////////////////////////////////////////
@@ -89,32 +89,31 @@ function script getmes2 {
/// that are valis as a variable name
/// @param index Message identifier
function script mes2 {
- set @mes2_index$, getarg(0);
+ .@mes2_index$ = getarg(0);
- if( getstrlen(@mes2_index$) == 0 )
+ if( getstrlen(.@mes2_index$) == 0 )
return; // invalid index
// print localized text
- set @mes2_text$, callfunc("getmes2",@mes2_index$,##_langid_);
- if( getstrlen(@mes2_text$) == 0 )
- {
- if( ##_langid_ != 0 )
- {// revert to default language
- set @mes2_text$, callfunc("getmes2",@mes2_index$,0);
- if( getstrlen(@mes2_text$) != 0 )
- mes @mes2_text$; // default text
+ .@mes2_text$ = callfunc("getmes2",.@mes2_index$,##_langid_);
+ if( getstrlen(.@mes2_text$) == 0 ) {
+ if( ##_langid_ != 0 ) {
+ // revert to default language
+ .@mes2_text$ = callfunc("getmes2",.@mes2_index$,0);
+ if( getstrlen(.@mes2_text$) != 0 )
+ mes .@mes2_text$; // default text
}
} else
- mes @mes2_text$; // localized text
+ mes .@mes2_text$; // localized text
return;
}
//////////////////////////////////////////////////////////////
/// Sample localized NPC
-prontera,155,183,4 script LocalizedNPC 705,{
+prontera,155,183,4 script LocalizedNPC 4_M_GEF_SOLDIER,{
// Get text for specific languages
- set @menu1$, callfunc("getmes2","LNPC_lang",0);
- set @menu2$, callfunc("getmes2","LNPC_lang",1);
+ .@menu1$ = callfunc("getmes2","LNPC_lang",0);
+ .@menu2$ = callfunc("getmes2","LNPC_lang",1);
do {
// get text that fallbacks to language 0
callfunc "mes2", "LNPC_name";
@@ -123,7 +122,7 @@ prontera,155,183,4 script LocalizedNPC 705,{
callfunc "mes2", "LNPC_text";
next;
- switch(select(@menu1$,@menu2$,"Cancel"))
+ switch(select(.@menu1$,.@menu2$,"Cancel"))
{
case 1:
case 2:
@@ -144,6 +143,6 @@ OnInterIfInitOnce:
callfunc "setmes2", "LNPC_lang", 0, "EN";
callfunc "setmes2", "LNPC_lang", 1, "PT";
callfunc "setmes2", "LNPC_text", 0, "Something in english";
- callfunc "setmes2", "LNPC_text", 1, "Algo em portugu�s";
+ callfunc "setmes2", "LNPC_text", 1, "Algo em português";
end;
}
diff --git a/doc/sample/npc_dynamic_shop.txt b/doc/sample/npc_dynamic_shop.txt
index c3bc78293..1e4ac77e4 100644
--- a/doc/sample/npc_dynamic_shop.txt
+++ b/doc/sample/npc_dynamic_shop.txt
@@ -1,39 +1,37 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Sample: Dynamic Shop
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20101219
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Contains commands needed for a dynamic shop.
//============================================================
// Dummy shop to insert items into:
- shop dyn_shop1 -1,501:50.
-prontera,181,200,4 script Dynamic Shop 123,{
+prontera,181,200,4 script Dynamic Shop 2_F_MAGICMASTER,{
callshop "dyn_shop1",0;
npcshopattach "dyn_shop1";
end;
OnSellItem:
- for(set @i, 0; @i < getarraysize(@sold_nameid); set @i, @i + 1){
- if(countitem(@sold_nameid[@i]) < @sold_quantity[@i] || @sold_quantity[@i] <= 0){
+ for (.@i = 0; .@i < getarraysize(@sold_nameid); ++.@i) {
+ if(countitem(@sold_nameid[.@i]) < @sold_quantity[.@i] || @sold_quantity[.@i] <= 0) {
mes "omgh4x!";
close;
- } else if(@sold_nameid[@i] == 501){
- delitem 501, @sold_quantity[@i];
- set $@rpotsleft, $@rpotsleft + @sold_quantity[@i];
- set Zeny, Zeny + @sold_quantity[@i]*20;
+ } else if (@sold_nameid[.@i] == Red_Potion) {
+ delitem Red_Potion, @sold_quantity[.@i];
+ $@rpotsleft += @sold_quantity[.@i];
+ Zeny += @sold_quantity[.@i]*20;
+ } else if (@sold_nameid[.@i] == Orange_Potion){
+ delitem Orange_Potion, @sold_quantity[.@i];
+ $@opotsleft += @sold_quantity[.@i];
+ Zeny += @sold_quantity[.@i]*100;
} else {
- if(@sold_nameid[@i] == 502){
- delitem 502, @sold_quantity[@i];
- set $@opotsleft, $@opotsleft + @sold_quantity[@i];
- set Zeny, Zeny + @sold_quantity[@i]*100;
- } else {
- mes "Sorry, I don't need your items.";
- close;
- }
+ mes "Sorry, I don't need your items.";
+ close;
}
}
deletearray @sold_quantity, getarraysize(@sold_quantity);
@@ -42,40 +40,40 @@ OnSellItem:
close;
OnBuyItem:
- for(set @i, 0; @i < getarraysize(@bought_nameid); set @i, @i + 1){
- if(@bought_quantity[@i] <= 0){
+ for (.@i = 0; .@i < getarraysize(@bought_nameid); ++.@i) {
+ if (@bought_quantity[.@i] <= 0) {
mes "omgh4x!";
close;
- } else if(@bought_nameid[@i] == 501){
- if(@bought_quantity[@i] > $@rpotsleft){
- if($@rpotsleft > 0){
- set @bought_quantity[@i], $@rpotsleft;
+ } else if (@bought_nameid[.@i] == Red_Potion) {
+ if (@bought_quantity[.@i] > $@rpotsleft) {
+ if($@rpotsleft > 0) {
+ @bought_quantity[.@i] = $@rpotsleft;
} else {
mes "We are out of red potions!";
close;
}
}
- if(Zeny >= 40*@bought_quantity[@i]){
- set Zeny, Zeny - 40*@bought_quantity[@i];
- getitem 501, @bought_quantity[@i];
- set $@rpotsleft, $@rpotsleft - @bought_quantity[@i];
+ if(Zeny >= 40*@bought_quantity[.@i]) {
+ Zeny -= 40*@bought_quantity[.@i];
+ getitem Red_Potion, @bought_quantity[.@i];
+ $@rpotsleft -= @bought_quantity[.@i];
} else {
mes "You have insufficient cash.";
close;
}
- } else {
- if(@bought_quantity[@i] > $@opotsleft){
- if($@opotsleft > 0){
- set @bought_quantity[@i], $@opotsleft;
+ } else /*if (@bought_nameid[.@i] == Orange_Potion)*/ {
+ if(@bought_quantity[.@i] > $@opotsleft) {
+ if($@opotsleft > 0) {
+ @bought_quantity[.@i] = $@opotsleft;
} else {
mes "We are out of orange potions!";
close;
}
}
- if(Zeny >= 200*@bought_quantity[@i]){
- set Zeny, Zeny - 200*@bought_quantity[@i];
- getitem 502, @bought_quantity[@i];
- set $@opotsleft, $@opotsleft - @bought_quantity[@i];
+ if(Zeny >= 200*@bought_quantity[.@i]) {
+ Zeny -= 200*@bought_quantity[.@i];
+ getitem Orange_Potion, @bought_quantity[.@i];
+ $@opotsleft -= @bought_quantity[.@i];
} else {
mes "You have insufficient cash.";
close;
@@ -88,8 +86,8 @@ OnBuyItem:
close;
OnInit:
- npcshopitem "dyn_shop1", 501,40,502,200;
- set $@rpotsleft, 10;
- set $@opotsleft, 10;
+ npcshopitem "dyn_shop1", Red_Potion, 40, Orange_Potion, 200;
+ $@rpotsleft = 10;
+ $@opotsleft = 10;
end;
}
diff --git a/doc/sample/npc_extend_shop.txt b/doc/sample/npc_extend_shop.txt
index 1ca4ed7b8..31ed0af43 100644
--- a/doc/sample/npc_extend_shop.txt
+++ b/doc/sample/npc_extend_shop.txt
@@ -1,30 +1,351 @@
-//===== rAthena Script =======================================
+//===== Hercules Script ======================================
//= Sample: Extended Shops
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= An example of shop NPCs.
//============================================================
-prontera,182,213,3 shop Super Novice Shop 716,1243:-1,2112:-1,2340:-1,2352:-1,2414:-1,2510:-1,2628:-1,5055:-1
-prontera,149,139,5 shop Whips Merchant 58,1951:-1,1953:-1,1955:-1,1957:-1,1959:-1,1961:-1,1962:-1,1963:-1,1964:-1
-prontera,162,175,3 shop Headgears Merchant 1 73,2209:-1,2210:-1,2211:-1,2221:-1,2223:-1,2217:-1,2227:-1,2231:-1,2225:-1,2229:-1
-prontera,162,172,3 shop Headgears Merchant 2 73,2203:-1,2212:-1,2218:-1,2239:-1,2241:-1,2242:-1,2243:-1,2263:-1,2265:-1,2276:-1,2288:-1,2291:-1,2297:-1
-prontera,162,169,3 shop Armours Merchant 73,2311:-1,2313:-1,2315:-1,2317:-1,2318:-1,2320:-1,2322:-1,2324:-1,2326:-1,2327:-1,2329:-1,2331:-1,2334:-1,2336:-1,2337:-1,2342:-1
-prontera,162,166,3 shop Shields Merchant 73,2102:-1,2104:-1,2106:-1,2108:-1,2109:-1,2110:-1,2111:-1
-prontera,162,163,3 shop Boots Merchant 73,2402:-1,2404:-1,2406:-1,2407:-1,2412:-1,2413:-1
-prontera,162,160,3 shop Robes Merchant 73,2502:-1,2504:-1,2506:-1,2507:-1,2508:-1,2509:-1
-prontera,162,157,3 shop Accessory Merchant 73,2601:-1,2602:-1,2603:-1,2604:-1,2605:-1,2607:-1,2608:-1,2615:-1,2616:-1,2618:-1,2619:-1
-prontera,162,154,3 shop Arrows Merchant 73,1750:-1,1751:-1,1752:-1,1753:-1,1754:-1,1755:-1,1756:-1,1757:-1,1758:-1,1759:-1,1760:-1,1761:-1,1762:-1,1763:-1,1764:-1,1765:-1,1766:-1,1767:-1,1768:-1,1769:-1
-prontera,162,151,3 shop Alchemist Shop 73.7127:-1,7128:-1,7129:-1,7130:-1,7131:-1,7132:-1,7133:-1,7144:-1,7134:-1,1093:-1
-prontera,162,148,3 shop Taming Merchant 73,619:-1,620:-1,621:-1,623:-1,624:-1,625:-1,626:-1,627:-1,628:-1,629:-1,630:-1,631:-1,632:-1,633:-1,634:-1,635:-1,636:-1,637:-1,638:-1,639:-1,640:-1,641:-1,642:-1,659:-1
-prontera,162,145,3 shop Pet Equipment 73,10001:-1,10002:-1,10003:-1,10004:-1,10005:-1,10006:-1,10007:-1,10008:-1,10009:-1,10010:-1,10011:-1,10012:-1,10013:-1,10014:-1,10015:-1,10016:-1,10017:-1,10018:-1,10019:-1,10020:-1
-prontera,148,234,5 shop Weapon Card Merchant 80,4004:100000,4018:100000,4025:100000,4026:100000,4019:100000,4029:100000,4043:100000,4017:100000,4020:100000,4024:100000,4037:100000,4055:100000,4057:100000,4076:100000,4096:100000,4104:100000,4030:100000,4049:100000,4062:100000,4069:100000,4085:100000,4007:100000,4060:100000,4063:100000,4068:100000,4080:100000,4094:100000,4111:100000,4118:100000,4082:20700,4092:100000,4126:100000,4072:100000,4115:100000,4035:100000,4086:100000,4106:100000,4117:100000,4125:100000
-prontera,148,231,5 shop Headgear Card Merchant 80,4010:100000,4039:100000,4046:100000,4052:100000,4087:100000,4110:100000,4112:100000,4122:100000,4127:100000
-prontera,146,229,5 shop Armor Card Merchant 80,4003:100000,4008:100000,4011:100000,4014:100000,4016:100000,4021:100000,4023:100000,4031:100000,4078:100000,4089:100000,4098:100000,4099:100000,4101:100000,4114:100000,4119:100000,4141:100000,4061:100000,4105:100000
-prontera,144,227,5 shop Shield Card Merchant 80,4013:100000,4032:100000,4058:100000,4059:100000,4066:100000,4074:100000,4083:100000,4120:100000,4124:100000,4136:100000,4138:100000,4045:100000,4067:100000,4075:100000,4090:100000
-prontera,142,225,5 shop Robe Card Merchant 80,4056:100000,4071:100000,4081:100000,4095:100000,4108:100000,4109:100000,4113:100000,4116:100000,4133:100000,4015:100000,4088:100000,4102:100000,4129:100000
-prontera,140,223,5 shop Shoes Card Merchant 80,4009:100000,4038:100000,4050:100000,4070:100000,4097:100000,4100:100000,4107:100000
-prontera,138,221,5 shop Accessory Card Merchant 80,4022:100500,4027:100500,4028:100500,4034:100500,4051:100500,4064:100500,4091:100500,4079:100500,4033:100500,4040:100500,4044:100500,4048:100500,4053:100500,4073:100500,4077:100500,4084:100500,4093:100500,4103:100500,4139:100500
+prontera,182,213,3 trader Super Novice Shop 4_M_KID2,{
+OnInit:
+ sellitem Novice_Knife;
+ sellitem Novice_Guard;
+ sellitem Novice_Breast;
+ sellitem Novice_Plate;
+ sellitem Novice_Boots;
+ sellitem Novice_Hood;
+ sellitem Novice_Armlet;
+ sellitem Novice_Egg_Cap;
+}
+prontera,149,139,5 trader Whips Merchant 1_M_MERCHANT,{
+OnInit:
+ sellitem Rope_;
+ sellitem Line_;
+ sellitem Wire_;
+ sellitem Rante_;
+ sellitem Tail_;
+ sellitem Whip_;
+ sellitem Lariat;
+ sellitem Rapture_Rose;
+ sellitem Chemeti;
+}
+prontera,162,175,3 trader Headgears Merchant 1 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Ribbon_;
+ sellitem Hair_Band;
+ sellitem Bandana;
+ sellitem Hat_;
+ sellitem Turban_;
+ sellitem Biretta_;
+ sellitem Cap_;
+ sellitem Gemmed_Sallet_;
+ sellitem Goggle_;
+ sellitem Helm_;
+}
+prontera,162,172,3 trader Headgears Merchant 2 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Glasses;
+ sellitem Eye_Bandage;
+ sellitem Flu_Mask;
+ sellitem One_Eyed_Glass;
+ sellitem Granpa_Beard;
+ sellitem Luxury_Sunglasses;
+ sellitem Spinning_Eyes;
+ sellitem Gangster_Patch;
+ sellitem Ganster_Mask;
+ sellitem Eagle_Eyes;
+ sellitem Mr_Scream;
+ sellitem Masquerade;
+ sellitem Goblini_Mask;
+}
+prontera,162,169,3 trader Armours Merchant 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Mink_Coat;
+ sellitem Padded_Armor_;
+ sellitem Chain_Mail_;
+ sellitem Plate_Armor_;
+ sellitem Clothes_Of_The_Lord;
+ sellitem Formal_Suit;
+ sellitem Silk_Robe_;
+ sellitem Scapulare_;
+ sellitem Saint_Robe_;
+ sellitem Holy_Robe;
+ sellitem Wooden_Mail_;
+ sellitem Tights_;
+ sellitem Mage_Coat;
+ sellitem Thief_Clothes_;
+ sellitem Ninja_Suit;
+ sellitem Full_Plate_Armor_;
+}
+prontera,162,166,3 trader Shields Merchant 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Guard_;
+ sellitem Buckler_;
+ sellitem Shield_;
+ sellitem Mirror_Shield_;
+ sellitem Memorize_Book;
+ sellitem Holy_Guard;
+ sellitem Herald_Of_GOD;
+}
+prontera,162,163,3 trader Boots Merchant 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Sandals_;
+ sellitem Shoes_;
+ sellitem Boots_;
+ sellitem Chrystal_Pumps;
+ sellitem Grave_;
+ sellitem Safty_Boots;
+}
+prontera,162,160,3 trader Robes Merchant 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Hood_;
+ sellitem Muffler_;
+ sellitem Manteau_;
+ sellitem Cape_Of_Ancient_Lord;
+ sellitem Ragamuffin_Cape;
+ sellitem Clack_Of_Servival;
+}
+prontera,162,157,3 trader Accessory Merchant 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Ring;
+ sellitem Earring;
+ sellitem Necklace;
+ sellitem Glove;
+ sellitem Brooch;
+ sellitem Clip;
+ sellitem Rosary;
+ sellitem Safety_Ring;
+ sellitem Critical_Ring;
+ sellitem Matyr's_Flea_Guard;
+ sellitem Thimble_Of_Archer;
+}
+prontera,162,154,3 trader Arrows Merchant 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Arrow;
+ sellitem Silver_Arrow;
+ sellitem Fire_Arrow;
+ sellitem Steel_Arrow;
+ sellitem Crystal_Arrow;
+ sellitem Arrow_Of_Wind;
+ sellitem Stone_Arrow;
+ sellitem Immatrial_Arrow;
+ sellitem Stun_Arrow;
+ sellitem Freezing_Arrow;
+ sellitem Flash_Arrow;
+ sellitem Curse_Arrow;
+ sellitem Rusty_Arrow;
+ sellitem Poison_Arrow;
+ sellitem Incisive_Arrow;
+ sellitem Oridecon_Arrow;
+ sellitem Arrow_Of_Counter_Evil;
+ sellitem Arrow_Of_Shadow;
+ sellitem Sleep_Arrow;
+ sellitem Silence_Arrow;
+}
+prontera,162,151,3 trader Alchemist Shop 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Alcol_Create_Book;
+ sellitem FireBottle_Create_Book;
+ sellitem Acid_Create_Book;
+ sellitem Plant_Create_Book;
+ sellitem Mine_Create_Book;
+ sellitem Coating_Create_Book;
+ sellitem Slim_Potion_Create_Book;
+ sellitem Normal_Potion_Book;
+ sellitem Medicine_Bowl;
+ sellitem Empty_Potion;
+}
+prontera,162,148,3 trader Taming Merchant 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Unripe_Apple;
+ sellitem Orange_Juice;
+ sellitem Bitter_Herb;
+ sellitem Rainbow_Carrot;
+ sellitem Earthworm_The_Dude;
+ sellitem Rotten_Fish;
+ sellitem Lusty_Iron;
+ sellitem Monster_Juice;
+ sellitem Sweet_Milk;
+ sellitem Well_Dried_Bone;
+ sellitem Singing_Flower;
+ sellitem Dew_Laden_Moss;
+ sellitem Deadly_Noxious_Herb;
+ sellitem Fatty_Chubby_Earthworm;
+ sellitem Baked_Yam;
+ sellitem Tropical_Banana;
+ sellitem Horror_Of_Tribe;
+ sellitem No_Recipient;
+ sellitem Old_Broom;
+ sellitem Silver_Knife_Of_Chaste;
+ sellitem Armlet_Of_Obedience;
+ sellitem Shining_Stone;
+ sellitem Contracts_In_Shadow;
+ sellitem Book_Of_Devil;
+ sellitem Heart_Of_Her;
+}
+prontera,162,145,3 trader Pet Equipment 1_F_MERCHANT_01,{
+OnInit:
+ sellitem Skull_Helm;
+ sellitem Monster_Oxygen_Mask;
+ sellitem Transparent_Headgear;
+ sellitem Pacifier;
+ sellitem Wig;
+ sellitem Queen's_Hair_Ornament;
+ sellitem Silk_Ribbon;
+ sellitem Punisher;
+ sellitem Wild_Flower;
+ sellitem Battered_Pot;
+ sellitem Stellar_Hairpin;
+ sellitem Tiny_Egg_Shell;
+ sellitem Backpack;
+ sellitem Rocker_Glasses;
+ sellitem Green_Lace;
+ sellitem Golden_Bell;
+ sellitem Bark_Shorts;
+ sellitem Monkey_Circlet;
+ sellitem Red_Muffler;
+ sellitem Sword_Of_Grave_Keeper;
+}
+prontera,148,234,5 trader Weapon Card Merchant 1_F_PUBGIRL,{
+OnInit:
+ sellitem Drops_Card, 100000;
+ sellitem Andre_Larva_Card, 100000;
+ sellitem Skeleton_Card, 100000;
+ sellitem Thief_Bug_Female_Card, 100000;
+ sellitem Hornet_Card, 100000;
+ sellitem Wolf_Card, 100000;
+ sellitem Andre_Card, 100000;
+ sellitem Savage_Babe_Card, 100000;
+ sellitem Farmiliar_Card, 100000;
+ sellitem Plankton_Card, 100000;
+ sellitem Snake_Card, 100000;
+ sellitem Marina_Card, 100000;
+ sellitem Metaller_Card, 100000;
+ sellitem Magnolia_Card, 100000;
+ sellitem Zenorc_Card, 100000;
+ sellitem Requiem_Card, 100000;
+ sellitem Mandragora_Card, 100000;
+ sellitem Vadon_Card, 100000;
+ sellitem Anacondaq_Card, 100000;
+ sellitem Drainliar_Card, 100000;
+ sellitem Orc_Skeleton_Card, 100000;
+ sellitem Pecopeco_Egg_Card, 100000;
+ sellitem Goblin_Card, 100000;
+ sellitem Caramel_Card, 100000;
+ sellitem Scorpion_Card, 100000;
+ sellitem Flora_Card, 100000;
+ sellitem Archer_Skeleton_Card, 100000;
+ sellitem Strouf_Card, 100000;
+ sellitem Petit_Card, 100000;
+ sellitem Desert_Wolf_Card, 20700;
+ sellitem Skel_Worker_Card, 100000;
+ sellitem Minorous_Card, 100000;
+ sellitem Golem_Card, 100000;
+ sellitem Hunter_Fly_Card, 100000;
+ sellitem Hydra_Card, 100000;
+ sellitem Soldier_Skeleton_Card, 100000;
+ sellitem Mummy_Card, 100000;
+ sellitem Side_Winder_Card, 100000;
+ sellitem Deviace_Card, 100000;
+}
+prontera,148,231,5 trader Headgear Card Merchant 1_F_PUBGIRL,{
+OnInit:
+ sellitem Wilow_Card, 100000;
+ sellitem Stainer_Card, 100000;
+ sellitem Martin_Card, 100000;
+ sellitem Elder_Wilow_Card, 100000;
+ sellitem Giearth_Card, 100000;
+ sellitem Ghoul_Card, 100000;
+ sellitem Marduk_Card, 100000;
+ sellitem Deviruchi_Card, 100000;
+ sellitem Nightmare_Card, 100000;
+}
+prontera,146,229,5 trader Armor Card Merchant 1_F_PUBGIRL,{
+OnInit:
+ sellitem Pupa_Card, 100000;
+ sellitem Picky_Card, 100000;
+ sellitem Picky__Card, 100000;
+ sellitem Roda_Frog_Card, 100000;
+ sellitem Thief_Bug_Card, 100000;
+ sellitem Rocker_Card, 100000;
+ sellitem Desert_Wolf_Babe_Card, 100000;
+ sellitem Pecopeco_Card, 100000;
+ sellitem Savage_Card, 100000;
+ sellitem Sword_Fish_Card, 100000;
+ sellitem Dokebi_Card, 100000;
+ sellitem Pasana_Card, 100000;
+ sellitem Sand_Man_Card, 100000;
+ sellitem Argiope_Card, 100000;
+ sellitem Bathory_Card, 100000;
+ sellitem Evil_Druid_Card, 100000;
+ sellitem Cornutus_Card, 100000;
+ sellitem Marc_Card, 100000;
+}
+prontera,144,227,5 trader Shield Card Merchant 1_F_PUBGIRL,{
+OnInit:
+ sellitem Andre_Egg_Card, 100000;
+ sellitem Ambernite_Card, 100000;
+ sellitem Thara_Frog_Card, 100000;
+ sellitem Soldier_Andre_Card, 100000;
+ sellitem Orc_Warrior_Card, 100000;
+ sellitem BigFoot_Card, 100000;
+ sellitem Rafflesia_Card, 100000;
+ sellitem Petit__Card, 100000;
+ sellitem Medusa_Card, 100000;
+ sellitem Khalitzburg_Card, 100000;
+ sellitem Anubis_Card, 100000;
+ sellitem Horn_Card, 100000;
+ sellitem Megalodon_Card, 100000;
+ sellitem Argos_Card, 100000;
+ sellitem Munak_Card, 100000;
+}
+prontera,142,225,5 trader Robe Card Merchant 1_F_PUBGIRL,{
+OnInit:
+ sellitem Dustiness_Card, 100000;
+ sellitem Orc_Zombie_Card, 100000;
+ sellitem Hode_Card, 100000;
+ sellitem Marse_Card, 100000;
+ sellitem Myst_Card, 100000;
+ sellitem Jakk_Card, 100000;
+ sellitem Marionette_Card, 100000;
+ sellitem Isis_Card, 100000;
+ sellitem Daydric_Card, 100000;
+ sellitem Condor_Card, 100000;
+ sellitem Frilldora_Card, 100000;
+ sellitem Whisper_Card, 100000;
+ sellitem Baphomet__Card, 100000;
+}
+prontera,140,223,5 trader Shoes Card Merchant 1_F_PUBGIRL,{
+OnInit:
+ sellitem Chonchon_Card, 100000;
+ sellitem Zombie_Card, 100000;
+ sellitem Thief_Bug_Male_Card, 100000;
+ sellitem Eggyra_Card, 100000;
+ sellitem Matyr_Card, 100000;
+ sellitem Sohee_Card, 100000;
+ sellitem Verit_Card, 100000;
+}
+prontera,138,221,5 trader Accessory Card Merchant 1_F_PUBGIRL,{
+OnInit:
+ sellitem Spore_Card, 100500;
+ sellitem Kukre_Card, 100500;
+ sellitem Tarou_Card, 100500;
+ sellitem Worm_Tail_Card, 100500;
+ sellitem Yoyo_Card, 100500;
+ sellitem Zerom_Card, 100500;
+ sellitem Kobold_Card, 100500;
+ sellitem Mantis_Card, 100500;
+ sellitem Poporing_Card, 100500;
+ sellitem Creamy_Card, 100500;
+ sellitem Smokie_Card, 100500;
+ sellitem Poison_Spore_Card, 100500;
+ sellitem Vitata_Card, 100500;
+ sellitem Pirate_Skel_Card, 100500;
+ sellitem Phen_Card, 100500;
+ sellitem Marine_Sphere_Card, 100500;
+ sellitem Obeaune_Card, 100500;
+ sellitem Horong_Card, 100500;
+ sellitem Joker_Card, 100500;
+}
diff --git a/doc/sample/npc_live_dialogues.txt b/doc/sample/npc_live_dialogues.txt
index 8778f6c50..9ce628c30 100644
--- a/doc/sample/npc_live_dialogues.txt
+++ b/doc/sample/npc_live_dialogues.txt
@@ -3,13 +3,13 @@
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
-//= 20070320
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= An example of an NPC with live dialogue.
//= Note: This relies on Global_Functions.txt to run.
//============================================================
-prontera,167,177,5 script Luppy 1107,{
+prontera,167,177,5 script Luppy DESERT_WOLF_B,{
mes "[Luppy]";
// Say a random greeting from Global_Functions.txt
@@ -20,35 +20,34 @@ prontera,167,177,5 script Luppy 1107,{
mes callfunc("F_Sex","What a beautiful lady!","What a handsome man!");
// Add some random greeting and goodbye into the menu
- menu callfunc("F_Hi"),-, callfunc("F_Bye"),M_BYE;
+ if (select(callfunc("F_Hi"), callfunc("F_Bye")) != 1) {
+ mes "[Luppy]";
+ // Add some random goodbye from Global_Functions.txt
+ mes callfunc("F_Bye");
+ close;
+ }
mes "[Luppy]";
// Give a random prize from set list of items
- if(@gotstuff){
+ if (@gotstuff) {
// Again, say stuff according to player's gender
mes "I like "+callfunc("F_Sex","smiling ladies!","bloody pirates!");
// Show one of 3 emotion from the list (we added ,1 to show emotion over PLAYER's head)
- emotion callfunc("F_RandMes",3,e_scissors,e_kis,e_pat),1;
+ emotion callfunc("F_RandMes", 3, e_scissors, e_kis, e_pat), 1;
close;
}
// We set a temp var to give present just once. Player can get more by relogging.
- set @gotstuff,1;
+ @gotstuff = 1;
// Get item ID from the list of presents: Apple, Mastela Fruit, Yggdrasil Seed or Orange Juice
- set @itemIDfromList, callfunc("F_RandMes",4,512,522,608,620);
+ .@itemIDfromList = callfunc("F_RandMes", 4, Apple, Fruit_Of_Mastela, Seed_Of_Yggdrasil, Orange_Juice);
// Again, say stuff according to player's gender
- mes "Hey, "+callfunc("F_Sex","sister!","brother!")+" I have "+getitemname(@itemIDfromList)+" for you!";
+ mes "Hey, "+callfunc("F_Sex","sister!","brother!")+" I have "+getitemname(.@itemIDfromList)+" for you!";
// Get the item from the list
- getitem @itemIDfromList,1;
- close;
-
-M_BYE:
- mes "[Luppy]";
- // Add some random goodbye from Global_Functions.txt
- mes callfunc("F_Bye");
+ getitem .@itemIDfromList, 1;
close;
}
diff --git a/doc/sample/npc_shop_test.txt b/doc/sample/npc_shop_test.txt
deleted file mode 100644
index 5e492b257..000000000
--- a/doc/sample/npc_shop_test.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-//===== Hercules Script =======================================
-//= Sample: Shops
-//===== By: ==================================================
-//= Hercules Dev Team
-//===== Current Version: =====================================
-//= 20090206
-//===== Description: =========================================
-//= An example of shop NPCs.
-//============================================================
-
-// Near fountain in Prontera
-prontera,156,192,3 shop Card Shop1 95,4001:100,4002:100,4003:100,4004:100,4005:100,4006:100,4007:100,4008:100,4009:100,4010:100,4011:100,4012:100,4013:100,4014:100,4015:100,4016:100,4017:100,4018:100,4019:100,4020:100,4021:100,4022:100,4023:100,4024:100,4025:100,4026:100,4027:100,4028:100,4029:100,4030:100,4031:100,4032:100,4033:100,4034:100,4035:100,4036:100,4037:100,4038:100,4039:100,4040:100,4041:100,4042:100,4043:100,4044:100,4045:100,4046:100,4047:100,4048:100,4049:100,4050:100
-prontera,154,192,1 shop Card Shop2 123,4051:100,4052:100,4053:100,4054:100,4055:100,4056:100,4057:100,4058:100,4059:100,4060:100,4061:100,4062:100,4063:100,4064:100,4065:100,4066:100,4067:100,4068:100,4069:100,4070:100,4071:100,4072:100,4073:100,4074:100,4075:100,4076:100,4077:100,4078:100,4079:100,4080:100,4081:100,4082:100,4083:100,4084:100,4085:100,4086:100,4087:100,4088:100,4089:100,4090:100,4091:100,4092:100,4093:100,4094:100,4095:100,4096:100,4097:100,4098:100,4099:100,4100:100
-prontera,158,192,1 shop Card Shop3 67,4101:100,4102:100,4103:100,4104:100,4105:100,4106:100,4107:100,4108:100,4109:100,4110:100,4111:100,4112:100,4113:100,4114:100,4115:100,4116:100,4117:100,4118:100,4119:100,4120:100,4121:100,4122:100,4123:100,4124:100,4125:100,4126:100,4127:100,4128:100,4129:100,4130:100,4131:100,4132:100,4133:100,4134:100,4135:100,4136:100,4137:100,4138:100,4139:100,4140:100,4141:100,4142:100,4143:100,4144:100,4145:100,4146:100,4147:100,4148:100
-prontera,144,205,1 shop Headgear Shop1 71,2201:100,2202:100,2203:100,2204:100,2205:100,2206:100,2207:100,2208:100,2209:100,2210:100,2211:100,2212:100,2213:100,2214:100,2215:100,2216:100,2217:100,2218:100,2219:100,2220:100,2221:100,2222:100,2223:100,2224:100,2225:100,2226:100,2227:100,2228:100,2229:100,2230:100,2231:100,2232:100,2233:100,2234:100,2235:100,2236:100,2237:100,2239:100,2240:100,2241:100,2242:100,2243:100,2244:100,2245:100,2246:100,2247:100,2248:100,2249:100,2250:100
-prontera,144,203,3 shop Headgear Shop2 101,2251:100,2252:100,2253:100,2254:100,2255:100,2256:100,2257:100,2258:100,2259:100,2260:100,2261:100,2262:100,2263:100,2264:100,2265:100,2266:100,2267:100,2268:100,2269:100,2270:100,2271:100,2272:100,2273:100,2274:100,2275:100,2276:100,2277:100,2278:100,2279:100,2280:100,2281:100,2282:100,2283:100,2284:100,2285:100,2286:100,2287:100,2288:100,2289:100,2290:100,2291:100,2292:100,2293:100,2294:100,2295:100,2296:100,2297:100,2298:100,2299:100
-prontera,144,201,3 shop Headgear Shop3 69,5001:100,5002:100,5003:100,5004:100,5005:100,5006:100,5007:100,5008:100,5009:100,5010:100,5011:100,5012:100,5013:100,5014:100,5015:100,5016:100,5017:100,5018:100,5019:100
-prontera,167,202,5 shop Accessories Shop 102,2601:100,2602:100,2603:100,2604:100,2605:100,2607:100,2608:100,2609:100,2610:100,2611:100,2612:100,2613:100,2614:100,2615:100,2616:100,2617:100,2618:100,2619:100,2620:100,2621:100,2622:100,2623:100,2624:100,2625:100,2626:100,2627:100,2628:100
-prontera,167,204,6 shop General Store 96,501:100,502:100,503:100,504:100,505:100,506:100,507:100,508:100,509:100,510:100,511:100,512:100,513:100,514:100,515:100,516:100,517:100,518:100,519:100,520:100,521:100,522:100,523:100,525:100,526:100,528:100,529:100,530:100,531:100,532:100,533:100,534:100,535:100,536:100,537:100,538:100,539:100,601:100,602:100,603:100,604:100,605:100,606:100,607:100,608:100,609:100,610:100
-prontera,167,206,6 shop Blacksmith Shop 90,714:100,715:100,716:100,717:100,718:100,719:100,720:100,721:100,722:100,723:100,724:100,725:100,726:100,727:100,728:100,729:100,730:100,731:100,732:100,733:100,756:100,757:100,984:100,985:100,990:100,991:100,992:100,993:100,994:100,995:100,996:100,997:100,1010:100,1011:100,998:100,999:100,1000:100,1001:100,1002:100,1003:100,913:100,920:100,718:100,958:100,957:100,922:100,963:100,923:100,968:100,1005:100,612:100,615:100,989:100
-prontera,164,204,5 shop Japan Store Limited 81,542:100,543:100,1766:100
-
-// South-central Prontera
-prontera,141,175,5 shop Bow man 102,1705:100,1711:100,1716:100,1719:100,1720:100,1750:1,1751:1,1752:1,1753:1,1754:1,1755:1,1756:1,1766:1,1065:1
-prontera,141,173,5 shop Sword shop 102,1117:100,1125:100,1155:100,1162:100,1130:100,1131:100,1132:100,1133:100,1134:100,1135:100,1136:100,1137:100,1138:100,1139:100,1140:100,1141:100,1161:100,1162:100,1163:100,1164:100,1165:100,1166:100,1167:100,1168:100,1169:100,1170:100
-prontera,141,171,5 shop Spear man 102,1408:100,1461:100,1464:100,1413:100,1414:100,1415:100,1416:100,1466:100,1467:100,1468:100,1469:100,1470:100,1471:100
-prontera,141,169,5 shop Axe man 102,1352:100,1355:100,1361:100,1363:100,1364:100,1365:100,1366:100,1367:100,1368:100,1369:100
-prontera,141,167,5 shop Dagger man 102,1208:100,1220:100,1223:100,1224:100,1225:100,1226:100,1227:100,1228:100,1229:100,1230:100,1231:100,1232:100,1233:100,1234:100,1235:100,1236:100,1237:100
-prontera,141,165,5 shop Mace shop 102,1505:100,1520:100,1514:100,1517:100,1522:100,1523:100,1524:100,1525:100,1526:100,1527:100,1528:100
-prontera,141,163,5 shop Katar shop 102,1251:100,1253:100,1255:100,1256:100,1257:100,1258:100,1259:100,1260:100,1261:100
-prontera,141,161,5 shop Rod man 102,1602:100,1608:100,1611:100,1613:100,1614:100,1615:100
-prontera,141,159,5 shop Bookstore 102,1550:100,1551:100,1552:100,1553:100,1554:100,1555:100,1556:100,1557:100,1558:100
-prontera,141,177,5 shop Armor shop 102,2306:100,2339:100,2311:100,2331:100,2336:100,2337:100,2326:100,2327:100,2315:100,2317:100,2102:100,2104:100,2106:100,2108:100,2402:100,2404:100,2406:100,2407:100,2408:100,2409:100,2502:100,2504:100,2506:100,2507:100,2508:100
-
-// Pet Groomer Merchant
-prontera,218,211,4 shop Pet Groomer 125,537:2500,643:3000,10013:1500,10014:2000
-izlude,164,138,4 shop Pet Groomer 124,537:2500,643:3000,10013:1500,10014:2000
-morocc,269,167,4 shop Pet Groomer 125,537:2500,643:3000,10013:1500,10014:2000
-geffen,193,152,4 shop Pet Groomer 124,537:2500,643:3000,10013:1500,10014:2000
-payon,142,104,4 shop Pet Groomer 124,537:2500,643:3000,10013:1500,10014:2000
diff --git a/doc/sample/npc_test_array.txt b/doc/sample/npc_test_array.txt
index 36b54a3fe..a429ffb93 100644
--- a/doc/sample/npc_test_array.txt
+++ b/doc/sample/npc_test_array.txt
@@ -3,41 +3,41 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20090206
+//= 20131225
//===== Description: =========================================
//= Demonstrates array commands.
//============================================================
-prontera,164,190,1 script Array Test 112,{
- set @hoge[0],1;
- set @hoge[1],5;
+prontera,164,190,1 script Array Test 4_F_KAFRA6,{
+ .@hoge[0] = 1;
+ .@hoge[1] = 5;
mes "Please enter a value for hoge[2].";
next;
- input @hoge[2];
- mes "hoge => " + @hoge;
- mes "hoge[0]=> " + @hoge[0];
- mes "hoge[1]=> " + @hoge[1];
- mes "hoge[2]=> " + @hoge[2];
+ input .@hoge[2];
+ mes "hoge => " + .@hoge;
+ mes "hoge[0]=> " + .@hoge[0];
+ mes "hoge[1]=> " + .@hoge[1];
+ mes "hoge[2]=> " + .@hoge[2];
next;
- setarray @hoge[1],2,3,4,5;
+ setarray .@hoge[1],2,3,4,5;
mes "true: 5,1,2,3,4";
- mes "hoge size = "+ getarraysize(@hoge);
- mes "hoge[0]=> " + @hoge[0];
- mes "hoge[1]=> " + @hoge[1];
- mes "hoge[2]=> " + @hoge[2];
- mes "hoge[3]=> " + @hoge[3];
+ mes "hoge size = "+ getarraysize(.@hoge);
+ mes "hoge[0]=> " + .@hoge[0];
+ mes "hoge[1]=> " + .@hoge[1];
+ mes "hoge[2]=> " + .@hoge[2];
+ mes "hoge[3]=> " + .@hoge[3];
next;
- copyarray @fuga[0],@hoge[2],2;
+ copyarray .@fuga[0],.@hoge[2],2;
mes "true: 3,4,0";
- mes "fuga[0]=> " + @fuga[0];
- mes "fuga[1]=> " + @fuga[1];
- mes "fuga[2]=> " + @fuga[2];
+ mes "fuga[0]=> " + .@fuga[0];
+ mes "fuga[1]=> " + .@fuga[1];
+ mes "fuga[2]=> " + .@fuga[2];
next;
- deletearray @hoge[1],2;
+ deletearray .@hoge[1],2;
mes "true: 1,4,5,0";
- mes "hoge[0]=> " + @hoge[0];
- mes "hoge[1]=> " + @hoge[1];
- mes "hoge[2]=> " + @hoge[2];
- mes "hoge[3]=> " + @hoge[3];
+ mes "hoge[0]=> " + .@hoge[0];
+ mes "hoge[1]=> " + .@hoge[1];
+ mes "hoge[2]=> " + .@hoge[2];
+ mes "hoge[3]=> " + .@hoge[3];
close;
}
diff --git a/doc/sample/npc_test_chat.txt b/doc/sample/npc_test_chat.txt
index ca81840ea..adc53c763 100644
--- a/doc/sample/npc_test_chat.txt
+++ b/doc/sample/npc_test_chat.txt
@@ -8,7 +8,7 @@
//= Demonstrates waitingroom commands.
//============================================================
-prontera,158,182,0 script Chat Test::test0001 116,{
+prontera,158,182,0 script Chat Test::test0001 4_F_KAFRA2,{
mes "Trigger Number: " + getwaitingroomstate(2);
mes "Trigger State: " + getwaitingroomstate(3);
switch(select("Enable:Disable:Delete:Create")) {
diff --git a/doc/sample/npc_test_checkweight.txt b/doc/sample/npc_test_checkweight.txt
index e2560cedf..0f383ffe4 100644
--- a/doc/sample/npc_test_checkweight.txt
+++ b/doc/sample/npc_test_checkweight.txt
@@ -3,147 +3,141 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20121113
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates 'checkweight' command.
//============================================================
-prontera,161,181,6 script ChkSpace 763,{
+prontera,161,181,6 script ChkSpace 4_M_JPN,{
+ function ChkResult;
+ function FinalReport;
-function ChkResult;
-function FinalReport;
-
-L_RESET:
+ // Reset
resetlvl(1);
- getinventorylist;
- for(set .@i,0; .@i < @inventorylist_count; set .@i,.@i+1){
- delitem(@inventorylist_id[.@i],@inventorylist_amount[.@i]); //clear inventory
+ getinventorylist;
+ for (.@i = 0; .@i < @inventorylist_count; ++.@i) {
+ delitem(@inventorylist_id[.@i], @inventorylist_amount[.@i]); //clear inventory
}
-
-L_TEST1: //basic backward chk
+ //basic backward chk
.@testid = 0;
.@succes = 0;
- .@ret = checkweight(512,10);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success
- .@ret = checkweight("Apple",10);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success
- .@ret = checkweight(6320,33000);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure too many item amount item weight=0
- .@ret = checkweight("Premium_Reset_Stone",33000);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure too many item amount
- .@ret = checkweight(717,500);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success weight based on max weight=2030
- .@ret = checkweight(717,1000);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure weight based on max weight=2030
- .@ret = checkweight(2794,100);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success
- .@ret = checkweight(2794,101);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure (with MAX_INVENTORY = 100)
- .@ret = checkweight(-1,1);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure invalide item id
- .@ret = checkweight(512,0);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure invalide amount
+ .@ret = checkweight(Apple, 10);
+ .@succes += ChkResult(.@testid++, 1, .@ret); //should be success
+ .@ret = checkweight("Apple", 10);
+ .@succes += ChkResult(.@testid++, 1, .@ret); //should be success
+ .@ret = checkweight(Premium_Reset_Stone, 33000);
+ .@succes += ChkResult(.@testid++, 0, .@ret); //should be failure too many item amount item weight=0
+ .@ret = checkweight("Premium_Reset_Stone", 33000);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure too many item amount
+ .@ret = checkweight(Blue_Gemstone, 500);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be success weight based on max weight=2030
+ .@ret = checkweight(Blue_Gemstone, 1000);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure weight based on max weight=2030
+ .@ret = checkweight(Magic_Stone_Ring, 100);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be success
+ .@ret = checkweight(Magic_Stone_Ring, 101);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure (with MAX_INVENTORY = 100)
+ .@ret = checkweight(-1, 1);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid item id
+ .@ret = checkweight(Apple, 0);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid amount
debugmes "End backward test";
- FinalReport(.@testid,.@succes);
-
+ FinalReport(.@testid, .@succes);
-L_TEST2: //update using list test
+ //update using list test
.@testid = 0;
.@succes = 0;
- .@ret = checkweight(512,10,513,10);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success
- .@ret = checkweight("Apple",10,"Banana",10);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success
- .@ret = checkweight(512,80,513,33000);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure
- .@ret = checkweight("Apple",80,"Banana",33000);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure too many item amount
- .@ret = checkweight("Apple",10,"Banana",21,512);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure invalid nb of args
- .@ret = checkweight(717,500,716,100);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be succes weight 1800/2030
- .@ret = checkweight(717,500,716,500);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure weight 3000/2030
- .@ret = checkweight(2794,95,2795,5);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success
- .@ret = checkweight(2794,95,2795,10);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure (with MAX_INVENTORY = 100)
- .@ret = checkweight(512,1,-1,1);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure invalide item id
- .@ret = checkweight(512,1,513,0);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure invalide amount
- .@ret = checkweight(6320,31000,6320,2000);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure overamount inventory
- .@ret = checkweight(512,1,513,1,514,1,515,1);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be sucess
-
+ .@ret = checkweight(Apple, 10, Banana, 10);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be success
+ .@ret = checkweight("Apple", 10, "Banana", 10);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be success
+ .@ret = checkweight(Apple, 80, Banana, 33000);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure
+ .@ret = checkweight("Apple", 80, "Banana", 33000);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure too many item amount
+ .@ret = checkweight("Apple", 10, "Banana", 21, Apple);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid nb of args
+ .@ret = checkweight(Blue_Gemstone, 500, Red_Gemstone, 100);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be succes weight 1800/2030
+ .@ret = checkweight(Blue_Gemstone, 500, Red_Gemstone, 500);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure weight 3000/2030
+ .@ret = checkweight(Magic_Stone_Ring, 95, Green_Apple_Ring, 5);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be success
+ .@ret = checkweight(Magic_Stone_Ring, 95, Green_Apple_Ring, 10);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure (with MAX_INVENTORY = 100)
+ .@ret = checkweight(Apple, 1, -1, 1);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid item id
+ .@ret = checkweight(Apple, 1, Banana, 0);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure invalid amount
+ .@ret = checkweight(Premium_Reset_Stone, 31000, Premium_Reset_Stone, 2000);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure overamount inventory
+ .@ret = checkweight(Apple, 1, Banana, 1, Grape, 1, Carrot, 1);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be sucess
+
debugmes "End update by list tests";
- FinalReport(.@testid,.@succes);
+ FinalReport(.@testid, .@succes);
-L_TEST3: //update using array tests
+ //update using array tests
.@testid = 0;
.@succes = 0;
- setarray .@item[0], 512,513,514,515;
- setarray .@count[0], 1,5,9,12;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be sucess
- cleararray .@item[0], 0, 4;
+ setarray .@item[0], Apple, Banana, Grape, Carrot;
+ setarray .@count[0], 1, 5, 9, 12;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be sucess
+ cleararray .@item[0], 0, 4;
cleararray .@count[0], 0, 4;
- setarray .@item[0], 512,513,514,515;
- setarray .@count[0], 1,5,-1,12;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, invalide amout
- cleararray .@item[0], 0, 4;
+ setarray .@item[0], Apple, Banana, Grape, Carrot;
+ setarray .@count[0], 1, 5, -1, 12;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, invalid amout
+ cleararray .@item[0], 0, 4;
cleararray .@count[0], 0, 4;
- setarray .@item[0], 512,513,514,-1;
- setarray .@count[0], 1,5,15,12;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, invalide id
- cleararray .@item[0], 0, 4;
+ setarray .@item[0], Apple, Banana, Grape, -1;
+ setarray .@count[0], 1, 5, 15, 12;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, invalid id
+ cleararray .@item[0], 0, 4;
cleararray .@count[0], 0, 4;
- setarray .@item[0], 717,715,716,714;
- setarray .@count[0], 300,300,300,300;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, total by weight
- cleararray .@item[0], 0, 4;
+ setarray .@item[0], Blue_Gemstone, Yellow_Gemstone, Red_Gemstone, Emperium;
+ setarray .@count[0], 300, 300, 300, 300;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, total by weight
+ cleararray .@item[0], 0, 4;
cleararray .@count[0], 0, 4;
- setarray .@item[0], 6320,6320;
- setarray .@count[0], 31000,2000;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, total by weight
- cleararray .@item[0], 0, 2;
+ setarray .@item[0], Premium_Reset_Stone, Premium_Reset_Stone;
+ setarray .@count[0], 31000, 2000;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, total by weight
+ cleararray .@item[0], 0, 2;
cleararray .@count[0], 0, 2;
- setarray .@item[0], 2794,2795;
- setarray .@count[0], 95,5;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,1,.@ret); //should be success
- setarray .@count[0], 95,10;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure overamount item
- cleararray .@item[0], 0, 2;
+ setarray .@item[0], Magic_Stone_Ring, Green_Apple_Ring;
+ setarray .@count[0], 95, 5;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 1, .@ret); //should be success
+ setarray .@count[0], 95, 10;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure overamount item
+ cleararray .@item[0], 0, 2;
cleararray .@count[0], 0, 2;
- setarray .@item[0], 6320,6320,512;
- setarray .@count[0], 1,3;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, size mistmatch
- cleararray .@item[0], 0, 3;
+ setarray .@item[0], Premium_Reset_Stone, Premium_Reset_Stone, Apple;
+ setarray .@count[0], 1, 3;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, size mistmatch
+ cleararray .@item[0], 0, 3;
cleararray .@count[0], 0, 2;
- setarray .@item[0], 6320,6320;
- setarray .@count[0], 1,3,5;
- .@ret = checkweight2(.@item,.@count);
- set .@succes,.@succes+ChkResult(.@testid++,0,.@ret); //should be failure, size mistmatch
-
+ setarray .@item[0], Premium_Reset_Stone, Premium_Reset_Stone;
+ setarray .@count[0], 1, 3, 5;
+ .@ret = checkweight2(.@item, .@count);
+ .@success += ChkResult(.@testid++, 0, .@ret); //should be failure, size mistmatch
debugmes "End update by array tests";
- FinalReport(.@testid,.@succes);
+ FinalReport(.@testid, .@succes);
-L_FINAL:
end;
-
function ChkResult {
.@tid = getarg(0);
diff --git a/doc/sample/npc_test_duplicate.txt b/doc/sample/npc_test_duplicate.txt
index d052e1cee..7f2855a49 100644
--- a/doc/sample/npc_test_duplicate.txt
+++ b/doc/sample/npc_test_duplicate.txt
@@ -3,8 +3,8 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20070915
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= An example of how duplicate NPCs are handled:
//= NPC variables are shared between all duplicates.
//= Each duplicate knows its own map coordinates.
@@ -27,6 +27,6 @@ OnTouch:
end;
}
-prontera,150,175,4 duplicate(Test Script) Test1 909
-prontera,155,175,4 duplicate(Test Script) Test2 909,2,2
-prontera,160,175,4 duplicate(Test Script) Test3 909,3,3
+prontera,150,175,4 duplicate(Test Script) Test1 4_PORING
+prontera,155,175,4 duplicate(Test Script) Test2 4_PORING,2,2
+prontera,160,175,4 duplicate(Test Script) Test3 4_PORING,3,3
diff --git a/doc/sample/npc_test_func.txt b/doc/sample/npc_test_func.txt
index fbde70cd1..a57b6cfb1 100644
--- a/doc/sample/npc_test_func.txt
+++ b/doc/sample/npc_test_func.txt
@@ -3,8 +3,8 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20120901
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates use of functions.
//============================================================
@@ -21,11 +21,11 @@ function script func002 {
}
// Uses 3 different methods of displaying dialogue from both internal and external sources.
-prontera,168,189,1 script Functions 112,{
- callfunc "func001"; // Calls func001 and displays "Hello there!"
- mes callfunc("func002"); // Calls func002 and displays "I'm a function"
+prontera,168,189,1 script Functions 4_F_KAFRA6,{
+ callfunc "func001"; // Calls func001 and displays "Hello there!"
+ mes callfunc("func002"); // Calls func002 and displays "I'm a function"
next;
- callsub L_SUB001; // Calls the label L_SUB001 and displays "I'm a label"
+ callsub L_SUB001; // Calls the label L_SUB001 and displays "I'm a label"
close;
end;
diff --git a/doc/sample/npc_test_npctimer.txt b/doc/sample/npc_test_npctimer.txt
index 7dc625785..6c9b85a0e 100644
--- a/doc/sample/npc_test_npctimer.txt
+++ b/doc/sample/npc_test_npctimer.txt
@@ -1,14 +1,14 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Sample: NPC Timers
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates NPC timer commands.
//============================================================
-prontera,156,183,0 script NPCtimerTest::npctimerX0000 116,{
+prontera,156,183,0 script NPCtimerTest::npctimerX0000 4_F_KAFRA2,{
mes "Timer value" + getnpctimer(0);
mes "State timer" + getnpctimer(1,"npctimerX0000");
mes "Number of events" + getnpctimer(2);
diff --git a/doc/sample/npc_test_npctimer2.txt b/doc/sample/npc_test_npctimer2.txt
index 1bb856b13..b325c0c90 100644
--- a/doc/sample/npc_test_npctimer2.txt
+++ b/doc/sample/npc_test_npctimer2.txt
@@ -1,14 +1,14 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Sample: Attached NPC Timers
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates attached NPC timer commands.
//============================================================
-prontera,156,183,0 script NPCtimerTest::npctimerX0000 116,{
+prontera,156,183,0 script NPCtimerTest::npctimerX0000 4_F_KAFRA2,{
mes "What would you like to know?";
select("Tell me my level.");
mes "I need time to think...";
diff --git a/doc/sample/npc_test_pcre.txt b/doc/sample/npc_test_pcre.txt
index 09f65e607..1306d1798 100644
--- a/doc/sample/npc_test_pcre.txt
+++ b/doc/sample/npc_test_pcre.txt
@@ -1,14 +1,14 @@
//===== Hercules Script =======================================
//= Sample: PCRE
//===== By: ==================================================
-//= rAthena Dev Team
+//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20100108
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates PCRE commands.
//============================================================
-prontera,152,181,5 script MouseJstr 763,{
+prontera,152,181,5 script MouseJstr 4_M_JPN,{
// hello
Lquote0:
diff --git a/doc/sample/npc_test_quest.txt b/doc/sample/npc_test_quest.txt
index 821c83739..fcf6b2a80 100644
--- a/doc/sample/npc_test_quest.txt
+++ b/doc/sample/npc_test_quest.txt
@@ -1,10 +1,10 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Sample: Quest Test
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20121227
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates quest commands.
//============================================================
@@ -12,8 +12,9 @@
// need to add the quest to /db/quest_db.txt - e.g:
// 70000,0,1002,3,0,0,0,0,"3 Splats Please!"
-prontera,90,95,1 script Jelly 123,{
- if(checkquest(70000) == -1) { // Quest not yet started.
+prontera,90,95,1 script Jelly 2_F_MAGICMASTER,{
+ if(checkquest(70000) == -1) {
+ // Quest not yet started.
mes "[Jelly]";
mes "Hey there! Would you help me?";
next;
@@ -29,18 +30,21 @@ prontera,90,95,1 script Jelly 123,{
setquest 70000; // Adds the quest to your Quest Window.
close;
}
- } else if(checkquest(70000,HUNTING) == 2) { // All monsters killed.
+ } else if(checkquest(70000,HUNTING) == 2) {
+ // All monsters killed.
mes "[Jelly]";
mes "Awesome! Thank you!";
getexp 10000,0;
dispbottom "You have been rewarded with 10,000 Base Exp.";
- completequest 70000; // Sets quest status to "complete".
+ completequest 70000; // Sets quest status to "complete".
close;
- } else if(checkquest(70000) == 1) { // Quest is active.
+ } else if(checkquest(70000) == 1) {
+ // Quest is active.
mes "[Jelly]";
mes "Keep going, almost there!";
close;
- } else if(checkquest(70000) == 2) { // Quest finished.
+ } else if(checkquest(70000) == 2) {
+ // Quest finished.
mes "[Jelly]";
mes "Thanks again for doing that for me!";
close;
diff --git a/doc/sample/npc_test_setitemx.txt b/doc/sample/npc_test_setitemx.txt
index 10d8daaaa..a06f0dc9f 100644
--- a/doc/sample/npc_test_setitemx.txt
+++ b/doc/sample/npc_test_setitemx.txt
@@ -1,49 +1,44 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Sample: Setiteminfo & Setitemscript
//===== By: ==================================================
//= Lupus
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates 'setiteminfo' and 'setitemscript' commands.
//============================================================
-prontera,164,161,5 script Lupus 1013,{
- menu
- "Make Knife[3] Edible",M_1,
- "Make Apple Equippable",M_2,
- "Edible Knife = Full SP",M_3,
- "Knife = Weapon + 3 Notes",M_4;
- close;
-
-M_1:
- mes "Ok. We made Knife[3] edible.";
- setiteminfo(1201,2,0); //type = 0 : potion
- setitemscript(1201,"{dispbottom \"* You used Knife[3]\";}");
- close;
-
-M_2:
- mes "Ok. We made Apple equippable.";
- setiteminfo(512,2,5); //item type -> headgear (type = 5)
- setiteminfo(512,5,512); //where to equip to (equip = 512)
- setiteminfo(512,11,256); //set as headgear location (loc = 256)
- setiteminfo(512,14,85); //set Headgear Sprite ID (view id = 85)
- setitemscript(512,"{dispbottom \"* Other item's changed\";}",0);
- setitemscript(512,"{dispbottom \"* Equipped\";}",1);
- setitemscript(512,"{dispbottom \"* Unequipped\";}",2);
- close;
-
-M_3:
- mes "Ok. Now edible Knife[3] restores your SP.";
- setitemscript(1201,2,0);
- setitemscript(1201,"{dispbottom \"* You ate Knife[3] + Full SP\"; percentheal 0,100;}");
- close;
-
-M_4:
- mes "Ok. We made Knife a weapon, but added 3 notes.";
- setiteminfo(1201,2,4); //type = 4 : weapon again
- setitemscript(1201,"{dispbottom \"* 1 Used\";}",0);
- setitemscript(1201,"{dispbottom \"* 2 Equipped\";}",1);
- setitemscript(1201,"{dispbottom \"* 3 Unequipped\";}",2);
+prontera,164,161,5 script Lupus WOLF,{
+ mes "Please choose an option:";
+ next;
+ switch (select("Make Knife[3] Edible", "Make Apple Equippable", "Edible Knife = Full SP", "Knife = Weapon + 3 Notes")) {
+ case 1:
+ mes "Ok. We made Knife[3] edible.";
+ setiteminfo(Knife, 2, IT_HEALING); //type = 0 : potion
+ setitemscript(Knife, "{dispbottom \"* You used Knife[3]\";}");
+ break;
+ case 2:
+ mes "Ok. We made Apple equippable.";
+ setiteminfo(Apple, 2, IT_ARMOR); //item type -> headgear (type = 5 -> IT_ARMOR)
+ setiteminfo(Apple, 5, 512); //where to equip to (equip = 512)
+ setiteminfo(Apple, 11, 256); //set as headgear location (loc = 256)
+ setiteminfo(Apple, 14, 85); //set Headgear Sprite ID (view id = 85)
+ setitemscript(Apple, "{dispbottom \"* Other item's changed\";}", 0);
+ setitemscript(Apple, "{dispbottom \"* Equipped\";}", 1);
+ setitemscript(Apple, "{dispbottom \"* Unequipped\";}", 2);
+ break;
+ case 3:
+ mes "Ok. Now edible Knife[3] restores your SP.";
+ setitemscript(Knife, 2, 0);
+ setitemscript(Knife, "{dispbottom \"* You ate Knife[3] + Full SP\"; percentheal 0,100;}");
+ break;
+ case 4:
+ mes "Ok. We made Knife a weapon, but added 3 notes.";
+ setiteminfo(Knife, 2, IT_WEAPON); //type = 4 -> IT_WEAPON
+ setitemscript(Knife, "{dispbottom \"* 1 Used\";}", 0);
+ setitemscript(Knife, "{dispbottom \"* 2 Equipped\";}", 1);
+ setitemscript(Knife, "{dispbottom \"* 3 Unequipped\";}", 2);
+ break;
+ }
close;
}
diff --git a/doc/sample/npc_test_setmapflag.txt b/doc/sample/npc_test_setmapflag.txt
index 681fbc43a..44137bef0 100644
--- a/doc/sample/npc_test_setmapflag.txt
+++ b/doc/sample/npc_test_setmapflag.txt
@@ -1,32 +1,32 @@
-//===== Hercules Script =======================================
+//===== Hercules Script ======================================
//= Sample: Mapflag Test
//===== By: ==================================================
//= Jbain
//===== Current Version: =====================================
-//= 20121003
-//===== Description: =========================================
+//= 20131225
+//===== Description: =========================================
//= Demonstrates mapflag commands.
//============================================================
-prontera,165,145,0 script EXPflagtest 123,{
+prontera,165,145,0 script EXPflagtest 2_F_MAGICMASTER,{
mes "[EXPflagtest]";
mes "Set up the map rates:";
switch(select("Job EXP:Base EXP:PVP on:Reset all flags")) {
case 1:
input .@rate;
- setmapflag "prontera",MF_JEXP,.@rate;
+ setmapflag "prontera",mf_jexp,.@rate;
close;
case 2:
input .@rate;
- setmapflag "prontera",MF_BEXP,.@rate;
+ setmapflag "prontera",mf_bexp,.@rate;
close;
case 3:
- setmapflag "prontera",MF_PVP;
+ setmapflag "prontera",mf_pvp;
close;
case 4:
- removemapflag "prontera",MF_BEXP;
- removemapflag "prontera",MF_JEXP;
- removemapflag "prontera",MF_PVP;
+ removemapflag "prontera",mf_bexp;
+ removemapflag "prontera",mf_jexp;
+ removemapflag "prontera",mf_pvp;
close;
}
}
diff --git a/doc/sample/npc_test_skill.txt b/doc/sample/npc_test_skill.txt
index cc6de3bbc..c26ed1b62 100644
--- a/doc/sample/npc_test_skill.txt
+++ b/doc/sample/npc_test_skill.txt
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20130426
+//= 20131225
//===== Description: =========================================
//= Demonstrates the 'skill' command.
//============================================================
@@ -16,20 +16,20 @@
// If flag is undefined, it defaults to 1
// View db/(pre-)re/skill_db.txt for skill IDs
-prontera,157,182,0 script Skills 116,{
+prontera,157,182,0 script Skills 4_F_KAFRA2,{
mes "What skill would you like?";
switch(select("First Aid:Play Dead:Heal:Sight:None")) {
case 1:
- skill 142,1,0; // Permanently gives player level 1 First Aid
+ skill NV_FIRSTAID,1,0; // Permanently gives player level 1 First Aid
close;
case 2:
- skill 143,1,0; // Permanently gives player level 1 Play Dead
+ skill NV_TRICKDEAD,1,0; // Permanently gives player level 1 Play Dead
close;
case 3:
- skill 28,3,1; // Temporarily gives player level 3 Heal
+ skill AL_HEAL,3,1; // Temporarily gives player level 3 Heal
close;
case 4:
- skill 10,1,3; // Permanently gives player level 1 Sight, even after skill resets/job changes
+ skill MG_SIGHT,1,3; // Permanently gives player level 1 Sight, even after skill resets/job changes
close;
case 5:
close;
diff --git a/doc/sample/npc_test_time.txt b/doc/sample/npc_test_time.txt
index ffa6a5ca2..2af1dadd8 100644
--- a/doc/sample/npc_test_time.txt
+++ b/doc/sample/npc_test_time.txt
@@ -8,7 +8,7 @@
//= Demonstrates time commands.
//============================================================
-prontera,157,181,6 script Time Sample 105,{
+prontera,157,181,6 script Time Sample 8W_SOLDIER,{
mes "[Time Sample]";
mes "System Tick : " + gettimetick(0);
mes " Time Tick : " + gettimetick(1);
diff --git a/doc/sample/npc_trader_sample.txt b/doc/sample/npc_trader_sample.txt
index abc87f6b4..0d50af8c5 100644
--- a/doc/sample/npc_trader_sample.txt
+++ b/doc/sample/npc_trader_sample.txt
@@ -3,56 +3,56 @@
//===== By: ==================================================
//= Hercules Dev Team
//===== Current Version: =====================================
-//= 20131223
+//= 20131225
//===== Description: =========================================
//= Demonstrates NPC Trader.
//============================================================
/* ordinary zeny trader */
-prontera,152,151,1 trader TestTrader 952,{
+prontera,152,151,1 trader TestTrader 4_F_EDEN_OFFICER,{
OnInit:
- sellitem 2115;
+ sellitem Valkyrja's_Shield;
end;
}
/* ordinary cash trader */
-prontera,152,152,1 trader TestTraderCash 952,{
+prontera,152,152,1 trader TestTraderCash 4_F_EDEN_OFFICER,{
OnInit:
tradertype(NST_CASH);
- sellitem 2115;
+ sellitem Valkyrja's_Shield;
end;
}
/* custom npc trader */
-prontera,153,152,1 trader TestCustom2 952,{
+prontera,153,152,1 trader TestCustom2 4_F_EDEN_OFFICER,{
OnInit:
tradertype(NST_CUSTOM);
- sellitem 501,2;
+ sellitem Red_Potion,2;
end;
-
+
/* allows currency to be item 501 and 502 */
OnCountFunds:
- setcurrency(countitem(501),countitem(502));
+ setcurrency(countitem(Red_Potion),countitem(Orange_Potion));
end;
/* receives @price (total cost) and @points (the secondary input field for cash windows) */
OnPayFunds:
dispbottom "Hi: price="+@price+" and points="+@points;
- if( countitem(502) < @points || countitem(501) < @price-@points )
+ if( countitem(Orange_Potion) < @points || countitem(Red_Potion) < @price-@points )
end;
- delitem 502,@points;
- delitem 501,@price-@points;
+ delitem Orange_Potion,@points;
+ delitem Red_Potion,@price-@points;
purchaseok();
end;
}
/* demonstrates Market Trader */
-prontera,150,160,6 trader HaiMarket 952,{
+prontera,150,160,6 trader HaiMarket 4_F_EDEN_OFFICER,{
OnInit:
tradertype(NST_MARKET);
- sellitem 501,-1,49;
+ sellitem Red_Potion,-1,49;
end;
-
+
OnClock0000://resupplies red potions on midnight
OnMyResupply:
- if( shopcount(501) < 20 )
- sellitem 501,-1,49;
+ if( shopcount(Red_Potion) < 20 )
+ sellitem Red_Potion,-1,49;
end;
-} \ No newline at end of file
+}
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index e858fc709..2a0dd7f63 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -172,7 +172,7 @@ REPLACE INTO `item_db` VALUES ('642','Book_Of_Devil','Book of the Devil','2','18
REPLACE INTO `item_db` VALUES ('643','Pet_Incubator','Pet Incubator','2','3000','1500','30','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','bpet;','','');
REPLACE INTO `item_db` VALUES ('644','Gift_Box','Gift Box','2','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 644,1;','','');
REPLACE INTO `item_db` VALUES ('645','Center_Potion','Concentration Potion','2','800','400','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION1,1800000,0;','','');
-REPLACE INTO `item_db` VALUES ('656','Awakening_Potion','Awakening Potion','2','1500','750','150','0','0','0','0','0','2147483647','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
+REPLACE INTO `item_db` VALUES ('656','Awakening_Potion','Awakening Potion','2','1500','750','150','0','0','0','0','0','2146959087','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
REPLACE INTO `item_db` VALUES ('657','Berserk_Potion','Berserk Potion','2','3000','1500','200','0','0','0','0','0','31868582','63','2','0','0','85',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION3,1800000,0;','','');
REPLACE INTO `item_db` VALUES ('658','Union_Of_Tribe','Union of Tribe','2','2','1','500','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','guildgetexp rand(600000,1200000);','','');
REPLACE INTO `item_db` VALUES ('659','Heart_Of_Her','Her Heart','2','500','250','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','pet 1188;','','');
@@ -558,24 +558,24 @@ REPLACE INTO `item_db` VALUES ('1187','Krieger_Twohand_Sword1','Glorious Claymor
REPLACE INTO `item_db` VALUES ('1188','Veteran_Sword','Veteran Sword','4','10000','5000','2000','180','0','0','1','1','16514','63','2','34','4','80',NULL,'1','3','0','if(getskilllv(SM_BASH)==10) { bonus2 bSkillAtk,SM_BASH,50; } if(getskilllv(KN_BOWLINGBASH)==10) { bonus2 bSkillAtk,KN_BOWLINGBASH,50; } bonus bStr,1; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('1189','Krasnaya','Krasnaya','4','20','10','3800','200','0','0','2','3','16514','2','2','34','2','50',NULL,'1','3','0','if(readparam(bStr)>=95) { bonus bBaseAtk,20; }','','');
REPLACE INTO `item_db` VALUES ('1190','Claymore_C','Claymore','4','0','0','0','220','0','0','1','0','16512','63','2','34','3','1',NULL,'0','3','0','bonus2 bAddSize,Size_Small,40; bonus2 bAddSize,Size_Medium,40; bonus2 bAddSize,Size_Large,40;','','');
-REPLACE INTO `item_db` VALUES ('1201','Knife','Knife','4','50','25','400','17','0','0','1','3','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1202','Knife_','Knife','4','50','25','400','17','0','0','1','4','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1203','Knife__','Knife','4','50','25','400','17','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1204','Cutter','Cutter','4','1250','625','500','30','0','0','1','3','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1205','Cutter_','Cutter','4','1250','625','500','30','0','0','1','4','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1206','Cutter__','Cutter','4','1250','625','500','30','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1207','Main_Gauche','Main Gauche','4','2400','1200','600','43','0','0','1','3','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1208','Main_Gauche_','Main Gauche','4','2400','1200','600','43','0','0','1','4','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1209','Main_Gauche__','Main Gauche','4','2400','1200','600','43','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1210','Dirk','Dirk','4','8500','4250','500','59','0','0','1','2','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1211','Dirk_','Dirk','4','8500','4250','500','59','0','0','1','3','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1212','Dirk__','Dirk','4','8500','4250','500','59','0','0','1','0','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1213','Dagger','Dagger','4','14000','7000','600','73','0','0','1','2','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1214','Dagger_','Dagger','4','14000','7000','600','73','0','0','1','3','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1215','Dagger__','Dagger','4','14000','7000','600','73','0','0','1','0','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1216','Stiletto','Stiletto','4','19500','9750','700','87','0','0','1','2','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1217','Stiletto_','Stiletto','4','19500','9750','700','87','0','0','1','3','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1218','Stiletto__','Stiletto','4','19500','9750','700','87','0','0','1','0','2147483647','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1201','Knife','Knife','4','50','25','400','17','0','0','1','3','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1202','Knife_','Knife','4','50','25','400','17','0','0','1','4','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1203','Knife__','Knife','4','50','25','400','17','0','0','1','0','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1204','Cutter','Cutter','4','1250','625','500','30','0','0','1','3','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1205','Cutter_','Cutter','4','1250','625','500','30','0','0','1','4','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1206','Cutter__','Cutter','4','1250','625','500','30','0','0','1','0','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1207','Main_Gauche','Main Gauche','4','2400','1200','600','43','0','0','1','3','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1208','Main_Gauche_','Main Gauche','4','2400','1200','600','43','0','0','1','4','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1209','Main_Gauche__','Main Gauche','4','2400','1200','600','43','0','0','1','0','2124381935','63','2','2','1','1',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1210','Dirk','Dirk','4','8500','4250','500','59','0','0','1','2','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1211','Dirk_','Dirk','4','8500','4250','500','59','0','0','1','3','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1212','Dirk__','Dirk','4','8500','4250','500','59','0','0','1','0','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1213','Dagger','Dagger','4','14000','7000','600','73','0','0','1','2','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1214','Dagger_','Dagger','4','14000','7000','600','73','0','0','1','3','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1215','Dagger__','Dagger','4','14000','7000','600','73','0','0','1','0','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1216','Stiletto','Stiletto','4','19500','9750','700','87','0','0','1','2','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1217','Stiletto_','Stiletto','4','19500','9750','700','87','0','0','1','3','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
+REPLACE INTO `item_db` VALUES ('1218','Stiletto__','Stiletto','4','19500','9750','700','87','0','0','1','0','2124381935','63','2','2','2','12',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('1219','Gladius','Gladius','4','43000','21500','700','105','0','0','1','2','42950382','63','2','2','3','24',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('1220','Gladius_','Gladius','4','43000','21500','700','105','0','0','1','3','42950382','63','2','2','3','24',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('1221','Gladius__','Gladius','4','43000','21500','700','105','0','0','1','0','42950382','63','2','2','3','24',NULL,'1','1','0','','','');
@@ -604,9 +604,9 @@ REPLACE INTO `item_db` VALUES ('1243','Novice_Knife','Novice Main-Gauche','4','1
REPLACE INTO `item_db` VALUES ('1244','Holy_Dagger','Holy Dagger','4','20','10','800','100','0','0','1','0','33689664','63','2','2','4','55',NULL,'1','1','0','bonus bAtkEle,Ele_Holy; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('1245','Cinquedea','Cinquedea','4','40000','20000','700','110','0','0','1','1','1','63','2','2','3','30',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('1246','Cinquedea_','Cinquedea','4','40000','20000','700','110','0','0','1','2','1','63','2','2','3','30',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('1247','Kindling_Dagger','Kindle Dagger','4','10000','5000','600','39','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Fire;','','');
-REPLACE INTO `item_db` VALUES ('1248','Obsidian_Dagger','Obsidian Dagger','4','10000','5000','600','39','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Earth;','','');
-REPLACE INTO `item_db` VALUES ('1249','Fisherman\'s_Dagger','Fisherman\'s Dagger','4','10000','5000','600','39','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Water;','','');
+REPLACE INTO `item_db` VALUES ('1247','Kindling_Dagger','Kindle Dagger','4','10000','5000','600','39','0','0','1','0','2124381935','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Fire;','','');
+REPLACE INTO `item_db` VALUES ('1248','Obsidian_Dagger','Obsidian Dagger','4','10000','5000','600','39','0','0','1','0','2124381935','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Earth;','','');
+REPLACE INTO `item_db` VALUES ('1249','Fisherman\'s_Dagger','Fisherman\'s Dagger','4','10000','5000','600','39','0','0','1','0','2124381935','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Water;','','');
REPLACE INTO `item_db` VALUES ('1250','Jur','Jur','4','19500','9750','800','125','0','0','1','2','4096','63','2','34','2','18',NULL,'1','16','0','','','');
REPLACE INTO `item_db` VALUES ('1251','Jur_','Jur','4','19500','9750','800','125','0','0','1','3','4096','63','2','34','2','18',NULL,'1','16','0','','','');
REPLACE INTO `item_db` VALUES ('1252','Katar','Katar','4','41000','20500','1200','148','0','0','1','1','4096','63','2','34','3','33',NULL,'1','16','0','bonus bDex,1;','','');
@@ -1078,19 +1078,19 @@ REPLACE INTO `item_db` VALUES ('2110','Holy_Guard','Holy Guard','5','85000','425
REPLACE INTO `item_db` VALUES ('2111','Herald_Of_GOD','Sacred Mission','5','128000','64000','1600','0','0','5','0','0','16384','63','2','32','0','83',NULL,'1','4','0','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;','','');
REPLACE INTO `item_db` VALUES ('2112','Novice_Guard','Novice Guard','5','1','0','1','0','0','3','0','0','1','63','2','32','0','0',NULL,'0','1','0','','','');
REPLACE INTO `item_db` VALUES ('2113','Novice_Shield','Novice Shield','5','5000','2500','1000','0','0','3','0','1','1','63','2','32','0','40',NULL,'1','3','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20;','','');
-REPLACE INTO `item_db` VALUES ('2114','Stone_Buckler','Stone Buckler','5','30000','15000','1500','0','0','3','0','1','2147483647','63','2','32','0','65',NULL,'1','2','0','bonus2 bSubSize,Size_Large,5;','','');
-REPLACE INTO `item_db` VALUES ('2115','Valkyrja\'s_Shield','Valkyrja\'s Shield','5','30000','15000','500','0','0','3','0','1','2147483647','63','2','32','0','65',NULL,'1','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2114','Stone_Buckler','Stone Buckler','5','30000','15000','1500','0','0','3','0','1','2147483646','63','2','32','0','65',NULL,'1','2','0','bonus2 bSubSize,Size_Large,5;','','');
+REPLACE INTO `item_db` VALUES ('2115','Valkyrja\'s_Shield','Valkyrja\'s Shield','5','30000','15000','500','0','0','3','0','1','2147483646','63','2','32','0','65',NULL,'1','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2116','Angel\'s_Safeguard','Angelic Guard','5','10000','5000','400','0','0','3','0','1','1','63','2','32','0','20',NULL,'1','1','0','bonus2 bSubRace,RC_Demon,5;','','');
REPLACE INTO `item_db` VALUES ('2117','Arm_Guard','Arm Guard','5','10000','5000','150','0','0','5','0','0','33554432','63','2','32','0','20',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('2118','Arm_Guard_','Arm Guard','5','10000','5000','150','0','0','5','0','1','33554432','63','2','32','0','20',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('2119','Improved_Arm_Guard','Advanced Arm Guard','5','40000','20000','150','0','0','4','0','0','33554432','63','2','32','0','50',NULL,'1','1','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2120','Improved_Arm_Guard_','Advanced Arm Guard','5','40000','20000','150','0','0','4','0','1','33554432','63','2','32','0','50',NULL,'1','1','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2121','Memorize_Book_','Memory Book','5','20','10','1000','0','0','3','0','1','8454660','63','2','32','0','0',NULL,'1','5','0','bonus bInt,1; bonus bMdef,2;','','');
-REPLACE INTO `item_db` VALUES ('2122','Platinum_Shield','Platinum Shield','5','20','10','1200','0','0','5','0','0','2147483647','2','2','32','0','68',NULL,'1','4','0','bonus bMdef,5; bonus2 bSubSize,Size_Medium,15; bonus2 bSubSize,Size_Large,15; bonus2 bSubRace,RC_Undead,10; bonus5 bAutoSpellWhenHit,NPC_MAGICMIRROR,2,150,BF_MAGIC,0;','','');
-REPLACE INTO `item_db` VALUES ('2123','Orleans_Server','Orleans\'s Server','5','20','10','1000','0','0','5','0','1','2147483647','2','2','32','0','55',NULL,'1','4','0','bonus bMdef,2; bonus bMagicDamageReturn,5;','','');
-REPLACE INTO `item_db` VALUES ('2124','Thorny_Buckler','Thorny Buckler','5','20','10','1000','0','0','5','0','1','2147483647','2','2','32','0','55',NULL,'1','2','0','bonus bMdef,2;','','');
-REPLACE INTO `item_db` VALUES ('2125','Strong_Shield','Strong Shield','5','20','10','2500','0','0','4','0','1','2147483647','2','2','32','0','75',NULL,'1','4','0','bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
-REPLACE INTO `item_db` VALUES ('2126','Guyak_Shield','Guyak Shield','5','20','10','700','0','0','3','0','0','2147483647','63','2','32','0','75',NULL,'1','2','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2122','Platinum_Shield','Platinum Shield','5','20','10','1200','0','0','5','0','0','2147483646','2','2','32','0','68',NULL,'1','4','0','bonus bMdef,5; bonus2 bSubSize,Size_Medium,15; bonus2 bSubSize,Size_Large,15; bonus2 bSubRace,RC_Undead,10; bonus5 bAutoSpellWhenHit,NPC_MAGICMIRROR,2,150,BF_MAGIC,0;','','');
+REPLACE INTO `item_db` VALUES ('2123','Orleans_Server','Orleans\'s Server','5','20','10','1000','0','0','5','0','1','2147483646','2','2','32','0','55',NULL,'1','4','0','bonus bMdef,2; bonus bMagicDamageReturn,5;','','');
+REPLACE INTO `item_db` VALUES ('2124','Thorny_Buckler','Thorny Buckler','5','20','10','1000','0','0','5','0','1','2147483646','2','2','32','0','55',NULL,'1','2','0','bonus bMdef,2;','','');
+REPLACE INTO `item_db` VALUES ('2125','Strong_Shield','Strong Shield','5','20','10','2500','0','0','4','0','1','2147483646','2','2','32','0','75',NULL,'1','4','0','bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
+REPLACE INTO `item_db` VALUES ('2126','Guyak_Shield','Guyak Shield','5','20','10','700','0','0','3','0','0','2147483646','63','2','32','0','75',NULL,'1','2','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2127','Secular_Mission','Secular Mission','5','20','10','0','0','0','10','0','0','4294967295','63','2','32','0','0',NULL,'0','4','0','bonus2 bSubRace,RC_NonBoss,25; bonus2 bSubRace,RC_Boss,25;','','');
REPLACE INTO `item_db` VALUES ('2128','Herald_Of_GOD_','Sacred Mission','5','128000','64000','1600','0','0','5','0','1','16384','63','2','32','0','83',NULL,'1','4','0','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;','','');
REPLACE INTO `item_db` VALUES ('2129','Exorcism_Bible','Exorcism Bible','5','20','10','600','0','0','5','0','0','33024','63','2','32','0','50',NULL,'1','5','0','bonus bHPrecovRate,3; bonus bSPrecovRate,3; bonus bInt,1;','','');
@@ -1101,7 +1101,7 @@ REPLACE INTO `item_db` VALUES ('2133','Tournament_Shield','Tournament Shield','5
REPLACE INTO `item_db` VALUES ('2134','Shield_Of_Naga','Shield of Naga','5','20','10','500','0','0','3','0','1','13631360','2','2','32','0','70',NULL,'1','2','0','bonus bMdef,3; autobonus2 \"{ bonus bShortWeaponDamageReturn,(getrefine()*3); }\",10,5000,BF_WEAPON,\"{ specialeffect2 EF_GUARD; }\";','','');
REPLACE INTO `item_db` VALUES ('2135','Shadow_Guard','Shadow Guard','5','20','10','800','0','0','4','0','1','131072','2','2','32','0','70',NULL,'1','2','0','','','');
REPLACE INTO `item_db` VALUES ('2136','Cracked_Buckler','Cracked Buckler','5','0','0','0','0','0','5','0','0','4294967295','63','2','32','0','0',NULL,'0','2','0','bonus bAgi,2; bonus2 bAddEle,Ele_Neutral,-10; bonus3 bAutoSpellWhenHit,PR_KYRIE,1,50; bonus bMdef,1;','','');
-REPLACE INTO `item_db` VALUES ('2137','Valkyrja\'s_Shield_C','Neo Valkyrja\'s Shield','5','0','0','0','0','0','5','0','0','2147483647','2','2','32','0','95',NULL,'0','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2137','Valkyrja\'s_Shield_C','Neo Valkyrja\'s Shield','5','0','0','0','0','0','5','0','0','2147483646','2','2','32','0','95',NULL,'0','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2138','Bradium_Shield','Bradium Shield','5','20','10','1800','0','0','5','0','1','13631360','2','2','32','0','65',NULL,'1','3','0','bonus2 bSkillAtk,CR_SHIELDBOOMERANG,60; bonus bAgi,-1; bonus bMaxHP,500;','','');
REPLACE INTO `item_db` VALUES ('2199','Ahura_Mazda','Ahura Mazdah','5','1','0','10','0','0','100','0','0','4294967295','63','2','32','0','1',NULL,'1','0','0','bonus bAllStats,50; bonus bMdef,99; bonus bShortWeaponDamageReturn,100; bonus2 bSubRace,RC_DemiHuman,95; skill CR_FULLPROTECTION,5; skill WZ_ESTIMATION,1; skill ST_FULLSTRIP,5; skill HW_MAGICPOWER,10; bonus bMaxHPrate,200; bonus bNoGemStone,0; bonus bSpeedRate,25;','sc_start4 SC_ENDURE,60000,10,0,0,1;','sc_end SC_ENDURE;');
REPLACE INTO `item_db` VALUES ('2201','Sunglasses','Sunglasses','5','5000','2500','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','12','0','bonus2 bResEff,Eff_Blind,500;','','');
@@ -1125,8 +1125,8 @@ REPLACE INTO `item_db` VALUES ('2218','Flu_Mask','Flu Mask','5','300','150','100
REPLACE INTO `item_db` VALUES ('2219','Flu_Mask_','Flu Mask','5','300','150','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','8','0','bonus2 bResEff,Eff_Silence,1000;','','');
REPLACE INTO `item_db` VALUES ('2220','Hat','Hat','5','1000','500','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
REPLACE INTO `item_db` VALUES ('2221','Hat_','Hat','5','1000','500','200','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
-REPLACE INTO `item_db` VALUES ('2222','Turban','Turban','5','4500','2250','300','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','7','0','','','');
-REPLACE INTO `item_db` VALUES ('2223','Turban_','Turban','5','4500','2250','300','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','7','0','','','');
+REPLACE INTO `item_db` VALUES ('2222','Turban','Turban','5','4500','2250','300','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','7','0','','','');
+REPLACE INTO `item_db` VALUES ('2223','Turban_','Turban','5','4500','2250','300','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','7','0','','','');
REPLACE INTO `item_db` VALUES ('2224','Goggle','Goggles','5','20','10','300','0','0','5','0','0','941290','63','2','768','0','0',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('2225','Goggle_','Goggles','5','20','10','300','0','0','5','0','1','941290','63','2','768','0','0',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('2226','Cap','Cap','5','12000','6000','400','0','0','4','0','0','941290','63','2','256','0','0',NULL,'1','14','0','','','');
@@ -1137,8 +1137,8 @@ REPLACE INTO `item_db` VALUES ('2230','Gemmed_Sallet','Gemmed Sallet','5','50000
REPLACE INTO `item_db` VALUES ('2231','Gemmed_Sallet_','Gemmed Sallet','5','50000','25000','500','0','0','4','0','1','414946','63','2','256','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2232','Circlet','Circlet','5','7500','3750','300','0','0','3','0','0','8487700','63','2','256','0','0',NULL,'1','18','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2233','Circlet_','Circlet','5','7500','3750','300','0','0','3','0','1','8487700','63','2','256','0','0',NULL,'1','18','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2234','Tiara','Tiara','5','20','10','400','0','0','4','0','0','2147483647','63','2','256','0','45',NULL,'1','19','0','bonus bInt,2;','','');
-REPLACE INTO `item_db` VALUES ('2235','Crown','Crown','5','20','10','400','0','0','4','0','0','2147483647','63','1','256','0','45',NULL,'1','45','0','bonus bInt,2;','','');
+REPLACE INTO `item_db` VALUES ('2234','Tiara','Tiara','5','20','10','400','0','0','4','0','0','2147483646','63','2','256','0','45',NULL,'1','19','0','bonus bInt,2;','','');
+REPLACE INTO `item_db` VALUES ('2235','Crown','Crown','5','20','10','400','0','0','4','0','0','2147483646','63','1','256','0','45',NULL,'1','45','0','bonus bInt,2;','','');
REPLACE INTO `item_db` VALUES ('2236','Santa\'s_Hat','Santa Hat','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','20','0','bonus bMdef,1; bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('2237','Weird_Goatee','Bandit Beard','5','2','1','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','21','0','','','');
REPLACE INTO `item_db` VALUES ('2239','One_Eyed_Glass','Monocle','5','10000','5000','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','23','0','','','');
@@ -1146,60 +1146,60 @@ REPLACE INTO `item_db` VALUES ('2240','Beard','Beard','5','2','1','100','0','0',
REPLACE INTO `item_db` VALUES ('2241','Granpa_Beard','Grampa Beard','5','5000','2500','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','','','');
REPLACE INTO `item_db` VALUES ('2242','Luxury_Sunglasses','Purple Glasses','5','24000','12000','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','26','0','bonus2 bResEff,Eff_Blind,1000;','','');
REPLACE INTO `item_db` VALUES ('2243','Spinning_Eyes','Geek Glasses','5','20000','10000','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','27','0','bonus2 bResEff,Eff_Blind,1500;','','');
-REPLACE INTO `item_db` VALUES ('2244','Big_Sis\'_Ribbon','Big Ribbon','5','15000','7500','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2245','Sweet_Gents','Sweet Gent','5','15000','7500','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','29','0','','','');
-REPLACE INTO `item_db` VALUES ('2246','Golden_Gear','Golden Gear','5','20','10','900','0','0','5','0','0','2147483647','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
-REPLACE INTO `item_db` VALUES ('2247','Oldman\'s_Romance','Romantic Gent','5','15000','7500','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','31','0','','','');
-REPLACE INTO `item_db` VALUES ('2248','Western_Grace','Western Grace','5','15000','7500','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','32','0','','','');
-REPLACE INTO `item_db` VALUES ('2249','Coronet','Coronet','5','20','10','300','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','33','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2250','Fillet','Cute Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','34','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('2244','Big_Sis\'_Ribbon','Big Ribbon','5','15000','7500','200','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2245','Sweet_Gents','Sweet Gent','5','15000','7500','400','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','29','0','','','');
+REPLACE INTO `item_db` VALUES ('2246','Golden_Gear','Golden Gear','5','20','10','900','0','0','5','0','0','2147483646','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db` VALUES ('2247','Oldman\'s_Romance','Romantic Gent','5','15000','7500','400','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','31','0','','','');
+REPLACE INTO `item_db` VALUES ('2248','Western_Grace','Western Grace','5','15000','7500','400','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','32','0','','','');
+REPLACE INTO `item_db` VALUES ('2249','Coronet','Coronet','5','20','10','300','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','33','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2250','Fillet','Cute Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','34','0','bonus bMaxSP,20;','','');
REPLACE INTO `item_db` VALUES ('2251','Holy_Bonnet','Monk Hat','5','30000','15000','100','0','0','5','0','0','33040','63','2','256','0','0',NULL,'1','35','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2252','Star_Sparkling','Wizard Hat','5','20','10','300','0','0','4','0','0','8454660','63','2','256','0','0',NULL,'1','36','0','bonus bMaxSP,100;','','');
REPLACE INTO `item_db` VALUES ('2253','Sunflower','Sunflower','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','37','0','bonus2 bSubRace,RC_Insect,10;','','');
-REPLACE INTO `item_db` VALUES ('2254','Angelic_Chain','Angel Wing','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;','','');
-REPLACE INTO `item_db` VALUES ('2255','Satanic_Chain','Evil Wing','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','39','0','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;','','');
+REPLACE INTO `item_db` VALUES ('2254','Angelic_Chain','Angel Wing','5','20','10','100','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;','','');
+REPLACE INTO `item_db` VALUES ('2255','Satanic_Chain','Evil Wing','5','20','10','100','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','39','0','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;','','');
REPLACE INTO `item_db` VALUES ('2256','Magestic_Goat','Majestic Goat','5','20','10','800','0','0','5','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('2257','Snowy_Horn','Unicorn Horn','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','42','0','','','');
REPLACE INTO `item_db` VALUES ('2258','Sharp_Gear','Spiky Band','5','20','10','1000','0','0','6','0','0','6739442','63','2','256','0','50',NULL,'1','43','0','','','');
REPLACE INTO `item_db` VALUES ('2259','Mini_Propeller','Mini Propeller','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','46','0','','','');
-REPLACE INTO `item_db` VALUES ('2260','Mini_Glasses','Mini Glasses','5','28000','14000','100','0','0','1','0','0','2147483647','63','2','512','0','0',NULL,'0','47','0','','','');
+REPLACE INTO `item_db` VALUES ('2260','Mini_Glasses','Mini Glasses','5','28000','14000','100','0','0','1','0','0','2147483646','63','2','512','0','0',NULL,'0','47','0','','','');
REPLACE INTO `item_db` VALUES ('2261','Prontera_Army_Cap','Army Cap','5','20','10','400','0','0','4','0','0','414946','63','2','256','0','0',NULL,'1','48','0','','','');
REPLACE INTO `item_db` VALUES ('2262','Pierrot_Nose','Clown Nose','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','49','0','','','');
-REPLACE INTO `item_db` VALUES ('2263','Gangster_Patch','Zorro Masque','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','50','0','','','');
+REPLACE INTO `item_db` VALUES ('2263','Gangster_Patch','Zorro Masque','5','20','10','100','0','0','0','0','0','2147483646','63','2','512','0','0',NULL,'0','50','0','','','');
REPLACE INTO `item_db` VALUES ('2264','Munak_Turban','Munak Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','769','0','0',NULL,'0','51','0','bonus2 bSubRace,RC_Undead,10;','','');
REPLACE INTO `item_db` VALUES ('2265','Ganster_Mask','Gangster Mask','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','52','0','bonus2 bResEff,Eff_Silence,1500;','','');
REPLACE INTO `item_db` VALUES ('2266','Iron_Cane','Iron Cain','5','20','10','300','0','0','1','0','0','16514','63','2','1','0','50',NULL,'0','53','0','','','');
-REPLACE INTO `item_db` VALUES ('2267','Cigar','Cigarette','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','54','0','bonus2 bSubRace,RC_Insect,3;','','');
-REPLACE INTO `item_db` VALUES ('2268','Smoking_Pipe','Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus2 bSubRace,RC_Insect,3;','','');
-REPLACE INTO `item_db` VALUES ('2269','Centimental_Flower','Romantic Flower','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db` VALUES ('2270','Centimental_Leaf','Romantic Leaf','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','57','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db` VALUES ('2271','Jack_A_Dandy','Jack be Dandy','5','45000','22500','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','58','0','','','');
+REPLACE INTO `item_db` VALUES ('2267','Cigar','Cigarette','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','54','0','bonus2 bSubRace,RC_Insect,3;','','');
+REPLACE INTO `item_db` VALUES ('2268','Smoking_Pipe','Pipe','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','55','0','bonus2 bSubRace,RC_Insect,3;','','');
+REPLACE INTO `item_db` VALUES ('2269','Centimental_Flower','Romantic Flower','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db` VALUES ('2270','Centimental_Leaf','Romantic Leaf','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','57','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db` VALUES ('2271','Jack_A_Dandy','Jack be Dandy','5','45000','22500','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','58','0','','','');
REPLACE INTO `item_db` VALUES ('2272','Stop_Post','Stop Post','5','20','10','400','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','59','0','','','');
-REPLACE INTO `item_db` VALUES ('2273','Doctor_Cap','Doctor Band','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','60','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2274','Ghost_Bandana','Ghost Bandana','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','61','0','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;','','');
+REPLACE INTO `item_db` VALUES ('2273','Doctor_Cap','Doctor Band','5','20','10','100','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','60','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2274','Ghost_Bandana','Ghost Bandana','5','20','10','100','0','0','0','0','0','2147483646','63','2','256','0','0',NULL,'1','61','0','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;','','');
REPLACE INTO `item_db` VALUES ('2275','Red_Bandana','Red Bandana','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','62','0','','','');
REPLACE INTO `item_db` VALUES ('2276','Eagle_Eyes','Angled Glasses','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','63','0','','','');
REPLACE INTO `item_db` VALUES ('2277','Nurse_Cap','Nurse Cap','5','20','10','100','0','0','2','0','0','33040','63','2','256','0','0',NULL,'1','64','0','bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('2278','Mr_Smile','Mr. Smile','5','60','30','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','65','0','','','');
REPLACE INTO `item_db` VALUES ('2279','Bomb_Wick','Bomb Wick','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','66','0','','','');
REPLACE INTO `item_db` VALUES ('2280','Sahkkat','Sakkat','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','67','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2281','Phantom_Of_Opera','Opera Masque','5','20','10','200','0','0','2','0','0','2147483647','63','2','513','0','0',NULL,'0','68','0','','','');
+REPLACE INTO `item_db` VALUES ('2281','Phantom_Of_Opera','Opera Masque','5','20','10','200','0','0','2','0','0','2147483646','63','2','513','0','0',NULL,'0','68','0','','','');
REPLACE INTO `item_db` VALUES ('2282','Spirit_Chain','Halo','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','69','0','bonus2 bSubEle,Ele_Holy,15;','','');
REPLACE INTO `item_db` VALUES ('2283','Ear_Mufs','Ear Muffs','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','70','0','bonus2 bResEff,Eff_Curse,1000;','','');
-REPLACE INTO `item_db` VALUES ('2284','Antler','Antlers','5','20','10','500','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','71','0','','','');
-REPLACE INTO `item_db` VALUES ('2285','Apple_Of_Archer','Apple of Archer','5','20','10','200','0','0','0','0','0','2147483647','63','2','256','0','30',NULL,'1','72','0','bonus bDex,3;','','');
-REPLACE INTO `item_db` VALUES ('2286','Elven_Ears','Elven Ears','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','70',NULL,'0','73','0','','','');
-REPLACE INTO `item_db` VALUES ('2287','Pirate_Bandana','Pirate Bandana','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('2288','Mr_Scream','Mr. Scream','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','75','0','','','');
+REPLACE INTO `item_db` VALUES ('2284','Antler','Antlers','5','20','10','500','0','0','4','0','0','2147483646','63','2','256','0','0',NULL,'1','71','0','','','');
+REPLACE INTO `item_db` VALUES ('2285','Apple_Of_Archer','Apple of Archer','5','20','10','200','0','0','0','0','0','2147483646','63','2','256','0','30',NULL,'1','72','0','bonus bDex,3;','','');
+REPLACE INTO `item_db` VALUES ('2286','Elven_Ears','Elven Ears','5','20','10','100','0','0','0','0','0','2147483646','63','2','512','0','70',NULL,'0','73','0','','','');
+REPLACE INTO `item_db` VALUES ('2287','Pirate_Bandana','Pirate Bandana','5','20','10','100','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
+REPLACE INTO `item_db` VALUES ('2288','Mr_Scream','Mr. Scream','5','20','10','100','0','0','1','0','0','2147483646','63','2','513','0','0',NULL,'0','75','0','','','');
REPLACE INTO `item_db` VALUES ('2289','Poo_Poo_Hat','Poo Poo Hat','5','20','10','700','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','76','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('2290','Funeral_Costume','Funeral Hat','5','3000','1500','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','77','0','','','');
-REPLACE INTO `item_db` VALUES ('2291','Masquerade','Masquerade','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,3;','','');
+REPLACE INTO `item_db` VALUES ('2291','Masquerade','Masquerade','5','20','10','100','0','0','0','0','0','2147483646','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db` VALUES ('2292','Welding_Mask','Welding Mask','5','20','10','300','0','0','2','0','0','263200','63','2','513','0','50',NULL,'0','79','0','bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db` VALUES ('2293','Pretend_Murdered','Pretend Murdered','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','80','0','','','');
REPLACE INTO `item_db` VALUES ('2294','Star_Dust','Stellar','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','81','0','','','');
-REPLACE INTO `item_db` VALUES ('2295','Blinker','Blinker','5','1500','750','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','82','0','bonus2 bResEff,Eff_Blind,10000;','','');
+REPLACE INTO `item_db` VALUES ('2295','Blinker','Blinker','5','1500','750','100','0','0','0','0','0','2147483646','63','2','512','0','0',NULL,'0','82','0','bonus2 bResEff,Eff_Blind,10000;','','');
REPLACE INTO `item_db` VALUES ('2296','Binoculars','Binoculars','5','20','10','100','0','0','1','0','0','526344','63','2','512','0','50',NULL,'0','83','0','bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('2297','Goblini_Mask','Goblin Mask','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','84','0','','','');
+REPLACE INTO `item_db` VALUES ('2297','Goblini_Mask','Goblin Mask','5','20','10','100','0','0','1','0','0','2147483646','63','2','513','0','0',NULL,'0','84','0','','','');
REPLACE INTO `item_db` VALUES ('2298','Green_Feeler','Green Feeler','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','85','0','','','');
REPLACE INTO `item_db` VALUES ('2299','Viking_Helm','Orc Helm','5','20','10','500','0','0','5','0','0','414946','63','2','256','0','0',NULL,'1','86','0','','','');
REPLACE INTO `item_db` VALUES ('2301','Cotton_Shirt','Cotton Shirt','5','10','5','100','0','0','1','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1208,11 +1208,11 @@ REPLACE INTO `item_db` VALUES ('2303','Leather_Jacket','Jacket','5','200','100',
REPLACE INTO `item_db` VALUES ('2304','Leather_Jacket_','Jacket','5','200','100','200','0','0','2','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2305','Adventure_Suit','Adventurer\'s Suit','5','1000','500','300','0','0','3','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2306','Adventurere\'s_Suit_','Adventurer\'s Suit','5','1000','500','300','0','0','3','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2307','Mantle','Mantle','5','10000','5000','600','0','0','4','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2308','Mantle_','Mantle','5','10000','5000','600','0','0','4','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2309','Coat','Coat','5','22000','11000','1200','0','0','5','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2310','Coat_','Coat','5','22000','11000','1200','0','0','5','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2311','Mink_Coat','Mink Coat','5','20','10','2300','0','0','6','0','1','2147483647','63','2','16','0','30',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2307','Mantle','Mantle','5','10000','5000','600','0','0','4','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2308','Mantle_','Mantle','5','10000','5000','600','0','0','4','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2309','Coat','Coat','5','22000','11000','1200','0','0','5','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2310','Coat_','Coat','5','22000','11000','1200','0','0','5','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2311','Mink_Coat','Mink Coat','5','20','10','2300','0','0','6','0','1','2147483646','63','2','16','0','30',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2312','Padded_Armor','Padded Armor','5','48000','24000','2800','0','0','7','0','0','414946','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2313','Padded_Armor_','Padded Armor','5','48000','24000','2800','0','0','7','0','1','414946','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2314','Chain_Mail','Chain Mail','5','65000','32500','3300','0','0','8','0','0','414946','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1220,8 +1220,8 @@ REPLACE INTO `item_db` VALUES ('2315','Chain_Mail_','Chain Mail','5','65000','32
REPLACE INTO `item_db` VALUES ('2316','Plate_Armor','Full Plate','5','80000','40000','4500','0','0','10','0','0','16514','63','2','16','0','40',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2317','Plate_Armor_','Full Plate','5','80000','40000','4500','0','0','10','0','1','16514','63','2','16','0','40',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2318','Clothes_Of_The_Lord','Lord\'s Clothes','5','20','10','2500','0','0','8','0','1','263200','63','2','16','0','70',NULL,'1','0','0','bonus bMdef,5; bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2319','Glittering_Clothes','Glittering Jacket','5','20','10','2500','0','0','7','0','1','2147483647','63','2','16','0','60',NULL,'1','0','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,300;','','');
-REPLACE INTO `item_db` VALUES ('2320','Formal_Suit','Formal Suit','5','20','10','300','0','0','5','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2319','Glittering_Clothes','Glittering Jacket','5','20','10','2500','0','0','7','0','1','2147483646','63','2','16','0','60',NULL,'1','0','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,300;','','');
+REPLACE INTO `item_db` VALUES ('2320','Formal_Suit','Formal Suit','5','20','10','300','0','0','5','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2321','Silk_Robe','Silk Robe','5','8000','4000','400','0','0','3','0','0','8767414','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db` VALUES ('2322','Silk_Robe_','Silk Robe','5','8000','4000','400','0','0','3','0','1','8767414','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db` VALUES ('2323','Scapulare','Scapulare','5','6500','3250','400','0','0','4','0','0','33040','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1239,35 +1239,35 @@ REPLACE INTO `item_db` VALUES ('2334','Mage_Coat','Mage Coat','5','20','10','600
REPLACE INTO `item_db` VALUES ('2335','Thief_Clothes','Thief Clothes','5','74000','37000','100','0','0','6','0','0','33689664','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2336','Thief_Clothes_','Thief Clothes','5','74000','37000','100','0','0','6','0','1','33689664','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2337','Ninja_Suit','Ninja Suit','5','20','10','1500','0','0','7','0','0','33689664','63','2','16','0','50',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2338','Wedding_Dress','Wedding Dress','5','43000','21500','500','0','0','0','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('2338','Wedding_Dress','Wedding Dress','5','43000','21500','500','0','0','0','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,15;','','');
REPLACE INTO `item_db` VALUES ('2339','G_Strings','Pantie','5','1000','500','100','0','0','4','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2340','Novice_Breast','Novice Breastplate','5','89000','44500','500','0','0','4','0','1','1','63','2','16','0','10',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2341','Full_Plate_Armor','Legion Plate Armor','5','94000','47000','5500','0','0','11','0','0','16384','63','2','16','0','70',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2342','Full_Plate_Armor_','Legion Plate Armor','5','102500','51250','5500','0','0','11','0','1','16384','63','2','16','0','70',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2343','Robe_Of_Casting','Robe of Cast','5','124800','62400','1100','0','0','5','0','0','8454656','63','2','16','0','75',NULL,'1','0','0','bonus bCastrate,-3; bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('2344','Flame_Sprits_Armor','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','4','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
-REPLACE INTO `item_db` VALUES ('2345','Flame_Sprits_Armor_','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','4','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
+REPLACE INTO `item_db` VALUES ('2345','Flame_Sprits_Armor_','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','4','0','1','2147483646','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
REPLACE INTO `item_db` VALUES ('2346','Water_Sprits_Armor','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','4','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
-REPLACE INTO `item_db` VALUES ('2347','Water_Sprits_Armor_','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','4','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
+REPLACE INTO `item_db` VALUES ('2347','Water_Sprits_Armor_','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','4','0','1','2147483646','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
REPLACE INTO `item_db` VALUES ('2348','Wind_Sprits_Armor','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','4','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
-REPLACE INTO `item_db` VALUES ('2349','Wind_Sprits_Armor_','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','4','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
+REPLACE INTO `item_db` VALUES ('2349','Wind_Sprits_Armor_','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','4','0','1','2147483646','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
REPLACE INTO `item_db` VALUES ('2350','Earth_Sprits_Armor','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','4','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
-REPLACE INTO `item_db` VALUES ('2351','Earth_Sprits_Armor_','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','4','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
+REPLACE INTO `item_db` VALUES ('2351','Earth_Sprits_Armor_','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','4','0','1','2147483646','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
REPLACE INTO `item_db` VALUES ('2352','Novice_Plate','Tattered Novice Ninja Suit','5','1','0','1','0','0','4','0','0','1','63','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2353','Odin\'s_Blessing','Odin\'s Blessing','5','30000','15000','2500','0','0','6','0','1','2147483647','63','2','16','0','65',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2354','Goibne\'s_Armor','Goibne\'s Armor','5','50000','25000','3500','0','0','7','0','0','2147483647','63','2','16','0','54',NULL,'1','0','0','bonus bVit,2; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db` VALUES ('2353','Odin\'s_Blessing','Odin\'s Blessing','5','30000','15000','2500','0','0','6','0','1','2147483646','63','2','16','0','65',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2354','Goibne\'s_Armor','Goibne\'s Armor','5','50000','25000','3500','0','0','7','0','0','2147483646','63','2','16','0','54',NULL,'1','0','0','bonus bVit,2; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db` VALUES ('2355','Angel\'s_Protection','Angelic Protection','5','10000','5000','600','0','0','4','0','1','1','63','2','16','0','40',NULL,'1','0','0','bonus bMdef,20;','','');
REPLACE INTO `item_db` VALUES ('2356','Vestment_Of_Grace','Blessed Holy Robe','5','20','10','2500','0','0','5','0','1','33024','63','2','16','0','70',NULL,'1','0','0','bonus bMdef,5; bonus2 bResEff,Eff_Blind,8000;','','');
-REPLACE INTO `item_db` VALUES ('2357','Valkyrie_Armor','Valkyrian Armor','5','0','0','2800','0','0','6','0','1','2147483647','2','2','16','0','1',NULL,'1','0','0','bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;','','');
+REPLACE INTO `item_db` VALUES ('2357','Valkyrie_Armor','Valkyrian Armor','5','0','0','2800','0','0','6','0','1','2147483646','2','2','16','0','1',NULL,'1','0','0','bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;','','');
REPLACE INTO `item_db` VALUES ('2358','Dress_Of_Angel','Angel\'s Dress','5','20','10','1000','0','0','5','0','0','4294967295','63','2','16','0','1',NULL,'0','0','0','bonus bLuk,4;','','');
REPLACE INTO `item_db` VALUES ('2359','Ninja_Suit_','Ninja Suit','5','20','10','1500','0','0','7','0','1','33689664','63','2','16','0','50',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2360','Robe_Of_Casting_','Robe of Cast','5','124800','62400','1100','0','0','5','0','1','8454656','63','2','16','0','75',NULL,'1','0','0','bonus bCastrate,-3; bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('2364','Meteo_Plate_Armor','Meteo Plate Armor','5','20','10','3000','0','0','10','0','1','279714','2','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Stun,3000; bonus2 bResEff,Eff_Freeze,3000;','','');
-REPLACE INTO `item_db` VALUES ('2365','Orleans_Gown','Orleans\'s Gown','5','20','10','300','0','0','2','0','1','2147483647','2','2','16','0','55',NULL,'1','0','0','bonus bCastrate,15; bonus bNoCastCancel,0;','','');
-REPLACE INTO `item_db` VALUES ('2366','Divine_Cloth','Divine Cloth','5','20','10','1500','0','0','6','0','1','2147483647','2','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Curse,500; bonus2 bResEff,Eff_Silence,500; bonus2 bResEff,Eff_Stun,500; bonus2 bResEff,Eff_Stone,500; bonus2 bResEff,Eff_Sleep,500;','','');
+REPLACE INTO `item_db` VALUES ('2365','Orleans_Gown','Orleans\'s Gown','5','20','10','300','0','0','2','0','1','2147483646','2','2','16','0','55',NULL,'1','0','0','bonus bCastrate,15; bonus bNoCastCancel,0;','','');
+REPLACE INTO `item_db` VALUES ('2366','Divine_Cloth','Divine Cloth','5','20','10','1500','0','0','6','0','1','2147483646','2','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Curse,500; bonus2 bResEff,Eff_Silence,500; bonus2 bResEff,Eff_Stun,500; bonus2 bResEff,Eff_Stone,500; bonus2 bResEff,Eff_Sleep,500;','','');
REPLACE INTO `item_db` VALUES ('2367','Sniping_Suit','Sniping Suit','5','20','10','750','0','0','5','0','1','2048','2','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bCritical,6+(readparam(bLuk)/10); bonus bDelayrate,-23;','','');
REPLACE INTO `item_db` VALUES ('2368','Golden_Armor','Golden Armor','5','20','10','2000','0','0','4','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db` VALUES ('2369','Freyja_Overcoat','Freyja Overcoat','5','0','0','500','0','0','12','0','0','2147483647','63','2','16','0','0',NULL,'0','0','0','bonus bUnbreakableArmor,0; bonus2 bSubRace,RC_DemiHuman,10;','','');
+REPLACE INTO `item_db` VALUES ('2369','Freyja_Overcoat','Freyja Overcoat','5','0','0','500','0','0','12','0','0','2147483646','63','2','16','0','0',NULL,'0','0','0','bonus bUnbreakableArmor,0; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('2370','Used_Mage_Coat','Used Mage Coat','5','0','0','0','0','0','15','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMaxHP,300; bonus bMaxSP,30; bonus bBaseAtk,10; bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2371','G_Strings_','Pantie','5','1000','500','100','0','0','4','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2372','Mage_Coat_','Mage Coat','5','20','10','600','0','0','5','0','1','8454660','63','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bInt,1;','','');
@@ -1292,45 +1292,45 @@ REPLACE INTO `item_db` VALUES ('2390','Improved_Tights','Improved Tights','5','2
REPLACE INTO `item_db` VALUES ('2391','Life_Link','Life Link','5','20','10','3500','0','0','9','0','1','16514','2','2','16','0','82',NULL,'1','0','0','bonus bVit,2; bonus bMdef,5; bonus bHPrecovRate,50;','','');
REPLACE INTO `item_db` VALUES ('2392','Old_Pant','Old Green Pantie','5','0','0','0','0','0','10','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bStr,2; bonus bVit,2; bonus bMaxHP,200; bonus3 bAutoSpellWhenHit,MO_CALLSPIRITS,5,20; bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('2393','N_Adventurer\'s_Suit','Novice Adventurer\'s Suit','5','0','0','0','0','0','8','0','1','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2394','Krieger_Suit1','Glorious Suit','5','20','10','0','0','0','0','0','0','2147483647','63','2','16','0','81',NULL,'1','0','0','bonus bMaxHPrate,20; bonus2 bSubRace,RC_DemiHuman,7;','','');
-REPLACE INTO `item_db` VALUES ('2395','Krieger_Suit2','Glorious Popularized Suit','5','20','10','0','0','0','0','0','0','2147483647','63','2','16','0','61',NULL,'1','0','0','bonus bMaxHP,600; bonus bSPrecovRate,10;','','');
-REPLACE INTO `item_db` VALUES ('2396','Krieger_Suit3','Glorious Mass-Production Suit','5','20','10','0','0','0','0','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHP,500;','','');
-REPLACE INTO `item_db` VALUES ('2397','Incredible_Coat','Incredible Event Resignation Coat','5','10','5','900','0','0','2','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2394','Krieger_Suit1','Glorious Suit','5','20','10','0','0','0','0','0','0','2147483646','63','2','16','0','81',NULL,'1','0','0','bonus bMaxHPrate,20; bonus2 bSubRace,RC_DemiHuman,7;','','');
+REPLACE INTO `item_db` VALUES ('2395','Krieger_Suit2','Glorious Popularized Suit','5','20','10','0','0','0','0','0','0','2147483646','63','2','16','0','61',NULL,'1','0','0','bonus bMaxHP,600; bonus bSPrecovRate,10;','','');
+REPLACE INTO `item_db` VALUES ('2396','Krieger_Suit3','Glorious Mass-Production Suit','5','20','10','0','0','0','0','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHP,500;','','');
+REPLACE INTO `item_db` VALUES ('2397','Incredible_Coat','Incredible Event Resignation Coat','5','10','5','900','0','0','2','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2398','Sniping_Suit_M','Sniping Suit','5','20','10','750','0','0','5','0','1','2048','2','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bCritical,6+(readparam(bLuk)/10); bonus bDelayrate,-23;','','');
-REPLACE INTO `item_db` VALUES ('2399','Dragon_Vest','Dragon Vest','5','20','10','500','0','0','3','0','1','2147483647','2','2','16','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2399','Dragon_Vest','Dragon Vest','5','20','10','500','0','0','3','0','1','2147483646','2','2','16','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2401','Sandals','Sandals','5','400','200','200','0','0','1','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2402','Sandals_','Sandals','5','400','200','200','0','0','1','0','1','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2403','Shoes','Shoes','5','3500','1750','400','0','0','2','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2404','Shoes_','Shoes','5','3500','1750','400','0','0','2','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2403','Shoes','Shoes','5','3500','1750','400','0','0','2','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2404','Shoes_','Shoes','5','3500','1750','400','0','0','2','0','1','2147483646','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2405','Boots','Boots','5','18000','9000','600','0','0','4','0','0','24009962','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2406','Boots_','Boots','5','18000','9000','600','0','0','4','0','1','24009962','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2407','Chrystal_Pumps','Crystal Pumps','5','20','10','100','0','0','0','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,10; bonus bLuk,5;','','');
+REPLACE INTO `item_db` VALUES ('2407','Chrystal_Pumps','Crystal Pumps','5','20','10','100','0','0','0','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,10; bonus bLuk,5;','','');
REPLACE INTO `item_db` VALUES ('2408','Cuffs','Shackles','5','5000','2500','3000','0','0','3','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2409','Spiky_Heel','High Heels','5','8500','4250','600','0','0','2','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2409','Spiky_Heel','High Heels','5','8500','4250','600','0','0','2','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2410','Sleipnir','Sleipnir','5','20','10','3500','0','0','5','0','0','4294967295','63','2','64','0','94',NULL,'0','0','0','bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25;','','');
REPLACE INTO `item_db` VALUES ('2411','Grave','Greaves','5','48000','24000','750','0','0','5','0','0','16512','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2412','Grave_','Greaves','5','54000','27000','750','0','0','5','0','1','16512','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2413','Safty_Boots','Safety Boots','5','34000','17000','350','0','0','6','0','0','16514','63','2','64','0','30',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2414','Novice_Boots','Novice Slippers','5','1','0','1','0','0','2','0','0','1','63','2','64','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2415','Slipper','Bunny Slipper','5','34000','17000','300','0','0','3','0','1','2147483647','63','2','64','0','30',NULL,'1','0','0','bonus bLuk,3; bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2415','Slipper','Bunny Slipper','5','34000','17000','300','0','0','3','0','1','2147483646','63','2','64','0','30',NULL,'1','0','0','bonus bLuk,3; bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('2416','Novice_Shoes','Novice Shoes','5','35000','17500','500','0','0','2','0','1','1','63','2','64','0','40',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2417','Fricco_Shoes','Fricco\'s Shoes','5','30000','15000','500','0','0','3','0','0','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;','','');
-REPLACE INTO `item_db` VALUES ('2418','Vidar\'s_Boots','Vidar\'s Boots','5','30000','15000','650','0','0','4','0','0','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;','','');
-REPLACE INTO `item_db` VALUES ('2419','Goibne\'s_Combat_Boots','Goibne\'s Greaves','5','30000','15000','700','0','0','4','0','0','2147483647','63','2','64','0','54',NULL,'1','0','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2417','Fricco_Shoes','Fricco\'s Shoes','5','30000','15000','500','0','0','3','0','0','2147483646','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;','','');
+REPLACE INTO `item_db` VALUES ('2418','Vidar\'s_Boots','Vidar\'s Boots','5','30000','15000','650','0','0','4','0','0','2147483646','63','2','64','0','65',NULL,'1','0','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;','','');
+REPLACE INTO `item_db` VALUES ('2419','Goibne\'s_Combat_Boots','Goibne\'s Greaves','5','30000','15000','700','0','0','4','0','0','2147483646','63','2','64','0','54',NULL,'1','0','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
REPLACE INTO `item_db` VALUES ('2420','Angel\'s_Arrival','Angel\'s Reincarnation','5','10000','5000','300','0','0','2','0','1','1','63','2','64','0','25',NULL,'1','0','0','bonus bMaxHP,100;','','');
-REPLACE INTO `item_db` VALUES ('2421','Valkyrie_Shoes','Valkyrian Shoes','5','0','0','500','0','0','4','0','1','2147483647','2','2','64','0','1',NULL,'1','0','0','bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2);','','');
+REPLACE INTO `item_db` VALUES ('2421','Valkyrie_Shoes','Valkyrian Shoes','5','0','0','500','0','0','4','0','1','2147483646','2','2','64','0','1',NULL,'1','0','0','bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2);','','');
REPLACE INTO `item_db` VALUES ('2422','High_Fashion_Sandals','High Fashion Sandals','5','24000','12000','200','0','0','2','0','1','8487700','63','2','64','0','40',NULL,'1','0','0','bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('2423','Variant_Shoes','Variant Shoes','5','20','10','500','0','0','3','0','0','2147483647','2','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
-REPLACE INTO `item_db` VALUES ('2424','Tidal_Shoes','Tidal Shoes','5','20','10','300','0','0','3','0','1','2147483647','2','2','64','0','55',NULL,'1','0','0','bonus2 bSubEle,Ele_Water,5;','','');
-REPLACE INTO `item_db` VALUES ('2425','Black_Leather_Boots','Black Leather Boots','5','20','10','500','0','0','4','0','0','2147483647','2','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
-REPLACE INTO `item_db` VALUES ('2426','Shadow_Walk','Shadow Walk','5','20','10','2000','0','0','0','0','0','2147483647','2','2','64','0','75',NULL,'1','0','0','bonus bMdef,10; if(getskilllv(AS_CLOAKING)<2) { bonus5 bAutoSpellWhenHit,AS_CLOAKING,2,100,BF_MAGIC,0; } else bonus5 bAutoSpellWhenHit,AS_CLOAKING,getskilllv(AS_CLOAKING),100,BF_MAGIC,0;','','');
+REPLACE INTO `item_db` VALUES ('2423','Variant_Shoes','Variant Shoes','5','20','10','500','0','0','3','0','0','2147483646','2','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
+REPLACE INTO `item_db` VALUES ('2424','Tidal_Shoes','Tidal Shoes','5','20','10','300','0','0','3','0','1','2147483646','2','2','64','0','55',NULL,'1','0','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db` VALUES ('2425','Black_Leather_Boots','Black Leather Boots','5','20','10','500','0','0','4','0','0','2147483646','2','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2426','Shadow_Walk','Shadow Walk','5','20','10','2000','0','0','0','0','0','2147483646','2','2','64','0','75',NULL,'1','0','0','bonus bMdef,10; if(getskilllv(AS_CLOAKING)<2) { bonus5 bAutoSpellWhenHit,AS_CLOAKING,2,100,BF_MAGIC,0; } else bonus5 bAutoSpellWhenHit,AS_CLOAKING,getskilllv(AS_CLOAKING),100,BF_MAGIC,0;','','');
REPLACE INTO `item_db` VALUES ('2427','Golden_Shoes','Golden Shoes','5','20','10','300','0','0','4','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('2429','Iron_Boots01','Iron Boots','5','0','0','1500','0','0','5','0','0','941290','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2430','Iron_Boots02','Iron Boots','5','0','0','800','0','0','5','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2431','Valley_Shoes','Valley Shoes','5','20','10','0','0','0','10','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMaxHPrate,7; bonus bMaxSPrate,7;','','');
-REPLACE INTO `item_db` VALUES ('2432','Spiky_Heel_','High Heels','5','8500','4250','600','0','0','2','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2432','Spiky_Heel_','High Heels','5','8500','4250','600','0','0','2','0','1','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('2433','Diabolus_Boots','Diabolus Boots','5','20','10','250','0','0','4','0','1','13631360','2','2','64','0','0',NULL,'1','0','0','bonus bMaxHP,(BaseLevel*10);','','');
-REPLACE INTO `item_db` VALUES ('2434','Black_Leather_Boots_','Black Leather Boots','5','20','10','500','0','0','4','0','1','2147483647','2','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2434','Black_Leather_Boots_','Black Leather Boots','5','20','10','500','0','0','4','0','1','2147483646','2','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
REPLACE INTO `item_db` VALUES ('2435','Battle_Greave','Battle Greaves','5','10','5','0','0','0','4','0','1','40260834','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2436','Combat_Boots','Combat Boots','5','10','5','0','0','0','3','0','1','9014044','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2437','Battle_Boots','Battle Boots','5','10','5','0','0','0','3','0','1','16777216','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
@@ -1340,91 +1340,91 @@ REPLACE INTO `item_db` VALUES ('2440','Sprint_Shoes','Sprint Shoes','5','20','10
REPLACE INTO `item_db` VALUES ('2441','Beach_Sandal','Beach Sandals','5','20','10','200','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db` VALUES ('2442','Boots_Perforated','Red Stocking Boots','5','0','0','0','0','0','7','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bLuk,2; bonus bHPrecovRate,10; bonus bSPrecovRate,10; bonus3 bAutoSpellWhenHit,WZ_QUAGMIRE,3,20; bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('2443','Fish_Shoes','Fisher\'s Boots','5','10','5','250','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2444','Krieger_Shoes1','Glorious Shoes','5','20','10','0','0','0','0','0','0','2147483647','63','2','64','0','81',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bSubRace,RC_DemiHuman,4; bonus3 bAutoSpellWhenHit,AL_INCAGI,1,10;','','');
-REPLACE INTO `item_db` VALUES ('2445','Krieger_Shoes2','Glorious Popularized Shoes','5','20','10','0','0','0','0','0','0','2147483647','63','2','64','0','61',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2446','Krieger_Shoes3','Glorious Mass-Production Shoes','5','20','10','0','0','0','0','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2447','Military_Boots','Army Boots','5','0','0','1000','0','0','5','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2444','Krieger_Shoes1','Glorious Shoes','5','20','10','0','0','0','0','0','0','2147483646','63','2','64','0','81',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bSubRace,RC_DemiHuman,4; bonus3 bAutoSpellWhenHit,AL_INCAGI,1,10;','','');
+REPLACE INTO `item_db` VALUES ('2445','Krieger_Shoes2','Glorious Popularized Shoes','5','20','10','0','0','0','0','0','0','2147483646','63','2','64','0','61',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2446','Krieger_Shoes3','Glorious Mass-Production Shoes','5','20','10','0','0','0','0','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2447','Military_Boots','Army Boots','5','0','0','1000','0','0','5','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2448','Air_Boss','Air Boss','5','0','0','500','0','0','2','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2449','Variant_Shoes_M','Variant Shoes','5','20','10','500','0','0','3','0','0','2147483647','2','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
-REPLACE INTO `item_db` VALUES ('2450','Vital_Tree_Shoes','Vital Tree Shoes','5','20','10','500','0','0','4','0','0','2147483647','2','2','64','0','60',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bHPRegenRate,30,10000; bonus bHealPower2,5; bonus bAddItemHealRate,5; bonus bMdef,3; bonus bVit,2;','','');
+REPLACE INTO `item_db` VALUES ('2449','Variant_Shoes_M','Variant Shoes','5','20','10','500','0','0','3','0','0','2147483646','2','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
+REPLACE INTO `item_db` VALUES ('2450','Vital_Tree_Shoes','Vital Tree Shoes','5','20','10','500','0','0','4','0','0','2147483646','2','2','64','0','60',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bHPRegenRate,30,10000; bonus bHealPower2,5; bonus bAddItemHealRate,5; bonus bMdef,3; bonus bVit,2;','','');
REPLACE INTO `item_db` VALUES ('2501','Hood','Hood','5','1000','500','200','0','0','1','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2502','Hood_','Hood','5','1000','500','200','0','0','1','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2503','Muffler','Muffler','5','5000','2500','400','0','0','2','0','0','2147483647','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2504','Muffler_','Muffler','5','5000','2500','400','0','0','2','0','1','2147483647','63','2','4','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2503','Muffler','Muffler','5','5000','2500','400','0','0','2','0','0','2147483646','63','2','4','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2504','Muffler_','Muffler','5','5000','2500','400','0','0','2','0','1','2147483646','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2505','Manteau','Manteau','5','32000','16000','600','0','0','4','0','0','6706402','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2506','Manteau_','Manteau','5','32000','16000','600','0','0','4','0','1','6706402','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2507','Cape_Of_Ancient_Lord','Ancient Cape','5','82000','41000','600','0','0','2','0','0','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2508','Ragamuffin_Cape','Ragamuffin Manteau','5','56000','28000','500','0','0','1','0','0','2147483647','63','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
+REPLACE INTO `item_db` VALUES ('2507','Cape_Of_Ancient_Lord','Ancient Cape','5','82000','41000','600','0','0','2','0','0','2147483646','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2508','Ragamuffin_Cape','Ragamuffin Manteau','5','56000','28000','500','0','0','1','0','0','2147483646','63','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
REPLACE INTO `item_db` VALUES ('2509','Clack_Of_Servival','Survivor\'s Manteau','5','20000','10000','550','0','0','0','0','0','8454660','63','2','4','0','75',NULL,'1','0','0','bonus bMdef,5; bonus bVit,10;','','');
REPLACE INTO `item_db` VALUES ('2510','Novice_Hood','Somber Novice Hood','5','1','0','1','0','0','2','0','0','1','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,20;','','');
-REPLACE INTO `item_db` VALUES ('2511','Skeleton\'s_Cape','Skeleton Manteau','5','5000','2500','700','0','0','1','0','0','2147483647','63','2','4','0','75',NULL,'1','0','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;','','');
+REPLACE INTO `item_db` VALUES ('2511','Skeleton\'s_Cape','Skeleton Manteau','5','5000','2500','700','0','0','1','0','0','2147483646','63','2','4','0','75',NULL,'1','0','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;','','');
REPLACE INTO `item_db` VALUES ('2512','Novice_Manteau','Novice Manteau','5','50000','25000','500','0','0','2','0','1','1','63','2','4','0','40',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,10;','','');
-REPLACE INTO `item_db` VALUES ('2513','Celestial_Robe','Heavenly Maiden Robe','5','20','10','500','0','0','3','0','1','2147483647','63','2','4','0','80',NULL,'1','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2513','Celestial_Robe','Heavenly Maiden Robe','5','20','10','500','0','0','3','0','1','2147483646','63','2','4','0','80',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2514','Pauldron','Pauldron','5','20','10','800','0','0','5','0','1','414946','63','2','4','0','80',NULL,'1','0','0','','','');
REPLACE INTO `item_db` VALUES ('2515','Wing_Of_Eagle','Eagle Wing','5','20000','10000','300','0','0','1','0','1','8454660','63','2','4','0','85',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2516','Falcon_Robe','Falcon Muffler','5','30000','15000','400','0','0','3','0','0','2147483647','63','2','4','0','65',NULL,'1','0','0','bonus bFlee,15; bonus bFlee2,5;','','');
-REPLACE INTO `item_db` VALUES ('2517','Vali\'s_Manteau','Vali\'s Manteau','5','30000','15000','600','0','0','4','0','0','2147483647','63','2','4','0','65',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,15;','','');
-REPLACE INTO `item_db` VALUES ('2518','Morpheus\'s_Shawl','Morpheus\'s Shawl','5','30000','15000','600','0','0','3','0','0','2147483647','63','2','4','0','33',NULL,'1','0','0','bonus bMaxSPrate,10; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2519','Morrigane\'s_Manteau','Morrigane\'s Manteau','5','30000','15000','600','0','0','3','0','0','2147483647','63','2','4','0','61',NULL,'1','0','0','bonus bLuk,2; bonus bFlee2,8;','','');
-REPLACE INTO `item_db` VALUES ('2520','Goibne\'s_Shoulder_Arms','Goibne\'s Spaulders','5','30000','15000','700','0','0','3','0','0','2147483647','63','2','4','0','54',NULL,'1','0','0','bonus bLongAtkDef,10; bonus bMdef,2; bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('2516','Falcon_Robe','Falcon Muffler','5','30000','15000','400','0','0','3','0','0','2147483646','63','2','4','0','65',NULL,'1','0','0','bonus bFlee,15; bonus bFlee2,5;','','');
+REPLACE INTO `item_db` VALUES ('2517','Vali\'s_Manteau','Vali\'s Manteau','5','30000','15000','600','0','0','4','0','0','2147483646','63','2','4','0','65',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,15;','','');
+REPLACE INTO `item_db` VALUES ('2518','Morpheus\'s_Shawl','Morpheus\'s Shawl','5','30000','15000','600','0','0','3','0','0','2147483646','63','2','4','0','33',NULL,'1','0','0','bonus bMaxSPrate,10; bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2519','Morrigane\'s_Manteau','Morrigane\'s Manteau','5','30000','15000','600','0','0','3','0','0','2147483646','63','2','4','0','61',NULL,'1','0','0','bonus bLuk,2; bonus bFlee2,8;','','');
+REPLACE INTO `item_db` VALUES ('2520','Goibne\'s_Shoulder_Arms','Goibne\'s Spaulders','5','30000','15000','700','0','0','3','0','0','2147483646','63','2','4','0','54',NULL,'1','0','0','bonus bLongAtkDef,10; bonus bMdef,2; bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('2521','Angel\'s_Warmth','Angelic Cardigan','5','10000','5000','400','0','0','2','0','1','1','63','2','4','0','20',NULL,'1','0','0','bonus bHPrecovRate,5;','','');
REPLACE INTO `item_db` VALUES ('2522','Undershirt','Undershirt','5','20000','10000','150','0','0','2','0','0','4294967295','63','2','4','0','1',NULL,'1','0','0','bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('2523','Undershirt_','Undershirt','5','20000','10000','150','0','0','2','0','1','4294967295','63','2','4','0','1',NULL,'1','0','0','bonus bMdef,1;','','');
-REPLACE INTO `item_db` VALUES ('2524','Valkyrie_Manteau','Valkyrian Manteau','5','0','0','500','0','0','3','0','1','2147483647','2','2','4','0','1',NULL,'1','0','0','bonus bUnbreakableGarment,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bFlee2,5+(getequiprefinerycnt(EQI_GARMENT)*2); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bShortWeaponDamageReturn,5+(getequiprefinerycnt(EQI_GARMENT)*2);','','');
-REPLACE INTO `item_db` VALUES ('2525','Cape_Of_Ancient_Lord_','Ancient Cape','5','82000','41000','600','0','0','2','0','1','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2524','Valkyrie_Manteau','Valkyrian Manteau','5','0','0','500','0','0','3','0','1','2147483646','2','2','4','0','1',NULL,'1','0','0','bonus bUnbreakableGarment,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bFlee2,5+(getequiprefinerycnt(EQI_GARMENT)*2); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bShortWeaponDamageReturn,5+(getequiprefinerycnt(EQI_GARMENT)*2);','','');
+REPLACE INTO `item_db` VALUES ('2525','Cape_Of_Ancient_Lord_','Ancient Cape','5','82000','41000','600','0','0','2','0','1','2147483646','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2526','Dragon_Scale_Coat','Coat of Dragon Scale','5','20','10','10','0','0','4','0','0','4294967295','63','2','4','0','50',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2527','Dragon_Breath','Dragon Breath','5','20','10','600','0','0','4','0','1','2147483647','2','2','4','0','48',NULL,'1','0','0','bonus2 bSubRace,RC_Dragon,15;','','');
-REPLACE INTO `item_db` VALUES ('2528','Wool_Scarf','Wool Scarf','5','20','10','500','0','0','3','0','1','2147483647','2','2','4','0','55',NULL,'1','0','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db` VALUES ('2529','Rider_Insignia','Rider Insignia','5','20','10','500','0','0','4','0','0','2147483647','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db` VALUES ('2530','Rider_Insignia_','Rider Insignia','5','20','10','500','0','0','4','0','1','2147483647','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2527','Dragon_Breath','Dragon Breath','5','20','10','600','0','0','4','0','1','2147483646','2','2','4','0','48',NULL,'1','0','0','bonus2 bSubRace,RC_Dragon,15;','','');
+REPLACE INTO `item_db` VALUES ('2528','Wool_Scarf','Wool Scarf','5','20','10','500','0','0','3','0','1','2147483646','2','2','4','0','55',NULL,'1','0','0','bonus bMdef,4;','','');
+REPLACE INTO `item_db` VALUES ('2529','Rider_Insignia','Rider Insignia','5','20','10','500','0','0','4','0','0','2147483646','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2530','Rider_Insignia_','Rider Insignia','5','20','10','500','0','0','4','0','1','2147483646','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db` VALUES ('2531','Ulfhedinn','Ulfhedinn','5','20','10','700','0','0','3','0','1','414946','2','2','4','0','70',NULL,'1','0','0','bonus3 bAutoSpellWhenHit,NPC_STONESKIN,1,20;','','');
REPLACE INTO `item_db` VALUES ('2532','Mithril_Magic_Cape','Mithril Magic Cape','5','20','10','400','0','0','3','0','1','625436','2','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,1,200,BF_MAGIC,0;','','');
REPLACE INTO `item_db` VALUES ('2534','Ruffler','Ruffler','5','20','10','0','0','0','10','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,17; bonus bFlee,17;','','');
REPLACE INTO `item_db` VALUES ('2535','Cloak_Of_Survival_C','Cloak Of Survival','5','1','0','0','0','0','5','0','0','8454660','63','2','4','0','0',NULL,'0','0','0','bonus bVit,10; bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('2536','Skin_Of_Ventus','Skin of Ventus','5','20','10','250','0','0','2','0','1','2147483647','63','2','4','0','60',NULL,'1','0','0','bonus bMdef,2; bonus bMaxHP,200; bonus bFlee,10;','','');
+REPLACE INTO `item_db` VALUES ('2536','Skin_Of_Ventus','Skin of Ventus','5','20','10','250','0','0','2','0','1','2147483646','63','2','4','0','60',NULL,'1','0','0','bonus bMdef,2; bonus bMaxHP,200; bonus bFlee,10;','','');
REPLACE INTO `item_db` VALUES ('2537','Diabolus_Manteau','Diabolus Manteau','5','20','10','250','0','0','5','0','1','13631360','2','2','4','0','0',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,5; bonus bMaxHP,100; bonus2 bAddDamageClass,1916,10; bonus2 bAddDamageClass,1917,10;','','');
REPLACE INTO `item_db` VALUES ('2538','Commander_Manteau','Captain\'s Manteau','5','10','5','0','0','0','4','0','1','40260834','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2539','Commander_Manteau_','Commander\'s Manteau','5','10','5','0','0','0','3','0','1','9014044','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2540','Sheriff_Manteau','Sheriff\'s Manteau','5','10','5','0','0','0','3','0','1','16777216','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db` VALUES ('2541','Asprika','Asprika','5','20','10','400','0','0','5','0','0','4294967295','63','2','4','0','94',NULL,'0','0','0','bonus bMdef,5; bonus3 bSubEle,Ele_Neutral,30,BF_SHORT; bonus3 bSubEle,Ele_Water,30,BF_SHORT; bonus3 bSubEle,Ele_Earth,30,BF_SHORT; bonus3 bSubEle,Ele_Fire,30,BF_SHORT; bonus3 bSubEle,Ele_Wind,30,BF_SHORT; bonus3 bSubEle,Ele_Poison,30,BF_SHORT; bonus3 bSubEle,Ele_Holy,30,BF_SHORT; bonus3 bSubEle,Ele_Dark,30,BF_SHORT; bonus3 bSubEle,Ele_Ghost,30,BF_SHORT; bonus3 bSubEle,Ele_Undead,30,BF_SHORT; bonus bFlee,30; skill AL_TELEPORT,1; bonus bUnbreakableGarment,0;','','');
-REPLACE INTO `item_db` VALUES ('2542','Flame_Manteau','Flame Manteau of Naght Sieger','5','20','10','70','0','0','4','0','1','2147483647','2','2','4','0','70',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMdef,2; bonus bMatkRate,1; bonus2 bAddEle,Ele_Fire,2;','','');
+REPLACE INTO `item_db` VALUES ('2542','Flame_Manteau','Flame Manteau of Naght Sieger','5','20','10','70','0','0','4','0','1','2147483646','2','2','4','0','70',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMdef,2; bonus bMatkRate,1; bonus2 bAddEle,Ele_Fire,2;','','');
REPLACE INTO `item_db` VALUES ('2543','Sylphid_Manteau','Sylphid Manteau','5','20','10','0','0','0','9','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','bonus bFlee,13; bonus2 bSubEle,Ele_Neutral,13; bonus bFlee2,1;','','');
REPLACE INTO `item_db` VALUES ('2544','Leather_Of_Tendrilion','Leather of Tendrilion','5','20','10','300','0','0','3','0','1','13623168','2','2','4','0','0',NULL,'1','0','0','bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Earth,5; bonus2 bSubRace,RC_Plant,5; bonus2 bSubRace,RC_Brute,5;','','');
REPLACE INTO `item_db` VALUES ('2545','Musika','Musika','5','20','10','500','0','0','2','0','1','33024','2','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus3 bAutoSpellWhenHit,AL_HEAL,getskilllv(AL_HEAL)?getskilllv(AL_HEAL):1,20;','','');
REPLACE INTO `item_db` VALUES ('2546','Beach_Manteau','Beach Manteau','5','20','10','600','0','0','0','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bStr,1; bonus bInt,1; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db` VALUES ('2547','Cheap_Running_Shirts','Cheap Undershirt','5','0','0','0','0','0','8','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bDex,2; bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,10; bonus bMdef,1;','','');
-REPLACE INTO `item_db` VALUES ('2548','Muffler_C','Neo Muffler','5','0','0','0','0','0','5','0','0','2147483647','2','2','4','0','95',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,10; bonus bMaxHPrate,10; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Holy,5; bonus2 bSubEle,Ele_Dark,5;','','');
-REPLACE INTO `item_db` VALUES ('2549','Krieger_Muffler1','Glorious Muffler','5','20','10','0','0','0','0','0','0','2147483647','63','2','4','0','81',NULL,'1','0','0','bonus bMaxHPrate,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('2548','Muffler_C','Neo Muffler','5','0','0','0','0','0','5','0','0','2147483646','2','2','4','0','95',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,10; bonus bMaxHPrate,10; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Holy,5; bonus2 bSubEle,Ele_Dark,5;','','');
+REPLACE INTO `item_db` VALUES ('2549','Krieger_Muffler1','Glorious Muffler','5','20','10','0','0','0','0','0','0','2147483646','63','2','4','0','81',NULL,'1','0','0','bonus bMaxHPrate,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db` VALUES ('2550','Fisher\'s_Muffler','Fisher\'s Muffler','5','20','10','200','0','0','0','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2551','Rider_Insignia_M','Crest of the Rider','5','20','10','500','0','0','4','0','1','2147483647','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2551','Rider_Insignia_M','Crest of the Rider','5','20','10','500','0','0','4','0','1','2147483646','2','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db` VALUES ('2552','Mithril_Magic_Cape_M','Mithril Magic Manteau','5','20','10','400','0','0','3','0','1','625436','2','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,1,200,BF_MAGIC,0;','','');
-REPLACE INTO `item_db` VALUES ('2553','Dragon_Manteau','Dragon Manteau','5','20','10','1000','0','0','5','0','1','2147483647','2','2','4','0','0',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,5;','','');
-REPLACE INTO `item_db` VALUES ('2554','Piece_Of_Angent_Skin','Nydhorgg\'s Shadow Garb','5','20','10','400','0','0','5','0','1','2147483647','2','2','4','0','90',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,7; bonus2 bSubEle,Ele_Water,7; bonus2 bSubEle,Ele_Earth,7; bonus2 bSubEle,Ele_Fire,7; bonus2 bSubEle,Ele_Wind,7; bonus2 bSubEle,Ele_Poison,7; bonus2 bSubEle,Ele_Holy,7; bonus2 bSubEle,Ele_Dark,7; bonus2 bSubEle,Ele_Ghost,7; bonus2 bSubEle,Ele_Undead,7; bonus bMaxSP,(BaseLevel/3)+(getrefine()*10); bonus3 bSPDrainRate,10,1,0; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2601','Ring','Ring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('2602','Earring','Earring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bInt,2;','','');
-REPLACE INTO `item_db` VALUES ('2603','Necklace','Necklace','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bVit,2;','','');
-REPLACE INTO `item_db` VALUES ('2604','Glove','Glove','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bDex,2;','','');
-REPLACE INTO `item_db` VALUES ('2605','Brooch','Brooch','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2553','Dragon_Manteau','Dragon Manteau','5','20','10','1000','0','0','5','0','1','2147483646','2','2','4','0','0',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2554','Piece_Of_Angent_Skin','Nydhorgg\'s Shadow Garb','5','20','10','400','0','0','5','0','1','2147483646','2','2','4','0','90',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,7; bonus2 bSubEle,Ele_Water,7; bonus2 bSubEle,Ele_Earth,7; bonus2 bSubEle,Ele_Fire,7; bonus2 bSubEle,Ele_Wind,7; bonus2 bSubEle,Ele_Poison,7; bonus2 bSubEle,Ele_Holy,7; bonus2 bSubEle,Ele_Dark,7; bonus2 bSubEle,Ele_Ghost,7; bonus2 bSubEle,Ele_Undead,7; bonus bMaxSP,(BaseLevel/3)+(getrefine()*10); bonus3 bSPDrainRate,10,1,0; bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2601','Ring','Ring','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bStr,2;','','');
+REPLACE INTO `item_db` VALUES ('2602','Earring','Earring','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bInt,2;','','');
+REPLACE INTO `item_db` VALUES ('2603','Necklace','Necklace','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bVit,2;','','');
+REPLACE INTO `item_db` VALUES ('2604','Glove','Glove','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bDex,2;','','');
+REPLACE INTO `item_db` VALUES ('2605','Brooch','Brooch','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db` VALUES ('2607','Clip','Clip','5','30000','15000','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxSP,10;','','');
-REPLACE INTO `item_db` VALUES ('2608','Rosary','Rosary','5','15000','7500','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,2;','','');
+REPLACE INTO `item_db` VALUES ('2608','Rosary','Rosary','5','15000','7500','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,2;','','');
REPLACE INTO `item_db` VALUES ('2609','Skul_Ring','Skull Ring','5','10000','5000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2610','Gold_Ring','Gold Ring','5','30000','15000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2611','Silver_Ring','Silver Ring','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2612','Flower_Ring','Flower Ring','5','1500','750','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2613','Diamond_Ring','Diamond Ring','5','45000','22500','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2614','An_Eye_Of_Dullahan','Eye of Dullahan','5','90000','45000','100','0','0','0','0','0','2147483647','63','2','136','0','50',NULL,'0','0','0','bonus2 bResEff,Eff_Poison,10000; bonus2 bSubRace,RC_Undead,4; bonus2 bSubRace,RC_Demon,4;','','');
-REPLACE INTO `item_db` VALUES ('2615','Safety_Ring','Safety Ring','5','75000','37500','100','0','0','3','0','0','2147483647','63','2','136','0','40',NULL,'0','0','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('2616','Critical_Ring','Critical Ring','5','75000','37500','100','0','0','0','0','0','2147483647','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,5;','','');
-REPLACE INTO `item_db` VALUES ('2617','Mitten_Of_Presbyter','Celebrant\'s Mitten','5','2','1','100','0','0','1','0','0','2147483647','63','2','136','0','35',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2618','Matyr\'s_Flea_Guard','Matyr\'s Leash','5','2','1','100','0','0','1','0','0','2147483647','63','2','136','0','35',NULL,'0','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2614','An_Eye_Of_Dullahan','Eye of Dullahan','5','90000','45000','100','0','0','0','0','0','2147483646','63','2','136','0','50',NULL,'0','0','0','bonus2 bResEff,Eff_Poison,10000; bonus2 bSubRace,RC_Undead,4; bonus2 bSubRace,RC_Demon,4;','','');
+REPLACE INTO `item_db` VALUES ('2615','Safety_Ring','Safety Ring','5','75000','37500','100','0','0','3','0','0','2147483646','63','2','136','0','40',NULL,'0','0','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('2616','Critical_Ring','Critical Ring','5','75000','37500','100','0','0','0','0','0','2147483646','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,5;','','');
+REPLACE INTO `item_db` VALUES ('2617','Mitten_Of_Presbyter','Celebrant\'s Mitten','5','2','1','100','0','0','1','0','0','2147483646','63','2','136','0','35',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2618','Matyr\'s_Flea_Guard','Matyr\'s Leash','5','2','1','100','0','0','1','0','0','2147483646','63','2','136','0','35',NULL,'0','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2619','Thimble_Of_Archer','Bow Thimble','5','10000','5000','100','0','0','0','0','0','526344','63','2','136','0','65',NULL,'0','0','0','bonus bLongAtkRate,3;','','');
REPLACE INTO `item_db` VALUES ('2620','Ring_Of_Rogue','Rogue\'s Treasure','5','10000','5000','100','0','0','0','0','0','33689664','63','2','136','0','70',NULL,'0','0','0','if(readparam(bStr)>=90) { bonus bHit,10; bonus bFlee,10; } if(readparam(bAgi)>=90) { bonus bBaseAtk,10; bonus bCritical,10; }','','');
-REPLACE INTO `item_db` VALUES ('2621','Ring_','Ring','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('2622','Earring_','Earring','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2623','Necklace_','Necklace','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bVit,1;','','');
-REPLACE INTO `item_db` VALUES ('2624','Glove_','Glove','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('2625','Brooch_','Brooch','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2626','Rosary_','Rosary','5','15000','7500','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,3; bonus bLuk,1;','','');
+REPLACE INTO `item_db` VALUES ('2621','Ring_','Ring','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bStr,1;','','');
+REPLACE INTO `item_db` VALUES ('2622','Earring_','Earring','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2623','Necklace_','Necklace','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('2624','Glove_','Glove','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('2625','Brooch_','Brooch','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2626','Rosary_','Rosary','5','15000','7500','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,3; bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('2627','Belt','Belt','5','20000','10000','1200','0','0','0','0','1','4294967295','63','2','136','0','25',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2628','Novice_Armlet','Novice Armlet','5','400','200','200','0','0','0','0','1','1','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2629','Magingiorde','Megingjard','5','20','10','8000','0','0','2','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bStr,40; bonus bMdef,7;','','');
@@ -1436,7 +1436,7 @@ REPLACE INTO `item_db` VALUES ('2636','Gold_Ring_','Gold Christmas Ring','5','30
REPLACE INTO `item_db` VALUES ('2637','Silver_Ring_','Silver Christmas Ring','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('2638','Exorcize_Sachet','Sacred Incense','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('2639','Purification_Sachet','Occult Incense','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,1; bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('2640','Kafra_Ring','Kafra Ring','5','40000','20000','200','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus bLuk,1; bonus bMdef,1;','','');
+REPLACE INTO `item_db` VALUES ('2640','Kafra_Ring','Kafra Ring','5','40000','20000','200','0','0','1','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus bLuk,1; bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('2641','Fashionable_Sack','Fashion Hip Sack','5','20','10','700','0','0','0','0','0','263200','63','2','136','0','50',NULL,'0','0','0','bonus bStr,2;','','');
REPLACE INTO `item_db` VALUES ('2642','Serin\'s_Gold_Ring','Serin\'s Gold Ring','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2643','Serin\'s_Gold_Ring_','Serin\'s Gold Ring','5','45000','22500','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1444,14 +1444,14 @@ REPLACE INTO `item_db` VALUES ('2644','The_Sign_','The Sign','5','2','1','0','0'
REPLACE INTO `item_db` VALUES ('2645','Moonlight_Ring','Moonlight Ring','5','40000','20000','200','0','0','0','0','0','33689664','63','2','136','0','60',NULL,'0','0','0','bonus bMdef,2;','','');
REPLACE INTO `item_db` VALUES ('2646','Bunch_Of_Carnation','Bunch of Carnations','5','2','1','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db` VALUES ('2647','Nile_Rose','Nile Rose','5','2','1','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,10;','','');
-REPLACE INTO `item_db` VALUES ('2648','Morpheus\'s_Ring','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2649','Morpheus\'s_Armlet','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2650','Morrigane\'s_Belt','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bBaseAtk,5; bonus bCritical,3;','','');
-REPLACE INTO `item_db` VALUES ('2651','Morrigane\'s_Pendant','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2; bonus bCritical,3;','','');
+REPLACE INTO `item_db` VALUES ('2648','Morpheus\'s_Ring','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2649','Morpheus\'s_Armlet','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2650','Morrigane\'s_Belt','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','0','2147483646','63','2','136','0','61',NULL,'0','0','0','bonus bBaseAtk,5; bonus bCritical,3;','','');
+REPLACE INTO `item_db` VALUES ('2651','Morrigane\'s_Pendant','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','0','2147483646','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2; bonus bCritical,3;','','');
REPLACE INTO `item_db` VALUES ('2652','Cursed_Lucky_Brooch','Goddess of Fortune\'s Cursed Brooch','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,6; bonus2 bAddEff2,Eff_Curse,50;','','');
REPLACE INTO `item_db` VALUES ('2653','Sacrifice_Ring','Sacrifice Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','90',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2654','Shinobi\'s_Sash','Shinobi Sash','5','20000','10000','300','0','0','1','0','0','33689664','63','2','136','0','30',NULL,'0','0','0','bonus bStr,1; bonus bAgi,1; bonus bMdef,1;','','');
-REPLACE INTO `item_db` VALUES ('2655','Bloody_Iron_Ball','Bloodied Shackle Ball','5','50000','25000','4000','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2655','Bloody_Iron_Ball','Bloodied Shackle Ball','5','50000','25000','4000','0','0','0','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2656','Hyper_Changer','Armor Charm','5','20000','10000','1000','0','0','1','0','0','414946','63','2','136','0','1',NULL,'0','0','0','bonus bMaxHP,50;','','');
REPLACE INTO `item_db` VALUES ('2657','Lab_Passport','Laboratory Permit','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2658','Nile_Rose_','Nile Rose','5','2','1','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,10;','','');
@@ -1460,16 +1460,16 @@ REPLACE INTO `item_db` VALUES ('2660','Vesper_Core02','Vesper Core 02','5','20',
REPLACE INTO `item_db` VALUES ('2661','Vesper_Core03','Vesper Core 03','5','20','10','100','0','0','1','0','0','13631360','2','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('2662','Vesper_Core04','Vesper Core 04','5','20','10','100','0','0','1','0','0','13631360','2','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
REPLACE INTO `item_db` VALUES ('2663','Gauntlet_Of_Accuracy','Gauntlet of Hit','5','20','10','900','0','0','0','0','0','4294967295','63','2','136','0','75',NULL,'0','0','0','bonus bHit,15; bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('2664','Scarf_Belt','Belcarf','5','20','10','200','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bDex,2; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2664','Scarf_Belt','Belcarf','5','20','10','200','0','0','0','0','0','2147483646','63','2','136','0','75',NULL,'0','0','0','bonus bDex,2; bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('2665','Ring_Of_Exorcism','Exorcising Ring','5','20','10','500','0','0','0','0','0','33040','63','2','136','0','60',NULL,'0','0','0','bonus bMdef,1; bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5;','','');
REPLACE INTO `item_db` VALUES ('2666','Lamp_Of_Hope','Lantern of Hope','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus bStr,2; bonus2 bResEff,Eff_Blind,1000;','','');
-REPLACE INTO `item_db` VALUES ('2667','Glove_Of_Archer','Renown Archer\'s Gloves','5','20','10','300','0','0','0','0','0','2147483647','63','2','136','0','60',NULL,'0','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('2667','Glove_Of_Archer','Renown Archer\'s Gloves','5','20','10','300','0','0','0','0','0','2147483646','63','2','136','0','60',NULL,'0','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('2668','Women\'s_Glory','Woman Glory','5','0','0','500','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2669','Golden_Necklace_','RJC Necklace','5','30000','15000','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxSP,10;','','');
REPLACE INTO `item_db` VALUES ('2670','Ring_Of_Longing','Ring of Longing','5','20','10','100','0','0','1','0','0','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('2671','Thimble_Of_Archer_','Bow Thimble','5','10000','5000','100','0','0','0','0','1','526344','63','2','136','0','65',NULL,'0','0','0','bonus bLongAtkRate,3;','','');
-REPLACE INTO `item_db` VALUES ('2672','Anniversary_Ring','3rd Anniversary Celebration Ring','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2673','Shining_Ring','Warrior\'s Shining Ring','5','0','0','100','0','0','0','0','0','2147483647','63','2','136','0','48',NULL,'0','0','0','bonus bBaseAtk,10; bonus bSPrecovRate,3;','','');
+REPLACE INTO `item_db` VALUES ('2672','Anniversary_Ring','3rd Anniversary Celebration Ring','5','20','10','100','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db` VALUES ('2673','Shining_Ring','Warrior\'s Shining Ring','5','0','0','100','0','0','0','0','0','2147483646','63','2','136','0','48',NULL,'0','0','0','bonus bBaseAtk,10; bonus bSPrecovRate,3;','','');
REPLACE INTO `item_db` VALUES ('2674','Honor_Ring','Ring of Honor','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2675','Lord_Ring','Lord Ring','5','0','0','10','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db` VALUES ('2676','Hunter_Earring','Hunter\'s Earring','5','20','10','300','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus2 bAddMonsterDropItem,7618,100;','','');
@@ -1478,35 +1478,35 @@ REPLACE INTO `item_db` VALUES ('2678','Ring_Of_Flame_Lord','Ring Of Flame Lord',
REPLACE INTO `item_db` VALUES ('2679','Ring_Of_Resonance','Ring Of Resonance','5','20','10','100','0','0','2','0','0','13631360','2','2','136','0','0',NULL,'0','0','0','bonus bAgi,2; bonus bVit,1; bonus bMdef,2; bonus4 bAutoSpellWhenHit,WZ_QUAGMIRE,1,50,0; bonus3 bAutoSpellWhenHit,AS_SPLASHER,10,20; bonus3 bAutoSpellWhenHit,AL_HEAL,10,30; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,3,20; bonus3 bAutoSpellWhenHit,CG_TAROTCARD,5,20;','','');
REPLACE INTO `item_db` VALUES ('2680','Lesser_Elemental_Ring','Lesser Elemental Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1; bonus3 bAutoSpell,WZ_ESTIMATION,1,80; bonus3 bAutoSpell,MC_IDENTIFY,1,50; bonus3 bAutoSpell,TF_PICKSTONE,1,100; bonus3 bAutoSpell,BS_GREED,1,10; bonus3 bAutoSpellWhenHit,TK_RUN,5,20; bonus3 bAutoSpellWhenHit,TK_HIGHJUMP,3,30; bonus3 bAutoSpellWhenHit,NV_FIRSTAID,1,100; bonus3 bAutoSpellWhenHit,TF_BACKSLIDING,1,50;','','');
REPLACE INTO `item_db` VALUES ('2681','Republic_Ring','Republic Anniversary Ring','5','20','10','1000','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
-REPLACE INTO `item_db` VALUES ('2682','Ring_Of_Water','Ring of Water','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5;','','');
-REPLACE INTO `item_db` VALUES ('2683','Ring_Of_Fire','Ring of Fire','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Fire,5;','','');
-REPLACE INTO `item_db` VALUES ('2684','Ring_Of_Wind','Ring of Wind','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Wind,5;','','');
-REPLACE INTO `item_db` VALUES ('2685','Ring_Of_Earth','Ring of Earth','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Earth,5;','','');
-REPLACE INTO `item_db` VALUES ('2686','Elven_Ears_C','Elven Ears','5','1','0','0','0','0','2','0','0','2147483647','63','2','512','0','1',NULL,'0','73','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('2687','Steel_Flower_C','Steel Flower','5','1','0','0','0','0','1','0','0','2147483647','63','2','1','0','1',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db` VALUES ('2688','Critical_Ring_C','Critical Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bCritical,10;','','');
-REPLACE INTO `item_db` VALUES ('2689','Earring_C','Earring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bInt,3;','','');
-REPLACE INTO `item_db` VALUES ('2690','Ring_C','Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bStr,4;','','');
-REPLACE INTO `item_db` VALUES ('2691','Necklace_C','Necklace','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bVit,4;','','');
-REPLACE INTO `item_db` VALUES ('2692','Glove_C','Glove','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bDex,4;','','');
-REPLACE INTO `item_db` VALUES ('2693','Brooch_C','Brooch','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bAgi,4;','','');
-REPLACE INTO `item_db` VALUES ('2694','Rosary_C','Rosary','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,4;','','');
-REPLACE INTO `item_db` VALUES ('2695','Safety_Ring_C','Safety Ring','5','1','0','0','0','0','5','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db` VALUES ('2696','Vesper_Core01_C','Vesper Core 01','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db` VALUES ('2697','Vesper_Core02_C','Vesper Core 02','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10;','','');
-REPLACE INTO `item_db` VALUES ('2698','Vesper_Core03_C','Vesper Core 03','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
-REPLACE INTO `item_db` VALUES ('2699','Vesper_Core04_C','Vesper Core 04','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
+REPLACE INTO `item_db` VALUES ('2682','Ring_Of_Water','Ring of Water','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db` VALUES ('2683','Ring_Of_Fire','Ring of Fire','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Fire,5;','','');
+REPLACE INTO `item_db` VALUES ('2684','Ring_Of_Wind','Ring of Wind','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Wind,5;','','');
+REPLACE INTO `item_db` VALUES ('2685','Ring_Of_Earth','Ring of Earth','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Earth,5;','','');
+REPLACE INTO `item_db` VALUES ('2686','Elven_Ears_C','Elven Ears','5','1','0','0','0','0','2','0','0','2147483646','63','2','512','0','1',NULL,'0','73','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('2687','Steel_Flower_C','Steel Flower','5','1','0','0','0','0','1','0','0','2147483646','63','2','1','0','1',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db` VALUES ('2688','Critical_Ring_C','Critical Ring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bCritical,10;','','');
+REPLACE INTO `item_db` VALUES ('2689','Earring_C','Earring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bInt,3;','','');
+REPLACE INTO `item_db` VALUES ('2690','Ring_C','Ring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bStr,4;','','');
+REPLACE INTO `item_db` VALUES ('2691','Necklace_C','Necklace','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bVit,4;','','');
+REPLACE INTO `item_db` VALUES ('2692','Glove_C','Glove','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bDex,4;','','');
+REPLACE INTO `item_db` VALUES ('2693','Brooch_C','Brooch','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bAgi,4;','','');
+REPLACE INTO `item_db` VALUES ('2694','Rosary_C','Rosary','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,4;','','');
+REPLACE INTO `item_db` VALUES ('2695','Safety_Ring_C','Safety Ring','5','1','0','0','0','0','5','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('2696','Vesper_Core01_C','Vesper Core 01','5','1','0','0','0','0','1','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2697','Vesper_Core02_C','Vesper Core 02','5','1','0','0','0','0','1','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10;','','');
+REPLACE INTO `item_db` VALUES ('2698','Vesper_Core03_C','Vesper Core 03','5','1','0','0','0','0','1','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
+REPLACE INTO `item_db` VALUES ('2699','Vesper_Core04_C','Vesper Core 04','5','1','0','0','0','0','1','0','0','2147483646','63','2','136','0','1',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
REPLACE INTO `item_db` VALUES ('2700','Red_Silk_Seal','Red Silk Seal','5','20','10','100','0','0','0','0','0','16514','2','2','136','0','60',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2701','Orleans_Glove','Orleans\'s Glove','5','20','10','100','0','0','0','0','1','2147483647','2','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
-REPLACE INTO `item_db` VALUES ('2702','Bison_Horn','Bison Horn','5','20','10','100','0','0','0','0','1','2147483647','2','2','136','0','90',NULL,'0','0','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db` VALUES ('2703','Expert_Ring','Expert Ring','5','20','10','150','0','0','0','0','1','2147483647','2','2','136','0','50',NULL,'0','0','0','bonus bDelayrate,-5; bonus bUseSPrate,5;','','');
+REPLACE INTO `item_db` VALUES ('2701','Orleans_Glove','Orleans\'s Glove','5','20','10','100','0','0','0','0','1','2147483646','2','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
+REPLACE INTO `item_db` VALUES ('2702','Bison_Horn','Bison Horn','5','20','10','100','0','0','0','0','1','2147483646','2','2','136','0','90',NULL,'0','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('2703','Expert_Ring','Expert Ring','5','20','10','150','0','0','0','0','1','2147483646','2','2','136','0','50',NULL,'0','0','0','bonus bDelayrate,-5; bonus bUseSPrate,5;','','');
REPLACE INTO `item_db` VALUES ('2704','Golden_Accessory','Golden Accessories','5','20','10','100','0','0','4','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('2705','Golden_Accessory2','Golden Accessories','5','20','10','100','0','0','4','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddMonsterDropItem,12018,500;','','');
REPLACE INTO `item_db` VALUES ('2706','Handcuff','Arrest Handcuffs','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2707','GUSLI','GUSLI','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2708','Chinese_Handicraft','Chinese Handicraft','5','0','0','50','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus3 bAutoSpell,MG_FIREBOLT,5,300;','','');
REPLACE INTO `item_db` VALUES ('2709','5_Anniversary_Coin','5th Anniversary Coin','5','2','1','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAtkRate,5; bonus bMatkRate,5;','','');
-REPLACE INTO `item_db` VALUES ('2710','Bloody_Iron_Ball_C','Bloody Iron Ball','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bBaseAtk,30;','','');
+REPLACE INTO `item_db` VALUES ('2710','Bloody_Iron_Ball_C','Bloody Iron Ball','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bBaseAtk,30;','','');
REPLACE INTO `item_db` VALUES ('2711','Spiritual_Ring_C','Spiritual Ring','5','1','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,2; bonus bDex,2;','','');
REPLACE INTO `item_db` VALUES ('2712','Ragnarok_Limited_Ed','Ragnarok Limited Edition','5','0','0','300','0','0','0','0','0','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bVit,3; bonus bAgi,3; bonus bLuk,3;','','');
REPLACE INTO `item_db` VALUES ('2713','Certificate_TW','Certificate','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1524,16 +1524,16 @@ REPLACE INTO `item_db` VALUES ('2724','Medal_Archer','Medal of Honor','5','20','
REPLACE INTO `item_db` VALUES ('2725','Medal_Merchant','Medal of Honor','5','20','10','0','0','0','1','0','0','263200','63','2','136','0','70',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bAspdRate,10; bonus bMaxHP,500; bonus bMaxSP,50; bonus3 bAddEff,Eff_Curse,100,ATF_SHORT;','','');
REPLACE INTO `item_db` VALUES ('2726','Icarus_Wing','Icarus Wings','5','20','10','100','0','0','0','0','0','2048','2','2','136','0','70',NULL,'0','0','0','bonus bMaxSP,50; bonus bDex,3;','','');
REPLACE INTO `item_db` VALUES ('2727','Bowman_Scarf','Bowman Scarf','5','20','10','200','0','0','0','0','0','2048','2','2','136','0','70',NULL,'0','0','0','bonus bMaxSP,50; bonus bDex,3;','','');
-REPLACE INTO `item_db` VALUES ('2728','Cursed_Hand','Cursed Hand','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30; bonus bHit,10; bonus bHPrecovRate,20;','','');
+REPLACE INTO `item_db` VALUES ('2728','Cursed_Hand','Cursed Hand','5','20','10','50','0','0','0','0','1','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30; bonus bHit,10; bonus bHPrecovRate,20;','','');
REPLACE INTO `item_db` VALUES ('2729','Diabolus_Ring','Diabolus Ring','5','20','10','50','0','0','0','0','1','13631360','2','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,100; bonus bMaxSP,100; bonus bHealPower,5; bonus2 bAddDamageClass,1916,10; bonus2 bAddDamageClass,1917,10;','','');
-REPLACE INTO `item_db` VALUES ('2730','Morroc_Seal','Seal of Continental Guard','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bMaxHP,50; bonus bAspdRate,3;','','');
-REPLACE INTO `item_db` VALUES ('2731','Morroc_Charm_Stone','Rune Spellstone','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bMaxSP,50; bonus bCastrate,-1;','','');
-REPLACE INTO `item_db` VALUES ('2732','Morroc_Ring','Death Loop','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bCritical,5;','','');
+REPLACE INTO `item_db` VALUES ('2730','Morroc_Seal','Seal of Continental Guard','5','20','10','50','0','0','0','0','1','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus bMaxHP,50; bonus bAspdRate,3;','','');
+REPLACE INTO `item_db` VALUES ('2731','Morroc_Charm_Stone','Rune Spellstone','5','20','10','50','0','0','0','0','1','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus bMaxSP,50; bonus bCastrate,-1;','','');
+REPLACE INTO `item_db` VALUES ('2732','Morroc_Ring','Death Loop','5','20','10','50','0','0','0','0','1','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus bCritical,5;','','');
REPLACE INTO `item_db` VALUES ('2733','Medal_Gunner','Sheriff Badge','5','20','10','0','0','0','1','0','0','16777216','63','2','136','0','70',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bCritical,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus3 bAddEff,Eff_Blind,100,ATF_LONG;','','');
REPLACE INTO `item_db` VALUES ('2734','Directive_A','Directive','5','0','0','0','0','0','1','0','0','1','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2735','Directive_B','Directive','5','0','0','0','0','0','1','0','0','1','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('2736','Navel_Ring','Navel Ring','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bDex,3; bonus bLuk,3; bonus bMdef,2;','','');
-REPLACE INTO `item_db` VALUES ('2737','Foot_Ring','Foot Ring','5','20','10','150','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bVit,3; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db` VALUES ('2736','Navel_Ring','Navel Ring','5','20','10','100','0','0','0','0','0','2147483646','63','2','136','0','75',NULL,'0','0','0','bonus bDex,3; bonus bLuk,3; bonus bMdef,2;','','');
+REPLACE INTO `item_db` VALUES ('2737','Foot_Ring','Foot Ring','5','20','10','150','0','0','0','0','0','2147483646','63','2','136','0','75',NULL,'0','0','0','bonus bVit,3; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db` VALUES ('2738','Shiny_Coin','Shiny Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,6; bonus2 bAddRace,RC_Boss,6; bonus bMatkRate,6;','','');
REPLACE INTO `item_db` VALUES ('2739','Ordinary_Coin','Ordinary Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5;','','');
REPLACE INTO `item_db` VALUES ('2740','Rusty_Coin','Rusty Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bMatkRate,3;','','');
@@ -1557,7 +1557,7 @@ REPLACE INTO `item_db` VALUES ('2759','Decussate_Ring','Decussate Ring','5','0',
REPLACE INTO `item_db` VALUES ('2760','Bloody_Ring','Bloody Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus2 bExpAddRace,RC_DemiHuman,15;','','');
REPLACE INTO `item_db` VALUES ('2761','Satanic_Ring','Satanic Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus2 bExpAddRace,RC_Angel,15;','','');
REPLACE INTO `item_db` VALUES ('2762','Dragoon_Ring','Dragon Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus2 bExpAddRace,RC_Dragon,15;','','');
-REPLACE INTO `item_db` VALUES ('2763','Skul_Ring_C','Neo Skull Ring','5','0','0','0','0','0','0','0','0','2147483647','2','2','136','0','95',NULL,'0','0','0','bonus bAtkRate,5; bonus bMatkRate,5; bonus bMaxHPrate,5; bonus2 bSkillHeal,AL_HEAL,5; skill MG_SIGHT,1;','','');
+REPLACE INTO `item_db` VALUES ('2763','Skul_Ring_C','Neo Skull Ring','5','0','0','0','0','0','0','0','0','2147483646','2','2','136','0','95',NULL,'0','0','0','bonus bAtkRate,5; bonus bMatkRate,5; bonus bMaxHPrate,5; bonus2 bSkillHeal,AL_HEAL,5; skill MG_SIGHT,1;','','');
REPLACE INTO `item_db` VALUES ('2764','Small_Fishing_Rod','Small Fishing Rod','5','10','5','250','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2765','Novice_Figure','Novice Figure','5','0','0','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,70; if(Class==Job_Novice) bonus bMaxHP,30;','','');
REPLACE INTO `item_db` VALUES ('2766','Swordman_Figure','Swordman Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bVit,1; if(Class==Job_Swordman) bonus bDef,2;','','');
@@ -1566,9 +1566,9 @@ REPLACE INTO `item_db` VALUES ('2768','Mage_Figure','Mage Figure','5','0','0','0
REPLACE INTO `item_db` VALUES ('2769','Archer_Figure','Archer Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bDex,1; if(Class==Job_Archer) bonus bBaseAtk,10;','','');
REPLACE INTO `item_db` VALUES ('2770','Thief_Figure','Thief Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,1; if(Class==Job_Thief) bonus bAspdRate,3;','','');
REPLACE INTO `item_db` VALUES ('2771','Merchant_Figure','Merchant Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; if(Class==Job_Merchant) bonus bCritical,5;','','');
-REPLACE INTO `item_db` VALUES ('2772','Krieger_Ring1','Glorious Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','81',NULL,'0','0','0','bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspdRate,5; bonus bCastrate,-3; bonus bHealPower,5;','','');
-REPLACE INTO `item_db` VALUES ('2773','Krieger_Ring2','Glorious Mass-Production Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bAllStats,2;','','');
-REPLACE INTO `item_db` VALUES ('2774','Krieger_Ring3','Glorious Popularized Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
+REPLACE INTO `item_db` VALUES ('2772','Krieger_Ring1','Glorious Ring','5','20','10','0','0','0','0','0','0','2147483646','63','2','136','0','81',NULL,'0','0','0','bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspdRate,5; bonus bCastrate,-3; bonus bHealPower,5;','','');
+REPLACE INTO `item_db` VALUES ('2773','Krieger_Ring2','Glorious Mass-Production Ring','5','20','10','0','0','0','0','0','0','2147483646','63','2','136','0','61',NULL,'0','0','0','bonus bAllStats,2;','','');
+REPLACE INTO `item_db` VALUES ('2774','Krieger_Ring3','Glorious Popularized Ring','5','20','10','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db` VALUES ('2775','Lure','Lure','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('2776','Cool_Towel','Adventurer\'s Trusty Towel','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','sc_start SC_SUMMER,-1,0;','sc_end SC_SUMMER;');
REPLACE INTO `item_db` VALUES ('2777','Shaman_Ring','Shaman Ring','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bUseSPrate,-5;','','');
@@ -1579,15 +1579,15 @@ REPLACE INTO `item_db` VALUES ('2781','Aumdura\'s_Grace','Aumdura\'s Benefit','5
REPLACE INTO `item_db` VALUES ('2782','Ring_Of_Wise_King','Ring of the Ancient Wise King','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,50; bonus bMaxSP,20;','','');
REPLACE INTO `item_db` VALUES ('2783','Eyes_Stone_Ring','Eye Stone Ring','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','70',NULL,'0','0','0','bonus bCritical,2; bonus bMaxSP,25;','','');
REPLACE INTO `item_db` VALUES ('2784','Oh_Holy_Night','Christmas Musicbox','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','1',NULL,'0','0','0','skill ALL_WEWISH,1;','','');
-REPLACE INTO `item_db` VALUES ('2785','Orleans_Glove_M','Orlean\'s Gloves','5','20','10','100','0','0','0','0','1','2147483647','2','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
+REPLACE INTO `item_db` VALUES ('2785','Orleans_Glove_M','Orlean\'s Gloves','5','20','10','100','0','0','0','0','1','2147483646','2','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
REPLACE INTO `item_db` VALUES ('2786','Spiritual_Ring_M','Spiritual Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,2; bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('2787','Waterdrop_Brooch','Waterdrop Brooch','5','20','10','200','0','0','0','0','1','2147483647','2','2','136','0','75',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5; bonus bMaxHP,80; bonus bMdef,2;','','');
-REPLACE INTO `item_db` VALUES ('2788','Bradium_Earing','Bradium Earring','5','20','10','200','0','0','0','0','1','2147483647','2','2','136','0','60',NULL,'0','0','0','bonus bMatkRate,2; bonus bInt,1; bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('2789','Bradium_Ring','Bradium Ring','5','20','10','200','0','0','0','0','1','2147483647','2','2','136','0','60',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bStr,1; bonus bVit,1;','','');
-REPLACE INTO `item_db` VALUES ('2790','Bradium_Brooch','Bradium Brooch','5','20','10','200','0','0','0','0','1','2147483647','2','2','136','0','60',NULL,'0','0','0','bonus bFlee,4; bonus bAspdRate,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('2787','Waterdrop_Brooch','Waterdrop Brooch','5','20','10','200','0','0','0','0','1','2147483646','2','2','136','0','75',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5; bonus bMaxHP,80; bonus bMdef,2;','','');
+REPLACE INTO `item_db` VALUES ('2788','Bradium_Earing','Bradium Earring','5','20','10','200','0','0','0','0','1','2147483646','2','2','136','0','60',NULL,'0','0','0','bonus bMatkRate,2; bonus bInt,1; bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('2789','Bradium_Ring','Bradium Ring','5','20','10','200','0','0','0','0','1','2147483646','2','2','136','0','60',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bStr,1; bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('2790','Bradium_Brooch','Bradium Brooch','5','20','10','200','0','0','0','0','1','2147483646','2','2','136','0','60',NULL,'0','0','0','bonus bFlee,4; bonus bAspdRate,2; bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('2791','Just_Got_Fish','Fresh Fish','5','20','10','500','0','0','0','0','1','4294967295','63','2','136','0','1',NULL,'0','0','0','bonus bHit,3;','','');
REPLACE INTO `item_db` VALUES ('2794','Magic_Stone_Ring','Magic Stone Ring','5','0','0','0','0','0','0','0','1','16514','63','2','136','0','99',NULL,'0','0','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('2795','Green_Apple_Ring','Green Apple Ring','5','0','0','0','0','0','0','0','0','2147483647','63','2','136','0','99',NULL,'0','0','0','bonus bAllStats,6; if(JobLevel <30) { bonus bAllStats,(JobLevel/5); }','','');
+REPLACE INTO `item_db` VALUES ('2795','Green_Apple_Ring','Green Apple Ring','5','0','0','0','0','0','0','0','0','2147483646','63','2','136','0','99',NULL,'0','0','0','bonus bAllStats,6; if(JobLevel <30) { bonus bAllStats,(JobLevel/5); }','','');
REPLACE INTO `item_db` VALUES ('2796','Magical_Stone','Rocks','5','0','0','200','0','0','0','0','0','8454660','63','2','136','0','99',NULL,'0','0','0','bonus2 bAddDamageClass,2047,10; bonus2 bAddDefClass,2048,-10; bonus3 bAddClassDropItem,6152,2047,70;','','');
REPLACE INTO `item_db` VALUES ('2797','Magical_Stone_','Rocks','5','0','0','200','0','0','0','0','0','8454660','63','2','136','0','99',NULL,'0','0','0','bonus2 bAddDamageClass,2049,10; bonus2 bAddDefClass,2050,-10; bonus3 bAddClassDropItem,6151,2049,70;','','');
REPLACE INTO `item_db` VALUES ('2798','Will_Of_Exhausted_Angel','Will Of Exhausted Angel','5','0','0','200','0','0','0','0','0','33024','63','2','136','0','99',NULL,'0','0','0','if(strcharinfo(3)==\"job3_arch02\") { bonus2 bAddDefClass,1761,50; bonus2 bAddDefClass,1762,50; }','','');
@@ -2136,53 +2136,53 @@ REPLACE INTO `item_db` VALUES ('4782','Dex3_J','DEX+3','6','20','10','10','0','0
REPLACE INTO `item_db` VALUES ('4783','Luk1_J','LUK+1','6','20','10','10','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('4784','Luk2_J','LUK+2','6','20','10','10','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('4785','Luk3_J','LUK+3','6','20','10','10','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db` VALUES ('5001','Headset','Headset','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','1',NULL,'1','87','0','bonus2 bResEff,Eff_Curse,1000;','','');
+REPLACE INTO `item_db` VALUES ('5001','Headset','Headset','5','20','10','200','0','0','3','0','0','2147483646','63','2','256','0','1',NULL,'1','87','0','bonus2 bResEff,Eff_Curse,1000;','','');
REPLACE INTO `item_db` VALUES ('5002','Gemmed_Crown','Jewel Crown','5','20','10','600','0','0','4','0','0','414946','63','2','256','0','60',NULL,'1','88','0','bonus bInt,2; bonus bLuk,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5003','Joker_Jester','Joker Jester','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','89','0','bonus bLuk,2; bonus bMdef,5;','','');
-REPLACE INTO `item_db` VALUES ('5004','Oxygen_Mask','Oxygen Mask','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','90','0','bonus2 bResEff,Eff_Poison,2000;','','');
-REPLACE INTO `item_db` VALUES ('5005','Gas_Mask','Gas Mask','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','91','0','bonus2 bResEff,Eff_Poison,3000;','','');
-REPLACE INTO `item_db` VALUES ('5006','Machoman_Glasses','Machoman\'s Glasses','5','36000','18000','100','0','0','1','0','0','2147483647','63','2','512','0','0',NULL,'0','92','0','','','');
-REPLACE INTO `item_db` VALUES ('5007','Loard_Circlet','Grand Circlet','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','55',NULL,'1','93','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,4;','','');
-REPLACE INTO `item_db` VALUES ('5008','Puppy_Love','Puppy Love','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','94','0','','','');
-REPLACE INTO `item_db` VALUES ('5009','Safety_Helmet','Safety Helmet','5','20','10','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','95','0','bonus bMdef,3; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db` VALUES ('5003','Joker_Jester','Joker Jester','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','89','0','bonus bLuk,2; bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('5004','Oxygen_Mask','Oxygen Mask','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','90','0','bonus2 bResEff,Eff_Poison,2000;','','');
+REPLACE INTO `item_db` VALUES ('5005','Gas_Mask','Gas Mask','5','20','10','100','0','0','1','0','0','2147483646','63','2','513','0','0',NULL,'0','91','0','bonus2 bResEff,Eff_Poison,3000;','','');
+REPLACE INTO `item_db` VALUES ('5006','Machoman_Glasses','Machoman\'s Glasses','5','36000','18000','100','0','0','1','0','0','2147483646','63','2','512','0','0',NULL,'0','92','0','','','');
+REPLACE INTO `item_db` VALUES ('5007','Loard_Circlet','Grand Circlet','5','20','10','200','0','0','3','0','0','2147483646','63','2','256','0','55',NULL,'1','93','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,4;','','');
+REPLACE INTO `item_db` VALUES ('5008','Puppy_Love','Puppy Love','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','94','0','','','');
+REPLACE INTO `item_db` VALUES ('5009','Safety_Helmet','Safety Helmet','5','20','10','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','95','0','bonus bMdef,3; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db` VALUES ('5010','Indian_Hair_Piece','Indian Fillet','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','96','0','','','');
REPLACE INTO `item_db` VALUES ('5011','Antenna','Aerial','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','97','0','','','');
-REPLACE INTO `item_db` VALUES ('5012','Ph.D_Hat','Ph.D Hat','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','98','0','','','');
+REPLACE INTO `item_db` VALUES ('5012','Ph.D_Hat','Ph.D Hat','5','20','10','200','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','98','0','','','');
REPLACE INTO `item_db` VALUES ('5013','Horn_Of_Lord_Kaho','Lord Kaho\'s Horn','5','20','10','100','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','99','0','bonus bMdef,10; bonus bStr,5; bonus bAgi,10; bonus bVit,10; bonus bInt,5; bonus bLuk,20;','','');
REPLACE INTO `item_db` VALUES ('5014','Fin_Helm','Fin Helm','5','20','10','300','0','0','2','0','0','16514','63','2','512','0','65',NULL,'0','100','0','','','');
REPLACE INTO `item_db` VALUES ('5015','Egg_Shell','Egg Shell','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','101','0','','','');
-REPLACE INTO `item_db` VALUES ('5016','Boy\'s_Cap','Boy\'s Cap','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','102','0','','','');
+REPLACE INTO `item_db` VALUES ('5016','Boy\'s_Cap','Boy\'s Cap','5','20','10','100','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','102','0','','','');
REPLACE INTO `item_db` VALUES ('5017','Bone_Helm','Bone Helm','5','20','10','800','0','0','7','0','0','279714','63','2','256','0','70',NULL,'1','103','0','bonus2 bSubEle,Ele_Dark,-15;','','');
REPLACE INTO `item_db` VALUES ('5018','Feather_Bonnet','Feather Bonnet','5','20','10','300','0','0','4','0','0','526344','63','2','256','0','0',NULL,'1','104','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('5019','Corsair','Corsair','5','20','10','500','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('5019','Corsair','Corsair','5','20','10','500','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('5020','Kafra_Band','Kafra Band','5','20','10','500','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','106','0','bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('5021','Bankruptcy_Of_Heart','Grief for Greed','5','20','10','1200','0','0','4','0','0','263200','63','2','256','0','38',NULL,'1','107','0','bonus bInt,1; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('5022','Helm_Of_Sun','Hat of the Sun God','5','20','10','2400','0','0','4','0','0','13623168','63','2','768','0','0',NULL,'1','138','0','bonus bStr,3; bonus bInt,2;','','');
REPLACE INTO `item_db` VALUES ('5023','Hat_Of_Bundle','Parcel Hat','5','20','10','1000','0','0','0','0','0','263200','63','2','256','0','0',NULL,'1','108','0','','','');
REPLACE INTO `item_db` VALUES ('5024','Hat_Of_Cake','Cake Hat','5','20','10','1000','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','109','0','','','');
REPLACE INTO `item_db` VALUES ('5025','Helm_Of_Angel','Helm of Angel','5','20','10','1600','0','0','5','0','0','13623168','63','2','256','0','74',NULL,'1','110','0','bonus bAgi,1; bonus bLuk,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5026','Hat_Of_Cook','Chef Hat','5','20','10','300','0','0','1','0','0','2147483647','63','2','256','0','50',NULL,'1','111','0','bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('5026','Hat_Of_Cook','Chef Hat','5','20','10','300','0','0','1','0','0','2147483646','63','2','256','0','50',NULL,'1','111','0','bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('5027','Wizardry_Hat','Mage Hat','5','20','10','300','0','0','1','0','0','8454660','63','2','256','0','0',NULL,'1','112','0','bonus bInt,2; bonus bMaxSP,150;','','');
REPLACE INTO `item_db` VALUES ('5028','Candle','Candle','5','20','10','150','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','113','0','','','');
-REPLACE INTO `item_db` VALUES ('5029','Spore_Hat','Spore Hat','5','20','10','900','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','114','0','','','');
-REPLACE INTO `item_db` VALUES ('5030','Panda_Cap','Panda Hat','5','20','10','800','0','0','3','0','0','2147483647','63','2','256','0','40',NULL,'1','115','0','','','');
+REPLACE INTO `item_db` VALUES ('5029','Spore_Hat','Spore Hat','5','20','10','900','0','0','3','0','0','2147483646','63','2','256','0','20',NULL,'1','114','0','','','');
+REPLACE INTO `item_db` VALUES ('5030','Panda_Cap','Panda Hat','5','20','10','800','0','0','3','0','0','2147483646','63','2','256','0','40',NULL,'1','115','0','','','');
REPLACE INTO `item_db` VALUES ('5031','Mine_Helm','Mine Hat','5','20','10','1500','0','0','4','0','0','447986','63','2','256','0','55',NULL,'1','116','0','bonus bDex,2;','','');
-REPLACE INTO `item_db` VALUES ('5032','Picnic_Hat','Sunday Hat','5','20','10','800','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','117','0','','','');
-REPLACE INTO `item_db` VALUES ('5033','Smokie_Hat','Raccoon Hat','5','20','10','900','0','0','3','0','0','2147483647','63','2','256','0','50',NULL,'1','118','0','','','');
-REPLACE INTO `item_db` VALUES ('5034','Light_Bulb_Band','Bulb Band','5','20','10','500','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','119','0','','','');
-REPLACE INTO `item_db` VALUES ('5035','Poring_Hat','Poring Hat','5','20','10','700','0','0','2','0','0','2147483647','63','2','256','0','38',NULL,'1','120','0','','','');
-REPLACE INTO `item_db` VALUES ('5036','Cross_Band','Cross Hat','5','20','10','250','0','0','1','0','0','2147483647','63','2','256','0','10',NULL,'1','121','0','','','');
+REPLACE INTO `item_db` VALUES ('5032','Picnic_Hat','Sunday Hat','5','20','10','800','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','117','0','','','');
+REPLACE INTO `item_db` VALUES ('5033','Smokie_Hat','Raccoon Hat','5','20','10','900','0','0','3','0','0','2147483646','63','2','256','0','50',NULL,'1','118','0','','','');
+REPLACE INTO `item_db` VALUES ('5034','Light_Bulb_Band','Bulb Band','5','20','10','500','0','0','0','0','0','2147483646','63','2','256','0','0',NULL,'1','119','0','','','');
+REPLACE INTO `item_db` VALUES ('5035','Poring_Hat','Poring Hat','5','20','10','700','0','0','2','0','0','2147483646','63','2','256','0','38',NULL,'1','120','0','','','');
+REPLACE INTO `item_db` VALUES ('5036','Cross_Band','Cross Hat','5','20','10','250','0','0','1','0','0','2147483646','63','2','256','0','10',NULL,'1','121','0','','','');
REPLACE INTO `item_db` VALUES ('5037','Fruit_Shell','Nut Shell','5','20','10','150','0','0','4','0','0','4294967295','63','2','256','0','5',NULL,'0','122','0','','','');
-REPLACE INTO `item_db` VALUES ('5038','Deviruchi_Cap','Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','123','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5038','Deviruchi_Cap','Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483646','63','2','256','0','64',NULL,'1','123','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('5039','Mottled_Egg_Shell','Rainbow Eggshell','5','20','10','400','0','0','4','0','0','4294967295','63','2','256','0','19',NULL,'0','124','0','','','');
REPLACE INTO `item_db` VALUES ('5040','Blush','Blush','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','125','0','','','');
REPLACE INTO `item_db` VALUES ('5041','Heart_Hair_Pin','Heart Hairpin','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','126','0','','','');
-REPLACE INTO `item_db` VALUES ('5042','Hair_Protector','Bao Bao','5','20','10','150','0','0','0','0','0','2147483647','63','2','256','0','14',NULL,'1','127','0','','','');
-REPLACE INTO `item_db` VALUES ('5043','Opera_Ghost_Mask','Opera Phantom Mask','5','20','10','200','0','0','1','0','0','2147483647','63','2','512','0','20',NULL,'0','128','0','','','');
+REPLACE INTO `item_db` VALUES ('5042','Hair_Protector','Bao Bao','5','20','10','150','0','0','0','0','0','2147483646','63','2','256','0','14',NULL,'1','127','0','','','');
+REPLACE INTO `item_db` VALUES ('5043','Opera_Ghost_Mask','Opera Phantom Mask','5','20','10','200','0','0','1','0','0','2147483646','63','2','512','0','20',NULL,'0','128','0','','','');
REPLACE INTO `item_db` VALUES ('5044','Devil\'s_Wing','Evil Wing Ears','5','20','10','350','0','0','2','0','0','0','63','2','256','0','45',NULL,'1','129','0','bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('5045','Magician_Hat','Magician Hat','5','20','10','500','0','0','3','0','0','8487700','63','2','256','0','50',NULL,'1','130','0','bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50;','','');
REPLACE INTO `item_db` VALUES ('5046','Bongun_Hat','Bongun Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','769','0','0',NULL,'0','139','0','','','');
-REPLACE INTO `item_db` VALUES ('5047','Fashion_Sunglass','Fashionable Glasses','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','131','0','','','');
+REPLACE INTO `item_db` VALUES ('5047','Fashion_Sunglass','Fashionable Glasses','5','20','10','100','0','0','0','0','0','2147483646','63','2','256','0','0',NULL,'1','131','0','','','');
REPLACE INTO `item_db` VALUES ('5048','First_Moon_Hair_Pin','Cresent Hairpin','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','132','0','','','');
REPLACE INTO `item_db` VALUES ('5049','Stripe_Band','Striped Hairband','5','20','10','150','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','133','0','','','');
REPLACE INTO `item_db` VALUES ('5050','Mystery_Fruit_Shell','Wonder Nutshell','5','20','10','300','0','0','5','0','0','4294967295','63','2','256','0','30',NULL,'0','134','0','','','');
@@ -2193,22 +2193,22 @@ REPLACE INTO `item_db` VALUES ('5054','Assasin_Mask','Assassin Mask','5','20','1
REPLACE INTO `item_db` VALUES ('5055','Novice_Egg_Cap','Novice False Eggshell','5','1','0','1','0','0','3','0','0','1','63','2','256','0','0',NULL,'0','101','0','','','');
REPLACE INTO `item_db` VALUES ('5056','Love_Berry','Fruit of Love','5','1','0','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','140','0','','','');
REPLACE INTO `item_db` VALUES ('5057','Ear_Of_Black_Cat','Black Cat Ears','5','16000','8000','200','0','0','2','0','0','4294967295','63','2','256','0','45',NULL,'1','141','0','','','');
-REPLACE INTO `item_db` VALUES ('5058','Drooping_Kitty','Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
+REPLACE INTO `item_db` VALUES ('5058','Drooping_Kitty','Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
REPLACE INTO `item_db` VALUES ('5059','Brown_Bear_Cap','Teddybear Hat','5','20','10','800','0','0','3','0','0','4294967295','63','2','256','0','50',NULL,'1','143','0','','','');
REPLACE INTO `item_db` VALUES ('5060','Party_Hat','Party Hat','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','144','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5061','Flower_Hairpin','Flower Hairpin','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','145','0','','','');
REPLACE INTO `item_db` VALUES ('5062','Straw_Hat','Straw Hat','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','50',NULL,'1','146','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('5063','Plaster','Giant Band Aid','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','147','0','','','');
+REPLACE INTO `item_db` VALUES ('5063','Plaster','Giant Band Aid','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','147','0','','','');
REPLACE INTO `item_db` VALUES ('5064','Leaf_Headgear','Smokie Leaf','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','148','0','','','');
REPLACE INTO `item_db` VALUES ('5065','Fish_On_Head','Blue Fish','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus2 bAddRace,RC_Fish,10;','','');
-REPLACE INTO `item_db` VALUES ('5066','Horn_Of_Succubus','Succubus Horn','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','70',NULL,'1','150','0','bonus bInt,1; bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('5067','Sombrero','Sombrero','5','20','10','350','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','151','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('5066','Horn_Of_Succubus','Succubus Horn','5','20','10','800','0','0','4','0','0','2147483646','63','2','256','0','70',NULL,'1','150','0','bonus bInt,1; bonus bMdef,10;','','');
+REPLACE INTO `item_db` VALUES ('5067','Sombrero','Sombrero','5','20','10','350','0','0','4','0','0','2147483646','63','2','256','0','0',NULL,'1','151','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('5068','Ear_Of_Devil\'s_Wing','Evil Wing Ears','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','70',NULL,'0','152','0','bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('5069','Mask_Of_Fox','Kitsune Mask','5','20','10','300','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','153','0','bonus bAgi,1; bonus bLuk,1;','','');
-REPLACE INTO `item_db` VALUES ('5070','Headband_Of_Power','Hot-blooded Headband','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','154','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('5071','Indian_Headband','Indian Headband','5','20','10','200','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','155','0','bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('5072','Inccubus_Horn','Incubus Horn','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','70',NULL,'1','156','0','bonus bAgi,1; bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('5073','Cap_Of_Concentration','Model Training Hat','5','20','10','700','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','157','0','bonus bDex,2;','','');
+REPLACE INTO `item_db` VALUES ('5069','Mask_Of_Fox','Kitsune Mask','5','20','10','300','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','153','0','bonus bAgi,1; bonus bLuk,1;','','');
+REPLACE INTO `item_db` VALUES ('5070','Headband_Of_Power','Hot-blooded Headband','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','154','0','bonus bStr,2;','','');
+REPLACE INTO `item_db` VALUES ('5071','Indian_Headband','Indian Headband','5','20','10','200','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','155','0','bonus bDex,1;','','');
+REPLACE INTO `item_db` VALUES ('5072','Inccubus_Horn','Incubus Horn','5','20','10','800','0','0','4','0','0','2147483646','63','2','256','0','70',NULL,'1','156','0','bonus bAgi,1; bonus bMdef,10;','','');
+REPLACE INTO `item_db` VALUES ('5073','Cap_Of_Concentration','Model Training Hat','5','20','10','700','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','157','0','bonus bDex,2;','','');
REPLACE INTO `item_db` VALUES ('5074','Ear_Of_Angel\'s_Wing','Angel Wing Ears','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','70',NULL,'0','158','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5075','Cowboy_Hat','Cowboy Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','159','0','','','');
REPLACE INTO `item_db` VALUES ('5076','Fur_Hat','Beanie','5','20','10','350','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','160','0','bonus bLuk,1;','','');
@@ -2216,20 +2216,20 @@ REPLACE INTO `item_db` VALUES ('5077','Tulip_Hairpin','Tulip Hairpin','5','20','
REPLACE INTO `item_db` VALUES ('5078','Sea_Otter_Cap','Sea-Otter Hat','5','20','10','800','0','0','3','0','0','4294967295','63','2','256','0','50',NULL,'1','162','0','bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('5079','Crossed_Hair_Band','X Hairpin','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','163','0','','','');
REPLACE INTO `item_db` VALUES ('5080','Headgear_Of_Queen','Crown of Ancient Queen','5','20','10','400','0','0','4','0','0','4294967295','63','2','256','0','45',NULL,'1','164','0','','','');
-REPLACE INTO `item_db` VALUES ('5081','Mistress_Crown','Crown of Mistress','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','75',NULL,'1','165','0','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db` VALUES ('5081','Mistress_Crown','Crown of Mistress','5','20','10','100','0','0','0','0','0','2147483646','63','2','256','0','75',NULL,'1','165','0','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db` VALUES ('5082','Mushroom_Band','Decorative Mushroom','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','166','0','','','');
REPLACE INTO `item_db` VALUES ('5083','Red_Tailed_Ribbon','Red Ribbon','5','20','10','200','0','0','1','0','0','4294967295','63','2','256','0','45',NULL,'1','167','0','bonus bMdef,10;','','');
-REPLACE INTO `item_db` VALUES ('5084','Lazy_Raccoon','Lazy Smokie','5','20','10','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','168','0','bonus2 bResEff,Eff_Sleep,2000;','','');
+REPLACE INTO `item_db` VALUES ('5084','Lazy_Raccoon','Lazy Smokie','5','20','10','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','168','0','bonus2 bResEff,Eff_Sleep,2000;','','');
REPLACE INTO `item_db` VALUES ('5085','Pair_Of_Red_Ribbon','Small Ribbons','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','','','');
-REPLACE INTO `item_db` VALUES ('5086','Alarm_Mask','Alarm Mask','5','20','10','100','0','0','2','0','0','2147483647','63','2','513','0','0',NULL,'0','170','0','bonus2 bResEff,Eff_Blind,5000;','','');
+REPLACE INTO `item_db` VALUES ('5086','Alarm_Mask','Alarm Mask','5','20','10','100','0','0','2','0','0','2147483646','63','2','513','0','0',NULL,'0','170','0','bonus2 bResEff,Eff_Blind,5000;','','');
REPLACE INTO `item_db` VALUES ('5087','Goblin_Mask_01','Poker Face','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','171','0','','','');
REPLACE INTO `item_db` VALUES ('5088','Goblin_Mask_02','Surprised Mask','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','172','0','','','');
REPLACE INTO `item_db` VALUES ('5089','Goblin_Mask_03','Annoyed Mask','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','173','0','','','');
REPLACE INTO `item_db` VALUES ('5090','Goblin_Mask_04','Goblin Leader Mask','5','20','10','100','0','0','2','0','0','4294967295','63','2','513','0','0',NULL,'0','174','0','','','');
-REPLACE INTO `item_db` VALUES ('5091','Big_Golden_Bell','Decorative Golden Bell','5','20','10','200','0','0','2','0','0','2147483647','63','2','768','0','35',NULL,'1','175','0','','','');
+REPLACE INTO `item_db` VALUES ('5091','Big_Golden_Bell','Decorative Golden Bell','5','20','10','200','0','0','2','0','0','2147483646','63','2','768','0','35',NULL,'1','175','0','','','');
REPLACE INTO `item_db` VALUES ('5092','Blue_Coif','Coif','5','150000','75000','300','0','0','5','0','0','4352','63','2','768','0','65',NULL,'1','176','0','','','');
REPLACE INTO `item_db` VALUES ('5093','Blue_Coif_','Coif','5','150000','75000','300','0','0','5','0','1','4352','63','2','768','0','65',NULL,'1','177','0','bonus bMaxSP,100;','','');
-REPLACE INTO `item_db` VALUES ('5094','Orc_Hero_Helm','Helmet of Orc Hero','5','500000','250000','900','0','0','5','0','0','2147483647','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('5094','Orc_Hero_Helm','Helmet of Orc Hero','5','500000','250000','900','0','0','5','0','0','2147483646','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('5096','Assassin_Mask_','Assassin Mask','5','20','10','100','0','0','0','0','0','4352','63','2','1','0','70',NULL,'0','180','0','','','');
REPLACE INTO `item_db` VALUES ('5097','Cone_Hat_','Holiday Hat','5','0','0','400','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','144','0','','','');
REPLACE INTO `item_db` VALUES ('5098','Tiger_Mask','Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','181','0','bonus bStr,3; bonus bMaxHP,100;','','');
@@ -2237,8 +2237,8 @@ REPLACE INTO `item_db` VALUES ('5099','Cat_Hat','Neko Mimi','5','20','10','300',
REPLACE INTO `item_db` VALUES ('5100','Sales_Signboard','Sales Banner','5','20','10','800','0','0','0','0','0','4294967295','63','2','256','0','75',NULL,'1','183','0','bonus bStr,1; bonus bAgi,1; bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5101','Takius_Blindfold','Takius\'s Blindfold','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','184','0','','','');
REPLACE INTO `item_db` VALUES ('5102','Round_Eyes','Blank Eyes','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','185','0','','','');
-REPLACE INTO `item_db` VALUES ('5103','Sunflower_Hairpin','Sunflower Hairpin','5','20','10','600','0','0','1','0','0','2147483647','63','2','256','0','30',NULL,'0','186','0','bonus bAgi,2; bonus bCritical,5;','','');
-REPLACE INTO `item_db` VALUES ('5104','Dark_Blindfold','Dark Blinder','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
+REPLACE INTO `item_db` VALUES ('5103','Sunflower_Hairpin','Sunflower Hairpin','5','20','10','600','0','0','1','0','0','2147483646','63','2','256','0','30',NULL,'0','186','0','bonus bAgi,2; bonus bCritical,5;','','');
+REPLACE INTO `item_db` VALUES ('5104','Dark_Blindfold','Dark Blinder','5','20','10','100','0','0','0','0','0','2147483646','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
REPLACE INTO `item_db` VALUES ('5105','Hat_Of_Cake_','2nd Anniversary Hat','5','20','10','1000','0','0','1','0','0','4294967295','63','2','256','0','24',NULL,'1','109','0','bonus bDex,1; bonus bMaxSP,80; bonus3 bAddMonsterDropItem,7864,7,50;','','');
REPLACE INTO `item_db` VALUES ('5106','Cone_Hat_INA','2nd Anniversary Hat','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','1',NULL,'0','144','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5107','Well_Baked_Toast','Crunch Toast','5','20','10','50','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','188','0','','','');
@@ -2255,29 +2255,29 @@ REPLACE INTO `item_db` VALUES ('5117','Mistic_Rose','Mystic Rose','5','20','10',
REPLACE INTO `item_db` VALUES ('5118','Ear_Of_Puppy','Puppy Headband','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','199','0','','','');
REPLACE INTO `item_db` VALUES ('5119','Super_Novice_Hat_','Super Novice Hat','5','8500','4250','400','0','0','4','0','1','1','63','2','256','0','40',NULL,'1','193','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db` VALUES ('5120','Fedora_','Bucket Hat','5','6000','3000','300','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','195','0','','','');
-REPLACE INTO `item_db` VALUES ('5121','Zherlthsh_Mask','Zealotus Mask','5','20','10','400','0','0','3','0','0','2147483647','63','2','768','0','70',NULL,'1','200','0','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db` VALUES ('5122','Magni_Cap','Magni\'s Cap','5','30000','15000','1000','0','0','5','0','0','2147483647','63','2','256','0','65',NULL,'1','250','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('5123','Ulle_Cap','Ulle\'s Cap','5','30000','15000','500','0','0','3','0','1','2147483647','63','2','256','0','65',NULL,'1','254','0','bonus bDex,2; bonus bAgi,1;','','');
-REPLACE INTO `item_db` VALUES ('5124','Fricca_Circlet','Fricca\'s Circlet','5','30000','15000','300','0','0','3','0','0','2147483647','63','2','256','0','65',NULL,'1','251','0','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50;','','');
+REPLACE INTO `item_db` VALUES ('5121','Zherlthsh_Mask','Zealotus Mask','5','20','10','400','0','0','3','0','0','2147483646','63','2','768','0','70',NULL,'1','200','0','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('5122','Magni_Cap','Magni\'s Cap','5','30000','15000','1000','0','0','5','0','0','2147483646','63','2','256','0','65',NULL,'1','250','0','bonus bStr,2;','','');
+REPLACE INTO `item_db` VALUES ('5123','Ulle_Cap','Ulle\'s Cap','5','30000','15000','500','0','0','3','0','1','2147483646','63','2','256','0','65',NULL,'1','254','0','bonus bDex,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('5124','Fricca_Circlet','Fricca\'s Circlet','5','30000','15000','300','0','0','3','0','0','2147483646','63','2','256','0','65',NULL,'1','251','0','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50;','','');
REPLACE INTO `item_db` VALUES ('5125','Kiss_Of_Angel','Angel\'s Kiss','5','10000','5000','300','0','0','3','0','1','1','63','2','256','0','50',NULL,'1','255','0','bonus bSPrecovRate,5;','','');
-REPLACE INTO `item_db` VALUES ('5126','Morpheus\'s_Hood','Morpheus\'s Hood','5','30000','15000','200','0','0','1','0','0','2147483647','63','2','256','0','33',NULL,'1','256','0','bonus bInt,2;','','');
-REPLACE INTO `item_db` VALUES ('5127','Morrigane\'s_Helm','Morrigane\'s Helm','5','30000','15000','500','0','0','4','0','0','2147483647','63','2','256','0','61',NULL,'1','257','0','bonus bLuk,2; bonus bBaseAtk,3;','','');
-REPLACE INTO `item_db` VALUES ('5128','Goibne\'s_Helmet','Goibne\'s Helm','5','30000','15000','500','0','0','5','0','0','2147483647','63','2','256','0','54',NULL,'1','258','0','bonus bVit,3; bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('5126','Morpheus\'s_Hood','Morpheus\'s Hood','5','30000','15000','200','0','0','1','0','0','2147483646','63','2','256','0','33',NULL,'1','256','0','bonus bInt,2;','','');
+REPLACE INTO `item_db` VALUES ('5127','Morrigane\'s_Helm','Morrigane\'s Helm','5','30000','15000','500','0','0','4','0','0','2147483646','63','2','256','0','61',NULL,'1','257','0','bonus bLuk,2; bonus bBaseAtk,3;','','');
+REPLACE INTO `item_db` VALUES ('5128','Goibne\'s_Helmet','Goibne\'s Helm','5','30000','15000','500','0','0','5','0','0','2147483646','63','2','256','0','54',NULL,'1','258','0','bonus bVit,3; bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('5129','Bird_Nest','Bird Nest','5','20','10','400','0','0','1','0','0','4294967295','63','2','256','0','50',NULL,'0','201','0','bonus bAgi,2; bonus2 bSubRace,RC_Brute,10;','','');
REPLACE INTO `item_db` VALUES ('5130','Lion_Mask','Lion Mask','5','20','10','700','0','0','0','0','0','13623168','63','2','768','0','75',NULL,'1','202','0','bonus2 bAddEffWhenHit,Eff_Silence,500; bonus bMdef,1;','','');
REPLACE INTO `item_db` VALUES ('5131','Close_Helmet','Close Helmet','5','20','10','1200','0','0','8','0','0','16514','63','2','769','0','75',NULL,'1','203','0','bonus bVit,3; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db` VALUES ('5132','Angeling_Hat','Angeling Hat','5','20','10','700','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','204','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('5133','Sheep_Hat','Sheep Hat','5','20','10','150','0','0','1','0','0','33040','63','2','256','0','0',NULL,'0','205','0','bonus bShortWeaponDamageReturn,5;','','');
REPLACE INTO `item_db` VALUES ('5134','Pumpkin_Hat','Pumpkin-Head','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','206','0','bonus2 bSubRace,RC_Demon,5;','','');
-REPLACE INTO `item_db` VALUES ('5135','Cyclops_Visor','Cyclop\'s Eye','5','0','0','200','0','0','0','0','0','2147483647','63','2','512','0','75',NULL,'0','207','0','bonus bMaxSP,50;','','');
+REPLACE INTO `item_db` VALUES ('5135','Cyclops_Visor','Cyclop\'s Eye','5','0','0','200','0','0','0','0','0','2147483646','63','2','512','0','75',NULL,'0','207','0','bonus bMaxSP,50;','','');
REPLACE INTO `item_db` VALUES ('5136','Santa\'s_Hat_','Antonio\'s Santa Hat','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','20','0','','','');
-REPLACE INTO `item_db` VALUES ('5137','Alice_Doll','Alice Doll','5','20','10','500','0','0','0','0','1','2147483647','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Sleep,10;','','');
+REPLACE INTO `item_db` VALUES ('5137','Alice_Doll','Alice Doll','5','20','10','500','0','0','0','0','1','2147483646','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Sleep,10;','','');
REPLACE INTO `item_db` VALUES ('5138','Magic_Eyes','Magic Eyes','5','20','10','300','0','0','1','0','0','8454660','63','2','256','0','30',NULL,'1','209','0','bonus bMdef,5; bonus bCastrate,-10; bonus bUseSPrate,20;','','');
REPLACE INTO `item_db` VALUES ('5139','Hibiscus','Hibiscus','5','20','10','200','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'0','210','0','bonus bDex,1; bonus bInt,1; bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('5140','Charming_Ribbon','Charming Ribbon','5','20','10','400','0','0','1','0','1','4294967295','63','2','256','0','10',NULL,'1','211','0','bonus2 bSubRace,RC_Undead,5; bonus2 bSubRace,RC_Demon,5;','','');
-REPLACE INTO `item_db` VALUES ('5141','Marionette_Doll','Marionette Doll','5','20','10','400','0','0','0','0','1','2147483647','63','2','256','0','30',NULL,'1','212','0','bonus bStr,1;','','');
+REPLACE INTO `item_db` VALUES ('5141','Marionette_Doll','Marionette Doll','5','20','10','400','0','0','0','0','1','2147483646','63','2','256','0','30',NULL,'1','212','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5142','Crescent_Helm','Crescent Helm','5','20','10','3000','0','0','8','0','0','279714','63','2','768','0','50',NULL,'1','213','0','bonus bVit,1; bonus2 bSubRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db` VALUES ('5143','Kabuki_Mask','Kabuki Mask','5','20','10','1000','0','0','5','0','1','2147483647','63','1','769','0','30',NULL,'1','214','0','bonus2 bResEff,Eff_Silence,3000;','','');
+REPLACE INTO `item_db` VALUES ('5143','Kabuki_Mask','Kabuki Mask','5','20','10','1000','0','0','5','0','1','2147483646','63','1','769','0','30',NULL,'1','214','0','bonus2 bResEff,Eff_Silence,3000;','','');
REPLACE INTO `item_db` VALUES ('5144','Gambler_Hat','Gambler Hat','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','bonus bLuk,5;','','');
REPLACE INTO `item_db` VALUES ('5145','Carnival_Joker_Jester','Carnival Joker Jester','5','10','5','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','89','0','','','');
REPLACE INTO `item_db` VALUES ('5146','Elephant_Hat','Elephant Hat','5','0','0','500','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','215','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,7; skill WZ_WATERBALL,1;','','');
@@ -2293,19 +2293,19 @@ REPLACE INTO `item_db` VALUES ('5155','Granpa_Beard_F','Father\'s White Moustach
REPLACE INTO `item_db` VALUES ('5156','Flu_Mask_F','Father\'s Mask','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','8','0','bonus bMatkRate,1;','','');
REPLACE INTO `item_db` VALUES ('5157','Viking_Helm_','Orc Helm','5','20','10','500','0','0','5','0','1','414946','63','2','256','0','0',NULL,'1','86','0','','','');
REPLACE INTO `item_db` VALUES ('5158','Holy_Bonnet_','Monk Hat','5','30000','15000','100','0','0','5','0','1','33040','63','2','256','0','0',NULL,'1','35','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5159','Golden_Gear_','Golden Gear','5','20','10','900','0','0','5','0','1','2147483647','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db` VALUES ('5159','Golden_Gear_','Golden Gear','5','20','10','900','0','0','5','0','1','2147483646','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db` VALUES ('5160','Magestic_Goat_','Majestic Goat','5','20','10','800','0','0','5','0','1','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5161','Sharp_Gear_','Spiky Band','5','20','10','1000','0','0','6','0','1','6739442','63','2','256','0','50',NULL,'1','43','0','','','');
REPLACE INTO `item_db` VALUES ('5162','Bone_Helm_','Bone Helm','5','20','10','800','0','0','7','0','1','279714','63','2','256','0','70',NULL,'1','103','0','bonus2 bSubEle,Ele_Dark,-15;','','');
-REPLACE INTO `item_db` VALUES ('5163','Corsair_','Corsair','5','20','10','500','0','0','5','0','1','2147483647','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
-REPLACE INTO `item_db` VALUES ('5164','Tiara_','Tiara','5','20','10','400','0','0','4','0','1','2147483647','63','2','256','0','45',NULL,'1','19','0','bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('5165','Crown_','Crown','5','20','10','400','0','0','4','0','1','2147483647','63','1','256','0','45',NULL,'1','45','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5163','Corsair_','Corsair','5','20','10','500','0','0','5','0','1','2147483646','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
+REPLACE INTO `item_db` VALUES ('5164','Tiara_','Tiara','5','20','10','400','0','0','4','0','1','2147483646','63','2','256','0','45',NULL,'1','19','0','bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5165','Crown_','Crown','5','20','10','400','0','0','4','0','1','2147483646','63','1','256','0','45',NULL,'1','45','0','bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('5166','Spinx_Helm_','Sphinx Hat','5','20','10','3000','0','0','5','0','1','16514','63','2','257','0','65',NULL,'0','137','0','bonus bStr,2;','','');
REPLACE INTO `item_db` VALUES ('5167','Munak_Turban_','Munak Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','769','0','0',NULL,'0','51','0','bonus2 bSubRace,RC_Undead,10;','','');
REPLACE INTO `item_db` VALUES ('5168','Bongun_Hat_','Bongun Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','769','0','0',NULL,'0','139','0','','','');
REPLACE INTO `item_db` VALUES ('5169','Bride_Mask','Bride Mask','5','30000','15000','500','0','0','4','0','1','4294967295','63','2','768','0','40',NULL,'1','223','0','if(BaseClass==Job_Taekwon) { bonus bLuk,2; bonus bCritical,5; }','','');
-REPLACE INTO `item_db` VALUES ('5170','Feather_Beret','Feather Beret','5','30000','15000','600','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','224','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10;','','');
-REPLACE INTO `item_db` VALUES ('5171','Valkyrie_Helm','Valkyrie Helm','5','100000','50000','1000','0','0','5','0','1','2147483647','2','2','256','0','0',NULL,'1','225','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db` VALUES ('5170','Feather_Beret','Feather Beret','5','30000','15000','600','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','224','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10;','','');
+REPLACE INTO `item_db` VALUES ('5171','Valkyrie_Helm','Valkyrie Helm','5','100000','50000','1000','0','0','5','0','1','2147483646','2','2','256','0','0',NULL,'1','225','0','bonus bMdef,5;','','');
REPLACE INTO `item_db` VALUES ('5172','Beret','Beret','5','30000','15000','700','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','226','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('5173','Satto_Hat','Magistrate Hat','5','30000','15000','400','0','0','3','0','1','4294967295','63','2','256','0','60',NULL,'1','227','0','if(BaseClass==Job_Taekwon) { bonus bAgi,1; bonus bHPrecovRate,3; }','','');
REPLACE INTO `item_db` VALUES ('5174','Ayam','Ayam','5','30000','15000','400','0','0','3','0','1','4294967295','63','2','256','0','60',NULL,'1','228','0','if(BaseClass==Job_Taekwon) { bonus bInt,1; bonus bSPrecovRate,3; }','','');
@@ -2318,7 +2318,7 @@ REPLACE INTO `item_db` VALUES ('5180','Phrygian_Cap_','France Holiday Hat','5','
REPLACE INTO `item_db` VALUES ('5181','Helm_Of_Darkness','Helm of Darkness','5','20','10','2000','0','0','3','0','1','414946','63','2','768','0','50',NULL,'1','233','0','bonus bStr,2;','','');
REPLACE INTO `item_db` VALUES ('5182','Puppy_Hat','Puppy Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','30',NULL,'0','234','0','bonus bAgi,1; bonus3 bAutoSpell,PR_GLORIA,1,10+20*(readparam(bAgi)>=77);','','');
REPLACE INTO `item_db` VALUES ('5183','Bird_Nest_Hat','Bird Nest Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','10',NULL,'1','235','0','bonus bDex,1; bonus bAgi,1; bonus2 bResEff,Eff_Stun,1000;','','');
-REPLACE INTO `item_db` VALUES ('5184','Captain_Hat','Captain\'s Hat','5','20','10','500','0','0','4','0','0','2147483647','63','2','256','0','30',NULL,'1','236','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db` VALUES ('5184','Captain_Hat','Captain\'s Hat','5','20','10','500','0','0','4','0','0','2147483646','63','2','256','0','30',NULL,'1','236','0','bonus2 bSubEle,Ele_Water,5;','','');
REPLACE INTO `item_db` VALUES ('5185','Laurel_Wreath','Laurel Wreath','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','10',NULL,'1','237','0','bonus bLuk,3; bonus2 bResEff,Eff_Blind,500; bonus2 bResEff,Eff_Curse,500;','','');
REPLACE INTO `item_db` VALUES ('5186','Geographer_Band','Geographer Band','5','20','10','500','0','0','1','0','0','4294967295','63','2','256','0','30',NULL,'0','238','0','bonus bInt,1; bonus3 bAutoSpellWhenHit,AL_HEAL,1,50;','','');
REPLACE INTO `item_db` VALUES ('5187','Twin_Ribbon','Twin Ribbon','5','20','10','200','0','0','0','0','1','4294967295','63','2','256','0','30',NULL,'1','239','0','bonus bMaxSP,30; bonus bMdef,3; bonus3 bAutoSpellWhenHit,NPC_STONESKIN,6,10; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,6,120,BF_MAGIC,0;','','');
@@ -2340,35 +2340,35 @@ REPLACE INTO `item_db` VALUES ('5202','Pumpkin_Hat_','Fantastic Pumpkin-Head','5
REPLACE INTO `item_db` VALUES ('5203','Tongue_Mask','Smiling Mask','5','20','10','200','0','0','2','0','0','4294967295','63','2','513','0','0',NULL,'0','253','0','bonus bSpeedRate,25;','','');
REPLACE INTO `item_db` VALUES ('5204','Event_Pierrot_Nose','Rudolph\'s Nose','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','49','0','bonus2 bResEff,Eff_Blind,3000; bonus2 bAddMonsterDropItem,12130,30;','','');
REPLACE INTO `item_db` VALUES ('5205','Wreath','Emperor\'s Laurel Crown','5','20','10','1000','0','0','3','0','0','4294967295','63','2','768','0','0',NULL,'1','261','0','bonus bAllStats,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5206','Romantic_White_Flower','Romantic White Flower','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','259','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db` VALUES ('5206','Romantic_White_Flower','Romantic White Flower','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','259','0','bonus2 bSubRace,RC_Plant,3;','','');
REPLACE INTO `item_db` VALUES ('5207','Gold_Spirit_Chain','Angel Blessing','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','260','0','bonus bLuk,1; bonus2 bSubEle,Ele_Holy,5;','','');
-REPLACE INTO `item_db` VALUES ('5208','Rideword_Hat','Rideword Hat','5','20','10','300','0','0','2','0','1','2147483647','63','2','256','0','40',NULL,'1','262','0','bonus2 bHPDrainRate,50,8; bonus2 bSPDrainRate,10,4; bonus2 bHPLossRate,10,5000;','','');
+REPLACE INTO `item_db` VALUES ('5208','Rideword_Hat','Rideword Hat','5','20','10','300','0','0','2','0','1','2147483646','63','2','256','0','40',NULL,'1','262','0','bonus2 bHPDrainRate,50,8; bonus2 bSPDrainRate,10,4; bonus2 bHPLossRate,10,5000;','','');
REPLACE INTO `item_db` VALUES ('5209','Yellow_Baseball_Cap','Love Dad Cap','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','263','0','','','');
REPLACE INTO `item_db` VALUES ('5210','Flying_Angel','Flapping Angel Wing','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bCastrate,-3; bonus bAspdRate,3; bonus bInt,1; bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('5211','Dress_Hat','Dress Hat','5','0','0','200','0','0','2','0','1','4294967295','63','2','256','0','20',NULL,'1','265','0','bonus bMdef,7; bonus bStr,1; bonus bInt,1; bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bHealPower,5; if(getrefine()>=7) { bonus2 bAddRace,RC_NonBoss,1; bonus2 bAddRace,RC_Boss,1; bonus bMatkRate,1; bonus bHealPower,1; }','','');
REPLACE INTO `item_db` VALUES ('5212','Satellite_Hairband','Satellite Hairband','5','0','0','1000','0','0','3','0','1','4294967295','63','2','256','0','30',NULL,'1','266','0','bonus bMaxHP,50; bonus bMaxSP,10; skill AL_RUWACH,1;','','sc_end SC_RUWACH;');
REPLACE INTO `item_db` VALUES ('5213','Black_Bunny_Band','Sheila Hairnet','5','0','0','200','0','0','2','0','0','4294967295','63','2','256','0','1',NULL,'1','267','0','bonus bAgi,2; bonus bMdef,3;','','');
REPLACE INTO `item_db` VALUES ('5214','Moonlight_Flower_Hat','Moonlight Flower Hat','5','0','0','200','0','0','3','0','0','4294967295','63','2','768','0','1',NULL,'1','268','0','bonus bDex,2; bonus3 bAutoSpell,AL_INCAGI,1,50;','','');
-REPLACE INTO `item_db` VALUES ('5215','Angelic_Chain_','Evolved Angel Wing','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bDex,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,3;','','');
-REPLACE INTO `item_db` VALUES ('5216','Satanic_Chain_','Evolved Evil Wing','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','39','0','bonus bStr,1; bonus bAgi,1; bonus bFlee,3; bonus2 bSubRace,RC_Angel,3;','','');
+REPLACE INTO `item_db` VALUES ('5215','Angelic_Chain_','Evolved Angel Wing','5','20','10','100','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bDex,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,3;','','');
+REPLACE INTO `item_db` VALUES ('5216','Satanic_Chain_','Evolved Evil Wing','5','20','10','100','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','39','0','bonus bStr,1; bonus bAgi,1; bonus bFlee,3; bonus2 bSubRace,RC_Angel,3;','','');
REPLACE INTO `item_db` VALUES ('5217','Magestic_Goat_TW','Evolved Majestic Goat','5','20','10','800','0','0','5','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,2;','','');
REPLACE INTO `item_db` VALUES ('5218','Bunny_Band_','Evolved Bunny Band','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','15','0','bonus bInt,2;','','');
-REPLACE INTO `item_db` VALUES ('5219','Drooping_Kitty_','Evolved Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,18; bonus bFlee,3;','','');
-REPLACE INTO `item_db` VALUES ('5220','Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,5;','','');
+REPLACE INTO `item_db` VALUES ('5219','Drooping_Kitty_','Evolved Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,18; bonus bFlee,3;','','');
+REPLACE INTO `item_db` VALUES ('5220','Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,5;','','');
REPLACE INTO `item_db` VALUES ('5221','Pair_Of_Red_Ribbon_','Evolved Pair of Red Ribbon','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('5222','Fish_On_Head_','Evolved Blue Fish','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus bAgi,1; bonus bDex,1;','','');
-REPLACE INTO `item_db` VALUES ('5223','Big_Golden_Bell_','Evolved Big Golden Bell','5','20','10','200','0','0','2','0','0','2147483647','63','2','768','0','35',NULL,'1','175','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db` VALUES ('5224','Orc_Hero_Helm_TW','Evolved Orc Hero Helm','5','500000','250000','900','0','0','5','0','0','2147483647','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db` VALUES ('5223','Big_Golden_Bell_','Evolved Big Golden Bell','5','20','10','200','0','0','2','0','0','2147483646','63','2','768','0','35',NULL,'1','175','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db` VALUES ('5224','Orc_Hero_Helm_TW','Evolved Orc Hero Helm','5','500000','250000','900','0','0','5','0','0','2147483646','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db` VALUES ('5225','Marcher_Hat','Parade Hat','5','20','10','200','0','0','2','0','1','4294967295','63','2','256','0','10',NULL,'1','269','0','bonus bMdef,2; bonus bStr,2; bonus4 bAutoSpellWhenHit,AL_ANGELUS,5,30,0; bonus4 bAutoSpellWhenHit,HP_ASSUMPTIO,1,1,0; bonus2 bResEff,Eff_Stun,1000; if(BaseClass==Job_Acolyte) bonus4 bAutoSpellOnSkill,AL_HEAL,PR_LEXAETERNA,1,1000;','','');
REPLACE INTO `item_db` VALUES ('5226','Mini_Propeller_','Mini Propeller','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','270','0','bonus bAgi,2; bonus bDex,1; bonus bFlee,10; bonus bCastrate,-getrefine();','','');
-REPLACE INTO `item_db` VALUES ('5227','Red_Deviruchi_Cap','Red Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','271','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('5228','White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('5229','Gray_Deviruchi_Cap','Brown Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','273','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db` VALUES ('5230','White_Drooping_Kitty','Gray Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','274','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db` VALUES ('5231','Gray_Drooping_Kitty','Brown Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','275','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db` VALUES ('5232','Pink_Drooping_Kitty','Pink Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','276','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db` VALUES ('5233','Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','277','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db` VALUES ('5234','Yellow_Drooping_Kitty','Yellow Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','278','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5227','Red_Deviruchi_Cap','Red Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483646','63','2','256','0','64',NULL,'1','271','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5228','White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483646','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5229','Gray_Deviruchi_Cap','Brown Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483646','63','2','256','0','64',NULL,'1','273','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5230','White_Drooping_Kitty','Gray Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','274','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5231','Gray_Drooping_Kitty','Brown Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','275','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5232','Pink_Drooping_Kitty','Pink Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','276','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5233','Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','277','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db` VALUES ('5234','Yellow_Drooping_Kitty','Yellow Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','278','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
REPLACE INTO `item_db` VALUES ('5235','Gray_Fur_Hat','Brown Beanie','5','20','10','350','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','279','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5236','Blue_Fur_Hat','Blue Beanie','5','20','10','350','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','280','0','bonus bLuk,1;','','');
REPLACE INTO `item_db` VALUES ('5237','Pink_Fur_Hat','Pink Beanie','5','20','10','350','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','281','0','bonus bLuk,1;','','');
@@ -2391,18 +2391,18 @@ REPLACE INTO `item_db` VALUES ('5253','Lif_Doll_Hat','Lif Doll Hat','5','20','10
REPLACE INTO `item_db` VALUES ('5254','Deviling_Hat','Deviling Hat','5','20','10','500','0','0','1','0','1','4294967295','63','2','256','0','20',NULL,'1','298','0','bonus bStr,1; bonus bCritical,3; bonus2 bSubRace,RC_Angel,-20; if(getrefine()>=6) { bonus bCritical,getrefine()-5; }','','');
REPLACE INTO `item_db` VALUES ('5255','Triple_Poring_Hat','Triple Poring Hat','5','20','10','600','0','0','3','0','0','4294967295','63','2','256','0','20',NULL,'0','299','0','bonus bLuk,3; bonus3 bAutoSpell,BS_GREED,1,50;','','');
REPLACE INTO `item_db` VALUES ('5256','Valkyrie_Feather_Band','Valkyrie Feather Band','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','20',NULL,'1','300','0','bonus bInt,1; bonus3 bAutoSpellWhenHit,AL_HEAL,1,10;','','');
-REPLACE INTO `item_db` VALUES ('5257','Soulless_Wing','Soul Ring','5','20','10','300','0','0','2','0','0','2147483647','63','2','256','0','20',NULL,'1','301','0','bonus bMdef,2; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,1,10;','','');
+REPLACE INTO `item_db` VALUES ('5257','Soulless_Wing','Soul Ring','5','20','10','300','0','0','2','0','0','2147483646','63','2','256','0','20',NULL,'1','301','0','bonus bMdef,2; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,1,10;','','');
REPLACE INTO `item_db` VALUES ('5258','Afro_Wig','Afro Wig','5','20','10','100','0','0','0','0','1','4294967295','63','2','768','0','10',NULL,'1','302','0','bonus3 bAutoSpellWhenHit,NV_FIRSTAID,1,300; bonus2 bSubEle,Ele_Neutral,1;','','');
REPLACE INTO `item_db` VALUES ('5259','Elephant_Hat_','Elephant Hat','5','20','10','500','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','215','0','bonus bVit,1; bonus3 bAutoSpell,WZ_WATERBALL,3,10; skill AL_HOLYWATER,1;','','');
REPLACE INTO `item_db` VALUES ('5260','Cookie_Hat','Cookie Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','217','0','bonus bAgi,1; bonus bFlee2,5; bonus bCritAtkRate,5;','','');
REPLACE INTO `item_db` VALUES ('5261','Silver_Tiara_','Silver Tiara','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','218','0','bonus bInt,2; if(BaseClass==Job_Mage) bonus bMatkRate,(JobLevel/20); if(BaseClass==Job_Acolyte) bonus bUseSPrate,-(JobLevel/10); if(BaseClass==Job_Archer) bonus bMaxSP,(JobLevel*2);','','');
REPLACE INTO `item_db` VALUES ('5262','Gold_Tiara_','Golden Tiara','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','232','0','bonus bStr,2; bonus bUnbreakableHelm,0; if((readparam(bDex)<56)&&(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief)) bonus bDex,JobLevel/7;','','');
-REPLACE INTO `item_db` VALUES ('5263','Ati_Atihan_Hat','Pagdayaw','5','20','10','100','0','0','1','0','0','2147483647','63','2','769','0','20',NULL,'1','303','0','bonus2 bSubEle,Ele_Water,1; bonus2 bSubEle,Ele_Earth,1; bonus2 bSubEle,Ele_Fire,1; bonus2 bSubEle,Ele_Wind,1; bonus2 bAddEff,Eff_Curse,3;','','');
+REPLACE INTO `item_db` VALUES ('5263','Ati_Atihan_Hat','Pagdayaw','5','20','10','100','0','0','1','0','0','2147483646','63','2','769','0','20',NULL,'1','303','0','bonus2 bSubEle,Ele_Water,1; bonus2 bSubEle,Ele_Earth,1; bonus2 bSubEle,Ele_Fire,1; bonus2 bSubEle,Ele_Wind,1; bonus2 bAddEff,Eff_Curse,3;','','');
REPLACE INTO `item_db` VALUES ('5264','Aussie_Flag_Hat','Australian Flag Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','304','0','bonus bAllStats,2;','','');
-REPLACE INTO `item_db` VALUES ('5265','Apple_Of_Archer_C','Apple of Archer','5','1','0','0','0','0','7','0','0','2147483647','63','2','256','0','1',NULL,'0','72','0','bonus bDex,4;','','');
+REPLACE INTO `item_db` VALUES ('5265','Apple_Of_Archer_C','Apple of Archer','5','1','0','0','0','0','7','0','0','2147483646','63','2','256','0','1',NULL,'0','72','0','bonus bDex,4;','','');
REPLACE INTO `item_db` VALUES ('5266','Bunny_Band_C','Bunny Band','5','1','0','0','0','0','9','0','0','4294967295','63','2','256','0','1',NULL,'0','15','0','bonus bMdef,5; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('5267','Sahkkat_C','Sakkat','5','1','0','0','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','67','0','bonus bAgi,3;','','');
-REPLACE INTO `item_db` VALUES ('5268','Lord_Circlet_C','Grand Circlet','5','1','0','0','0','0','10','0','0','2147483647','63','2','256','0','1',NULL,'0','93','0','bonus bStr,3; bonus bInt,3; bonus bLuk,3; bonus bMdef,4;','','');
+REPLACE INTO `item_db` VALUES ('5268','Lord_Circlet_C','Grand Circlet','5','1','0','0','0','0','10','0','0','2147483646','63','2','256','0','1',NULL,'0','93','0','bonus bStr,3; bonus bInt,3; bonus bLuk,3; bonus bMdef,4;','','');
REPLACE INTO `item_db` VALUES ('5269','Flying_Angel_','Flapping Angel Wing','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bInt,1; bonus bAgi,1; bonus bAspdRate,3; bonus bSpeedRate,25;','','');
REPLACE INTO `item_db` VALUES ('5270','Fallen_Leaves_','Autumn Leaves','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'1','241','0','bonus bFlee2,5;','','');
REPLACE INTO `item_db` VALUES ('5271','Chinese_Crown_','Phoenix Crown','5','20','10','500','0','0','4','0','1','4294967295','63','2','768','0','0',NULL,'1','221','0','bonus bMdef,3; bonus2 bSubRace,RC_Boss,getrefine();','','');
@@ -2411,11 +2411,11 @@ REPLACE INTO `item_db` VALUES ('5273','Happy_Wig','Happy Wig','5','20','10','100
REPLACE INTO `item_db` VALUES ('5274','Shiny_Wig','Shiny Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','306','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db` VALUES ('5275','Marvelous_Wig','Marvelous Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','307','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db` VALUES ('5276','Fantastic_Wig','Fantastic Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','308','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
-REPLACE INTO `item_db` VALUES ('5277','Yellow_Bandana','Yellow Bandana','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','20',NULL,'1','309','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
-REPLACE INTO `item_db` VALUES ('5278','Yellow_Ribbon','Yellow Ribbon','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','20',NULL,'1','310','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
-REPLACE INTO `item_db` VALUES ('5279','Drooping_Kitty_C','Refined Drooping Cat','5','2','1','0','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
+REPLACE INTO `item_db` VALUES ('5277','Yellow_Bandana','Yellow Bandana','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','20',NULL,'1','309','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
+REPLACE INTO `item_db` VALUES ('5278','Yellow_Ribbon','Yellow Ribbon','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','20',NULL,'1','310','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
+REPLACE INTO `item_db` VALUES ('5279','Drooping_Kitty_C','Refined Drooping Cat','5','2','1','0','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
REPLACE INTO `item_db` VALUES ('5280','Magestic_Goat_C','Baphomet Horns','5','2','1','0','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
-REPLACE INTO `item_db` VALUES ('5281','Deviruchi_Cap_C','Refined Deviruchi Hat','5','2','1','0','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'0','123','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db` VALUES ('5281','Deviruchi_Cap_C','Refined Deviruchi Hat','5','2','1','0','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'0','123','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db` VALUES ('5282','euRO_Baseball_Cap','Europe Baseball Cap','5','0','0','200','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','216','0','','','');
REPLACE INTO `item_db` VALUES ('5283','Chick_Hat','Chick Hat','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'0','311','0','bonus bLuk,2; bonus bMaxHP,50; bonus bMaxSP,50; skill TF_DOUBLE,2; bonus bDoubleRate,10; bonus2 bSubRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db` VALUES ('5284','Water_Lily_Crown','Water Lily Crown','5','20','10','200','0','0','0','0','1','4294967295','63','2','256','0','30',NULL,'0','312','0','bonus bDex,1; bonus bAgi,1; bonus bHPrecovRate,5; bonus bSPrecovRate,3;','','');
@@ -2434,13 +2434,13 @@ REPLACE INTO `item_db` VALUES ('5296','Drooping_Nine_Tail_','Drooping Nine Tail'
REPLACE INTO `item_db` VALUES ('5297','Soulless_Wing_','Soul Wing','5','20','10','300','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','301','0','bonus bAllStats,1; bonus2 bSPRegenRate,2,10000;','','');
REPLACE INTO `item_db` VALUES ('5298','Marvelous_Wig_','Dokebi\'s Wig','5','20','10','100','0','0','1','0','1','4294967295','63','2','768','0','0',NULL,'1','307','0','bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,-5; bonus2 bSubEle,Ele_Water,-5;','','');
REPLACE INTO `item_db` VALUES ('5299','Ati_Atihan_Hat_','Pagdayaw','5','20','10','100','0','0','1','0','1','4294967295','63','2','769','0','0',NULL,'0','303','0','bonus3 bAutoSpell,DC_SCREAM,1,50;','','');
-REPLACE INTO `item_db` VALUES ('5300','Bullock_Helm','Bullock Helm','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','45',NULL,'1','322','0','bonus bMaxHP,100;','','');
+REPLACE INTO `item_db` VALUES ('5300','Bullock_Helm','Bullock Helm','5','20','10','800','0','0','2','0','0','2147483646','63','2','256','0','45',NULL,'1','322','0','bonus bMaxHP,100;','','');
REPLACE INTO `item_db` VALUES ('5301','Russian_Ribbon','Victory Hairband','5','0','0','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','323','0','','','');
REPLACE INTO `item_db` VALUES ('5302','Lotus_Flower_Hat','Flower Lily','5','0','0','100','0','0','1','0','0','4294967295','63','2','256','0','30',NULL,'1','324','0','','','');
REPLACE INTO `item_db` VALUES ('5303','Flower_Coronet','Flower Crown','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','325','0','bonus bMdef,3; bonus bMaxHP,50;','','');
REPLACE INTO `item_db` VALUES ('5304','Cap_Of_Blindness','Cap Of Blindness','5','20','10','800','0','0','4','0','1','4294967295','63','2','769','0','50',NULL,'1','326','0','bonus2 bResEff,Eff_Curse,700; bonus2 bResEff,Eff_Blind,10000;','','');
REPLACE INTO `item_db` VALUES ('5305','Pirate_Dagger','Pirate Dagger','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','327','0','bonus bBaseAtk,5;','','');
-REPLACE INTO `item_db` VALUES ('5306','Freyja_Crown','Freya\'s Crown','5','0','0','500','0','0','12','0','0','2147483647','63','2','256','0','0',NULL,'0','328','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('5306','Freyja_Crown','Freya\'s Crown','5','0','0','500','0','0','12','0','0','2147483646','63','2','256','0','0',NULL,'0','328','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db` VALUES ('5307','Carmen_Miranda\'s_Hat','Carmen Miranda\'s Hat','5','20','10','400','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','329','0','bonus bMdef,3; bonus3 bAutoSpellWhenHit,DC_WINKCHARM,1,50;','','');
REPLACE INTO `item_db` VALUES ('5308','Brazilian_Flag_Hat','Brazil National Flag Hat','5','20','10','300','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','330','0','bonus bSpeedAddRate,25;','','');
REPLACE INTO `item_db` VALUES ('5309','Mahican','Wool Mask','5','20','10','200','0','0','1','0','0','4294967295','63','2','769','0','0',NULL,'1','331','0','skill RG_GRAFFITI,1;','','');
@@ -2453,19 +2453,19 @@ REPLACE INTO `item_db` VALUES ('5315','Observer','Observer','5','20','10','100',
REPLACE INTO `item_db` VALUES ('5316','Umbrella_Hat','Umbrella Hat','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','338','0','bonus2 bSubEle,Ele_Water,3;','','');
REPLACE INTO `item_db` VALUES ('5317','Fisherman_Hat','Fisherman\'s Hat','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','339','0','bonus3 bAutoSpell,WZ_WATERBALL,3,50;','','');
REPLACE INTO `item_db` VALUES ('5318','Poring_Party_Hat','Poring Party Hat','5','20','10','0','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','340','0','bonus bAllStats,3;','','');
-REPLACE INTO `item_db` VALUES ('5319','Hellomother_Hat','Hello Mother Hat','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','10',NULL,'1','341','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db` VALUES ('5320','Champion_Wreath','Champion Wreath','5','20','10','500','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','261','0','bonus bAllStats,2; bonus4 bAutoSpellWhenHit,AL_HEAL,1,50,0;','','');
+REPLACE INTO `item_db` VALUES ('5319','Hellomother_Hat','Hello Mother Hat','5','20','10','200','0','0','2','0','0','2147483646','63','2','256','0','10',NULL,'1','341','0','bonus bLuk,3;','','');
+REPLACE INTO `item_db` VALUES ('5320','Champion_Wreath','Champion Wreath','5','20','10','500','0','0','4','0','0','2147483646','63','2','256','0','0',NULL,'1','261','0','bonus bAllStats,2; bonus4 bAutoSpellWhenHit,AL_HEAL,1,50,0;','','');
REPLACE INTO `item_db` VALUES ('5321','Indonesian_Bandana','Bandana Merah Putih','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','342','0','','','');
REPLACE INTO `item_db` VALUES ('5322','Scarf','Kerchief','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','24',NULL,'1','343','0','bonus bMdef,2; bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('5323','Misstrance_Crown','Misstrance Crown','5','20','10','0','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','165','0','bonus bAllStats,2;','','');
REPLACE INTO `item_db` VALUES ('5324','Little_Angel_Doll','Little Angel Doll','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','10',NULL,'1','344','0','bonus bDex,3; bonus4 bAutoSpellWhenHit,CR_GRANDCROSS,3,30,0;','','');
REPLACE INTO `item_db` VALUES ('5325','Robo_Eye','Robo Eye','5','20','10','200','0','0','2','0','0','4294967295','63','2','512','0','10',NULL,'0','345','0','bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bDex,1;','','');
REPLACE INTO `item_db` VALUES ('5326','Masquerade_C','Masquerade C','5','1','0','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,7;','','');
-REPLACE INTO `item_db` VALUES ('5327','Orc_Hero_Helm_C','Refined Helmet of Orc Hero','5','1','0','0','0','0','10','0','0','2147483647','63','2','768','0','0',NULL,'0','178','0','bonus bStr,5; bonus bVit,3;','','');
+REPLACE INTO `item_db` VALUES ('5327','Orc_Hero_Helm_C','Refined Helmet of Orc Hero','5','1','0','0','0','0','10','0','0','2147483646','63','2','768','0','0',NULL,'0','178','0','bonus bStr,5; bonus bVit,3;','','');
REPLACE INTO `item_db` VALUES ('5328','Evil_Wing_Ears_C','Evil Wing Ears C','5','1','0','0','0','0','2','0','0','4294967295','63','2','512','0','0',NULL,'0','152','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5329','Dark_Blindfold_C','Dark Blindfold C','5','1','0','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,500;','','');
-REPLACE INTO `item_db` VALUES ('5330','kRO_Drooping_Kitty_C','kRO Drooping Kitty C','5','1','0','0','0','0','6','0','0','2147483647','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,4000; bonus2 bResEff,Eff_Curse,1000;','','');
-REPLACE INTO `item_db` VALUES ('5331','Corsair_C','Corsair C','5','1','0','0','0','0','10','0','0','2147483647','63','2','256','0','0',NULL,'0','105','0','bonus bVit,3; bonus bInt,3;','','');
+REPLACE INTO `item_db` VALUES ('5330','kRO_Drooping_Kitty_C','kRO Drooping Kitty C','5','1','0','0','0','0','6','0','0','2147483646','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,4000; bonus2 bResEff,Eff_Curse,1000;','','');
+REPLACE INTO `item_db` VALUES ('5331','Corsair_C','Corsair C','5','1','0','0','0','0','10','0','0','2147483646','63','2','256','0','0',NULL,'0','105','0','bonus bVit,3; bonus bInt,3;','','');
REPLACE INTO `item_db` VALUES ('5332','Loki_Mask','Loki Mask','5','0','0','200','0','0','0','0','0','4294967295','63','2','513','0','20',NULL,'0','346','0','bonus bFlee2,3;','','');
REPLACE INTO `item_db` VALUES ('5333','Radio_Antenna','Radio Antenna','5','0','0','1500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','347','0','bonus bMdef,5; bonus bCritical,5; bonus bFlee,5; skill MG_LIGHTNINGBOLT,1; bonus4 bAutoSpellWhenHit,MG_THUNDERSTORM,5,30,1;','','');
REPLACE INTO `item_db` VALUES ('5334','Angeling_Wanna_Fly','Flapping Angeling','5','0','0','700','0','0','0','0','0','4294967295','63','2','256','0','38',NULL,'0','348','0','bonus bLuk,2; bonus bMdef,2;','','');
@@ -2481,12 +2481,12 @@ REPLACE INTO `item_db` VALUES ('5343','Tayelin_Doll_Hat','Telling Doll Hat','5',
REPLACE INTO `item_db` VALUES ('5344','Binit_Doll_Hat','Bennit Doll Hat','5','0','0','500','0','0','0','0','1','4294967295','63','2','256','0','60',NULL,'0','358','0','bonus2 bSubRace,RC_DemiHuman,5; bonus bVit,2; autobonus \"{ bonus bAspdRate,5; }\",20,30000,0,\"{ specialeffect2 EF_HASTEUP; }\";','','');
REPLACE INTO `item_db` VALUES ('5345','Debril_Doll_Hat','W Doll Hat','5','0','0','500','0','0','0','0','1','4294967295','63','2','256','0','60',NULL,'0','359','0','bonus2 bSubRace,RC_DemiHuman,5; bonus bLuk,2; bonus2 bAddRace,RC_Undead,5; bonus2 bMagicAddRace,RC_Undead,5; bonus2 bSubRace,RC_Undead,5;','','');
REPLACE INTO `item_db` VALUES ('5346','Gf_Recruiter_Hat','Gf Recruiter Hat','5','0','0','0','0','0','2','0','0','4294967295','63','2','256','0','10',NULL,'1','360','0','','','');
-REPLACE INTO `item_db` VALUES ('5347','Ph.D_Hat_','Ph.D Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','98','0','','','');
-REPLACE INTO `item_db` VALUES ('5348','Big_Sis\'_Ribbon_','Big Ribbon','5','15000','7500','200','0','0','2','0','1','2147483647','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db` VALUES ('5349','Boy\'s_Cap_','Boy\'s Cap','5','20','10','100','0','0','2','0','1','2147483647','63','2','256','0','0',NULL,'1','102','0','','','');
-REPLACE INTO `item_db` VALUES ('5350','Pirate_Bandana_','Pirate Bandana','5','20','10','100','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
+REPLACE INTO `item_db` VALUES ('5347','Ph.D_Hat_','Ph.D Hat','5','20','10','200','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','98','0','','','');
+REPLACE INTO `item_db` VALUES ('5348','Big_Sis\'_Ribbon_','Big Ribbon','5','15000','7500','200','0','0','2','0','1','2147483646','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db` VALUES ('5349','Boy\'s_Cap_','Boy\'s Cap','5','20','10','100','0','0','2','0','1','2147483646','63','2','256','0','0',NULL,'1','102','0','','','');
+REPLACE INTO `item_db` VALUES ('5350','Pirate_Bandana_','Pirate Bandana','5','20','10','100','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
REPLACE INTO `item_db` VALUES ('5351','Sunflower_','Sunflower','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'0','37','0','bonus2 bSubRace,RC_Insect,10;','','');
-REPLACE INTO `item_db` VALUES ('5352','Poporing_Cap','Poporing Cap','5','20','10','700','0','0','2','0','0','2147483647','63','2','256','0','38',NULL,'1','361','0','','','');
+REPLACE INTO `item_db` VALUES ('5352','Poporing_Cap','Poporing Cap','5','20','10','700','0','0','2','0','0','2147483646','63','2','256','0','38',NULL,'1','361','0','','','');
REPLACE INTO `item_db` VALUES ('5353','Helm_Of_Sun_','Hat of the Sun God','5','20','10','2400','0','0','4','0','1','13623168','63','2','768','0','0',NULL,'1','138','0','bonus bStr,3; bonus bInt,2;','','');
REPLACE INTO `item_db` VALUES ('5354','Muslim_Hat_M','Muslim Hat M','5','0','0','100','0','0','2','0','0','4294967295','63','1','256','0','0',NULL,'0','362','0','bonus bCastrate,-5;','','');
REPLACE INTO `item_db` VALUES ('5355','Muslim_Hat_F','Selendang','5','0','0','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','363','0','bonus bCastrate,-5;','','');
@@ -2517,7 +2517,7 @@ REPLACE INTO `item_db` VALUES ('5379','Balloon_Hat','Tam','5','0','0','800','0',
REPLACE INTO `item_db` VALUES ('5380','Fish_Head_Hat','Fish Head Hat','5','20','10','400','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','386','0','bonus3 bAutoSpell,SA_FROSTWEAPON,1,5;','','');
REPLACE INTO `item_db` VALUES ('5381','Santa_Poring_Hat','Santa Poring Hat','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'0','387','0','bonus bMdef,2; bonus2 bAddEle,Ele_Dark,3; bonus2 bSubEle,Ele_Dark,3;','','');
REPLACE INTO `item_db` VALUES ('5382','Bell_Ribbon','Bell Ribbon','5','20','10','200','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','388','0','bonus bVit,1; skill AL_ANGELUS,1;','','sc_end SC_ANGELUS;');
-REPLACE INTO `item_db` VALUES ('5383','Hunting_Cap','Hunter\'s Cap','5','20','10','250','0','0','3','0','1','2147483647','63','2','256','0','50',NULL,'1','389','0','bonus bLuk,1; bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('5383','Hunting_Cap','Hunter\'s Cap','5','20','10','250','0','0','3','0','1','2147483646','63','2','256','0','50',NULL,'1','389','0','bonus bLuk,1; bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db` VALUES ('5384','Santa_Hat_1','Twin Pompom By JB','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','20',NULL,'1','390','0','bonus bLuk,3; skill WZ_ESTIMATION,1; bonus3 bAutoSpell,AL_INCAGI,1,500;','','');
REPLACE INTO `item_db` VALUES ('5385','Yoyo_Hat','Yoyo Hat','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','20',NULL,'1','391','0','skill TF_HIDING, 1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db` VALUES ('5386','Ayam_','Ayam','5','0','0','70','0','0','7','0','0','4294967295','63','2','256','0','1',NULL,'0','228','0','bonus bMdef,7; bonus bFlee,7; bonus2 bAddMonsterDropItem,12198,200;','','');
@@ -2550,12 +2550,12 @@ REPLACE INTO `item_db` VALUES ('5412','Sweet_Candy','Sweet Candy','5','20','10',
REPLACE INTO `item_db` VALUES ('5413','Popcorn_Hat','Pop Corn Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','415','0','bonus2 bSubEle,Ele_Wind, 10;','','');
REPLACE INTO `item_db` VALUES ('5414','Campfire_Hat','Camp Fire Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','416','0','bonus2 bSubEle,Ele_Fire, 10; bonus4 bAutoSpellWhenHit, MG_FIREBALL, 5, 100, 1;','','');
REPLACE INTO `item_db` VALUES ('5415','Poring_Cake_Cap','Poring Cake Hat','5','20','10','1000','0','0','5','0','0','4294967295','63','2','256','0','40',NULL,'1','417','0','bonus bMdef,5; bonus bCritical,5; bonus bFlee,5; bonus bFlee2,5; bonus bAspdRate,5; bonus bCastrate,-5; bonus bDelayrate,-5;','','');
-REPLACE INTO `item_db` VALUES ('5416','Beer_Cap','Beer Hat','5','20','10','600','0','0','2','0','0','2147483647','63','2','256','0','18',NULL,'1','418','0','bonus bFlee2,5; skill SM_RECOVERY,3; skill MG_SRECOVERY,3;','','');
+REPLACE INTO `item_db` VALUES ('5416','Beer_Cap','Beer Hat','5','20','10','600','0','0','2','0','0','2147483646','63','2','256','0','18',NULL,'1','418','0','bonus bFlee2,5; skill SM_RECOVERY,3; skill MG_SRECOVERY,3;','','');
REPLACE INTO `item_db` VALUES ('5417','Crown_Parrot','Crown Parrots','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'0','419','0','bonus bInt,1; bonus2 bResEff,Eff_Silence,10000; bonus3 bAutoSpell,DC_SCREAM,1,50;','','');
REPLACE INTO `item_db` VALUES ('5418','Soldier_Hat','Legionnaire Hat','5','20','10','400','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'1','420','0','bonus bStr,1; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bUseSPrate,10;','','');
REPLACE INTO `item_db` VALUES ('5419','Evolved_Leaf','Leaves Of Grass','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','57','0','bonus bVit,1; bonus2 bSubRace,RC_Plant,5;','','');
-REPLACE INTO `item_db` VALUES ('5420','Mask_Of_Ifrit','Mask Of Ifrit','5','0','0','0','0','0','8','0','0','2147483647','63','2','769','0','70',NULL,'0','421','0','bonus bStr,1; bonus bInt,1; bonus bMdef,5; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,-10; skill MG_SIGHT,1; bonus3 bAutoSpellWhenHit,WZ_METEOR,3,50; bonus3 bAutoSpell,MG_FIREBOLT,3,50;','','sc_end SC_SIGHT;');
-REPLACE INTO `item_db` VALUES ('5421','Ifrit\'s_Ear','Ears Of Ifrit','5','20','10','0','0','0','0','0','0','2147483647','63','2','512','0','70',NULL,'0','422','0','bonus bStr,1; bonus bMdef,3; bonus2 bSkillAtk,MG_FIREBOLT,2; bonus2 bSkillAtk,WZ_FIREPILLAR,2; bonus2 bSkillAtk,WZ_METEOR,2; bonus2 bSkillAtk,SM_BASH,2; bonus2 bSkillAtk,SM_MAGNUM,2; bonus2 bSkillAtk,KN_PIERCE,2; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,-5;','','');
+REPLACE INTO `item_db` VALUES ('5420','Mask_Of_Ifrit','Mask Of Ifrit','5','0','0','0','0','0','8','0','0','2147483646','63','2','769','0','70',NULL,'0','421','0','bonus bStr,1; bonus bInt,1; bonus bMdef,5; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,-10; skill MG_SIGHT,1; bonus3 bAutoSpellWhenHit,WZ_METEOR,3,50; bonus3 bAutoSpell,MG_FIREBOLT,3,50;','','sc_end SC_SIGHT;');
+REPLACE INTO `item_db` VALUES ('5421','Ifrit\'s_Ear','Ears Of Ifrit','5','20','10','0','0','0','0','0','0','2147483646','63','2','512','0','70',NULL,'0','422','0','bonus bStr,1; bonus bMdef,3; bonus2 bSkillAtk,MG_FIREBOLT,2; bonus2 bSkillAtk,WZ_FIREPILLAR,2; bonus2 bSkillAtk,WZ_METEOR,2; bonus2 bSkillAtk,SM_BASH,2; bonus2 bSkillAtk,SM_MAGNUM,2; bonus2 bSkillAtk,KN_PIERCE,2; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,-5;','','');
REPLACE INTO `item_db` VALUES ('5422','Linguistic_Book_Cap','Linguistic Book Hat','5','20','10','70','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','423','0','bonus bInt,1; bonus bMdef,2;','','');
REPLACE INTO `item_db` VALUES ('5423','Lovecap_China','I Love China','5','20','10','250','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'0','424','0','bonus bDex,3; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db` VALUES ('5424','Fanta_Orange_Can','Fanta Orange Can Hat','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','425','0','','','');
@@ -2571,10 +2571,10 @@ REPLACE INTO `item_db` VALUES ('5433','Golden_Wreath','Golden Laurel','5','20','
REPLACE INTO `item_db` VALUES ('5435','Coke_Hat','Red Minstrel Hat','5','20','10','100','0','0','1','0','1','4294967295','63','2','256','0','40',NULL,'1','436','0','bonus bInt,1; bonus bMaxSP,80; bonus bMdef,3; if(getrefine()>5) { bonus bMdef,getrefine()-5; bonus bMaxSP,(getrefine()-5)*10; }','','');
REPLACE INTO `item_db` VALUES ('5436','Bride\'s_Corolla','Bride\'s Corolla','5','20','10','200','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','437','0','bonus bLuk,3; bonus bMdef,2;','','');
REPLACE INTO `item_db` VALUES ('5437','Flower_Of_Fairy','Fairy Flower','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'1','438','0','bonus bInt,1; bonus bMdef,1; bonus2 bSubRace,RC_Insect,5;','','');
-REPLACE INTO `item_db` VALUES ('5438','Fillet_Green','Cute Green Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','439','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db` VALUES ('5439','Fillet_Red','Cute Red Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','440','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db` VALUES ('5440','Fillet_Blue','Cute Blue Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','441','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db` VALUES ('5441','Fillet_White','Cute White Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','442','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('5438','Fillet_Green','Cute Green Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','439','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('5439','Fillet_Red','Cute Red Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','440','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('5440','Fillet_Blue','Cute Blue Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','441','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db` VALUES ('5441','Fillet_White','Cute White Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','442','0','bonus bMaxSP,20;','','');
REPLACE INTO `item_db` VALUES ('5442','Necktie','Necktie','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','70',NULL,'1','443','0','bonus bVit,1; bonus bHit,-5; bonus bUseSPrate,5;','','');
REPLACE INTO `item_db` VALUES ('5443','Status_Of_Baby_Angel','Statue Of Baby Angel','5','20','10','600','0','0','3','0','1','4294967295','63','2','256','0','70',NULL,'1','444','0','bonus bMdef,2; bonus4 bAutoSpellWhenHit,PR_STRECOVERY,1,20,0;','','');
REPLACE INTO `item_db` VALUES ('5444','Hair_Brush','Hair Brush','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','445','0','bonus bCritical,6;','','');
@@ -2583,7 +2583,7 @@ REPLACE INTO `item_db` VALUES ('5446','Cat_Foot_Hairpin','Catfoot Hairpin','5','
REPLACE INTO `item_db` VALUES ('5447','Frog_Cap','Frog Hat','5','20','10','500','0','0','3','0','0','4294967295','63','2','256','0','70',NULL,'1','448','0','bonus bMdef,1; bonus2 bAddRace,RC_Insect,12; bonus2 bMagicAddRace,RC_Insect,12;','','');
REPLACE INTO `item_db` VALUES ('5448','Solo_Play_Box1','Soloplay Box1','5','0','0','300','0','0','0','0','1','4294967295','63','2','769','0','0',NULL,'1','449','0','','','');
REPLACE INTO `item_db` VALUES ('5449','Solo_Play_Box2','Soloplay Box2','5','0','0','300','0','0','0','0','1','4294967295','63','2','769','0','0',NULL,'1','450','0','','','');
-REPLACE INTO `item_db` VALUES ('5450','Sun_Cap','Solar Hat','5','20','10','1000','0','0','0','0','0','2147483647','63','2','256','0','20',NULL,'1','451','0','','','');
+REPLACE INTO `item_db` VALUES ('5450','Sun_Cap','Solar Hat','5','20','10','1000','0','0','0','0','0','2147483646','63','2','256','0','20',NULL,'1','451','0','','','');
REPLACE INTO `item_db` VALUES ('5451','Dragonhelm_Gold','RWC 2008 Dragon Helm Gold','5','20','10','2500','0','0','7','0','1','4294967295','63','2','256','0','1',NULL,'0','452','0','bonus bAspdRate,10; bonus bAllStats,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db` VALUES ('5452','Dragonhelm_Silver','RWC 2008 Dragon Helm Silver','5','20','10','2500','0','0','5','0','1','4294967295','63','2','256','0','1',NULL,'0','453','0','bonus bAspdRate,7; bonus bAllStats,2; bonus2 bAddRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db` VALUES ('5453','Dragonhelm_Copper','RWC 2008 Dragon Helm Copper','5','20','10','2500','0','0','0','0','1','4294967295','63','2','256','0','1',NULL,'0','454','0','bonus bAspdRate,5; bonus bAllStats,2; bonus2 bAddRace,RC_DemiHuman,1;','','');
@@ -2614,13 +2614,13 @@ REPLACE INTO `item_db` VALUES ('5488','J_Twin_Santahat','Twin Santa Hat','5','20
REPLACE INTO `item_db` VALUES ('5489','Love_Daddy','Love Daddy Hat','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','484','0','bonus bDex,2;','','');
REPLACE INTO `item_db` VALUES ('5490','Anubis_Helm','Anubis Helm','5','20','10','0','0','0','3','0','0','4294967295','63','2','256','0','70',NULL,'0','485','0','bonus bMdef,5; bonus2 bSubRace,RC_Boss,10; bonus bHealPower2,10; bonus bAddItemHealRate,10;','','');
REPLACE INTO `item_db` VALUES ('5491','Hat_Of_Outlaw','Bandit Hat','5','20','10','800','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','486','0','bonus bStr,2; bonus2 bSubEle,Ele_Fire, 10;','','');
-REPLACE INTO `item_db` VALUES ('5492','Boy\'s_Cap_I','Student Cap','5','0','0','0','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'0','102','0','bonus bMdef,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db` VALUES ('5493','Ulle_Cap_I','Ulle\'s Cap','5','0','0','0','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'0','254','0','bonus bDex,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('5492','Boy\'s_Cap_I','Student Cap','5','0','0','0','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'0','102','0','bonus bMdef,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db` VALUES ('5493','Ulle_Cap_I','Ulle\'s Cap','5','0','0','0','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'0','254','0','bonus bDex,2; bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('5494','Spinx_Helm_I','Sphinx Hat','5','0','0','0','0','0','5','0','0','16514','63','2','257','0','0',NULL,'0','137','0','bonus bStr,5;','','');
REPLACE INTO `item_db` VALUES ('5495','Power_Of_Thor','Power Of Thor','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','75',NULL,'1','493','0','bonus bInt,1; bonus bDex,1; bonus bMdef,3; bonus bFlee,5;','','');
REPLACE INTO `item_db` VALUES ('5496','Dice_Hat','Dice Hat','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','50',NULL,'0','494','0','bonus bLuk,4;','','');
-REPLACE INTO `item_db` VALUES ('5497','King_Tiger_Doll_Hat','King Tiger Doll Hat','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','30',NULL,'1','495','0','bonus bStr,2;','','');
-REPLACE INTO `item_db` VALUES ('5498','Wondering_Wolf_Helm','Wandering Wolf Helm','5','20','10','600','0','0','5','0','0','2147483647','63','2','768','0','50',NULL,'0','490','0','bonus bVit,5; bonus bFlee,10;','','');
+REPLACE INTO `item_db` VALUES ('5497','King_Tiger_Doll_Hat','King Tiger Doll Hat','5','20','10','400','0','0','3','0','1','2147483646','63','2','256','0','30',NULL,'1','495','0','bonus bStr,2;','','');
+REPLACE INTO `item_db` VALUES ('5498','Wondering_Wolf_Helm','Wandering Wolf Helm','5','20','10','600','0','0','5','0','0','2147483646','63','2','768','0','50',NULL,'0','490','0','bonus bVit,5; bonus bFlee,10;','','');
REPLACE INTO `item_db` VALUES ('5499','Pizza_Hat','Pizza Hat','5','20','10','600','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','487','0','skill SM_PROVOKE, 1;','','');
REPLACE INTO `item_db` VALUES ('5500','Icecream_Hat','Icecream Hat','5','0','0','300','0','0','6','0','0','4294967295','63','2','256','0','30',NULL,'1','488','0','bonus bMdef,3; skill MG_FROSTDIVER, 3;','','');
REPLACE INTO `item_db` VALUES ('5501','Pirate\'s_Pride','Pirate\'s Pride','5','0','0','100','0','0','6','0','0','4294967295','63','2','256','0','10',NULL,'0','496','0','bonus2 bAddRace2, 6, 5; bonus2 bSubRace2, 6, 5;','','');
@@ -2650,7 +2650,7 @@ REPLACE INTO `item_db` VALUES ('5524','Sakura_Milk_Tea_Hat','Sakura Milk Tea Hat
REPLACE INTO `item_db` VALUES ('5525','First_Leaf_Tea_Hat','Flower Hat','5','20','10','100','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'1','519','0','bonus bMaxHP,80; bonus bMaxSP,20;','','');
REPLACE INTO `item_db` VALUES ('5526','Lady_Tanee_Doll','Tanigumi Girl Doll','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','60',NULL,'0','520','0','bonus bAgi,2; bonus bFlee,3; bonus2 bSubEle,Ele_Wind, 5; bonus2 bAddMonsterDropItem, 513, 200;','','');
REPLACE INTO `item_db` VALUES ('5527','Lunatic_Hat','Lunatic Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','1',NULL,'1','521','0','bonus bLuk,5; bonus bMdef,2; bonus bFlee2,5; bonus2 bAddMonsterDropItem,622,50;','','');
-REPLACE INTO `item_db` VALUES ('5528','King_Frog_Hat','Frog King Hat','5','20','10','500','0','0','4','0','1','2147483647','63','2','256','0','30',NULL,'0','522','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db` VALUES ('5528','King_Frog_Hat','Frog King Hat','5','20','10','500','0','0','4','0','1','2147483646','63','2','256','0','30',NULL,'0','522','0','bonus bAgi,1;','','');
REPLACE INTO `item_db` VALUES ('5529','Evil\'s_Bone_Hat','Satanic Bone Helm','5','20','10','600','0','0','6','0','1','4294967295','63','2','768','0','70',NULL,'1','523','0','bonus bDex,3; bonus2 bSubEle,Ele_Neutral,5; skill WZ_FROSTNOVA,1;','','');
REPLACE INTO `item_db` VALUES ('5530','Raven_Cap','Raven Cap','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','524','0','','','');
REPLACE INTO `item_db` VALUES ('5532','Pirate_Dagger_J','Pirate Dagger','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'1','327','0','bonus bShortWeaponDamageReturn,1;','','');
@@ -2676,7 +2676,7 @@ REPLACE INTO `item_db` VALUES ('5553','Fest_Bunny_Band','Festival Bunny Band','5
REPLACE INTO `item_db` VALUES ('5554','Octopus_Hat','Octopus Hat','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','20',NULL,'1','538','0','bonus3 bAutoSpell,SM_PROVOKE,5,10; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db` VALUES ('5555','Leaf_Cat_Hat','Leaf Cat Hat','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','539','0','bonus bAgi,1; bonus3 bAutoSpellWhenHit,AL_HEAL,3,10;','','');
REPLACE INTO `item_db` VALUES ('5556','Fur_Seal_Hat','Seal Hat','5','20','10','500','0','0','3','0','0','4294967295','63','2','769','0','55',NULL,'1','540','0','bonus bInt,1; bonus3 bAutoSpell,WZ_FROSTNOVA,1,30;','','');
-REPLACE INTO `item_db` VALUES ('5557','Wild_Rose_Hat','Wild Rose Hat','5','20','10','500','0','0','6','0','1','2147483647','63','2','256','0','20',NULL,'1','541','0','bonus bAgi,3;','','');
+REPLACE INTO `item_db` VALUES ('5557','Wild_Rose_Hat','Wild Rose Hat','5','20','10','500','0','0','6','0','1','2147483646','63','2','256','0','20',NULL,'1','541','0','bonus bAgi,3;','','');
REPLACE INTO `item_db` VALUES ('5558','Saci_Hat','Luxury Hat','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','542','0','bonus3 bAddMonsterDropItem,510,RC_Plant,500;','','');
REPLACE INTO `item_db` VALUES ('5559','Piece_Of_White_Cloth_E','Piece Of White Cloth','5','0','0','0','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','543','0','','','');
REPLACE INTO `item_db` VALUES ('5560','Bullock_Helm_J','Bullock Helm','5','20','10','3000','0','0','3','0','0','4294967295','63','2','256','0','75',NULL,'1','322','0','bonus bMaxHP,100; bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
@@ -2760,10 +2760,10 @@ REPLACE INTO `item_db` VALUES ('5803','Flower_Love_Hat','Love Flower Hat','5','2
REPLACE INTO `item_db` VALUES ('5804','Pirate_Eyepatch','Pirate Eye Bandage','5','1000','500','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','13','0','','','');
REPLACE INTO `item_db` VALUES ('5805','Victorious_Coronet','Victorious Coronet','5','0','0','150','0','0','1','0','0','4294967295','63','2','256','0','70',NULL,'0','43','0','bonus bMaxHPrate,15; bonus bSPrecovRate,5;','','');
REPLACE INTO `item_db` VALUES ('5806','Poem_Natalia_Hat','Poet Natalie\'s Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'0','67','0','','','');
-REPLACE INTO `item_db` VALUES ('5807','October_Fest_Cap','October Fest Cap','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','50',NULL,'1','104','0','','','');
+REPLACE INTO `item_db` VALUES ('5807','October_Fest_Cap','October Fest Cap','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','50',NULL,'1','104','0','','','');
REPLACE INTO `item_db` VALUES ('5808','Diabolus_Helmet','Dark Bacilium','5','20','10','250','0','0','5','0','1','1040256','2','2','769','0','0',NULL,'1','364','0','bonus2 bResEff,Eff_Stone,2000+(getrefine()*200); bonus2 bResEff,Eff_Freeze,2000+(getrefine()*200); bonus2 bResEff,Eff_Stun,2000+(getrefine()*200);','','');
REPLACE INTO `item_db` VALUES ('5809','Boom_Boom_Hat','Boom Boom Hat','5','0','0','100','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'0','216','0','bonus bAllStats,5;','','');
-REPLACE INTO `item_db` VALUES ('5810','Ph.D_Hat_V','Ph.D Hat V','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','98','0','bonus bInt,5; bonus bVit,3; bonus bDex,3;','','');
+REPLACE INTO `item_db` VALUES ('5810','Ph.D_Hat_V','Ph.D Hat V','5','20','10','100','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','98','0','bonus bInt,5; bonus bVit,3; bonus bDex,3;','','');
REPLACE INTO `item_db` VALUES ('5811','Santa_Beard','Santa\'s Beard','5','20','10','100','0','0','5','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','','','');
REPLACE INTO `item_db` VALUES ('5812','Hat_Of_Expert','Hat Of Expert','5','0','0','0','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
REPLACE INTO `item_db` VALUES ('5815','Cowboy_Hat_J','Purple Cowboy Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','475','0','bonus bStr,1; bonus2 bSubSize, 0, 5; bonus2 bSubSize, 1, 5; bonus2 bSubSize, 2, 5;','','');
@@ -5044,9 +5044,9 @@ REPLACE INTO `item_db` VALUES ('12996','Blue_Herb_Box','Blue Herb Box','18','20'
REPLACE INTO `item_db` VALUES ('12997','Elunium_Box','Elunium Box','18','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem 985,5;','','');
REPLACE INTO `item_db` VALUES ('12998','Oridecon_Box','Oridecon Box','18','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem 984,5;','','');
REPLACE INTO `item_db` VALUES ('12999','Branch_Of_Dead_Tree_Box','Dead Branch Box','18','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getitem 604,3;','','');
-REPLACE INTO `item_db` VALUES ('13000','Jujube_Dagger','Jujube Dagger','4','10000','5000','600','39','0','0','1','0','2147483647','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Wind;','','');
-REPLACE INTO `item_db` VALUES ('13001','Dragon_Killer','Dragon Killer','4','20','10','900','110','0','0','1','0','2147483647','63','2','2','4','60',NULL,'1','1','0','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;','','');
-REPLACE INTO `item_db` VALUES ('13002','Ginnungagap','Ginnungagap','4','20','10','700','148','0','0','1','0','2147483647','63','2','2','4','70',NULL,'1','1','0','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;','','');
+REPLACE INTO `item_db` VALUES ('13000','Jujube_Dagger','Jujube Dagger','4','10000','5000','600','39','0','0','1','0','2124381935','63','2','2','1','1',NULL,'1','1','0','bonus bAtkEle,Ele_Wind;','','');
+REPLACE INTO `item_db` VALUES ('13001','Dragon_Killer','Dragon Killer','4','20','10','900','110','0','0','1','0','2124381935','63','2','2','4','60',NULL,'1','1','0','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;','','');
+REPLACE INTO `item_db` VALUES ('13002','Ginnungagap','Ginnungagap','4','20','10','700','148','0','0','1','0','2124381935','63','2','2','4','70',NULL,'1','1','0','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;','','');
REPLACE INTO `item_db` VALUES ('13003','Coward','Cowardice Blade','4','52000','26000','700','80','0','0','1','1','33689664','63','2','2','3','55',NULL,'1','1','0','bonus bDef,5;','','');
REPLACE INTO `item_db` VALUES ('13004','Coward_','Cowardice Blade','4','52000','26000','700','80','0','0','1','2','33689664','63','2','2','3','55',NULL,'1','1','0','bonus bDef,5;','','');
REPLACE INTO `item_db` VALUES ('13005','Angelwing_Short_Sword','Angelic Wing Dagger','4','20','10','600','120','0','0','1','2','1','63','2','2','4','50',NULL,'1','1','0','','','');
@@ -5063,7 +5063,7 @@ REPLACE INTO `item_db` VALUES ('13015','Hakujin_','Hakujin','4','20','10','800',
REPLACE INTO `item_db` VALUES ('13016','Poison_Knife_','Poison Knife','4','20','10','800','64','0','0','1','2','42950382','63','2','2','3','65',NULL,'1','1','0','bonus bAtkEle,Ele_Poison; bonus2 bAddEff,Eff_Poison,3000;','','');
REPLACE INTO `item_db` VALUES ('13017','House_Auger_','Ice Pick','4','20','10','600','70','0','0','1','1','42950382','63','2','2','4','36',NULL,'1','1','0','bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss;','','');
REPLACE INTO `item_db` VALUES ('13018','Sucsamad_','Sucsamad','4','20','10','800','140','0','0','1','1','42950382','63','2','2','4','36',NULL,'1','1','0','bonus2 bAddEle,Ele_Earth,10; bonus2 bAddEle,Ele_Wind,10; bonus bUnbreakableWeapon,0;','','');
-REPLACE INTO `item_db` VALUES ('13019','Ginnungagap_','Ginnungagap','4','20','10','700','148','0','0','1','1','2147483647','63','2','2','4','70',NULL,'1','1','0','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;','','');
+REPLACE INTO `item_db` VALUES ('13019','Ginnungagap_','Ginnungagap','4','20','10','700','148','0','0','1','1','2124381935','63','2','2','4','70',NULL,'1','1','0','bonus bAtkEle,Ele_Dark; bonus2 bAddEff,Eff_Blind,500; bonus2 bAddEff2,Eff_Blind,50;','','');
REPLACE INTO `item_db` VALUES ('13020','Warrior_Balmung_','Warrior\'s Balmung','4','20','10','1000','170','0','0','1','0','4294967295','63','2','2','4','48',NULL,'1','1','0','bonus bAllStats,5;','','');
REPLACE INTO `item_db` VALUES ('13021','Combat_Knife_C','Combat Knife','4','1','0','0','129','0','0','1','0','42950382','63','2','2','4','1',NULL,'0','1','0','bonus bIgnoreDefRace,RC_DemiHuman; bonus2 bSubRace,RC_DemiHuman,10; bonus2 bSubRace,RC_Demon,-10; bonus bMaxSPrate,10; bonus bSPDrainValue,3;','','');
REPLACE INTO `item_db` VALUES ('13022','Counter_Dagger_C','Dagger of Counter','4','1','0','0','209','0','0','1','0','8454660','63','2','2','4','1',NULL,'0','1','0','bonus bCritical,90;','','');
@@ -5074,19 +5074,19 @@ REPLACE INTO `item_db` VALUES ('13026','Moonlight_Sword_C','Moonlight Dagger','4
REPLACE INTO `item_db` VALUES ('13027','Scalpel','Scalpel','4','20','10','500','120','0','0','1','3','42950382','2','2','2','4','55',NULL,'1','1','0','bonus2 bAddEff,Eff_Bleeding,500;','','');
REPLACE INTO `item_db` VALUES ('13028','Tooth_Blade','Tooth Blade','4','20','10','700','130','0','0','1','1','42950382','2','2','2','4','55',NULL,'1','1','0','if(getrefine()>=9) { bonus3 bAutoSpell,NPC_SLOWCAST,2,70; } else bonus3 bAutoSpell,NPC_SLOWCAST,1,50;','','');
REPLACE INTO `item_db` VALUES ('13029','Prinsence_Knife','Prinsense Knife','4','20','10','0','120','0','0','1','0','42950382','63','2','2','1','0',NULL,'0','1','0','bonus2 bAddRace,RC_Boss,50; bonus2 bAddRace,RC_NonBoss,50;','','');
-REPLACE INTO `item_db` VALUES ('13030','Dragon_Killer_','Dragon Killer','4','20','10','900','110','0','0','1','2','2147483647','63','2','2','4','60',NULL,'1','1','0','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;','','');
+REPLACE INTO `item_db` VALUES ('13030','Dragon_Killer_','Dragon Killer','4','20','10','900','110','0','0','1','2','2124381935','63','2','2','4','60',NULL,'1','1','0','bonus bIgnoreDefRace,RC_Dragon; bonus2 bExpAddRace,RC_Dragon,10;','','');
REPLACE INTO `item_db` VALUES ('13031','Sword_Breaker_','Swordbreaker','4','20','10','1000','70','0','0','1','3','42950382','63','2','2','4','36',NULL,'1','1','0','bonus bBreakWeaponRate,500;','','');
REPLACE INTO `item_db` VALUES ('13032','Mail_Breaker_','Mailbreaker','4','20','10','1000','70','0','0','1','3','42950382','63','2','2','4','36',NULL,'1','1','0','bonus bBreakArmorRate,500;','','');
REPLACE INTO `item_db` VALUES ('13033','Assasin_Dagger_','Assassin Dagger','4','20','10','600','140','0','0','1','1','4096','63','2','2','4','36',NULL,'1','1','0','bonus bMaxHPrate,20; bonus bMaxSPrate,15; bonus bAspdRate,2; bonus bAtkEle,Ele_Dark;','','');
REPLACE INTO `item_db` VALUES ('13034','Twilight_Desert','Desert Twilight','4','20','10','600','130','0','0','1','2','4096','2','2','2','2','70',NULL,'1','1','0','','','');
REPLACE INTO `item_db` VALUES ('13035','Sandstorm','Sandstorm','4','20','10','600','50','0','0','1','4','4096','2','2','2','2','70',NULL,'1','1','0','','','');
-REPLACE INTO `item_db` VALUES ('13036','BF_Dagger1','Brave Assassin\'s Damascus','4','20','10','0','120','0','0','1','0','2147483647','63','2','2','3','80',NULL,'1','1','0','bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(Class==Job_Ninja||Class==Job_Rogue||Class==Job_Stalker) bonus bMatkRate,15;','','');
-REPLACE INTO `item_db` VALUES ('13037','BF_Dagger2','Valorous Assassin\'s Damascus','4','20','10','0','120','0','0','1','0','2147483647','63','2','2','3','80',NULL,'1','1','0','bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; autobonus \"{ bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss; }\",10,6000,BF_WEAPON,\"{ specialeffect2 EF_HASTEUP; }\"; if(Class==Job_Ninja||Class==Job_Rogue||Class==Job_Stalker) bonus bMatkRate,15;','','');
+REPLACE INTO `item_db` VALUES ('13036','BF_Dagger1','Brave Assassin\'s Damascus','4','20','10','0','120','0','0','1','0','2124381935','63','2','2','3','80',NULL,'1','1','0','bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus bUnbreakableWeapon,0; if(Class==Job_Ninja||Class==Job_Rogue||Class==Job_Stalker) bonus bMatkRate,15;','','');
+REPLACE INTO `item_db` VALUES ('13037','BF_Dagger2','Valorous Assassin\'s Damascus','4','20','10','0','120','0','0','1','0','2124381935','63','2','2','3','80',NULL,'1','1','0','bonus bStr,1; bonus bAgi,1; bonus2 bAddRace,RC_DemiHuman,75; bonus bUnbreakableWeapon,0; autobonus \"{ bonus bDefRatioAtkRace,RC_Boss; bonus bDefRatioAtkRace,RC_NonBoss; }\",10,6000,BF_WEAPON,\"{ specialeffect2 EF_HASTEUP; }\"; if(Class==Job_Ninja||Class==Job_Rogue||Class==Job_Stalker) bonus bMatkRate,15;','','');
REPLACE INTO `item_db` VALUES ('13038','Dagger_Of_Hunter','Dagger of Hunter','4','20','10','700','120','0','0','1','3','131072','2','2','2','3','70',NULL,'1','1','0','bonus bStr,1; bonus bAgi,2; bonus bDex,1; bonus4 bAutoSpellOnSkill,RG_BACKSTAP,SM_BASH,10,100; bonus2 bSkillAtk,RG_BACKSTAP,20;','','');
REPLACE INTO `item_db` VALUES ('13039','Ivory_Knife','Ivory Knife','4','20','10','700','130','0','0','1','2','42950382','2','2','2','3','50',NULL,'1','1','0','bonus bAgi,2; bonus bAspdRate,3; bonus2 bAddEff,Eff_Bleeding,300; bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30;','','');
-REPLACE INTO `item_db` VALUES ('13040','N_Cutter','Novice Cutter','4','0','0','0','50','0','0','1','3','2147483647','63','2','2','1','1',NULL,'0','1','0','','','');
-REPLACE INTO `item_db` VALUES ('13041','N_Main_Gauche','Novice Main Gauche','4','0','0','0','63','0','0','1','3','2147483647','63','2','2','1','1',NULL,'0','1','0','','','');
-REPLACE INTO `item_db` VALUES ('13042','Krieger_Dagger1','Glorious Gladius','4','20','10','0','120','0','0','1','0','2147483647','63','2','2','4','80',NULL,'1','1','0','bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus3 bAutoSpell,PR_LEXDIVINA,1,20; bonus bUnbreakableWeapon,0; if(getrefine()>5) { bonus2 bAddRace,RC_DemiHuman,(getrefine()-4)*(getrefine()-4); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>8) bonus4 bAutoSpellOnSkill,RG_RAID,NPC_WIDEBLEEDING,1,250;','','');
+REPLACE INTO `item_db` VALUES ('13040','N_Cutter','Novice Cutter','4','0','0','0','50','0','0','1','3','2124381935','63','2','2','1','1',NULL,'0','1','0','','','');
+REPLACE INTO `item_db` VALUES ('13041','N_Main_Gauche','Novice Main Gauche','4','0','0','0','63','0','0','1','3','2124381935','63','2','2','1','1',NULL,'0','1','0','','','');
+REPLACE INTO `item_db` VALUES ('13042','Krieger_Dagger1','Glorious Gladius','4','20','10','0','120','0','0','1','0','2124381935','63','2','2','4','80',NULL,'1','1','0','bonus2 bAddRace,RC_DemiHuman,75; bonus2 bIgnoreDefRate,RC_DemiHuman,20; bonus3 bAutoSpell,PR_LEXDIVINA,1,20; bonus bUnbreakableWeapon,0; if(getrefine()>5) { bonus2 bAddRace,RC_DemiHuman,(getrefine()-4)*(getrefine()-4); bonus2 bIgnoreDefRate,RC_DemiHuman,5; } if(getrefine()>8) bonus4 bAutoSpellOnSkill,RG_RAID,NPC_WIDEBLEEDING,1,250;','','');
REPLACE INTO `item_db` VALUES ('13043','Fortune_Sword_I','Fortune Sword','4','0','0','0','120','0','0','1','0','42950382','63','2','2','4','0',NULL,'0','1','0','bonus bLuk,5;','','');
REPLACE INTO `item_db` VALUES ('13044','House_Auger_I','Ice Pick','4','0','0','0','105','0','0','1','0','42950382','63','2','2','4','0',NULL,'0','1','0','','','');
REPLACE INTO `item_db` VALUES ('13045','Kamaitachi_I','Kamaitachi','4','0','0','0','155','0','0','2','0','33554432','63','2','2','4','0',NULL,'0','1','0','','','');
@@ -6020,7 +6020,7 @@ REPLACE INTO `item_db` VALUES ('14469','Ox_Tail_Scroll','Ox Tail Egg','2','20','
REPLACE INTO `item_db` VALUES ('14500','Insurance60','Life Insurrance Certificate','2','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_CASH_DEATHPENALTY,3600000,0;','','');
REPLACE INTO `item_db` VALUES ('14508','Zeny_Scroll','Zeny Pet Egg Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('14509','Light_Center_Pot','Light Concentration Potion','2','800','400','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION1,1800000,0;','','');
-REPLACE INTO `item_db` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','1500','750','20','0','0','0','0','0','2147483647','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
+REPLACE INTO `item_db` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','1500','750','20','0','0','0','0','0','2146959087','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
REPLACE INTO `item_db` VALUES ('14511','Light_Berserk_Pot','Light Berserk Potion','2','3000','1500','20','0','0','0','0','0','31868582','63','2','0','0','85',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION3,1800000,0;','','');
REPLACE INTO `item_db` VALUES ('14512','Meteor_10_Scroll','Meteor Storm Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill WZ_METEOR,10;','','');
REPLACE INTO `item_db` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill WZ_STORMGUST,10;','','');
@@ -6121,7 +6121,7 @@ REPLACE INTO `item_db` VALUES ('14607','Luxurious_Dinner_W','Luxurious Western F
REPLACE INTO `item_db` VALUES ('14608','Luxurious_Dinner_E','Manchu-Han Imperial Feast','2','20000','10000','1200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_INCALLSTATUS,3600000,6;','','');
REPLACE INTO `item_db` VALUES ('14609','Spoiled_Cuisine','Spoiled Cuisine','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','percentheal 10,10;','','');
REPLACE INTO `item_db` VALUES ('15000','Bone_Plate','Bone Plate','5','20','10','1000','0','0','7','0','1','414946','2','2','16','0','85',NULL,'1','0','0','bonus bStr,1; bonus bMdef,3; bonus2 bIgnoreDefRate,RC_DemiHuman,10; bonus2 bIgnoreDefRate,RC_Brute,10; bonus3 bAutoSpellWhenHit,NPC_WIDEBLEEDING,1,10;','','');
-REPLACE INTO `item_db` VALUES ('15001','Odin\'s_Blessing_I','Odin\'s Blessing','5','0','0','0','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db` VALUES ('15001','Odin\'s_Blessing_I','Odin\'s Blessing','5','0','0','0','0','0','10','0','0','2147483646','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db` VALUES ('16000','Erde','Erde','4','20','10','500','130','0','0','1','2','312754','2','2','2','4','50',NULL,'1','8','0','bonus2 bSkillAtk,AM_ACIDTERROR,20; bonus2 bSkillAtk,AM_DEMONSTRATION,20; bonus bMaxSP,50; bonus bHealPower,10;','','');
REPLACE INTO `item_db` VALUES ('16001','Red_Square_Bag','Red Square Bag','4','20','10','500','130','0','0','1','2','312754','2','2','2','3','50',NULL,'1','8','0','bonus bMaxHP,200; bonus2 bSkillAtk,AM_ACIDTERROR,20; bonus2 bSkillAtk,AM_DEMONSTRATION,20; bonus2 bAddMonsterDropItem,501,50; bonus2 bAddMonsterDropItem,502,20; bonus2 bAddMonsterDropItem,503,20; bonus2 bAddMonsterDropItem,504,20; bonus2 bAddMonsterDropItem,505,10; if(readparam(bStr)>=95) bonus2 bAddEff,Eff_Stun,500;','','');
REPLACE INTO `item_db` VALUES ('16002','Stunner_C','Stunner','4','0','0','0','175','0','0','1','0','33040','63','2','2','3','1',NULL,'0','8','0','bonus2 bAddEff,Eff_Stun,1000; bonus2 bAddSize,Size_Small,40; bonus2 bAddSize,Size_Medium,40; bonus2 bAddSize,Size_Large,40;','','');
@@ -6150,7 +6150,7 @@ REPLACE INTO `item_db` VALUES ('18502','Cheer_Scarf10','Cheer Scarf10','5','0','
REPLACE INTO `item_db` VALUES ('18503','Small_Horn_Of_Devil','Small Devil Horns','5','20','10','100','0','0','2','0','0','4294967295','63','2','512','0','1',NULL,'0','562','0','bonus bAtkRate,5; bonus bMatkRate,5; bonus bMaxHPrate,10; bonus bMaxSPrate,10;','','');
REPLACE INTO `item_db` VALUES ('18505','Umbala_Spirit','Umbala Spirit','5','0','0','200','0','0','1','0','1','4294967295','63','2','1','0','30',NULL,'0','675','0','bonus bVit,1;','','');
REPLACE INTO `item_db` VALUES ('18506','Hattah_Black','Hattah Black','5','12000','6000','4000','0','0','2','0','1','4294967295','63','2','769','0','1',NULL,'1','676','0','','','');
-REPLACE INTO `item_db` VALUES ('18507','Elven_Ears_','Elven Ears','5','20','10','100','0','0','0','0','1','2147483647','63','2','512','0','70',NULL,'0','73','0','','','');
+REPLACE INTO `item_db` VALUES ('18507','Elven_Ears_','Elven Ears','5','20','10','100','0','0','0','0','1','2147483646','63','2','512','0','70',NULL,'0','73','0','','','');
REPLACE INTO `item_db` VALUES ('18539','Skull_Cap','Skull Cap','5','40','20','200','0','0','5','0','1','4294967295','63','2','256','0','10',NULL,'1','713','0','bonus bMatkRate,2; if(getrefine() >= 5) { bonus bMatkRate,3; } if(getrefine() >= 7) { bonus bMatkRate,3; }','','');
REPLACE INTO `item_db` VALUES ('18595','Horn_Of_Ancient','Horn of Ancient','5','40','20','200','0','0','8','0','1','4294967295','63','2','256','0','50',NULL,'1','757','0','autobonus \"{ bonus bBaseAtk,100; }\",5,10000,0,\"{ specialeffect2 EF_POTION_BERSERK; }\";','','');
REPLACE INTO `item_db` VALUES ('18596','Sprout_Hat','Sprout Hat','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','70',NULL,'1','758','0','skill WZ_HEAVENDRIVE,3;','','');
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index e0fa911e8..82ea04c67 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -174,7 +174,7 @@ REPLACE INTO `item_db_re` VALUES ('642','Book_Of_Devil','Book of the Devil','2',
REPLACE INTO `item_db_re` VALUES ('643','Pet_Incubator','Pet Incubator','2','3000','1500','30','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','bpet;','','');
REPLACE INTO `item_db_re` VALUES ('644','Gift_Box','Gift Box','2','1000','500','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','getrandgroupitem 644,1;','','');
REPLACE INTO `item_db_re` VALUES ('645','Center_Potion','Concentration Potion','2','800','400','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION1,1800000,4;','','');
-REPLACE INTO `item_db_re` VALUES ('656','Awakening_Potion','Awakening Potion','2','1500','750','150','0','0','0','0','0','2147483647','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,6;','','');
+REPLACE INTO `item_db_re` VALUES ('656','Awakening_Potion','Awakening Potion','2','1500','750','150','0','0','0','0','0','2146959087','63','2','0','0','40',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,6;','','');
REPLACE INTO `item_db_re` VALUES ('657','Berserk_Potion','Berserk Potion','2','3000','1500','200','0','0','0','0','0','31868582','63','2','0','0','85',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION3,1800000,9;','','');
REPLACE INTO `item_db_re` VALUES ('658','Union_Of_Tribe','Tribal Solidarity','2','2','1','500','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','guildgetexp rand(600000,1200000);','','');
REPLACE INTO `item_db_re` VALUES ('659','Heart_Of_Her','Her Heart','2','500','250','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','pet 1188;','','');
@@ -1172,8 +1172,8 @@ REPLACE INTO `item_db_re` VALUES ('2110','Holy_Guard','Holy Guard','5','85000','
REPLACE INTO `item_db_re` VALUES ('2111','Herald_Of_GOD','Sacred Mission','5','128000','64000','1600','0','0','120','0','0','16384','63','2','32','0','83',NULL,'1','4','0','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;','','');
REPLACE INTO `item_db_re` VALUES ('2112','Novice_Guard','Novice Guard','5','1','0','1','0','0','20','0','0','1','47','2','32','0','0',NULL,'0','1','0','','','');
REPLACE INTO `item_db_re` VALUES ('2113','Novice_Shield','Novice Shield','5','5000','2500','1000','0','0','20','0','1','1','47','2','32','0','40',NULL,'1','3','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Earth,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Wind,20; bonus2 bSubEle,Ele_Poison,20; bonus2 bSubEle,Ele_Ghost,20; bonus2 bSubEle,Ele_Undead,20;','','');
-REPLACE INTO `item_db_re` VALUES ('2114','Stone_Buckler','Stone Buckler','5','30000','15000','1500','0','0','45','0','1','2147483647','63','2','32','0','65',NULL,'1','2','0','bonus2 bSubSize,Size_Large,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2115','Valkyrja\'s_Shield','Valkyrja\'s Shield','5','30000','15000','500','0','0','80','0','1','2147483647','63','2','32','0','65',NULL,'1','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2114','Stone_Buckler','Stone Buckler','5','30000','15000','1500','0','0','45','0','1','2147483646','63','2','32','0','65',NULL,'1','2','0','bonus2 bSubSize,Size_Large,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2115','Valkyrja\'s_Shield','Valkyrja\'s Shield','5','30000','15000','500','0','0','80','0','1','2147483646','63','2','32','0','65',NULL,'1','4','0','bonus2 bSubEle,Ele_Water,20; bonus2 bSubEle,Ele_Fire,20; bonus2 bSubEle,Ele_Dark,20; bonus2 bSubEle,Ele_Undead,20; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2116','Angel\'s_Safeguard','Angelic Guard','5','10000','5000','400','0','0','30','0','1','1','47','2','32','0','20',NULL,'1','1','0','bonus2 bSubRace,RC_Demon,5;','','');
REPLACE INTO `item_db_re` VALUES ('2117','Arm_Guard','Arm Guard','5','10000','5000','150','0','0','50','0','0','570425344','1','2','32','0','20',NULL,'1','1','0','','','');
REPLACE INTO `item_db_re` VALUES ('2118','Arm_Guard_','Arm Guard','5','10000','5000','150','0','0','50','0','1','570425344','1','2','32','0','20',NULL,'1','1','0','','','');
@@ -1184,7 +1184,7 @@ REPLACE INTO `item_db_re` VALUES ('2122','Platinum_Shield','Platinum Shield','5'
REPLACE INTO `item_db_re` VALUES ('2123','Orleans_Server','Orleans\'s Server','5','20','10','1000','0','0','75','0','1','1040382','58','2','32','0','55',NULL,'1','4','0','bonus bMdef,2; bonus bMagicDamageReturn,5;','','');
REPLACE INTO `item_db_re` VALUES ('2124','Thorny_Buckler','Thorny Buckler','5','20','10','1000','0','0','85','0','1','1040382','58','2','32','0','55',NULL,'1','2','0','bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('2125','Strong_Shield','Strong Shield','5','20','10','2500','0','0','90','0','1','414946','58','2','32','0','75',NULL,'1','4','0','bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
-REPLACE INTO `item_db_re` VALUES ('2126','Guyak_Shield','Guyak Shield','5','20','10','700','0','0','3','0','0','2147483647','63','2','32','0','0',NULL,'1','2','0','bonus bMdef,2; bonus bMagicDamageReturn,2; autobonus2 \"{ bonus bShortWeaponDamageReturn,5; }\",20,1000,BF_WEAPON,\"{ specialeffect2 EF_REFLECTSHIELD; }\";','','');
+REPLACE INTO `item_db_re` VALUES ('2126','Guyak_Shield','Guyak Shield','5','20','10','700','0','0','3','0','0','2147483646','63','2','32','0','0',NULL,'1','2','0','bonus bMdef,2; bonus bMagicDamageReturn,2; autobonus2 \"{ bonus bShortWeaponDamageReturn,5; }\",20,1000,BF_WEAPON,\"{ specialeffect2 EF_REFLECTSHIELD; }\";','','');
REPLACE INTO `item_db_re` VALUES ('2127','Secular_Mission','Secular Mission','5','20','10','0','0','0','10','0','0','4294967295','63','2','32','0','0',NULL,'0','4','0','bonus2 bSubRace,RC_NonBoss,25; bonus2 bSubRace,RC_Boss,25;','','');
REPLACE INTO `item_db_re` VALUES ('2128','Herald_Of_GOD_','Sacred Mission','5','128000','64000','1600','0','0','120','0','1','16384','63','2','32','0','83',NULL,'1','4','0','bonus bVit,3; bonus bInt,2; bonus bMdef,3; bonus bUnbreakableShield,0;','','');
REPLACE INTO `item_db_re` VALUES ('2129','Exorcism_Bible','Exorcism Bible','5','20','10','600','0','0','80','0','0','33024','63','2','32','0','50',NULL,'1','5','0','bonus bHPrecovRate,3; bonus bSPrecovRate,3; bonus bInt,1;','','');
@@ -1213,7 +1213,7 @@ REPLACE INTO `item_db_re` VALUES ('2151','Upg_Shield','Reinforcement Shield','5'
REPLACE INTO `item_db_re` VALUES ('2152','Anti_Demon_Shield_C','Anti Demon Shield','5','0','0','0','0','0','120','0','0','4294967295','63','2','32','0','0',NULL,'0','3','0','bonus2 bSubRace,RC_DemiHuman,25; bonus2 bSubRace,RC_Demon,25; bonus bMaxHP,400;','','');
REPLACE INTO `item_db_re` VALUES ('2153','Imperial_Guard','Imperial Guard','5','20','10','2500','0','0','120','0','1','16384','56','2','32','0','102',NULL,'1','4','0','bonus bMdef,5; if(getrefine()>=6) { bonus2 bSkillAtk,LG_SHIELDPRESS,20+((getrefine()-5)*2); } else { bonus2 bSkillAtk,LG_SHIELDPRESS,20; }','','');
REPLACE INTO `item_db_re` VALUES ('2154','Toy_Shield','Toy Shield','5','0','0','500','0','0','1','0','1','4294967295','63','2','32','0','10',NULL,'1','1','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2155','Academy_Shield','Academy Shield','5','0','0','1500','0','0','3','0','1','2147483647','63','2','32','0','0',NULL,'1','4','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2155','Academy_Shield','Academy Shield','5','0','0','1500','0','0','3','0','1','2147483646','63','2','32','0','0',NULL,'1','4','0','','','');
REPLACE INTO `item_db_re` VALUES ('2156','Bible_Of_Promise1','Bible of Promise(1st Vol.)','5','20','10','500','0','0','10','0','1','256','56','2','32','0','110',NULL,'1','5','0','bonus bMdef,2; skill ALL_ODINS_POWER,1;','','');
REPLACE INTO `item_db_re` VALUES ('2157','Insecticide','Pesticide','5','20','10','100','0','0','0','0','0','4294967295','63','2','32','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2158','Ramor_Shield_Undead','Ramorushirudo','5','20','10','1300','0','0','50','0','1','4294967295','63','2','32','0','65',NULL,'1','3','0','','','');
@@ -1258,8 +1258,8 @@ REPLACE INTO `item_db_re` VALUES ('2218','Flu_Mask','Flu Mask','5','300','150','
REPLACE INTO `item_db_re` VALUES ('2219','Flu_Mask_','Flu Mask','5','300','150','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','8','0','bonus2 bResEff,Eff_Silence,1000;','','');
REPLACE INTO `item_db_re` VALUES ('2220','Hat','Hat','5','1000','500','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
REPLACE INTO `item_db_re` VALUES ('2221','Hat_','Hat','5','1000','500','200','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','16','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2222','Turban','Turban','5','4500','2250','300','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','7','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2223','Turban_','Turban','5','4500','2250','300','0','0','5','0','1','2147483647','63','2','256','0','0',NULL,'1','7','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2222','Turban','Turban','5','4500','2250','300','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','7','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2223','Turban_','Turban','5','4500','2250','300','0','0','5','0','1','2147483646','63','2','256','0','0',NULL,'1','7','0','','','');
REPLACE INTO `item_db_re` VALUES ('2224','Goggle','Goggles','5','20','10','300','0','0','5','0','0','941290','63','2','768','0','0',NULL,'1','1','0','','','');
REPLACE INTO `item_db_re` VALUES ('2225','Goggle_','Goggles','5','20','10','300','0','0','5','0','1','941290','63','2','768','0','0',NULL,'1','1','0','','','');
REPLACE INTO `item_db_re` VALUES ('2226','Cap','Cap','5','12000','6000','400','0','0','7','0','0','941290','63','2','256','0','0',NULL,'1','14','0','','','');
@@ -1270,8 +1270,8 @@ REPLACE INTO `item_db_re` VALUES ('2230','Gemmed_Sallet','Gemmed Sallet','5','50
REPLACE INTO `item_db_re` VALUES ('2231','Gemmed_Sallet_','Gemmed Sallet','5','50000','25000','500','0','0','8','0','1','414946','63','2','256','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2232','Circlet','Circlet','5','7500','3750','300','0','0','6','0','0','8487700','63','2','256','0','0',NULL,'1','18','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2233','Circlet_','Circlet','5','7500','3750','300','0','0','6','0','1','8487700','63','2','256','0','0',NULL,'1','18','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2234','Tiara','Tiara','5','20','10','400','0','0','7','0','0','2147483647','63','2','256','0','45',NULL,'1','19','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2235','Crown','Crown','5','20','10','400','0','0','7','0','0','2147483647','63','1','256','0','45',NULL,'1','45','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2234','Tiara','Tiara','5','20','10','400','0','0','7','0','0','2147483646','63','2','256','0','45',NULL,'1','19','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2235','Crown','Crown','5','20','10','400','0','0','7','0','0','2147483646','63','1','256','0','45',NULL,'1','45','0','bonus bInt,2;','','');
REPLACE INTO `item_db_re` VALUES ('2236','Santa\'s_Hat','Santa Hat','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','20','0','bonus bMdef,1; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2237','Weird_Goatee','Bandit Beard','5','2','1','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','21','0','','','');
REPLACE INTO `item_db_re` VALUES ('2238','Weird_Moustache','Moustache','5','2','1','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','22','0','','','');
@@ -1280,60 +1280,60 @@ REPLACE INTO `item_db_re` VALUES ('2240','Beard','Beard','5','2','1','100','0','
REPLACE INTO `item_db_re` VALUES ('2241','Granpa_Beard','Grampa Beard','5','5000','2500','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','','','');
REPLACE INTO `item_db_re` VALUES ('2242','Luxury_Sunglasses','Purple Glasses','5','24000','12000','100','0','0','2','0','0','4294967295','63','2','512','0','0',NULL,'0','26','0','bonus2 bResEff,Eff_Blind,1000;','','');
REPLACE INTO `item_db_re` VALUES ('2243','Spinning_Eyes','Geek Glasses','5','20000','10000','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','27','0','bonus2 bResEff,Eff_Blind,1500;','','');
-REPLACE INTO `item_db_re` VALUES ('2244','Big_Sis\'_Ribbon','Big Ribbon','5','15000','7500','200','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2245','Sweet_Gents','Sweet Gent','5','15000','7500','400','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','29','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2246','Golden_Gear','Golden Gear','5','20','10','900','0','0','9','0','0','2147483647','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
-REPLACE INTO `item_db_re` VALUES ('2247','Oldman\'s_Romance','Romantic Gent','5','15000','7500','400','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','31','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2248','Western_Grace','Western Grace','5','15000','7500','400','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','32','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2249','Coronet','Coronet','5','20','10','300','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','33','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2250','Fillet','Cute Ribbon','5','500','250','100','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'0','34','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('2244','Big_Sis\'_Ribbon','Big Ribbon','5','15000','7500','200','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2245','Sweet_Gents','Sweet Gent','5','15000','7500','400','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','29','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2246','Golden_Gear','Golden Gear','5','20','10','900','0','0','9','0','0','2147483646','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('2247','Oldman\'s_Romance','Romantic Gent','5','15000','7500','400','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','31','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2248','Western_Grace','Western Grace','5','15000','7500','400','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','32','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2249','Coronet','Coronet','5','20','10','300','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','33','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2250','Fillet','Cute Ribbon','5','500','250','100','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'0','34','0','bonus bMaxSP,20;','','');
REPLACE INTO `item_db_re` VALUES ('2251','Holy_Bonnet','Monk Hat','5','30000','15000','100','0','0','10','0','0','33040','63','2','256','0','0',NULL,'1','35','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2252','Star_Sparkling','Wizard Hat','5','20','10','300','0','0','7','0','0','8454660','63','2','256','0','0',NULL,'1','36','0','bonus bMaxSP,100;','','');
REPLACE INTO `item_db_re` VALUES ('2253','Sunflower','Sunflower','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','37','0','bonus2 bSubRace,RC_Insect,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2254','Angelic_Chain','Angel Wing','5','20','10','100','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2255','Satanic_Chain','Evil Wing','5','20','10','100','0','0','6','0','0','2147483647','63','2','256','0','0',NULL,'1','39','0','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2254','Angelic_Chain','Angel Wing','5','20','10','100','0','0','4','0','0','2147483646','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bAgi,1; bonus bLuk,1; bonus2 bSubRace,RC_Demon,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2255','Satanic_Chain','Evil Wing','5','20','10','100','0','0','6','0','0','2147483646','63','2','256','0','0',NULL,'1','39','0','bonus bMdef,2; bonus bStr,1; bonus2 bSubRace,RC_Angel,3;','','');
REPLACE INTO `item_db_re` VALUES ('2256','Magestic_Goat','Magestic Goat','5','20','10','800','0','0','9','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('2257','Snowy_Horn','Unicorn Horn','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','42','0','','','');
REPLACE INTO `item_db_re` VALUES ('2258','Sharp_Gear','Spiky Band','5','20','10','1000','0','0','12','0','0','6739442','63','2','256','0','50',NULL,'1','43','0','','','');
REPLACE INTO `item_db_re` VALUES ('2259','Mini_Propeller','Mini Propeller','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','46','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2260','Mini_Glasses','Mini Glasses','5','28000','14000','100','0','0','2','0','0','2147483647','63','2','512','0','0',NULL,'0','47','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2260','Mini_Glasses','Mini Glasses','5','28000','14000','100','0','0','2','0','0','2147483646','63','2','512','0','0',NULL,'0','47','0','','','');
REPLACE INTO `item_db_re` VALUES ('2261','Prontera_Army_Cap','Army Cap','5','20','10','400','0','0','8','0','0','414946','63','2','256','0','0',NULL,'1','48','0','','','');
REPLACE INTO `item_db_re` VALUES ('2262','Pierrot_Nose','Clown Nose','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','49','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2263','Gangster_Patch','Zorro Masque','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','50','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2263','Gangster_Patch','Zorro Masque','5','20','10','100','0','0','0','0','0','2147483646','63','2','512','0','0',NULL,'0','50','0','','','');
REPLACE INTO `item_db_re` VALUES ('2264','Munak_Turban','Munak Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','769','0','0',NULL,'0','51','0','bonus2 bSubRace,RC_Undead,10;','','');
REPLACE INTO `item_db_re` VALUES ('2265','Ganster_Mask','Gangster Mask','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','52','0','bonus2 bResEff,Eff_Silence,1500;','','');
REPLACE INTO `item_db_re` VALUES ('2266','Iron_Cane','Iron Cain','5','20','10','300','0','0','4','0','0','16514','63','2','1','0','50',NULL,'0','53','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2267','Cigar','Cigarette','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','54','0','bonus2 bSubRace,RC_Insect,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2268','Smoking_Pipe','Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus2 bSubRace,RC_Insect,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2269','Centimental_Flower','Romantic Flower','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2270','Centimental_Leaf','Romantic Leaf','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','57','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2271','Jack_A_Dandy','Jack be Dandy','5','45000','22500','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','58','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2267','Cigar','Cigarette','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','54','0','bonus2 bSubRace,RC_Insect,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2268','Smoking_Pipe','Pipe','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','55','0','bonus2 bSubRace,RC_Insect,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2269','Centimental_Flower','Romantic Flower','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2270','Centimental_Leaf','Romantic Leaf','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','57','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2271','Jack_A_Dandy','Jack be Dandy','5','45000','22500','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','58','0','','','');
REPLACE INTO `item_db_re` VALUES ('2272','Stop_Post','Stop Post','5','20','10','400','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','59','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2273','Doctor_Cap','Doctor Band','5','20','10','100','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','60','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2274','Ghost_Bandana','Ghost Bandana','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','61','0','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2273','Doctor_Cap','Doctor Band','5','20','10','100','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','60','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2274','Ghost_Bandana','Ghost Bandana','5','20','10','100','0','0','0','0','0','2147483646','63','2','256','0','0',NULL,'1','61','0','bonus bAgi,2; bonus2 bSubEle,Ele_Ghost,10;','','');
REPLACE INTO `item_db_re` VALUES ('2275','Red_Bandana','Red Bandana','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','62','0','','','');
REPLACE INTO `item_db_re` VALUES ('2276','Eagle_Eyes','Angled Glasses','5','20','10','100','0','0','2','0','0','4294967295','63','2','512','0','0',NULL,'0','63','0','','','');
REPLACE INTO `item_db_re` VALUES ('2277','Nurse_Cap','Nurse Cap','5','20','10','100','0','0','4','0','0','33040','63','2','256','0','0',NULL,'1','64','0','bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('2278','Mr_Smile','Mr. Smile','5','60','30','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','65','0','','','');
REPLACE INTO `item_db_re` VALUES ('2279','Bomb_Wick','Bomb Wick','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','66','0','','','');
REPLACE INTO `item_db_re` VALUES ('2280','Sahkkat','Sakkat','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','67','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2281','Phantom_Of_Opera','Opera Masque','5','20','10','200','0','0','2','0','0','2147483647','63','2','513','0','0',NULL,'0','68','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2281','Phantom_Of_Opera','Opera Masque','5','20','10','200','0','0','2','0','0','2147483646','63','2','513','0','0',NULL,'0','68','0','','','');
REPLACE INTO `item_db_re` VALUES ('2282','Spirit_Chain','Halo','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','69','0','bonus2 bSubEle,Ele_Holy,15;','','');
REPLACE INTO `item_db_re` VALUES ('2283','Ear_Mufs','Ear Muffs','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','70','0','bonus2 bResEff,Eff_Curse,1000;','','');
-REPLACE INTO `item_db_re` VALUES ('2284','Antler','Antlers','5','20','10','500','0','0','8','0','0','2147483647','63','2','256','0','0',NULL,'1','71','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2285','Apple_Of_Archer','Apple of Archer','5','20','10','200','0','0','1','0','0','2147483647','63','2','256','0','30',NULL,'1','72','0','bonus bDex,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2286','Elven_Ears','Elven Ears','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','70',NULL,'0','73','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2287','Pirate_Bandana','Pirate Bandana','5','20','10','100','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2288','Mr_Scream','Mr. Scream','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','75','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2284','Antler','Antlers','5','20','10','500','0','0','8','0','0','2147483646','63','2','256','0','0',NULL,'1','71','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2285','Apple_Of_Archer','Apple of Archer','5','20','10','200','0','0','1','0','0','2147483646','63','2','256','0','30',NULL,'1','72','0','bonus bDex,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2286','Elven_Ears','Elven Ears','5','20','10','100','0','0','0','0','0','2147483646','63','2','512','0','70',NULL,'0','73','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2287','Pirate_Bandana','Pirate Bandana','5','20','10','100','0','0','4','0','0','2147483646','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2288','Mr_Scream','Mr. Scream','5','20','10','100','0','0','1','0','0','2147483646','63','2','513','0','0',NULL,'0','75','0','','','');
REPLACE INTO `item_db_re` VALUES ('2289','Poo_Poo_Hat','Poo Poo Hat','5','20','10','700','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','76','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('2290','Funeral_Costume','Funeral Hat','5','3000','1500','100','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'0','77','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2291','Masquerade','Masquerade','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2291','Masquerade','Masquerade','5','20','10','100','0','0','0','0','0','2147483646','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db_re` VALUES ('2292','Welding_Mask','Welding Mask','5','20','10','300','0','0','2','0','0','263200','63','2','513','0','50',NULL,'0','79','0','bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2293','Pretend_Murdered','Pretend Murdered','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','80','0','','','');
REPLACE INTO `item_db_re` VALUES ('2294','Star_Dust','Stellar','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','81','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2295','Blinker','Blinker','5','1500','750','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','82','0','bonus2 bResEff,Eff_Blind,10000;','','');
+REPLACE INTO `item_db_re` VALUES ('2295','Blinker','Blinker','5','1500','750','100','0','0','0','0','0','2147483646','63','2','512','0','0',NULL,'0','82','0','bonus2 bResEff,Eff_Blind,10000;','','');
REPLACE INTO `item_db_re` VALUES ('2296','Binoculars','Binoculars','5','20','10','100','0','0','2','0','0','526344','63','2','512','0','50',NULL,'0','83','0','bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2297','Goblini_Mask','Goblin Mask','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','84','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2297','Goblini_Mask','Goblin Mask','5','20','10','100','0','0','1','0','0','2147483646','63','2','513','0','0',NULL,'0','84','0','','','');
REPLACE INTO `item_db_re` VALUES ('2298','Green_Feeler','Green Feeler','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','85','0','','','');
REPLACE INTO `item_db_re` VALUES ('2299','Viking_Helm','Orc Helm','5','20','10','500','0','0','9','0','0','414946','63','2','256','0','0',NULL,'1','86','0','','','');
REPLACE INTO `item_db_re` VALUES ('2301','Cotton_Shirt','Cotton Shirt','5','10','5','100','0','0','10','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1342,11 +1342,11 @@ REPLACE INTO `item_db_re` VALUES ('2303','Leather_Jacket','Jacket','5','200','10
REPLACE INTO `item_db_re` VALUES ('2304','Leather_Jacket_','Jacket','5','200','100','200','0','0','15','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2305','Adventure_Suit','Adventurer\'s Suit','5','1000','500','300','0','0','20','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2306','Adventurere\'s_Suit_','Adventurer\'s Suit','5','1000','500','300','0','0','20','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2307','Mantle','Mantle','5','10000','5000','600','0','0','37','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2308','Mantle_','Mantle','5','10000','5000','600','0','0','37','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2309','Coat','Coat','5','22000','11000','1200','0','0','42','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2310','Coat_','Coat','5','22000','11000','1200','0','0','42','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2311','Mink_Coat','Mink Coat','5','20','10','2300','0','0','30','0','1','2147483647','63','2','16','0','30',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2307','Mantle','Mantle','5','10000','5000','600','0','0','37','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2308','Mantle_','Mantle','5','10000','5000','600','0','0','37','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2309','Coat','Coat','5','22000','11000','1200','0','0','42','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2310','Coat_','Coat','5','22000','11000','1200','0','0','42','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2311','Mink_Coat','Mink Coat','5','20','10','2300','0','0','30','0','1','2147483646','63','2','16','0','30',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2312','Padded_Armor','Padded Armor','5','48000','24000','2800','0','0','35','0','0','414946','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2313','Padded_Armor_','Padded Armor','5','48000','24000','2800','0','0','35','0','1','414946','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2314','Chain_Mail','Chain Mail','5','65000','32500','3300','0','0','55','0','0','414946','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1354,8 +1354,8 @@ REPLACE INTO `item_db_re` VALUES ('2315','Chain_Mail_','Chain Mail','5','65000',
REPLACE INTO `item_db_re` VALUES ('2316','Plate_Armor','Full Plate','5','80000','40000','4500','0','0','70','0','0','16514','63','2','16','0','40',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2317','Plate_Armor_','Full Plate','5','80000','40000','4500','0','0','70','0','1','16514','63','2','16','0','40',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2318','Clothes_Of_The_Lord','Lord\'s Clothes','5','20','10','2500','0','0','59','0','1','263200','63','2','16','0','70',NULL,'1','0','0','bonus bMdef,5; bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2319','Glittering_Clothes','Glittering Jacket','5','20','10','2500','0','0','58','0','1','2147483647','63','2','16','0','60',NULL,'1','0','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,300;','','');
-REPLACE INTO `item_db_re` VALUES ('2320','Formal_Suit','Formal Suit','5','20','10','300','0','0','40','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2319','Glittering_Clothes','Glittering Jacket','5','20','10','2500','0','0','58','0','1','2147483646','63','2','16','0','60',NULL,'1','0','0','bonus bMdef,5; bonus2 bAddEff,Eff_Blind,300;','','');
+REPLACE INTO `item_db_re` VALUES ('2320','Formal_Suit','Formal Suit','5','20','10','300','0','0','40','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2321','Silk_Robe','Silk Robe','5','8000','4000','400','0','0','20','0','0','8767414','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2322','Silk_Robe_','Silk Robe','5','8000','4000','400','0','0','20','0','1','8767414','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2323','Scapulare','Scapulare','5','6500','3250','400','0','0','24','0','0','33040','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -1373,38 +1373,38 @@ REPLACE INTO `item_db_re` VALUES ('2334','Mage_Coat','Mage Coat','5','20','10','
REPLACE INTO `item_db_re` VALUES ('2335','Thief_Clothes','Thief Clothes','5','74000','37000','100','0','0','40','0','0','570560576','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2336','Thief_Clothes_','Thief Clothes','5','74000','37000','100','0','0','40','0','1','570560576','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2337','Ninja_Suit','Ninja Suit','5','20','10','1500','0','0','58','0','0','570560576','63','2','16','0','50',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2338','Wedding_Dress','Wedding Dress','5','43000','21500','500','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('2338','Wedding_Dress','Wedding Dress','5','43000','21500','500','0','0','10','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('2339','G_Strings','Pantie','5','1000','500','100','0','0','22','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2340','Novice_Breast','Novice Breastplate','5','89000','44500','500','0','0','32','0','1','1','47','2','16','0','10',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2341','Full_Plate_Armor','Legion Plate Armor','5','94000','47000','5500','0','0','79','0','0','16384','63','2','16','0','70',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2342','Full_Plate_Armor_','Legion Plate Armor','5','102500','51250','5500','0','0','79','0','1','16384','63','2','16','0','70',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2343','Robe_Of_Casting','Robe of Cast','5','124800','62400','1100','0','0','40','0','0','8454656','63','2','16','0','75',NULL,'1','0','0','bonus bVariableCastrate,-3; bonus bMdef,4;','','');
REPLACE INTO `item_db_re` VALUES ('2344','Flame_Sprits_Armor','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','25','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
-REPLACE INTO `item_db_re` VALUES ('2345','Flame_Sprits_Armor_','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','25','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
+REPLACE INTO `item_db_re` VALUES ('2345','Flame_Sprits_Armor_','Lucius\'s Fierce Armor of Volcano','5','136000','68000','2200','0','0','25','0','1','2147483646','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Fire;','','');
REPLACE INTO `item_db_re` VALUES ('2346','Water_Sprits_Armor','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','25','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
-REPLACE INTO `item_db_re` VALUES ('2347','Water_Sprits_Armor_','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','25','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
+REPLACE INTO `item_db_re` VALUES ('2347','Water_Sprits_Armor_','Saphien\'s Armor of Ocean','5','136000','68000','2200','0','0','25','0','1','2147483646','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Water;','','');
REPLACE INTO `item_db_re` VALUES ('2348','Wind_Sprits_Armor','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','25','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
-REPLACE INTO `item_db_re` VALUES ('2349','Wind_Sprits_Armor_','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','25','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
+REPLACE INTO `item_db_re` VALUES ('2349','Wind_Sprits_Armor_','Aebecee\'s Raging Typhoon Armor','5','136000','68000','2200','0','0','25','0','1','2147483646','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Wind;','','');
REPLACE INTO `item_db_re` VALUES ('2350','Earth_Sprits_Armor','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','25','0','0','279714','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
-REPLACE INTO `item_db_re` VALUES ('2351','Earth_Sprits_Armor_','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','25','0','1','2147483647','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
+REPLACE INTO `item_db_re` VALUES ('2351','Earth_Sprits_Armor_','Claytos Cracking Earth Armor','5','136000','68000','2200','0','0','25','0','1','2147483646','63','2','16','0','45',NULL,'1','0','0','bonus bDefEle,Ele_Earth;','','');
REPLACE INTO `item_db_re` VALUES ('2352','Novice_Plate','Tattered Novice Ninja Suit','5','1','0','1','0','0','25','0','0','1','47','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2353','Odin\'s_Blessing','Odin\'s Blessing','5','30000','15000','2500','0','0','53','0','1','2147483647','63','2','16','0','65',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2354','Goibne\'s_Armor','Goibne\'s Armor','5','50000','25000','3500','0','0','58','0','0','2147483647','63','2','16','0','54',NULL,'1','0','0','bonus bVit,2; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2353','Odin\'s_Blessing','Odin\'s Blessing','5','30000','15000','2500','0','0','53','0','1','2147483646','63','2','16','0','65',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2354','Goibne\'s_Armor','Goibne\'s Armor','5','50000','25000','3500','0','0','58','0','0','2147483646','63','2','16','0','54',NULL,'1','0','0','bonus bVit,2; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db_re` VALUES ('2355','Angel\'s_Protection','Angelic Protection','5','10000','5000','600','0','0','25','0','1','1','47','2','16','0','40',NULL,'1','0','0','bonus bMdef,20;','','');
REPLACE INTO `item_db_re` VALUES ('2356','Vestment_Of_Grace','Blessed Holy Robe','5','20','10','2500','0','0','45','0','1','33024','63','2','16','0','70',NULL,'1','0','0','bonus bMdef,5; bonus2 bResEff,Eff_Blind,8000;','','');
REPLACE INTO `item_db_re` VALUES ('2357','Valkyrie_Armor','Valkyrian Armor','5','0','0','2800','0','0','55','0','1','1040382','58','2','16','0','0',NULL,'1','0','0','bonus bAllStats,1; bonus bUnbreakableArmor,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus2 bResEff,Eff_Silence,5000; else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus2 bResEff,Eff_Stun,5000;','','');
REPLACE INTO `item_db_re` VALUES ('2358','Dress_Of_Angel','Angel\'s Dress','5','20','10','1000','0','0','5','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bLuk,4;','','');
REPLACE INTO `item_db_re` VALUES ('2359','Ninja_Suit_','Ninja Suit','5','20','10','1500','0','0','58','0','1','570560576','63','2','16','0','50',NULL,'1','0','0','bonus bAgi,1; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2360','Robe_Of_Casting_','Robe of Cast','5','124800','62400','1100','0','0','40','0','1','8454656','63','2','16','0','75',NULL,'1','0','0','bonus bVariableCastrate,-3; bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2361','Blue_Aodai','Blue Robe','5','20','10','500','0','0','0','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5; bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2362','Red_Aodai','Red Robe','5','20','10','500','0','0','0','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2361','Blue_Aodai','Blue Robe','5','20','10','500','0','0','0','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2362','Red_Aodai','Red Robe','5','20','10','500','0','0','0','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2363','White_Aodai','White Robe','5','20','10','500','0','0','0','0','0','1','47','2','16','0','0',NULL,'1','0','0','bonus bStr,3; bonus bInt,3; bonus bVit,3; bonus bDex,3; bonus bAgi,3; bonus bLuk,3; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2364','Meteo_Plate_Armor','Meteo Plate Armor','5','20','10','3000','0','0','85','0','1','279714','58','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Stun,3000; bonus2 bResEff,Eff_Freeze,3000;','','');
REPLACE INTO `item_db_re` VALUES ('2365','Orleans_Gown','Orleans\'s Gown','5','20','10','300','0','0','15','0','1','1040382','58','2','16','0','55',NULL,'1','0','0','bonus bVariableCastrate,15; bonus bNoCastCancel,0;','','');
REPLACE INTO `item_db_re` VALUES ('2366','Divine_Cloth','Divine Cloth','5','20','10','1500','0','0','50','0','1','1040382','58','2','16','0','55',NULL,'1','0','0','bonus2 bResEff,Eff_Curse,500; bonus2 bResEff,Eff_Silence,500; bonus2 bResEff,Eff_Stun,500; bonus2 bResEff,Eff_Stone,500; bonus2 bResEff,Eff_Sleep,500;','','');
REPLACE INTO `item_db_re` VALUES ('2367','Sniping_Suit','Sniping Suit','5','20','10','750','0','0','42','0','1','2048','58','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bCritical,6+(readparam(bLuk)/10); bonus bDelayrate,-23;','','');
REPLACE INTO `item_db_re` VALUES ('2368','Golden_Armor','Golden Armor','5','20','10','2000','0','0','4','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2369','Freyja_Overcoat','Freyja Overcoat','5','0','0','500','0','0','12','0','0','2147483647','63','2','16','0','0',NULL,'0','0','0','bonus bUnbreakableArmor,0; bonus2 bSubRace,RC_DemiHuman,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2369','Freyja_Overcoat','Freyja Overcoat','5','0','0','500','0','0','12','0','0','2147483646','63','2','16','0','0',NULL,'0','0','0','bonus bUnbreakableArmor,0; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('2370','Used_Mage_Coat','Used Mage Coat','5','0','0','0','0','0','15','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bAgi,1; bonus bMaxHP,300; bonus bMaxSP,30; bonus bBaseAtk,10; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2371','G_Strings_','Pantie','5','1000','500','100','0','0','22','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2372','Mage_Coat_','Mage Coat','5','20','10','600','0','0','40','0','1','8454660','63','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bInt,1;','','');
@@ -1429,31 +1429,31 @@ REPLACE INTO `item_db_re` VALUES ('2390','Improved_Tights','Improved Tights','5'
REPLACE INTO `item_db_re` VALUES ('2391','Life_Link','Life Link','5','20','10','3500','0','0','75','0','1','16514','58','2','16','0','82',NULL,'1','0','0','bonus bVit,2; bonus bMdef,5; bonus bHPrecovRate,50;','','');
REPLACE INTO `item_db_re` VALUES ('2392','Old_Pant','Old Green Pantie','5','0','0','0','0','0','60','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bStr,2; bonus bVit,2; bonus bMaxHP,200; bonus3 bAutoSpellWhenHit,MO_CALLSPIRITS,5,20; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2393','N_Adventurer\'s_Suit','Novice Adventurer\'s Suit','5','0','0','0','0','0','45','0','1','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2394','Krieger_Suit1','Glorious Suit','5','20','10','0','0','0','10','0','0','2147483647','63','2','16','0','81',NULL,'1','0','0','bonus bMaxHPrate,20; bonus2 bSubRace,RC_DemiHuman,7;','','');
-REPLACE INTO `item_db_re` VALUES ('2395','Krieger_Suit2','Glorious Popularized Suit','5','20','10','0','0','0','10','0','0','2147483647','63','2','16','0','61',NULL,'1','0','0','bonus bMaxHP,600; bonus bSPrecovRate,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2396','Krieger_Suit3','Glorious Mass-Production Suit','5','20','10','0','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHP,500;','','');
-REPLACE INTO `item_db_re` VALUES ('2397','Incredible_Coat','Incredible Event Resignation Coat','5','10','5','900','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2394','Krieger_Suit1','Glorious Suit','5','20','10','0','0','0','10','0','0','2147483646','63','2','16','0','81',NULL,'1','0','0','bonus bMaxHPrate,20; bonus2 bSubRace,RC_DemiHuman,7;','','');
+REPLACE INTO `item_db_re` VALUES ('2395','Krieger_Suit2','Glorious Popularized Suit','5','20','10','0','0','0','10','0','0','2147483646','63','2','16','0','61',NULL,'1','0','0','bonus bMaxHP,600; bonus bSPrecovRate,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2396','Krieger_Suit3','Glorious Mass-Production Suit','5','20','10','0','0','0','10','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHP,500;','','');
+REPLACE INTO `item_db_re` VALUES ('2397','Incredible_Coat','Incredible Event Resignation Coat','5','10','5','900','0','0','10','0','0','2147483646','63','2','16','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2398','Sniping_Suit_M','Sniping Suit','5','20','10','750','0','0','5','0','1','2048','58','2','16','0','50',NULL,'1','0','0','bonus bMdef,5; bonus bCritical,6+(readparam(bLuk)/10); bonus bDelayrate,-23;','','');
REPLACE INTO `item_db_re` VALUES ('2399','Dragon_Vest','Dragon Vest','5','20','10','500','0','0','20','0','1','1040382','58','2','16','0','0',NULL,'1','0','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2401','Sandals','Sandals','5','400','200','200','0','0','5','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2402','Sandals_','Sandals','5','400','200','200','0','0','5','0','1','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2403','Shoes','Shoes','5','3500','1750','400','0','0','10','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2404','Shoes_','Shoes','5','3500','1750','400','0','0','10','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2403','Shoes','Shoes','5','3500','1750','400','0','0','10','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2404','Shoes_','Shoes','5','3500','1750','400','0','0','10','0','1','2147483646','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2405','Boots','Boots','5','18000','9000','600','0','0','16','0','0','24009962','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2406','Boots_','Boots','5','18000','9000','600','0','0','16','0','1','24009962','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2407','Chrystal_Pumps','Crystal Pumps','5','20','10','100','0','0','5','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,10; bonus bLuk,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2407','Chrystal_Pumps','Crystal Pumps','5','20','10','100','0','0','5','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,10; bonus bLuk,5;','','');
REPLACE INTO `item_db_re` VALUES ('2408','Cuffs','Shackles','5','5000','2500','3000','0','0','18','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2409','Spiky_Heel','High Heels','5','8500','4250','600','0','0','10','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2409','Spiky_Heel','High Heels','5','8500','4250','600','0','0','10','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2410','Sleipnir','Sleipnir','5','20','10','3500','0','0','40','0','0','4294967295','63','2','64','0','94',NULL,'0','0','0','bonus bUnbreakableShoes,0; bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,25; bonus bSpeedRate,25; bonus bInt,25;','','');
REPLACE INTO `item_db_re` VALUES ('2411','Grave','Greaves','5','48000','24000','750','0','0','27','0','0','16512','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2412','Grave_','Greaves','5','54000','27000','750','0','0','27','0','1','16512','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2413','Safty_Boots','Safety Boots','5','34000','17000','350','0','0','22','0','0','16514','63','2','64','0','30',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2414','Novice_Boots','Novice Slippers','5','1','0','1','0','0','5','0','0','1','47','2','64','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2415','Slipper','Bunny Slipper','5','34000','17000','300','0','0','9','0','1','2147483647','63','2','64','0','30',NULL,'1','0','0','bonus bLuk,3; bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2415','Slipper','Bunny Slipper','5','34000','17000','300','0','0','9','0','1','2147483646','63','2','64','0','30',NULL,'1','0','0','bonus bLuk,3; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('2416','Novice_Shoes','Novice Shoes','5','35000','17500','500','0','0','8','0','1','1','47','2','64','0','40',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2417','Fricco_Shoes','Fricco\'s Shoes','5','30000','15000','500','0','0','12','0','0','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;','','');
-REPLACE INTO `item_db_re` VALUES ('2418','Vidar\'s_Boots','Vidar\'s Boots','5','30000','15000','650','0','0','13','0','0','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;','','');
-REPLACE INTO `item_db_re` VALUES ('2419','Goibne\'s_Combat_Boots','Goibne\'s Greaves','5','30000','15000','700','0','0','13','0','0','2147483647','63','2','64','0','54',NULL,'1','0','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2417','Fricco_Shoes','Fricco\'s Shoes','5','30000','15000','500','0','0','12','0','0','2147483646','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2; bonus2 bAddItemHealRate,Red_Potion,20; bonus2 bAddItemHealRate,Yellow_Potion,20; bonus2 bAddItemHealRate,Orange_Potion,20; bonus2 bAddItemHealRate,White_Potion,20;','','');
+REPLACE INTO `item_db_re` VALUES ('2418','Vidar\'s_Boots','Vidar\'s Boots','5','30000','15000','650','0','0','13','0','0','2147483646','63','2','64','0','65',NULL,'1','0','0','bonus bMaxHPrate,9; bonus bMaxSPrate,9;','','');
+REPLACE INTO `item_db_re` VALUES ('2419','Goibne\'s_Combat_Boots','Goibne\'s Greaves','5','30000','15000','700','0','0','13','0','0','2147483646','63','2','64','0','54',NULL,'1','0','0','bonus bMdef,3; bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
REPLACE INTO `item_db_re` VALUES ('2420','Angel\'s_Arrival','Angel\'s Reincarnation','5','10000','5000','300','0','0','8','0','1','1','47','2','64','0','25',NULL,'1','0','0','bonus bMaxHP,100;','','');
REPLACE INTO `item_db_re` VALUES ('2421','Valkyrie_Shoes','Valkyrian Shoes','5','0','0','500','0','0','13','0','1','1040382','58','2','64','0','0',NULL,'1','0','0','bonus bUnbreakableShoes,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bMaxHP,(BaseLevel*5); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bMaxSP,(JobLevel*2);','','');
REPLACE INTO `item_db_re` VALUES ('2422','High_Fashion_Sandals','High Fashion Sandals','5','24000','12000','200','0','0','7','0','1','8487700','63','2','64','0','40',NULL,'1','0','0','bonus bMdef,10;','','');
@@ -1462,11 +1462,11 @@ REPLACE INTO `item_db_re` VALUES ('2424','Tidal_Shoes','Tidal Shoes','5','20','1
REPLACE INTO `item_db_re` VALUES ('2425','Black_Leather_Boots','Black Leather Boots','5','20','10','500','0','0','16','0','0','1040382','58','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2426','Shadow_Walk','Shadow Walk','5','20','10','2000','0','0','0','0','0','1040382','58','2','64','0','75',NULL,'1','0','0','bonus bMdef,10; if(getskilllv(AS_CLOAKING)<2) { bonus5 bAutoSpellWhenHit,AS_CLOAKING,2,100,BF_MAGIC,0; } else bonus5 bAutoSpellWhenHit,AS_CLOAKING,getskilllv(AS_CLOAKING),100,BF_MAGIC,0;','','');
REPLACE INTO `item_db_re` VALUES ('2427','Golden_Shoes','Golden Shoes','5','20','10','300','0','0','4','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2428','Freyja_Boots','Freyja Boots','5','0','0','300','0','0','22','0','0','2147483647','63','2','64','0','0',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2428','Freyja_Boots','Freyja Boots','5','0','0','300','0','0','22','0','0','2147483646','63','2','64','0','0',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('2429','Iron_Boots01','Iron Boots','5','0','0','1500','0','0','5','0','0','941290','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2430','Iron_Boots02','Iron Boots','5','0','0','800','0','0','5','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2431','Valley_Shoes','Valley Shoes','5','20','10','0','0','0','10','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bMaxHPrate,7; bonus bMaxSPrate,7;','','');
-REPLACE INTO `item_db_re` VALUES ('2432','Spiky_Heel_','Highheels','5','8500','4250','600','0','0','10','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2432','Spiky_Heel_','Highheels','5','8500','4250','600','0','0','10','0','1','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2433','Diabolus_Boots','Diabolus Boots','5','20','10','250','0','0','15','0','1','1040256','58','2','64','0','0',NULL,'1','0','0','bonus bMaxHP,(BaseLevel*10);','','');
REPLACE INTO `item_db_re` VALUES ('2434','Black_Leather_Boots_','Black Leather Boots','5','20','10','500','0','0','16','0','1','1040382','58','2','64','0','55',NULL,'1','0','0','bonus bAgi,1; if(getrefine()>=9) bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2435','Battle_Greave','Battle Greave','5','10','5','0','0','0','15','0','1','577131746','63','2','64','0','80',NULL,'1','0','0','bonus bMaxHP,100; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
@@ -1478,10 +1478,10 @@ REPLACE INTO `item_db_re` VALUES ('2440','Sprint_Shoes','Sprint Shoes','5','20',
REPLACE INTO `item_db_re` VALUES ('2441','Beach_Sandal','Beach Sandals','5','20','10','200','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2442','Boots_Perforated','Red Stocking Boots','5','0','0','0','0','0','18','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','bonus bLuk,2; bonus bHPrecovRate,10; bonus bSPrecovRate,10; bonus3 bAutoSpellWhenHit,WZ_QUAGMIRE,3,30; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2443','Fish_Shoes','Fisher\'s Boots','5','10','5','250','0','0','0','0','0','4294967295','63','2','64','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2444','Krieger_Shoes1','Glorious Shoes','5','20','10','0','0','0','0','0','0','2147483647','63','2','64','0','81',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bSubRace,RC_DemiHuman,4; bonus3 bAutoSpellWhenHit,AL_INCAGI,1,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2445','Krieger_Shoes2','Glorious Popularized Shoes','5','20','10','0','0','0','5','0','0','2147483647','63','2','64','0','61',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2446','Krieger_Shoes3','Glorious Mass-Production Shoes','5','20','10','0','0','0','10','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2447','Military_Boots','Army Boots','5','1000','500','1000','0','0','5','0','0','2147483647','63','2','64','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2444','Krieger_Shoes1','Glorious Shoes','5','20','10','0','0','0','0','0','0','2147483646','63','2','64','0','81',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bSubRace,RC_DemiHuman,4; bonus3 bAutoSpellWhenHit,AL_INCAGI,1,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2445','Krieger_Shoes2','Glorious Popularized Shoes','5','20','10','0','0','0','5','0','0','2147483646','63','2','64','0','61',NULL,'1','0','0','bonus bMaxHPrate,5; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2446','Krieger_Shoes3','Glorious Mass-Production Shoes','5','20','10','0','0','0','10','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2447','Military_Boots','Army Boots','5','1000','500','1000','0','0','5','0','0','2147483646','63','2','64','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2448','Air_Boss','Air Boss','5','0','0','500','0','0','2','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2449','Variant_Shoes_M','Variant Shoes','5','20','10','500','0','0','3','0','0','1040382','58','2','64','0','85',NULL,'1','0','0','bonus bMaxHPrate,20-getrefine(); bonus bMaxSPrate,20-getrefine(); bonus bDef,getrefine()/2;','','');
REPLACE INTO `item_db_re` VALUES ('2450','Vital_Tree_Shoes','Vital Tree Shoes','5','20','10','500','0','0','16','0','0','1040382','58','2','64','0','60',NULL,'1','0','0','bonus bMaxHPrate,10; bonus2 bHPRegenRate,30,10000; bonus bHealPower2,5; bonus bAddItemHealRate,5; bonus bMdef,3; bonus bVit,2;','','');
@@ -1493,7 +1493,7 @@ REPLACE INTO `item_db_re` VALUES ('2455','Time_Keepr_Boots','Guardian Boots','5'
REPLACE INTO `item_db_re` VALUES ('2456','Para_Team_Boots1','Eden Group Boots I','5','0','0','0','0','0','14','0','0','4294967295','63','2','64','0','12',NULL,'0','0','0','bonus bHPrecovRate,10; bonus bSPrecovRate,2;','','');
REPLACE INTO `item_db_re` VALUES ('2457','Para_Team_Boots2','Eden Group Boots II','5','0','0','0','0','0','16','0','0','4294967295','63','2','64','0','26',NULL,'0','0','0','bonus bHPrecovRate,12; bonus bSPrecovRate,4;','','');
REPLACE INTO `item_db_re` VALUES ('2458','Para_Team_Boots3','Eden Group Boots III','5','0','0','0','0','0','18','0','0','4294967295','63','2','64','0','40',NULL,'0','0','0','bonus bHPrecovRate,14; bonus bSPrecovRate,6;','','');
-REPLACE INTO `item_db_re` VALUES ('2459','Upg_Shoes','Reinforcement Shoes','5','20','10','200','0','0','15','0','1','2147483647','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2459','Upg_Shoes','Reinforcement Shoes','5','20','10','200','0','0','15','0','1','2147483646','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2460','Upg_Boots','Reinforcement Boots','5','20','10','300','0','0','21','0','1','24009962','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2461','Upg_Greave','Reinforcement Greaves','5','20','10','400','0','0','32','0','1','16512','63','2','64','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2462','Sleipnir_C','Ephemeral Sleipnir','5','20','10','0','0','0','40','0','0','4294967295','63','2','64','0','94',NULL,'0','0','0','bonus bUnbreakableShoes,0; bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25;','','');
@@ -1522,36 +1522,36 @@ REPLACE INTO `item_db_re` VALUES ('2484','Siege_Boots','WoE Boots','5','10','5',
REPLACE INTO `item_db_re` VALUES ('2485','Siege_Shoes','WoE Shoes','5','10','5','350','0','0','15','0','1','8487701','63','2','64','0','95',NULL,'1','0','0','bonus bMdef,10; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db_re` VALUES ('2486','Shadow_Walk_','Shadow Walker','5','20','10','2000','0','0','0','0','1','1040382','58','2','64','0','75',NULL,'1','0','0','bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2487','Vital_Tree_Shoes_','Sephiroth\'s Shoes','5','20','10','500','0','0','16','0','1','1040382','58','2','64','0','60',NULL,'1','0','0','bonus bVit,2; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2488','Fricco_Shoes_','Freyja Boots','5','30000','15000','500','0','0','12','0','1','2147483647','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2489','Vidar\'s_Boots_','Vidar\'s Boots','5','30000','15000','650','0','0','13','0','1','2147483647','63','2','64','0','65',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2488','Fricco_Shoes_','Freyja Boots','5','30000','15000','500','0','0','12','0','1','2147483646','63','2','64','0','65',NULL,'1','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2489','Vidar\'s_Boots_','Vidar\'s Boots','5','30000','15000','650','0','0','13','0','1','2147483646','63','2','64','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2491','Bangungot_Boots','Bangungot Boots of Nightmare','5','20','10','600','0','0','10','0','0','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,getrefine(); if(getrefine()>=14) { bonus bSpeedRate,25; }','','');
REPLACE INTO `item_db_re` VALUES ('2492','Bayani_Bangungot_Boots','Bangungot Boots(Bayani)','5','20','10','600','0','0','10','0','1','4294967295','63','2','64','0','0',NULL,'1','0','0','bonus bMdef,getrefine(); if(getrefine()>=12) { bonus bSpeedRate,25; }','','');
REPLACE INTO `item_db_re` VALUES ('2495','Egir_Shoes','Aegir Shoes','5','200000','100000','300','0','0','13','0','1','4294967295','63','2','64','0','110',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2501','Hood','Hood','5','1000','500','200','0','0','4','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2502','Hood_','Hood','5','1000','500','200','0','0','4','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2503','Muffler','Muffler','5','5000','2500','400','0','0','8','0','0','2147483647','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2504','Muffler_','Muffler','5','5000','2500','400','0','0','8','0','1','2147483647','63','2','4','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2503','Muffler','Muffler','5','5000','2500','400','0','0','8','0','0','2147483646','63','2','4','0','0',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2504','Muffler_','Muffler','5','5000','2500','400','0','0','8','0','1','2147483646','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2505','Manteau','Manteau','5','32000','16000','600','0','0','13','0','0','6706402','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2506','Manteau_','Manteau','5','32000','16000','600','0','0','13','0','1','6706402','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2507','Cape_Of_Ancient_Lord','Ancient Cape','5','82000','41000','600','0','0','9','0','0','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2508','Ragamuffin_Cape','Ragamuffin Manteau','5','56000','28000','500','0','0','4','0','0','2147483647','63','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2507','Cape_Of_Ancient_Lord','Ancient Cape','5','82000','41000','600','0','0','9','0','0','2147483646','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2508','Ragamuffin_Cape','Ragamuffin Manteau','5','56000','28000','500','0','0','4','0','0','2147483646','63','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2509','Clack_Of_Servival','Survivor\'s Manteau','5','20000','10000','550','0','0','10','0','0','8454660','63','2','4','0','75',NULL,'1','0','0','bonus bMdef,5; bonus bVit,10;','','');
REPLACE INTO `item_db_re` VALUES ('2510','Novice_Hood','Somber Novice Hood','5','1','0','1','0','0','4','0','0','1','47','2','4','0','0',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,20;','','');
-REPLACE INTO `item_db_re` VALUES ('2511','Skeleton\'s_Cape','Skeleton Manteau','5','5000','2500','700','0','0','13','0','0','2147483647','63','2','4','0','75',NULL,'1','0','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;','','');
+REPLACE INTO `item_db_re` VALUES ('2511','Skeleton\'s_Cape','Skeleton Manteau','5','5000','2500','700','0','0','13','0','0','2147483646','63','2','4','0','75',NULL,'1','0','0','bonus bStr,2; bonus bInt,-3; bonus bDex,2; bonus bVit,-3; bonus bLuk,2; bonus bAgi,-4;','','');
REPLACE INTO `item_db_re` VALUES ('2512','Novice_Manteau','Novice Manteau','5','50000','25000','500','0','0','7','0','1','1','47','2','4','0','40',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2513','Celestial_Robe','Heavenly Maiden Robe','5','20','10','500','0','0','18','0','1','2147483647','63','2','4','0','80',NULL,'1','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2513','Celestial_Robe','Heavenly Maiden Robe','5','20','10','500','0','0','18','0','1','2147483646','63','2','4','0','80',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2514','Pauldron','Pauldron','5','20','10','800','0','0','25','0','1','414946','63','2','4','0','80',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2515','Wing_Of_Eagle','Eagle Wing','5','20000','10000','300','0','0','12','0','1','8454660','63','2','4','0','85',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2516','Falcon_Robe','Falcon Muffler','5','30000','15000','400','0','0','8','0','0','2147483647','63','2','4','0','65',NULL,'1','0','0','bonus bFlee,15; bonus bFlee2,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2517','Vali\'s_Manteau','Vali\'s Manteau','5','30000','15000','600','0','0','13','0','0','2147483647','63','2','4','0','65',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,15;','','');
-REPLACE INTO `item_db_re` VALUES ('2518','Morpheus\'s_Shawl','Morpheus\'s Shawl','5','30000','15000','600','0','0','8','0','0','2147483647','63','2','4','0','33',NULL,'1','0','0','bonus bMaxSPrate,10; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2519','Morrigane\'s_Manteau','Morrigane\'s Manteau','5','30000','15000','600','0','0','9','0','0','2147483647','63','2','4','0','61',NULL,'1','0','0','bonus bLuk,2; bonus bFlee2,8;','','');
-REPLACE INTO `item_db_re` VALUES ('2520','Goibne\'s_Shoulder_Arms','Goibne\'s Spaulders','5','30000','15000','700','0','0','11','0','0','2147483647','63','2','4','0','54',NULL,'1','0','0','bonus bLongAtkDef,10; bonus bMdef,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2516','Falcon_Robe','Falcon Muffler','5','30000','15000','400','0','0','8','0','0','2147483646','63','2','4','0','65',NULL,'1','0','0','bonus bFlee,15; bonus bFlee2,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2517','Vali\'s_Manteau','Vali\'s Manteau','5','30000','15000','600','0','0','13','0','0','2147483646','63','2','4','0','65',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,15;','','');
+REPLACE INTO `item_db_re` VALUES ('2518','Morpheus\'s_Shawl','Morpheus\'s Shawl','5','30000','15000','600','0','0','8','0','0','2147483646','63','2','4','0','33',NULL,'1','0','0','bonus bMaxSPrate,10; bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2519','Morrigane\'s_Manteau','Morrigane\'s Manteau','5','30000','15000','600','0','0','9','0','0','2147483646','63','2','4','0','61',NULL,'1','0','0','bonus bLuk,2; bonus bFlee2,8;','','');
+REPLACE INTO `item_db_re` VALUES ('2520','Goibne\'s_Shoulder_Arms','Goibne\'s Spaulders','5','30000','15000','700','0','0','11','0','0','2147483646','63','2','4','0','54',NULL,'1','0','0','bonus bLongAtkDef,10; bonus bMdef,2; bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('2521','Angel\'s_Warmth','Angelic Cardigan','5','10000','5000','400','0','0','6','0','1','1','47','2','4','0','20',NULL,'1','0','0','bonus bHPrecovRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('2522','Undershirt','Undershirt','5','20000','10000','150','0','0','5','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2523','Undershirt_','Undershirt','5','20000','10000','150','0','0','5','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2524','Valkyrie_Manteau','Valkyrian Manteau','5','0','0','500','0','0','10','0','1','1040382','58','2','4','0','0',NULL,'1','0','0','bonus bUnbreakableGarment,0; if(BaseClass==Job_Mage||BaseClass==Job_Archer||BaseClass==Job_Acolyte) bonus bFlee2,5+(getequiprefinerycnt(EQI_GARMENT)*2); else if(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief) bonus bShortWeaponDamageReturn,5+(getequiprefinerycnt(EQI_GARMENT)*2);','','');
-REPLACE INTO `item_db_re` VALUES ('2525','Cape_Of_Ancient_Lord_','Ancient Cape','5','82000','41000','600','0','0','9','0','1','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2525','Cape_Of_Ancient_Lord_','Ancient Cape','5','82000','41000','600','0','0','9','0','1','2147483646','63','2','4','0','40',NULL,'1','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2526','Dragon_Scale_Coat','Coat of Dragon Scale','5','20','10','10','0','0','14','0','0','4294967295','63','2','4','0','50',NULL,'1','0','0','bonus bMaxHP,300;','','');
REPLACE INTO `item_db_re` VALUES ('2527','Dragon_Breath','Dragon Breath','5','20','10','600','0','0','16','0','1','1040382','58','2','4','0','48',NULL,'1','0','0','bonus2 bSubRace,RC_Dragon,15;','','');
REPLACE INTO `item_db_re` VALUES ('2528','Wool_Scarf','Wool Scarf','5','20','10','500','0','0','11','0','1','1040382','58','2','4','0','55',NULL,'1','0','0','bonus bMdef,4;','','');
@@ -1559,10 +1559,10 @@ REPLACE INTO `item_db_re` VALUES ('2529','Rider_Insignia','Rider Insignia','5','
REPLACE INTO `item_db_re` VALUES ('2530','Rider_Insignia_','Rider Insignia','5','20','10','500','0','0','13','0','1','1040382','58','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2531','Ulfhedinn','Ulfhedinn','5','20','10','700','0','0','13','0','1','414946','58','2','4','0','70',NULL,'1','0','0','bonus3 bAutoSpellWhenHit,NPC_STONESKIN,6,20;','','');
REPLACE INTO `item_db_re` VALUES ('2532','Mithril_Magic_Cape','Mithril Magic Cape','5','20','10','400','0','0','8','0','1','625436','58','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,1,200,BF_MAGIC,0;','','');
-REPLACE INTO `item_db_re` VALUES ('2533','Freyja_Cape','Freyja Cape','5','0','0','200','0','0','10','0','0','2147483647','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,15;','','');
+REPLACE INTO `item_db_re` VALUES ('2533','Freyja_Cape','Freyja Cape','5','0','0','200','0','0','10','0','0','2147483646','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,15;','','');
REPLACE INTO `item_db_re` VALUES ('2534','Ruffler','Ruffler','5','20','10','0','0','0','10','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,17; bonus bFlee,17;','','');
REPLACE INTO `item_db_re` VALUES ('2535','Cloak_Of_Survival_C','Cloak Of Survival','5','1','0','0','0','0','17','0','0','8454660','63','2','4','0','0',NULL,'0','0','0','bonus bVit,10; bonus bMdef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2536','Skin_Of_Ventus','Skin of Ventus','5','20','10','250','0','0','7','0','1','2147483647','63','2','4','0','60',NULL,'1','0','0','bonus bMdef,2; bonus bMaxHP,200; bonus bFlee,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2536','Skin_Of_Ventus','Skin of Ventus','5','20','10','250','0','0','7','0','1','2147483646','63','2','4','0','60',NULL,'1','0','0','bonus bMdef,2; bonus bMaxHP,200; bonus bFlee,10;','','');
REPLACE INTO `item_db_re` VALUES ('2537','Diabolus_Manteau','Diabolus Manteau','5','20','10','250','0','0','15','0','1','1040256','58','2','4','0','0',NULL,'1','0','0','bonus2 bSubEle,Ele_Neutral,5; bonus bMaxHP,100; bonus2 bAddDamageClass,1916,10; bonus2 bAddDamageClass,1917,10;','','');
REPLACE INTO `item_db_re` VALUES ('2538','Commander_Manteau','Captain\'s Manteau','5','10','5','0','0','0','28','0','1','577131746','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
REPLACE INTO `item_db_re` VALUES ('2539','Commander_Manteau_','Commander\'s Manteau','5','10','5','0','0','0','20','0','1','9014044','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHP,50; bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,1;','','');
@@ -1575,7 +1575,7 @@ REPLACE INTO `item_db_re` VALUES ('2545','Musika','Musika','5','20','10','500','
REPLACE INTO `item_db_re` VALUES ('2546','Beach_Manteau','Beach Manteau','5','20','10','600','0','0','0','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bStr,1; bonus bInt,1; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2547','Cheap_Running_Shirts','Cheap Undershirt','5','0','0','0','0','0','11','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','bonus bDex,2; bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,10; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2548','Muffler_C','Neo Muffler','5','0','0','0','0','0','22','0','0','1040382','58','2','4','0','95',NULL,'0','0','0','bonus2 bSubRace,RC_DemiHuman,10; bonus bMaxHPrate,10; bonus2 bSubEle,Ele_Water,5; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Holy,5; bonus2 bSubEle,Ele_Dark,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2549','Krieger_Muffler1','Glorious Muffler','5','20','10','0','0','0','3','0','0','2147483647','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHPrate,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2549','Krieger_Muffler1','Glorious Muffler','5','20','10','0','0','0','3','0','0','2147483646','63','2','4','0','80',NULL,'1','0','0','bonus bMaxHPrate,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('2550','Fisher\'s_Muffler','Fisher\'s Muffler','5','20','10','200','0','0','0','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2551','Rider_Insignia_M','Crest of the Rider','5','20','10','500','0','0','4','0','1','1040382','58','2','4','0','55',NULL,'1','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2552','Mithril_Magic_Cape_M','Mithril Magic Manteau','5','20','10','400','0','0','3','0','1','625436','58','2','4','0','70',NULL,'1','0','0','bonus bMdef,3; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,1,200,BF_MAGIC,0;','','');
@@ -1588,7 +1588,7 @@ REPLACE INTO `item_db_re` VALUES ('2558','Freyja_SScarf90','Freya Soul Scarf','5
REPLACE INTO `item_db_re` VALUES ('2559','Time_Keepr_Manteau','Guardian Manteau','5','30000','15000','0','0','0','9','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMdef,1; bonus bFlee,10; bonus2 bSubEle,Ele_Neutral,10;','','');
REPLACE INTO `item_db_re` VALUES ('2560','Para_Team_Manteau','Eden Group Manteau','5','0','0','0','0','0','14','0','0','4294967295','63','2','4','0','12',NULL,'0','0','0','bonus2 bSubEle,Ele_Neutral,10;','','');
REPLACE INTO `item_db_re` VALUES ('2561','Upg_Hood','Reinforcement Hood','5','0','0','100','0','0','9','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2562','Upg_Muffler','Reinforcement Muffler','5','20','10','200','0','0','13','0','1','2147483647','63','2','4','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2562','Upg_Muffler','Reinforcement Muffler','5','20','10','200','0','0','13','0','1','2147483646','63','2','4','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2563','Upg_Manteau','Reinforcement Manteau','5','20','10','300','0','0','18','0','1','6706402','63','2','4','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2564','Feral_Tail','Feral Tail','5','20','10','0','0','0','16','0','0','4294967295','63','2','4','0','75',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2565','Beach_Towel','Beach Towel','5','20','10','100','0','0','2','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bMdef,3; bonus bFlee,7;','','');
@@ -1612,54 +1612,54 @@ REPLACE INTO `item_db_re` VALUES ('2582','Salvage_Cape','Salvage Cape','5','5600
REPLACE INTO `item_db_re` VALUES ('2583','Holy_Cape','Holy Cape','5','20','10','100','0','0','5','0','1','4294967295','63','2','4','0','50',NULL,'1','0','0','bonus bDex,-5; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2584','Wanderer_Outer','Coat Of Wandering','5','20','10','500','0','0','8','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2585','Muffler_Of_Valor','Muffler Of Valor','5','0','0','0','0','0','4','0','0','4294967295','63','2','4','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2586','Siege_Manteau','WoE Manteau','5','10','5','600','0','0','32','0','1','2147483647','63','2','4','0','95',NULL,'1','0','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2586','Siege_Manteau','WoE Manteau','5','10','5','600','0','0','32','0','1','2147483646','63','2','4','0','95',NULL,'1','0','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,2;','','');
REPLACE INTO `item_db_re` VALUES ('2587','Siege_Muffler','WoE Muffler','5','10','5','400','0','0','15','0','1','4294967295','63','2','4','0','95',NULL,'1','0','0','bonus bMdef,10; bonus2 bSubRace,RC_DemiHuman,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2588','Ragamuffin_Cape_','Rag mantle','5','56000','28000','500','0','0','4','0','1','2147483647','63','2','4','0','40',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2588','Ragamuffin_Cape_','Rag mantle','5','56000','28000','500','0','0','4','0','1','2147483646','63','2','4','0','40',NULL,'1','0','0','bonus bUnbreakableGarment,0; bonus bMdef,10;','','');
REPLACE INTO `item_db_re` VALUES ('2589','Fallen_Angel_Wing','Fallen Angel Wing','5','0','0','200','0','0','18','0','1','4294967295','63','2','4','0','0',NULL,'1','3','0','bonus bLuk,2; bonus bMdef,18;','','');
REPLACE INTO `item_db_re` VALUES ('2590','Buwaya_Cloth','Buwaya Sack Cloth','5','20','10','200','0','0','8','0','0','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bHealPower2,getrefine()/3; bonus bAddItemHealRate,getrefine()/3; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2591','Bayani_Buwaya_Cloth','Buwaya Sack Cloth(Bayani)','5','20','10','200','0','0','8','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','bonus bHealPower2,getrefine(); bonus bAddItemHealRate,getrefine(); bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10;','','');
REPLACE INTO `item_db_re` VALUES ('2592','Boss_Brownie_Manteau','Cloak of Domovoi','5','20','10','100','0','0','3','0','0','4294967295','63','2','4','0','50',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2593','Flow_Manteau','Furowamanto','5','20','10','700','0','0','20','0','1','4294967295','63','2','4','0','65',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2594','Wrapping_Manteau','Furoshiki Cloak','5','20','10','100','0','0','0','0','1','4294967295','63','2','4','0','0',NULL,'1','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2601','Ring','Ring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2602','Earring','Earring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2603','Necklace','Necklace','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bVit,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2604','Glove','Glove','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bDex,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2605','Brooch','Brooch','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2601','Ring','Ring','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2602','Earring','Earring','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2603','Necklace','Necklace','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bVit,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2604','Glove','Glove','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bDex,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2605','Brooch','Brooch','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('2607','Clip','Clip','5','30000','15000','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxSP,10; bonus bMaxHP,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2608','Rosary','Rosary','5','15000','7500','100','0','0','0','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2608','Rosary','Rosary','5','15000','7500','100','0','0','0','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,2;','','');
REPLACE INTO `item_db_re` VALUES ('2609','Skul_Ring','Skull Ring','5','10000','5000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2610','Gold_Ring','Gold Ring','5','30000','15000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2611','Silver_Ring','Silver Ring','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2612','Flower_Ring','Flower Ring','5','1500','750','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2613','Diamond_Ring','Diamond Ring','5','45000','22500','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2614','An_Eye_Of_Dullahan','Eye of Dullahan','5','90000','45000','100','0','0','0','0','0','2147483647','63','2','136','0','50',NULL,'0','0','0','bonus2 bResEff,Eff_Poison,10000; bonus2 bSubRace,RC_Undead,4; bonus2 bSubRace,RC_Demon,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2615','Safety_Ring','Safety Ring','5','75000','37500','100','0','0','5','0','0','2147483647','63','2','136','0','40',NULL,'0','0','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2616','Critical_Ring','Critical Ring','5','75000','37500','100','0','0','0','0','0','2147483647','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2617','Mitten_Of_Presbyter','Celebrant\'s Mitten','5','2','1','100','0','0','1','0','0','2147483647','63','2','136','0','35',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2618','Matyr\'s_Flea_Guard','Matyr\'s Leash','5','2','1','100','0','0','1','0','0','2147483647','63','2','136','0','35',NULL,'0','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2614','An_Eye_Of_Dullahan','Eye of Dullahan','5','90000','45000','100','0','0','0','0','0','2147483646','63','2','136','0','50',NULL,'0','0','0','bonus2 bResEff,Eff_Poison,10000; bonus2 bSubRace,RC_Undead,4; bonus2 bSubRace,RC_Demon,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2615','Safety_Ring','Safety Ring','5','75000','37500','100','0','0','5','0','0','2147483646','63','2','136','0','40',NULL,'0','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2616','Critical_Ring','Critical Ring','5','75000','37500','100','0','0','0','0','0','2147483646','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2617','Mitten_Of_Presbyter','Celebrant\'s Mitten','5','2','1','100','0','0','1','0','0','2147483646','63','2','136','0','35',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2618','Matyr\'s_Flea_Guard','Matyr\'s Leash','5','2','1','100','0','0','1','0','0','2147483646','63','2','136','0','35',NULL,'0','0','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2619','Thimble_Of_Archer','Bow Thimble','5','10000','5000','100','0','0','0','0','0','526344','63','2','136','0','65',NULL,'0','0','0','bonus bLongAtkRate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2620','Ring_Of_Rogue','Rogue\'s Treasure','5','10000','5000','100','0','0','0','0','0','570560576','63','2','136','0','70',NULL,'0','0','0','if(readparam(bStr)>=90) { bonus bHit,10; bonus bFlee,10; } if(readparam(bAgi)>=90) { bonus bBaseAtk,10; bonus bCritical,10; }','','');
-REPLACE INTO `item_db_re` VALUES ('2621','Ring_','Ring','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2622','Earring_','Earring','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2623','Necklace_','Necklace','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2624','Glove_','Glove','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2625','Brooch_','Brooch','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2626','Rosary_','Rosary','5','15000','7500','200','0','0','0','0','1','2147483647','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,3; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2621','Ring_','Ring','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2622','Earring_','Earring','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2623','Necklace_','Necklace','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2624','Glove_','Glove','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2625','Brooch_','Brooch','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2626','Rosary_','Rosary','5','15000','7500','200','0','0','0','0','1','2147483646','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,3; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2627','Belt','Belt','5','20000','10000','1200','0','0','0','0','1','4294967295','63','2','136','0','25',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2628','Novice_Armlet','Novice Armlet','5','400','200','200','0','0','0','0','1','1','47','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2629','Magingiorde','Magingiorde','5','20','10','8000','0','0','2','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bStr,40+BaseLevel/5; bonus bMdef,7; if(readparam(bStr)==120) bonus2 bAddRace,RC_Boss,10;','','');
REPLACE INTO `item_db_re` VALUES ('2630','Brysinggamen','Brysinggamen','5','20','10','1500','0','0','1','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bDex,6; bonus bStr,6; bonus bAgi,6; bonus bVit,6; bonus bInt,10; bonus bLuk,10; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2631','First_Age_Ring','Celebration Ring','5','1','0','10','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2632','Korean_Trinket','Korean Trinket','5','125000','62500','100','0','0','1','0','0','2147483647','63','2','136','0','65',NULL,'0','0','0','bonus bVit,1; bonus bDex,1; bonus bLuk,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2633','Jade_Ring','Jade Ring','5','204000','102000','100','0','0','0','0','0','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bStr,2; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2632','Korean_Trinket','Korean Trinket','5','125000','62500','100','0','0','1','0','0','2147483646','63','2','136','0','65',NULL,'0','0','0','bonus bVit,1; bonus bDex,1; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2633','Jade_Ring','Jade Ring','5','204000','102000','100','0','0','0','0','0','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus bStr,2; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('2634','Bridegroom_Ring','Wedding Ring','5','0','0','0','0','0','0','0','0','4294967295','63','1','136','0','0',NULL,'0','0','0','skill WE_MALE,1; skill WE_FEMALE,1; skill WE_CALLPARTNER,1;','','');
REPLACE INTO `item_db_re` VALUES ('2635','Bride_Ring','Wedding Ring','5','0','0','0','0','0','0','0','0','4294967295','63','0','136','0','0',NULL,'0','0','0','skill WE_MALE,1; skill WE_FEMALE,1; skill WE_CALLPARTNER,1;','','');
REPLACE INTO `item_db_re` VALUES ('2636','Gold_Ring_','Gold Christmas Ring','5','30000','15000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2637','Silver_Ring_','Silver Christmas Ring','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2638','Exorcize_Sachet','Sacred Incense','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('2639','Purification_Sachet','Occult Incense','5','20000','10000','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,1; bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2640','Kafra_Ring','Kafra Ring','5','40000','20000','200','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus bLuk,1; bonus bMdef,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2640','Kafra_Ring','Kafra Ring','5','40000','20000','200','0','0','1','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bAgi,1; bonus bLuk,1; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('2641','Fashionable_Sack','Fashion Hip Sack','5','20','10','700','0','0','0','0','0','263200','63','2','136','0','50',NULL,'0','0','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('2642','Serin\'s_Gold_Ring','Serin\'s Gold Ring','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2643','Serin\'s_Gold_Ring_','Serin\'s Gold Ring','5','45000','22500','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1667,14 +1667,14 @@ REPLACE INTO `item_db_re` VALUES ('2644','The_Sign_','The Sign','5','2','1','0',
REPLACE INTO `item_db_re` VALUES ('2645','Moonlight_Ring','Moonlight Ring','5','40000','20000','200','0','0','0','0','0','570560576','63','2','136','0','60',NULL,'0','0','0','bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('2646','Bunch_Of_Carnation','Bunch of Carnation','5','2','1','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db_re` VALUES ('2647','Nile_Rose','Nile Rose','5','2','1','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2648','Morpheus\'s_Ring','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2649','Morpheus\'s_Armlet','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','0','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2650','Morrigane\'s_Belt','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bBaseAtk,5; bonus bCritical,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2651','Morrigane\'s_Pendant','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2; bonus bCritical,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2648','Morpheus\'s_Ring','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2649','Morpheus\'s_Armlet','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','0','2147483646','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2650','Morrigane\'s_Belt','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','0','2147483646','63','2','136','0','61',NULL,'0','0','0','bonus bBaseAtk,5; bonus bCritical,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2651','Morrigane\'s_Pendant','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','0','2147483646','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2; bonus bCritical,3;','','');
REPLACE INTO `item_db_re` VALUES ('2652','Cursed_Lucky_Brooch','Goddess of Fortune\'s Cursed Brooch','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','40',NULL,'0','0','0','bonus bCritical,6; bonus2 bAddEff2,Eff_Curse,50;','','');
REPLACE INTO `item_db_re` VALUES ('2653','Sacrifice_Ring','Sacrifice Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','90',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2654','Shinobi\'s_Sash','Shinobi Sash','5','20000','10000','300','0','0','1','0','0','570560576','63','2','136','0','30',NULL,'0','0','0','bonus bStr,1; bonus bAgi,1; bonus bMdef,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2655','Bloody_Iron_Ball','Bloodied Shackle Ball','5','50000','25000','4000','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2655','Bloody_Iron_Ball','Bloodied Shackle Ball','5','50000','25000','4000','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2656','Hyper_Changer','Armor Charm','5','20000','10000','1000','0','0','0','0','0','414946','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,50;','','');
REPLACE INTO `item_db_re` VALUES ('2657','Lab_Passport','Laboratory Permit','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2658','Nile_Rose_','Nile Rose','5','2','1','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,10;','','');
@@ -1683,16 +1683,16 @@ REPLACE INTO `item_db_re` VALUES ('2660','Vesper_Core02','Vesper Core 02','5','2
REPLACE INTO `item_db_re` VALUES ('2661','Vesper_Core03','Vesper Core 03','5','20','10','100','0','0','1','0','0','1040256','58','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('2662','Vesper_Core04','Vesper Core 04','5','20','10','100','0','0','1','0','0','1040256','58','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
REPLACE INTO `item_db_re` VALUES ('2663','Gauntlet_Of_Accuracy','Gauntlet of Hit','5','20','10','900','0','0','0','0','0','4294967295','63','2','136','0','75',NULL,'0','0','0','bonus bHit,15; bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2664','Scarf_Belt','Belcarf','5','20','10','200','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bDex,2; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2664','Scarf_Belt','Belcarf','5','20','10','200','0','0','0','0','0','2147483646','63','2','136','0','75',NULL,'0','0','0','bonus bDex,2; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('2665','Ring_Of_Exorcism','Exorcising Ring','5','20','10','500','0','0','0','0','0','33040','63','2','136','0','60',NULL,'0','0','0','bonus bMdef,1; bonus2 bExpAddRace,RC_Undead,5; bonus2 bExpAddRace,RC_Demon,5;','','');
REPLACE INTO `item_db_re` VALUES ('2666','Lamp_Of_Hope','Lantern of Hope','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,2; bonus2 bResEff,Eff_Blind,1000;','','');
-REPLACE INTO `item_db_re` VALUES ('2667','Glove_Of_Archer','Renown Archer\'s Gloves','5','20','10','300','0','0','0','0','0','2147483647','63','2','136','0','60',NULL,'0','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2667','Glove_Of_Archer','Renown Archer\'s Gloves','5','20','10','300','0','0','0','0','0','2147483646','63','2','136','0','60',NULL,'0','0','0','bonus bHit,5; bonus bCritical,5; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('2668','Women\'s_Glory','Woman Glory','5','0','0','500','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2669','Golden_Necklace_','RJC Necklace','5','30000','15000','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxSP,10;','','');
REPLACE INTO `item_db_re` VALUES ('2670','Ring_Of_Longing','Ring of Longing','5','20','10','100','0','0','1','0','0','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('2671','Thimble_Of_Archer_','Bow Thimble','5','10000','5000','100','0','0','0','0','1','526344','63','2','136','0','65',NULL,'0','0','0','bonus bLongAtkRate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2672','Anniversary_Ring','3rd Anniversary Celebration Ring','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2673','Shining_Ring','Warrior\'s Shining Ring','5','0','0','100','0','0','0','0','0','2147483647','63','2','136','0','48',NULL,'0','0','0','bonus bBaseAtk,10; bonus bSPrecovRate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2672','Anniversary_Ring','3rd Anniversary Celebration Ring','5','20','10','100','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2673','Shining_Ring','Warrior\'s Shining Ring','5','0','0','100','0','0','0','0','0','2147483646','63','2','136','0','48',NULL,'0','0','0','bonus bBaseAtk,10; bonus bSPrecovRate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2674','Honor_Ring','Ring of Honor','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2675','Lord_Ring','Lord Ring','5','0','0','10','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db_re` VALUES ('2676','Hunter_Earring','Hunter\'s Earring','5','20','10','300','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddMonsterDropItem,7618,100;','','');
@@ -1701,24 +1701,24 @@ REPLACE INTO `item_db_re` VALUES ('2678','Ring_Of_Flame_Lord','Ring Of Flame Lor
REPLACE INTO `item_db_re` VALUES ('2679','Ring_Of_Resonance','Ring Of Resonance','5','20','10','100','0','0','2','0','0','1040256','58','2','136','0','0',NULL,'0','0','0','bonus bAgi,2; bonus bVit,1; bonus bMdef,2; bonus4 bAutoSpellWhenHit,WZ_QUAGMIRE,1,50,0; bonus3 bAutoSpellWhenHit,AS_SPLASHER,10,20; bonus3 bAutoSpellWhenHit,AL_HEAL,10,30; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,3,20; bonus3 bAutoSpellWhenHit,CG_TAROTCARD,5,20;','','');
REPLACE INTO `item_db_re` VALUES ('2680','Lesser_Elemental_Ring','Lesser Elemental Ring','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1; bonus3 bAutoSpell,WZ_ESTIMATION,1,80; bonus3 bAutoSpell,MC_IDENTIFY,1,50; bonus3 bAutoSpell,TF_PICKSTONE,1,100; bonus3 bAutoSpell,BS_GREED,1,10; bonus3 bAutoSpellWhenHit,TK_RUN,5,20; bonus3 bAutoSpellWhenHit,TK_HIGHJUMP,3,30; bonus3 bAutoSpellWhenHit,NV_FIRSTAID,1,100; bonus3 bAutoSpellWhenHit,TF_BACKSLIDING,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('2681','Republic_Ring','Republic Anniversary Ring','5','20','10','1000','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2682','Ring_Of_Water','Ring of Water','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2683','Ring_Of_Fire','Ring of Fire','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Fire,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2684','Ring_Of_Wind','Ring of Wind','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Wind,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2685','Ring_Of_Earth','Ring of Earth','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Earth,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2686','Elven_Ears_C','Rental Elven Ears','5','1','0','0','0','0','2','0','0','2147483647','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2687','Steel_Flower_C','Rental Steel Flower','5','1','0','0','0','0','1','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2688','Critical_Ring_C','Rental Critical Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2689','Earring_C','Rental Earring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bInt,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2690','Ring_C','Rental Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2691','Necklace_C','Rental Necklace','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2692','Glove_C','Glove','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2693','Brooch_C','Rental Brooch','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2694','Rosary_C','Rental Rosary','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2695','Safety_Ring_C','Rental Safety Ring','5','1','0','0','0','0','8','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,8;','','');
-REPLACE INTO `item_db_re` VALUES ('2696','Vesper_Core01_C','Vesper Core 01','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2697','Vesper_Core02_C','Vesper Core 02','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2698','Vesper_Core03_C','Vesper Core 03','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2699','Vesper_Core04_C','Vesper Core 04','5','1','0','0','0','0','1','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2682','Ring_Of_Water','Ring of Water','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2683','Ring_Of_Fire','Ring of Fire','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Fire,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2684','Ring_Of_Wind','Ring of Wind','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Wind,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2685','Ring_Of_Earth','Ring of Earth','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','20',NULL,'0','0','0','bonus2 bSubEle,Ele_Earth,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2686','Elven_Ears_C','Rental Elven Ears','5','1','0','0','0','0','2','0','0','2147483646','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2687','Steel_Flower_C','Rental Steel Flower','5','1','0','0','0','0','1','0','0','2147483646','63','2','1','0','0',NULL,'0','56','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2688','Critical_Ring_C','Rental Critical Ring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2689','Earring_C','Rental Earring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2690','Ring_C','Rental Ring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2691','Necklace_C','Rental Necklace','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2692','Glove_C','Glove','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2693','Brooch_C','Rental Brooch','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2694','Rosary_C','Rental Rosary','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5; bonus bLuk,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2695','Safety_Ring_C','Rental Safety Ring','5','1','0','0','0','0','8','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,8;','','');
+REPLACE INTO `item_db_re` VALUES ('2696','Vesper_Core01_C','Vesper Core 01','5','1','0','0','0','0','1','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bInt,2; bonus bMaxSPrate,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2697','Vesper_Core02_C','Vesper Core 02','5','1','0','0','0','0','1','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bStr,3; bonus bBaseAtk,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2698','Vesper_Core03_C','Vesper Core 03','5','1','0','0','0','0','1','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bAgi,3; bonus bFlee,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2699','Vesper_Core04_C','Vesper Core 04','5','1','0','0','0','0','1','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,3; bonus bDex,3; bonus bHit,10;','','');
REPLACE INTO `item_db_re` VALUES ('2700','Red_Silk_Seal','Red Silk Seal','5','20','10','100','0','0','0','0','0','16514','58','2','136','0','60',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2701','Orleans_Glove','Orleans\'s Glove','5','20','10','100','0','0','0','0','1','1040382','58','2','136','0','90',NULL,'0','0','0','bonus bDex,2; bonus bMatkRate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2702','Bison_Horn','Bison Horn','5','20','10','100','0','0','0','0','1','1040382','58','2','136','0','90',NULL,'0','0','0','bonus bAgi,2;','','');
@@ -1729,7 +1729,7 @@ REPLACE INTO `item_db_re` VALUES ('2706','Handcuff','Arrest Handcuffs','5','0','
REPLACE INTO `item_db_re` VALUES ('2707','GUSLI','Gusli','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2708','Chinese_Handicraft','Chinese Handicraft','5','0','0','50','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus3 bAutoSpell,MG_FIREBOLT,5,300;','','');
REPLACE INTO `item_db_re` VALUES ('2709','5_Anniversary_Coin','5th Anniversary Coin','5','2','1','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAtkRate,5; bonus bMatkRate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2710','Bloody_Iron_Ball_C','Bloody Iron Ball','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bBaseAtk,30;','','');
+REPLACE INTO `item_db_re` VALUES ('2710','Bloody_Iron_Ball_C','Bloody Iron Ball','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bBaseAtk,30;','','');
REPLACE INTO `item_db_re` VALUES ('2711','Spiritual_Ring_C','Spiritual Ring','5','1','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bInt,2; bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('2712','Ragnarok_Limited_Ed','Ragnarok Limited Edition','5','0','0','300','0','0','0','0','0','4294967295','63','2','136','0','30',NULL,'0','0','0','bonus bVit,3; bonus bAgi,3; bonus bLuk,3;','','');
REPLACE INTO `item_db_re` VALUES ('2713','Certificate_TW','Certificate','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1747,16 +1747,16 @@ REPLACE INTO `item_db_re` VALUES ('2724','Medal_Archer','Medal of Honor','5','20
REPLACE INTO `item_db_re` VALUES ('2725','Medal_Merchant','Medal of Honor','5','20','10','0','0','0','1','0','0','263200','63','2','136','0','70',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bAspdRate,10; bonus bMaxHP,500; bonus bMaxSP,50; bonus3 bAddEff,Eff_Curse,100,ATF_SHORT;','','');
REPLACE INTO `item_db_re` VALUES ('2726','Icarus_Wing','Icarus Wings','5','20','10','100','0','0','0','0','0','2048','58','2','136','0','70',NULL,'0','0','0','bonus bMaxSP,50; bonus bDex,3;','','');
REPLACE INTO `item_db_re` VALUES ('2727','Bowman_Scarf','Bowman Scarf','5','20','10','200','0','0','0','0','0','2048','58','2','136','0','70',NULL,'0','0','0','bonus bMaxSP,50; bonus bDex,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2728','Cursed_Hand','Cursed Hand','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30; bonus bHit,10; bonus bHPrecovRate,20;','','');
+REPLACE INTO `item_db_re` VALUES ('2728','Cursed_Hand','Cursed Hand','5','20','10','50','0','0','0','0','1','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus3 bAutoSpell,NPC_CRITICALWOUND,1,30; bonus bHit,10; bonus bHPrecovRate,20;','','');
REPLACE INTO `item_db_re` VALUES ('2729','Diabolus_Ring','Diabolus Ring','5','20','10','50','0','0','0','0','1','1040256','58','2','136','0','0',NULL,'0','0','0','bonus bMaxHP,100; bonus bMaxSP,100; bonus bHealPower,5; bonus2 bAddDamageClass,1916,10; bonus2 bAddDamageClass,1917,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2730','Morroc_Seal','Seal of Continental Guard','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bMaxHP,50; bonus bAspdRate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('2731','Morroc_Charm_Stone','Rune Spellstone','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bMaxSP,50; bonus bVariableCastrate,-1;','','');
-REPLACE INTO `item_db_re` VALUES ('2732','Morroc_Ring','Death Loop','5','20','10','50','0','0','0','0','1','2147483647','63','2','136','0','80',NULL,'0','0','0','bonus bCritical,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2730','Morroc_Seal','Seal of Continental Guard','5','20','10','50','0','0','0','0','1','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus bMaxHP,50; bonus bAspdRate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2731','Morroc_Charm_Stone','Rune Spellstone','5','20','10','50','0','0','0','0','1','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus bMaxSP,50; bonus bVariableCastrate,-1;','','');
+REPLACE INTO `item_db_re` VALUES ('2732','Morroc_Ring','Death Loop','5','20','10','50','0','0','0','0','1','2147483646','63','2','136','0','80',NULL,'0','0','0','bonus bCritical,5;','','');
REPLACE INTO `item_db_re` VALUES ('2733','Medal_Gunner','Sheriff Badge','5','20','10','0','0','0','1','0','0','16777216','1','2','136','0','70',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bCritical,10; bonus bMaxHP,300; bonus bMaxSP,80; bonus3 bAddEff,Eff_Blind,100,ATF_LONG;','','');
REPLACE INTO `item_db_re` VALUES ('2734','Directive_A','Directive','5','0','0','0','0','0','0','0','0','1','47','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2735','Directive_B','Directive','5','0','0','0','0','0','0','0','0','1','47','2','136','0','0',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2736','Navel_Ring','Navel Ring','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bDex,3; bonus bLuk,3; bonus bMdef,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2737','Foot_Ring','Foot Ring','5','20','10','150','0','0','0','0','0','2147483647','63','2','136','0','75',NULL,'0','0','0','bonus bVit,3; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2736','Navel_Ring','Navel Ring','5','20','10','100','0','0','0','0','0','2147483646','63','2','136','0','75',NULL,'0','0','0','bonus bDex,3; bonus bLuk,3; bonus bMdef,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2737','Foot_Ring','Foot Ring','5','20','10','150','0','0','0','0','0','2147483646','63','2','136','0','75',NULL,'0','0','0','bonus bVit,3; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db_re` VALUES ('2738','Shiny_Coin','Shiny Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,6; bonus2 bAddRace,RC_Boss,6; bonus bMatkRate,6;','','');
REPLACE INTO `item_db_re` VALUES ('2739','Ordinary_Coin','Ordinary Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('2740','Rusty_Coin','Rusty Coin','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bMatkRate,3;','','');
@@ -1791,9 +1791,9 @@ REPLACE INTO `item_db_re` VALUES ('2768','Mage_Figure','Mage Figure','5','0','0'
REPLACE INTO `item_db_re` VALUES ('2769','Archer_Figure','Archer Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bDex,1; if(Class==Job_Archer) bonus bBaseAtk,10;','','');
REPLACE INTO `item_db_re` VALUES ('2770','Thief_Figure','Thief Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,1; if(Class==Job_Thief) bonus bAspdRate,3;','','');
REPLACE INTO `item_db_re` VALUES ('2771','Merchant_Figure','Merchant Figure','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,1; if(Class==Job_Merchant) bonus bCritical,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2772','Krieger_Ring1','Glorious Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','81',NULL,'0','0','0','bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspdRate,5; bonus bVariableCastrate,-3; bonus bHealPower,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2773','Krieger_Ring2','Glorious Popularized Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bAllStats,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2774','Krieger_Ring3','Glorious Mass-Production Ring','5','20','10','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2772','Krieger_Ring1','Glorious Ring','5','20','10','0','0','0','0','0','0','2147483646','63','2','136','0','81',NULL,'0','0','0','bonus bMaxHP,300; bonus2 bSubEle,Ele_Water,10; bonus2 bSubEle,Ele_Wind,10; bonus2 bSubEle,Ele_Earth,10; bonus2 bSubEle,Ele_Fire,10; bonus bAspdRate,5; bonus bVariableCastrate,-3; bonus bHealPower,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2773','Krieger_Ring2','Glorious Popularized Ring','5','20','10','0','0','0','0','0','0','2147483646','63','2','136','0','61',NULL,'0','0','0','bonus bAllStats,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2774','Krieger_Ring3','Glorious Mass-Production Ring','5','20','10','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db_re` VALUES ('2775','Lure','Lure','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2776','Cool_Towel','Adventurer\'s Trusty Towel','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','','sc_start SC_SUMMER,-1,0;','sc_end SC_SUMMER;');
REPLACE INTO `item_db_re` VALUES ('2777','Shaman_Ring','Shaman Ring','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bUseSPrate,-5;','','');
@@ -1848,30 +1848,30 @@ REPLACE INTO `item_db_re` VALUES ('2825','Shaman_EaringB','Shaman Earrings','5',
REPLACE INTO `item_db_re` VALUES ('2826','Dark_Knight_BeltB','Dark Knight Belt','5','20','10','500','0','0','1','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bDex,2; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('2827','Dark_Knight_GloveB','Dark Knight Glove','5','20','10','500','0','0','1','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','autobonus \"{ bonus bMaxHPrate,10; }\",10,10000,0,\"{ specialeffect2 EF_POTION_BERSERK; }\";','','');
REPLACE INTO `item_db_re` VALUES ('2828','Upg_Clip','Upg Clip','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMaxHPrate,3; bonus bMaxSP,30;','','');
-REPLACE INTO `item_db_re` VALUES ('2829','Greed_Clip','Greed Clip','5','0','0','0','0','0','0','0','0','2147483647','63','2','136','0','10',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2829','Greed_Clip','Greed Clip','5','0','0','0','0','0','0','0','0','2147483646','63','2','136','0','10',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2830','Magingiorde_C','Ephemeral Magingiorde','5','20','10','0','0','0','2','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bStr,40; bonus bMdef,7;','','');
REPLACE INTO `item_db_re` VALUES ('2831','Brysinggamen_C','Ephemeral Brysinggamen','5','20','10','0','0','0','1','0','0','4294967295','63','2','136','0','94',NULL,'0','0','0','bonus bStr,6; bonus bInt,6; bonus bVit,6; bonus bAgi,6; bonus bLuk,10; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2832','Freyja_Ring','Freya Ring R','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2833','Odin\'s_Recall','Odin Recall R','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db_re` VALUES ('2834','F_All_In_One_Ring','All In One Ring','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1; bonus bNoCastCancel,0; bonus bVariableCastrate,10; skill AL_HEAL,1; skill AL_TELEPORT,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2835','F_Critical_Ring_C','Critical Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2836','F_Glove_C','Rental Glove','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2837','F_Safety_Ring_C','Safety Ring','5','1','0','0','0','0','5','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2838','F_Necklace_C','Necklace','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2839','F_Ring_C','Ring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2840','F_Rosary_C','Rosary','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,4; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2835','F_Critical_Ring_C','Critical Ring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2836','F_Glove_C','Rental Glove','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2837','F_Safety_Ring_C','Safety Ring','5','1','0','0','0','0','5','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2838','F_Necklace_C','Necklace','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2839','F_Ring_C','Ring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2840','F_Rosary_C','Rosary','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,4; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2841','Caracas_Ring','Caracas Ring','5','0','0','0','0','0','2','0','0','327680','56','2','136','0','99',NULL,'0','0','0','bonus bInt,2; bonus bDex,2; bonus bMdef,2; bonus2 bExpAddRace,RC_Boss,10; bonus2 bExpAddRace,RC_NonBoss,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2842','F_Earing_C','Earring','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('2842','F_Earing_C','Earring','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bInt,3;','','');
REPLACE INTO `item_db_re` VALUES ('2843','Gold_Trickle','Golden Bell','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','75',NULL,'0','0','0','bonus bMaxSP,50;','','');
REPLACE INTO `item_db_re` VALUES ('2844','El_Dicastes_Light','Light of El Dicastes','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','80',NULL,'0','0','0','skill RETURN_TO_ELDICASTES,1;','','');
REPLACE INTO `item_db_re` VALUES ('2845','No_Fear_Belt','NoFear Belts','5','0','0','0','0','0','2','0','0','4294967295','63','2','136','0','20',NULL,'0','0','0','bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('2846','E_All_In_One_Ring','E All In One Ring','5','20','10','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bAllStats,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2847','E_Critical_Ring_C','E Critical Ring C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
-REPLACE INTO `item_db_re` VALUES ('2848','E_Glove_C','E Glove C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2849','E_Safety_Ring_C','E Safety Ring C','5','1','0','0','0','0','5','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('2850','E_Ring_C','E Ring C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2851','E_Necklace_C','E Necklace C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
-REPLACE INTO `item_db_re` VALUES ('2852','E_Rosary_C','E Rosary C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,4; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2847','E_Critical_Ring_C','E Critical Ring C','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bCritical,10;','','');
+REPLACE INTO `item_db_re` VALUES ('2848','E_Glove_C','E Glove C','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2849','E_Safety_Ring_C','E Safety Ring C','5','1','0','0','0','0','5','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('2850','E_Ring_C','E Ring C','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bVit,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2851','E_Necklace_C','E Necklace C','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bStr,4;','','');
+REPLACE INTO `item_db_re` VALUES ('2852','E_Rosary_C','E Rosary C','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bLuk,4; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('2853','Telekinetic_Orb','Telekinetic Orb','5','20','10','200','0','0','2','0','0','1040256','56','2','136','0','110',NULL,'0','0','0','bonus bMdef,1; bonus bInt,3; bonus bMaxSP,30; bonus2 bSkillAtk,WL_SOULEXPANSION,10; bonus2 bSkillAtk,SO_PSYCHIC_WAVE,10; bonus2 bSkillUseSP,WL_SOULEXPANSION,-50; bonus2 bSkillUseSP,SO_PSYCHIC_WAVE,-50;','','');
REPLACE INTO `item_db_re` VALUES ('2854','Alchemy_Glove','Alchemy Glove','5','20','10','100','0','0','1','0','1','1040256','56','2','136','0','125',NULL,'0','0','0','bonus bMdef,2; bonus bInt,1; bonus3 bAutoSpell,MG_FIREBALL,5,10; bonus5 bAutoSpell,MG_FIREBOLT,5,10,BF_MAGIC,1; bonus2 bSubEle,Ele_Water,-30;','','');
REPLACE INTO `item_db_re` VALUES ('2855','Whike_Black_Tail','Whikebain\'s Black Tail','5','20','10','100','0','0','0','0','0','4294967295','63','2','136','0','45',NULL,'0','0','0','bonus bCritical,70; bonus bAspdRate,3;','','');
@@ -1887,8 +1887,8 @@ REPLACE INTO `item_db_re` VALUES ('2864','Light_Of_Cure','Light Of Cure','5','20
REPLACE INTO `item_db_re` VALUES ('2865','Seal_Of_Cathedral','Seal Of Cathedral','5','20','10','0','0','0','0','0','0','256','56','2','136','0','110',NULL,'0','0','0','bonus bInt,2; bonus bHealPower,2;','','');
REPLACE INTO `item_db_re` VALUES ('2866','Ring_Of_Archbishop','Ring Of Archbishop','5','20','10','0','0','0','0','0','0','256','56','2','136','0','110',NULL,'0','0','0','bonus bDex,2; bonus bHealPower,2;','','');
REPLACE INTO `item_db_re` VALUES ('2867','Broken_Bamboo_Piece','Broken Bamboo Piece','5','20','10','100','0','0','2','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bMdef,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2868','Green_Batik','Green Batik','5','20','10','100','0','0','1','0','0','2147483647','63','2','136','0','45',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bDex,1; bonus bMdef,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2869','Colorful_Ketupat','Colorful Ketupat','5','20','10','100','0','0','0','0','0','2147483647','63','2','136','0','45',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2868','Green_Batik','Green Batik','5','20','10','100','0','0','1','0','0','2147483646','63','2','136','0','45',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bDex,1; bonus bMdef,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2869','Colorful_Ketupat','Colorful Ketupat','5','20','10','100','0','0','0','0','0','2147483646','63','2','136','0','45',NULL,'0','0','0','bonus bStr,1; bonus bInt,1; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('2870','Tw_8th_Anni_Ring','Tw 8th Anni Ring','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','bonus bStr,5; bonus bInt,5; bonus bVit,5; bonus bDex,5; bonus bAgi,5; bonus bLuk,5;','','');
REPLACE INTO `item_db_re` VALUES ('2871','Brazilian_Emblem','Symbol Of Brazil','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','60',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2872','G_Honor_Certificate','G Honor Certificate','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
@@ -1919,10 +1919,10 @@ REPLACE INTO `item_db_re` VALUES ('2896','Medal_Of_Valor2','Medal Of Valor2','5'
REPLACE INTO `item_db_re` VALUES ('2897','2011RWC_Necklace_J','RWC Necklace','5','0','0','100','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2898','Black_Rosary','Black Rosary','5','20','10','100','0','0','0','0','1','4294967295','63','2','136','0','90',NULL,'0','0','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('2899','Sound_Amplifier','Sound Amplifier','5','20','10','100','0','0','0','0','1','526336','63','2','136','0','90',NULL,'0','0','0','bonus2 bSkillAtk,WM_METALICSOUND,25; bonus bVariableCastrate,-50;','','');
-REPLACE INTO `item_db_re` VALUES ('2900','Morrigane\'s_Belt_','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','61',NULL,'0','0','0','','','');
-REPLACE INTO `item_db_re` VALUES ('2901','Morrigane\'s_Pendant_','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','1','2147483647','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('2902','Morpheus\'s_Ring_','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','1','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('2903','Morpheus\'s_Armlet_','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','1','2147483647','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2900','Morrigane\'s_Belt_','Morrigane\'s Belt','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','61',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('2901','Morrigane\'s_Pendant_','Morrigane\'s Pendant','5','30000','15000','200','0','0','0','0','1','2147483646','63','2','136','0','61',NULL,'0','0','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('2902','Morpheus\'s_Ring_','Morpheus\'s Ring','5','30000','15000','100','0','0','0','0','1','2147483646','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('2903','Morpheus\'s_Armlet_','Morpheus\'s Bracelet','5','30000','15000','100','0','0','0','0','1','2147483646','63','2','136','0','33',NULL,'0','0','0','bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('2904','Naqsh','At Lorient','5','0','0','0','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2905','Super_Ora_Ora','Ora Ora Very Strong','5','0','0','1000','0','0','0','0','0','4294967295','63','2','136','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('2906','Happy_Gauntlet','Gloves of Fortune','5','20','10','1000','0','0','3','0','1','4294967295','63','2','136','0','70',NULL,'0','0','0','bonus bMdef,3;','','');
@@ -2677,53 +2677,53 @@ REPLACE INTO `item_db_re` VALUES ('4867','MHP3','MHP+3%','6','0','0','0','0','0'
REPLACE INTO `item_db_re` VALUES ('4868','MHP4','MHP+4%','6','0','0','0','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMaxHPrate,4;','','');
REPLACE INTO `item_db_re` VALUES ('4870','SP25','SP+25','6','0','0','0','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMaxSP,25;','','');
REPLACE INTO `item_db_re` VALUES ('4871','SP75','SP+75','6','0','0','0','0','0','0','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','bonus bMaxSP,75;','','');
-REPLACE INTO `item_db_re` VALUES ('5001','Headset','Headset','5','20','10','200','0','0','6','0','0','2147483647','63','2','256','0','0',NULL,'1','87','0','bonus2 bResEff,Eff_Curse,1000;','','');
+REPLACE INTO `item_db_re` VALUES ('5001','Headset','Headset','5','20','10','200','0','0','6','0','0','2147483646','63','2','256','0','0',NULL,'1','87','0','bonus2 bResEff,Eff_Curse,1000;','','');
REPLACE INTO `item_db_re` VALUES ('5002','Gemmed_Crown','Jewel Crown','5','20','10','600','0','0','9','0','0','414946','63','2','256','0','60',NULL,'1','88','0','bonus bInt,2; bonus bLuk,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5003','Joker_Jester','Joker Jester','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','89','0','bonus bLuk,2; bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5004','Oxygen_Mask','Oxygen Mask','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','90','0','bonus2 bResEff,Eff_Poison,2000;','','');
-REPLACE INTO `item_db_re` VALUES ('5005','Gas_Mask','Gas Mask','5','20','10','100','0','0','1','0','0','2147483647','63','2','513','0','0',NULL,'0','91','0','bonus2 bResEff,Eff_Poison,3000;','','');
-REPLACE INTO `item_db_re` VALUES ('5006','Machoman_Glasses','Machoman\'s Glasses','5','36000','18000','100','0','0','1','0','0','2147483647','63','2','512','0','0',NULL,'0','92','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5007','Loard_Circlet','Grand Circlet','5','20','10','200','0','0','7','0','0','2147483647','63','2','256','0','55',NULL,'1','93','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5008','Puppy_Love','Puppy Love','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','94','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5009','Safety_Helmet','Safety Helmet','5','20','10','500','0','0','7','0','0','2147483647','63','2','256','0','0',NULL,'1','95','0','bonus bMdef,3; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5003','Joker_Jester','Joker Jester','5','20','10','100','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','89','0','bonus bLuk,2; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5004','Oxygen_Mask','Oxygen Mask','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','90','0','bonus2 bResEff,Eff_Poison,2000;','','');
+REPLACE INTO `item_db_re` VALUES ('5005','Gas_Mask','Gas Mask','5','20','10','100','0','0','1','0','0','2147483646','63','2','513','0','0',NULL,'0','91','0','bonus2 bResEff,Eff_Poison,3000;','','');
+REPLACE INTO `item_db_re` VALUES ('5006','Machoman_Glasses','Machoman\'s Glasses','5','36000','18000','100','0','0','1','0','0','2147483646','63','2','512','0','0',NULL,'0','92','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5007','Loard_Circlet','Grand Circlet','5','20','10','200','0','0','7','0','0','2147483646','63','2','256','0','55',NULL,'1','93','0','bonus bStr,1; bonus bInt,1; bonus bLuk,1; bonus bMdef,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5008','Puppy_Love','Puppy Love','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','94','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5009','Safety_Helmet','Safety Helmet','5','20','10','500','0','0','7','0','0','2147483646','63','2','256','0','0',NULL,'1','95','0','bonus bMdef,3; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5010','Indian_Hair_Piece','Indian Fillet','5','20','10','100','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','96','0','','','');
REPLACE INTO `item_db_re` VALUES ('5011','Antenna','Aerial','5','20','10','100','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','97','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5012','Ph.D_Hat','Ph.D Hat','5','20','10','200','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','98','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5012','Ph.D_Hat','Ph.D Hat','5','20','10','200','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','98','0','','','');
REPLACE INTO `item_db_re` VALUES ('5013','Horn_Of_Lord_Kaho','Lord Kaho\'s Horn','5','20','10','100','0','0','30','0','0','4294967295','63','2','256','0','0',NULL,'1','99','0','bonus bMdef,10; bonus bStr,5; bonus bAgi,10; bonus bVit,10; bonus bInt,5; bonus bLuk,20;','','');
REPLACE INTO `item_db_re` VALUES ('5014','Fin_Helm','Fin Helm','5','20','10','300','0','0','5','0','0','16514','63','2','512','0','65',NULL,'0','100','0','','','');
REPLACE INTO `item_db_re` VALUES ('5015','Egg_Shell','Egg Shell','5','20','10','200','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'0','101','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5016','Boy\'s_Cap','Boy\'s Cap','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','102','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5016','Boy\'s_Cap','Boy\'s Cap','5','20','10','100','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','102','0','','','');
REPLACE INTO `item_db_re` VALUES ('5017','Bone_Helm','Bone Helm','5','20','10','800','0','0','15','0','0','279714','63','2','256','0','70',NULL,'1','103','0','bonus2 bSubEle,Ele_Dark,-15;','','');
REPLACE INTO `item_db_re` VALUES ('5018','Feather_Bonnet','Feather Bonnet','5','20','10','300','0','0','8','0','0','526344','63','2','256','0','0',NULL,'1','104','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5019','Corsair','Corsair','5','20','10','500','0','0','11','0','0','2147483647','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5019','Corsair','Corsair','5','20','10','500','0','0','11','0','0','2147483646','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5020','Kafra_Band','Kafra Band','5','20','10','500','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','106','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('5021','Bankruptcy_Of_Heart','Grief for Greed','5','20','10','1200','0','0','8','0','0','263200','63','2','256','0','38',NULL,'1','107','0','bonus bInt,1; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('5022','Helm_Of_Sun','Hat of the Sun God','5','20','10','2400','0','0','4','0','0','1040256','63','2','768','0','0',NULL,'1','138','0','bonus bStr,3; bonus bInt,2;','','');
REPLACE INTO `item_db_re` VALUES ('5023','Hat_Of_Bundle','Parcel Hat','5','20','10','1000','0','0','0','0','0','263200','63','2','256','0','0',NULL,'1','108','0','','','');
REPLACE INTO `item_db_re` VALUES ('5024','Hat_Of_Cake','Cake Hat','5','20','10','1000','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','109','0','','','');
REPLACE INTO `item_db_re` VALUES ('5025','Helm_Of_Angel','Helm of Angel','5','20','10','1600','0','0','10','0','0','1040256','63','2','256','0','74',NULL,'1','110','0','bonus bAgi,1; bonus bLuk,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5026','Hat_Of_Cook','Chef Hat','5','20','10','300','0','0','3','0','0','2147483647','63','2','256','0','50',NULL,'1','111','0','bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5026','Hat_Of_Cook','Chef Hat','5','20','10','300','0','0','3','0','0','2147483646','63','2','256','0','50',NULL,'1','111','0','bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('5027','Wizardry_Hat','Mage Hat','5','20','10','300','0','0','2','0','0','8454660','63','2','256','0','0',NULL,'1','112','0','bonus bInt,2; bonus bMaxSP,150;','','');
REPLACE INTO `item_db_re` VALUES ('5028','Candle','Candle','5','20','10','150','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','113','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5029','Spore_Hat','Spore Hat','5','20','10','900','0','0','6','0','0','2147483647','63','2','256','0','20',NULL,'1','114','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5030','Panda_Cap','Panda Hat','5','20','10','800','0','0','6','0','0','2147483647','63','2','256','0','40',NULL,'1','115','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5029','Spore_Hat','Spore Hat','5','20','10','900','0','0','6','0','0','2147483646','63','2','256','0','20',NULL,'1','114','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5030','Panda_Cap','Panda Hat','5','20','10','800','0','0','6','0','0','2147483646','63','2','256','0','40',NULL,'1','115','0','','','');
REPLACE INTO `item_db_re` VALUES ('5031','Mine_Helm','Mine Hat','5','20','10','1500','0','0','9','0','0','447986','63','2','256','0','55',NULL,'1','116','0','bonus bDex,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5032','Picnic_Hat','Sunday Hat','5','20','10','800','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','117','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5033','Smokie_Hat','Raccoon Hat','5','20','10','900','0','0','6','0','0','2147483647','63','2','256','0','50',NULL,'1','118','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5034','Light_Bulb_Band','Bulb Band','5','20','10','500','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','119','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5035','Poring_Hat','Poring Hat','5','20','10','700','0','0','3','0','0','2147483647','63','2','256','0','38',NULL,'1','120','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5036','Cross_Band','Cross Hat','5','20','10','250','0','0','2','0','0','2147483647','63','2','256','0','10',NULL,'1','121','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5032','Picnic_Hat','Sunday Hat','5','20','10','800','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','117','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5033','Smokie_Hat','Raccoon Hat','5','20','10','900','0','0','6','0','0','2147483646','63','2','256','0','50',NULL,'1','118','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5034','Light_Bulb_Band','Bulb Band','5','20','10','500','0','0','0','0','0','2147483646','63','2','256','0','0',NULL,'1','119','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5035','Poring_Hat','Poring Hat','5','20','10','700','0','0','3','0','0','2147483646','63','2','256','0','38',NULL,'1','120','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5036','Cross_Band','Cross Hat','5','20','10','250','0','0','2','0','0','2147483646','63','2','256','0','10',NULL,'1','121','0','','','');
REPLACE INTO `item_db_re` VALUES ('5037','Fruit_Shell','Nut Shell','5','20','10','150','0','0','8','0','0','4294967295','63','2','256','0','5',NULL,'0','122','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5038','Deviruchi_Cap','Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','64',NULL,'1','123','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5038','Deviruchi_Cap','Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483646','63','2','256','0','64',NULL,'1','123','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5039','Mottled_Egg_Shell','Rainbow Eggshell','5','20','10','400','0','0','8','0','0','4294967295','63','2','256','0','19',NULL,'0','124','0','','','');
REPLACE INTO `item_db_re` VALUES ('5040','Blush','Blush','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','125','0','','','');
REPLACE INTO `item_db_re` VALUES ('5041','Heart_Hair_Pin','Heart Hairpin','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','126','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5042','Hair_Protector','Bao Bao','5','20','10','150','0','0','0','0','0','2147483647','63','2','256','0','14',NULL,'1','127','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5043','Opera_Ghost_Mask','Opera Phantom Mask','5','20','10','200','0','0','2','0','0','2147483647','63','2','512','0','20',NULL,'0','128','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5042','Hair_Protector','Bao Bao','5','20','10','150','0','0','0','0','0','2147483646','63','2','256','0','14',NULL,'1','127','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5043','Opera_Ghost_Mask','Opera Phantom Mask','5','20','10','200','0','0','2','0','0','2147483646','63','2','512','0','20',NULL,'0','128','0','','','');
REPLACE INTO `item_db_re` VALUES ('5044','Devil\'s_Wing','Evil Wing Ears','5','20','10','350','0','0','4','0','0','4294967295','63','2','256','0','45',NULL,'1','129','0','bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5045','Magician_Hat','Magician Hat','5','20','10','500','0','0','6','0','0','8487700','63','2','256','0','50',NULL,'1','130','0','bonus bDex,1; bonus bAgi,1; bonus bMaxSP,50;','','');
REPLACE INTO `item_db_re` VALUES ('5046','Bongun_Hat','Bongun Hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','769','0','0',NULL,'0','139','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5047','Fashion_Sunglass','Fashionable Glasses','5','20','10','100','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'1','131','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5047','Fashion_Sunglass','Fashionable Glasses','5','20','10','100','0','0','0','0','0','2147483646','63','2','256','0','0',NULL,'1','131','0','','','');
REPLACE INTO `item_db_re` VALUES ('5048','First_Moon_Hair_Pin','Cresent Hairpin','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','132','0','','','');
REPLACE INTO `item_db_re` VALUES ('5049','Stripe_Band','Striped Hairband','5','20','10','150','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','133','0','','','');
REPLACE INTO `item_db_re` VALUES ('5050','Mystery_Fruit_Shell','Wonder Nutshell','5','20','10','300','0','0','10','0','0','4294967295','63','2','256','0','30',NULL,'0','134','0','','','');
@@ -2734,22 +2734,22 @@ REPLACE INTO `item_db_re` VALUES ('5054','Assasin_Mask','Assassin Mask','5','20'
REPLACE INTO `item_db_re` VALUES ('5055','Novice_Egg_Cap','Novice False Eggshell','5','1','0','1','0','0','6','0','0','1','47','2','256','0','0',NULL,'0','101','0','','','');
REPLACE INTO `item_db_re` VALUES ('5056','Love_Berry','Fruit of Love','5','1','0','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','140','0','','','');
REPLACE INTO `item_db_re` VALUES ('5057','Ear_Of_Black_Cat','Black Cat Ears','5','16000','8000','200','0','0','4','0','0','4294967295','63','2','256','0','45',NULL,'1','141','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5058','Drooping_Kitty','Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
+REPLACE INTO `item_db_re` VALUES ('5058','Drooping_Kitty','Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
REPLACE INTO `item_db_re` VALUES ('5059','Brown_Bear_Cap','Teddybear Hat','5','20','10','800','0','0','6','0','0','4294967295','63','2','256','0','50',NULL,'1','143','0','','','');
REPLACE INTO `item_db_re` VALUES ('5060','Party_Hat','Party Hat','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','144','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5061','Flower_Hairpin','Flower Hairpin','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','145','0','','','');
REPLACE INTO `item_db_re` VALUES ('5062','Straw_Hat','Straw Hat','5','20','10','200','0','0','6','0','0','4294967295','63','2','256','0','50',NULL,'1','146','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5063','Plaster','Giant Band Aid','5','20','10','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','147','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5063','Plaster','Giant Band Aid','5','20','10','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','147','0','','','');
REPLACE INTO `item_db_re` VALUES ('5064','Leaf_Headgear','Smokie Leaf','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','148','0','','','');
REPLACE INTO `item_db_re` VALUES ('5065','Fish_On_Head','Blue Fish','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus2 bAddRace,RC_Fish,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5066','Horn_Of_Succubus','Succubus Horn','5','20','10','800','0','0','7','0','0','2147483647','63','2','256','0','70',NULL,'1','150','0','bonus bInt,1; bonus bMdef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5067','Sombrero','Sombrero','5','20','10','350','0','0','8','0','0','2147483647','63','2','256','0','0',NULL,'1','151','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5066','Horn_Of_Succubus','Succubus Horn','5','20','10','800','0','0','7','0','0','2147483646','63','2','256','0','70',NULL,'1','150','0','bonus bInt,1; bonus bMdef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5067','Sombrero','Sombrero','5','20','10','350','0','0','8','0','0','2147483646','63','2','256','0','0',NULL,'1','151','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5068','Ear_Of_Devil\'s_Wing','Evil Wing Ears','5','20','10','100','0','0','3','0','0','4294967295','63','2','512','0','70',NULL,'0','152','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5069','Mask_Of_Fox','Kitsune Mask','5','20','10','300','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','153','0','bonus bAgi,1; bonus bLuk,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5070','Headband_Of_Power','Hot-blooded Headband','5','20','10','100','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','154','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5071','Indian_Headband','Indian Headband','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','155','0','bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5072','Inccubus_Horn','Incubus Horn','5','20','10','800','0','0','7','0','0','2147483647','63','2','256','0','70',NULL,'1','156','0','bonus bAgi,1; bonus bMdef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5073','Cap_Of_Concentration','Model Training Hat','5','20','10','700','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','157','0','bonus bDex,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5069','Mask_Of_Fox','Kitsune Mask','5','20','10','300','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','153','0','bonus bAgi,1; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5070','Headband_Of_Power','Hot-blooded Headband','5','20','10','100','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','154','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5071','Indian_Headband','Indian Headband','5','20','10','200','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','155','0','bonus bDex,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5072','Inccubus_Horn','Incubus Horn','5','20','10','800','0','0','7','0','0','2147483646','63','2','256','0','70',NULL,'1','156','0','bonus bAgi,1; bonus bMdef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5073','Cap_Of_Concentration','Model Training Hat','5','20','10','700','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','157','0','bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('5074','Ear_Of_Angel\'s_Wing','Angel Wing Ears','5','20','10','100','0','0','3','0','0','4294967295','63','2','512','0','70',NULL,'0','158','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5075','Cowboy_Hat','Cowboy Hat','5','20','10','500','0','0','8','0','0','4294967295','63','2','256','0','0',NULL,'1','159','0','','','');
REPLACE INTO `item_db_re` VALUES ('5076','Fur_Hat','Beanie','5','20','10','350','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','160','0','bonus bLuk,1;','','');
@@ -2757,21 +2757,21 @@ REPLACE INTO `item_db_re` VALUES ('5077','Tulip_Hairpin','Tulip Hairpin','5','20
REPLACE INTO `item_db_re` VALUES ('5078','Sea_Otter_Cap','Sea-Otter Hat','5','20','10','800','0','0','6','0','0','4294967295','63','2','256','0','50',NULL,'1','162','0','bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5079','Crossed_Hair_Band','X Hairpin','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','163','0','','','');
REPLACE INTO `item_db_re` VALUES ('5080','Headgear_Of_Queen','Crown of Ancient Queen','5','20','10','400','0','0','8','0','0','4294967295','63','2','256','0','45',NULL,'1','164','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5081','Mistress_Crown','Crown of Mistress','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','75',NULL,'1','165','0','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5081','Mistress_Crown','Crown of Mistress','5','20','10','100','0','0','2','0','0','2147483646','63','2','256','0','75',NULL,'1','165','0','bonus bMaxSP,100; bonus bInt,2; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5082','Mushroom_Band','Decorative Mushroom','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','166','0','','','');
REPLACE INTO `item_db_re` VALUES ('5083','Red_Tailed_Ribbon','Red Ribbon','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','45',NULL,'1','167','0','bonus bMdef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5084','Lazy_Raccoon','Lazy Smokie','5','20','10','500','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','168','0','bonus2 bResEff,Eff_Sleep,2000;','','');
+REPLACE INTO `item_db_re` VALUES ('5084','Lazy_Raccoon','Lazy Smokie','5','20','10','500','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','168','0','bonus2 bResEff,Eff_Sleep,2000;','','');
REPLACE INTO `item_db_re` VALUES ('5085','Pair_Of_Red_Ribbon','Small Ribbons','5','20','10','100','0','0','2','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5086','Alarm_Mask','Alarm Mask','5','20','10','100','0','0','2','0','0','2147483647','63','2','513','0','0',NULL,'0','170','0','bonus2 bResEff,Eff_Blind,5000;','','');
+REPLACE INTO `item_db_re` VALUES ('5086','Alarm_Mask','Alarm Mask','5','20','10','100','0','0','2','0','0','2147483646','63','2','513','0','0',NULL,'0','170','0','bonus2 bResEff,Eff_Blind,5000;','','');
REPLACE INTO `item_db_re` VALUES ('5087','Goblin_Mask_01','Poker Face','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','171','0','','','');
REPLACE INTO `item_db_re` VALUES ('5088','Goblin_Mask_02','Surprised Mask','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','172','0','','','');
REPLACE INTO `item_db_re` VALUES ('5089','Goblin_Mask_03','Annoyed Mask','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','0',NULL,'0','173','0','','','');
REPLACE INTO `item_db_re` VALUES ('5090','Goblin_Mask_04','Goblin Leader Mask','5','20','10','100','0','0','2','0','0','4294967295','63','2','513','0','0',NULL,'0','174','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5091','Big_Golden_Bell','Decorative Golden Bell','5','20','10','200','0','0','2','0','0','2147483647','63','2','768','0','35',NULL,'1','175','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5091','Big_Golden_Bell','Decorative Golden Bell','5','20','10','200','0','0','2','0','0','2147483646','63','2','768','0','35',NULL,'1','175','0','','','');
REPLACE INTO `item_db_re` VALUES ('5092','Blue_Coif','Coif','5','150000','75000','300','0','0','5','0','0','4352','63','2','768','0','65',NULL,'1','176','0','','','');
REPLACE INTO `item_db_re` VALUES ('5093','Blue_Coif_','Coif','5','150000','75000','300','0','0','5','0','1','4352','63','2','768','0','65',NULL,'1','177','0','bonus bMaxSP,100;','','');
-REPLACE INTO `item_db_re` VALUES ('5094','Orc_Hero_Helm','Helmet of Orc Hero','5','500000','250000','900','0','0','5','0','0','2147483647','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5095','Orc_Hero_Helm_','Helmet of Orc Hero','5','800000','400000','1000','0','0','5','0','1','2147483647','63','2','768','0','55',NULL,'1','179','0','bonus bStr,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5094','Orc_Hero_Helm','Helmet of Orc Hero','5','500000','250000','900','0','0','5','0','0','2147483646','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5095','Orc_Hero_Helm_','Helmet of Orc Hero','5','800000','400000','1000','0','0','5','0','1','2147483646','63','2','768','0','55',NULL,'1','179','0','bonus bStr,2; bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5096','Assassin_Mask_','Assassin Mask','5','20','10','100','0','0','1','0','0','4352','63','2','1','0','70',NULL,'0','180','0','','','');
REPLACE INTO `item_db_re` VALUES ('5097','Cone_Hat_','Holiday Hat','5','0','0','400','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','144','0','','','');
REPLACE INTO `item_db_re` VALUES ('5098','Tiger_Mask','Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','181','0','bonus bStr,3; bonus bMaxHP,100;','','');
@@ -2779,8 +2779,8 @@ REPLACE INTO `item_db_re` VALUES ('5099','Cat_Hat','Neko Mimi','5','20','10','30
REPLACE INTO `item_db_re` VALUES ('5100','Sales_Signboard','Sales Banner','5','20','10','800','0','0','0','0','0','4294967295','63','2','256','0','75',NULL,'1','183','0','bonus bStr,1; bonus bAgi,1; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5101','Takius_Blindfold','Takius Blindfold','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','184','0','','','');
REPLACE INTO `item_db_re` VALUES ('5102','Round_Eyes','Blank Eyes','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','185','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5103','Sunflower_Hairpin','Sunflower Hairpin','5','20','10','600','0','0','2','0','0','2147483647','63','2','256','0','30',NULL,'0','186','0','bonus bAgi,2; bonus bCritical,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5104','Dark_Blindfold','Dark Blinder','5','20','10','100','0','0','0','0','0','2147483647','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
+REPLACE INTO `item_db_re` VALUES ('5103','Sunflower_Hairpin','Sunflower Hairpin','5','20','10','600','0','0','2','0','0','2147483646','63','2','256','0','30',NULL,'0','186','0','bonus bAgi,2; bonus bCritical,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5104','Dark_Blindfold','Dark Blinder','5','20','10','100','0','0','0','0','0','2147483646','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
REPLACE INTO `item_db_re` VALUES ('5105','Hat_Of_Cake_','2nd Anniversary Hat','5','20','10','1000','0','0','2','0','0','4294967295','63','2','256','0','24',NULL,'1','109','0','bonus bDex,1; bonus bMaxSP,80; bonus3 bAddMonsterDropItem,7864,7,50;','','');
REPLACE INTO `item_db_re` VALUES ('5106','Cone_Hat_INA','2nd Anniversary Hat','5','20','10','300','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','144','0','bonus bUnbreakableHelm,0; bonus bMdef,10; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5107','Well_Baked_Toast','Crunch Toast','5','20','10','50','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','188','0','','','');
@@ -2797,29 +2797,29 @@ REPLACE INTO `item_db_re` VALUES ('5117','Mistic_Rose','Mystic Rose','5','20','1
REPLACE INTO `item_db_re` VALUES ('5118','Ear_Of_Puppy','Puppy Headband','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','199','0','','','');
REPLACE INTO `item_db_re` VALUES ('5119','Super_Novice_Hat_','Super Novice Hat','5','8500','4250','400','0','0','8','0','1','1','47','2','256','0','40',NULL,'1','193','0','bonus bAllStats,1;','','');
REPLACE INTO `item_db_re` VALUES ('5120','Fedora_','Bucket Hat','5','6000','3000','300','0','0','6','0','1','4294967295','63','2','256','0','0',NULL,'1','195','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5121','Zherlthsh_Mask','Zealotus Mask','5','20','10','400','0','0','3','0','0','2147483647','63','2','768','0','70',NULL,'1','200','0','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5122','Magni_Cap','Magni\'s Cap','5','30000','15000','1000','0','0','9','0','0','2147483647','63','2','256','0','65',NULL,'1','250','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5123','Ulle_Cap','Ulle\'s Cap','5','30000','15000','500','0','0','6','0','1','2147483647','63','2','256','0','65',NULL,'1','254','0','bonus bDex,2; bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5124','Fricca_Circlet','Fricca\'s Circlet','5','30000','15000','300','0','0','6','0','0','2147483647','63','2','256','0','65',NULL,'1','251','0','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50;','','');
+REPLACE INTO `item_db_re` VALUES ('5121','Zherlthsh_Mask','Zealotus Mask','5','20','10','400','0','0','3','0','0','2147483646','63','2','768','0','70',NULL,'1','200','0','bonus2 bAddRace,RC_DemiHuman,5; bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5122','Magni_Cap','Magni\'s Cap','5','30000','15000','1000','0','0','9','0','0','2147483646','63','2','256','0','65',NULL,'1','250','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5123','Ulle_Cap','Ulle\'s Cap','5','30000','15000','500','0','0','6','0','1','2147483646','63','2','256','0','65',NULL,'1','254','0','bonus bDex,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5124','Fricca_Circlet','Fricca\'s Circlet','5','30000','15000','300','0','0','6','0','0','2147483646','63','2','256','0','65',NULL,'1','251','0','bonus bMdef,10; bonus bInt,2; bonus bMaxSP,50;','','');
REPLACE INTO `item_db_re` VALUES ('5125','Kiss_Of_Angel','Angel\'s Kiss','5','10000','5000','300','0','0','6','0','1','1','47','2','256','0','50',NULL,'1','255','0','bonus bSPrecovRate,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5126','Morpheus\'s_Hood','Morpheus\'s Hood','5','30000','15000','200','0','0','3','0','0','2147483647','63','2','256','0','33',NULL,'1','256','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5127','Morrigane\'s_Helm','Morrigane\'s Helm','5','30000','15000','500','0','0','8','0','0','2147483647','63','2','256','0','61',NULL,'1','257','0','bonus bLuk,2; bonus bBaseAtk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5128','Goibne\'s_Helmet','Goibne\'s Helm','5','30000','15000','500','0','0','10','0','0','2147483647','63','2','256','0','54',NULL,'1','258','0','bonus bVit,3; bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5126','Morpheus\'s_Hood','Morpheus\'s Hood','5','30000','15000','200','0','0','3','0','0','2147483646','63','2','256','0','33',NULL,'1','256','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5127','Morrigane\'s_Helm','Morrigane\'s Helm','5','30000','15000','500','0','0','8','0','0','2147483646','63','2','256','0','61',NULL,'1','257','0','bonus bLuk,2; bonus bBaseAtk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5128','Goibne\'s_Helmet','Goibne\'s Helm','5','30000','15000','500','0','0','10','0','0','2147483646','63','2','256','0','54',NULL,'1','258','0','bonus bVit,3; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('5129','Bird_Nest','Bird Nest','5','20','10','400','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'0','201','0','bonus bAgi,2; bonus2 bSubRace,RC_Brute,10;','','');
REPLACE INTO `item_db_re` VALUES ('5130','Lion_Mask','Lion Mask','5','20','10','700','0','0','0','0','0','1040256','63','2','768','0','75',NULL,'1','202','0','bonus2 bAddEffWhenHit,Eff_Silence,500; bonus bMdef,1;','','');
REPLACE INTO `item_db_re` VALUES ('5131','Close_Helmet','Close Helmet','5','20','10','1200','0','0','8','0','0','16514','63','2','769','0','75',NULL,'1','203','0','bonus bVit,3; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('5132','Angeling_Hat','Angeling Hat','5','20','10','700','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'0','204','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5133','Sheep_Hat','Sheep Hat','5','20','10','150','0','0','3','0','0','33040','63','2','256','0','0',NULL,'0','205','0','bonus bShortWeaponDamageReturn,5;','','');
REPLACE INTO `item_db_re` VALUES ('5134','Pumpkin_Hat','Pumpkin-Head','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','206','0','bonus2 bSubRace,RC_Demon,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5135','Cyclops_Visor','Cyclop\'s Eye','5','0','0','200','0','0','0','0','0','2147483647','63','2','512','0','75',NULL,'0','207','0','bonus bMaxSP,50;','','');
+REPLACE INTO `item_db_re` VALUES ('5135','Cyclops_Visor','Cyclop\'s Eye','5','0','0','200','0','0','0','0','0','2147483646','63','2','512','0','75',NULL,'0','207','0','bonus bMaxSP,50;','','');
REPLACE INTO `item_db_re` VALUES ('5136','Santa\'s_Hat_','Antonio\'s Santa Hat','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','20','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5137','Alice_Doll','Alice Doll','5','20','10','500','0','0','1','0','1','2147483647','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Sleep,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5137','Alice_Doll','Alice Doll','5','20','10','500','0','0','1','0','1','2147483646','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1; bonus2 bAddRace,RC_DemiHuman,10; bonus2 bAddEff2,Eff_Sleep,10;','','');
REPLACE INTO `item_db_re` VALUES ('5138','Magic_Eyes','Magic Eyes','5','20','10','300','0','0','3','0','0','8454660','63','2','256','0','30',NULL,'1','209','0','bonus bMdef,5; bonus bVariableCastrate,-10; bonus bUseSPrate,20;','','');
REPLACE INTO `item_db_re` VALUES ('5139','Hibiscus','Hibiscus','5','20','10','200','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'0','210','0','bonus bDex,1; bonus bInt,1; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('5140','Charming_Ribbon','Charming Ribbon','5','20','10','400','0','0','2','0','1','4294967295','63','2','256','0','10',NULL,'1','211','0','bonus2 bSubRace,RC_Undead,5; bonus2 bSubRace,RC_Demon,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5141','Marionette_Doll','Marionette Doll','5','20','10','400','0','0','1','0','1','2147483647','63','2','256','0','30',NULL,'1','212','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5141','Marionette_Doll','Marionette Doll','5','20','10','400','0','0','1','0','1','2147483646','63','2','256','0','30',NULL,'1','212','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5142','Crescent_Helm','Crescent Helm','5','20','10','3000','0','0','8','0','0','279714','63','2','768','0','50',NULL,'1','213','0','bonus bVit,1; bonus2 bSubRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5143','Kabuki_Mask','Kabuki Mask','5','20','10','1000','0','0','5','0','1','2147483647','63','1','769','0','30',NULL,'1','214','0','bonus2 bResEff,Eff_Silence,3000;','','');
+REPLACE INTO `item_db_re` VALUES ('5143','Kabuki_Mask','Kabuki Mask','5','20','10','1000','0','0','5','0','1','2147483646','63','1','769','0','30',NULL,'1','214','0','bonus2 bResEff,Eff_Silence,3000;','','');
REPLACE INTO `item_db_re` VALUES ('5144','Gambler_Hat','Gamble Hat','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','bonus bLuk,5;','','');
REPLACE INTO `item_db_re` VALUES ('5145','Carnival_Joker_Jester','Carnival Joker Jester','5','10','5','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','89','0','','','');
REPLACE INTO `item_db_re` VALUES ('5146','Elephant_Hat','Elephant Hat','5','0','0','500','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','215','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,7; skill WZ_WATERBALL,1;','','');
@@ -2835,18 +2835,18 @@ REPLACE INTO `item_db_re` VALUES ('5155','Granpa_Beard_F','Father\'s White Moust
REPLACE INTO `item_db_re` VALUES ('5156','Flu_Mask_F','Father\'s Mask','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','8','0','bonus bMatkRate,1;','','');
REPLACE INTO `item_db_re` VALUES ('5157','Viking_Helm_','Orc Helm','5','20','10','500','0','0','9','0','1','414946','63','2','256','0','0',NULL,'1','86','0','','','');
REPLACE INTO `item_db_re` VALUES ('5158','Holy_Bonnet_','Monk Hat','5','30000','15000','100','0','0','10','0','1','33040','63','2','256','0','0',NULL,'1','35','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5159','Golden_Gear_','Golden Gear','5','20','10','900','0','0','9','0','1','2147483647','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5159','Golden_Gear_','Golden Gear','5','20','10','900','0','0','9','0','1','2147483646','63','2','256','0','40',NULL,'1','30','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5160','Magestic_Goat_','Magestic Goat','5','20','10','800','0','0','9','0','1','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5161','Sharp_Gear_','Spiky Band','5','20','10','1000','0','0','12','0','1','6739442','63','2','256','0','50',NULL,'1','43','0','','','');
REPLACE INTO `item_db_re` VALUES ('5162','Bone_Helm_','Bone Helm','5','20','10','800','0','0','15','0','1','279714','63','2','256','0','70',NULL,'1','103','0','bonus2 bSubEle,Ele_Dark,-15;','','');
-REPLACE INTO `item_db_re` VALUES ('5163','Corsair_','Corsair','5','20','10','500','0','0','10','0','1','2147483647','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5164','Tiara_','Tiara','5','20','10','400','0','0','7','0','1','2147483647','63','2','256','0','45',NULL,'1','19','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5165','Crown_','Crown','5','20','10','400','0','0','7','0','1','2147483647','63','1','256','0','45',NULL,'1','45','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5163','Corsair_','Corsair','5','20','10','500','0','0','10','0','1','2147483646','63','2','256','0','0',NULL,'1','105','0','bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5164','Tiara_','Tiara','5','20','10','400','0','0','7','0','1','2147483646','63','2','256','0','45',NULL,'1','19','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5165','Crown_','Crown','5','20','10','400','0','0','7','0','1','2147483646','63','1','256','0','45',NULL,'1','45','0','bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5166','Spinx_Helm_','Sphinx Hat','5','20','10','3000','0','0','5','0','1','16514','63','2','257','0','65',NULL,'0','137','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5167','Munak_Turban_','Munak Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','769','0','0',NULL,'0','51','0','bonus2 bSubRace,RC_Undead,10;','','');
REPLACE INTO `item_db_re` VALUES ('5168','Bongun_Hat_','Bongun Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','769','0','0',NULL,'0','139','0','','','');
REPLACE INTO `item_db_re` VALUES ('5169','Bride_Mask','Bride Mask','5','30000','15000','500','0','0','4','0','1','4294967295','63','2','768','0','40',NULL,'1','223','0','if(BaseClass==Job_Taekwon) { bonus bLuk,2; bonus bCritical,5; }','','');
-REPLACE INTO `item_db_re` VALUES ('5170','Feather_Beret','Feather Beret','5','30000','15000','600','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','224','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5170','Feather_Beret','Feather Beret','5','30000','15000','600','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','224','0','bonus bMdef,1; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5171','Valkyrie_Helm','Valkyrie Helm','5','100000','50000','1000','0','0','10','0','1','1040382','58','2','256','0','0',NULL,'1','225','0','bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('5172','Beret','Beret','5','30000','15000','700','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','226','0','bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5173','Satto_Hat','Magistrate Hat','5','30000','15000','400','0','0','6','0','1','4294967295','63','2','256','0','60',NULL,'1','227','0','if(BaseClass==Job_Taekwon) { bonus bAgi,1; bonus bHPrecovRate,3; }','','');
@@ -2860,7 +2860,7 @@ REPLACE INTO `item_db_re` VALUES ('5180','Phrygian_Cap_','France Holiday Hat','5
REPLACE INTO `item_db_re` VALUES ('5181','Helm_Of_Darkness','Helm of Darkness','5','20','10','500','0','0','3','0','1','414946','63','2','768','0','50',NULL,'1','233','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5182','Puppy_Hat','Puppy Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','30',NULL,'0','234','0','bonus bAgi,1; bonus3 bAutoSpell,PR_GLORIA,1,10+20*(readparam(bAgi)>=77);','','');
REPLACE INTO `item_db_re` VALUES ('5183','Bird_Nest_Hat','Bird Nest Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','10',NULL,'1','235','0','bonus bDex,1; bonus bAgi,1; bonus2 bResEff,Eff_Stun,1000;','','');
-REPLACE INTO `item_db_re` VALUES ('5184','Captain_Hat','Captain\'s Hat','5','20','10','500','0','0','8','0','0','2147483647','63','2','256','0','30',NULL,'1','236','0','bonus2 bSubEle,Ele_Water,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5184','Captain_Hat','Captain\'s Hat','5','20','10','500','0','0','8','0','0','2147483646','63','2','256','0','30',NULL,'1','236','0','bonus2 bSubEle,Ele_Water,5;','','');
REPLACE INTO `item_db_re` VALUES ('5185','Laurel_Wreath','Laurel Wreath','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','10',NULL,'1','237','0','bonus bLuk,3; bonus2 bResEff,Eff_Blind,500; bonus2 bResEff,Eff_Curse,500;','','');
REPLACE INTO `item_db_re` VALUES ('5186','Geographer_Band','Geographer Band','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','30',NULL,'0','238','0','bonus bInt,1; bonus3 bAutoSpellWhenHit,AL_HEAL,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('5187','Twin_Ribbon','Twin Red Ribbon','5','20','10','200','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','239','0','bonus bMaxSP,30; bonus bMdef,3; bonus3 bAutoSpellWhenHit,NPC_STONESKIN,6,10; bonus5 bAutoSpellWhenHit,NPC_ANTIMAGIC,6,120,BF_MAGIC,0;','','');
@@ -2882,35 +2882,35 @@ REPLACE INTO `item_db_re` VALUES ('5202','Pumpkin_Hat_','Fantastic Pumpkin-Head'
REPLACE INTO `item_db_re` VALUES ('5203','Tongue_Mask','Smiling Mask','5','20','10','200','0','0','2','0','0','4294967295','63','2','513','0','0',NULL,'0','253','0','bonus bSpeedRate,25;','','');
REPLACE INTO `item_db_re` VALUES ('5204','Event_Pierrot_Nose','Rudolph\'s Nose','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','49','0','bonus2 bResEff,Eff_Blind,3000; bonus2 bAddMonsterDropItem,12130,30;','','');
REPLACE INTO `item_db_re` VALUES ('5205','Wreath','Emperor\'s Laurel Crown','5','20','10','1000','0','0','3','0','0','4294967295','63','2','768','0','0',NULL,'1','261','0','bonus bAllStats,1; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5206','Romantic_White_Flower','Romantic White Flower','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','259','0','bonus2 bSubRace,RC_Plant,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5206','Romantic_White_Flower','Romantic White Flower','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','259','0','bonus2 bSubRace,RC_Plant,3;','','');
REPLACE INTO `item_db_re` VALUES ('5207','Gold_Spirit_Chain','Angel Blessing','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','260','0','bonus bLuk,1; bonus2 bSubEle,Ele_Holy,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5208','Rideword_Hat','Rideword Hat','5','20','10','300','0','0','3','0','1','2147483647','63','2','256','0','40',NULL,'1','262','0','bonus2 bHPDrainRate,50,8; bonus2 bSPDrainRate,10,4; bonus2 bHPLossRate,10,5000;','','');
+REPLACE INTO `item_db_re` VALUES ('5208','Rideword_Hat','Rideword Hat','5','20','10','300','0','0','3','0','1','2147483646','63','2','256','0','40',NULL,'1','262','0','bonus2 bHPDrainRate,50,8; bonus2 bSPDrainRate,10,4; bonus2 bHPLossRate,10,5000;','','');
REPLACE INTO `item_db_re` VALUES ('5209','Yellow_Baseball_Cap','Love Dad Cap','5','20','10','300','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','263','0','','','');
REPLACE INTO `item_db_re` VALUES ('5210','Flying_Angel','Flapping Angel Wing','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bVariableCastrate,-3; bonus bAspdRate,3; bonus bInt,1; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5211','Dress_Hat','Dress Hat','5','0','0','200','0','0','3','0','1','4294967295','63','2','256','0','20',NULL,'1','265','0','bonus bMdef,7; bonus bStr,1; bonus bInt,1; bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bHealPower,5; if(getrefine()>=7) { bonus2 bAddRace,RC_NonBoss,1; bonus2 bAddRace,RC_Boss,1; bonus bMatkRate,1; bonus bHealPower,1; }','','');
REPLACE INTO `item_db_re` VALUES ('5212','Satellite_Hairband','Satellite Hairband','5','0','0','1000','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','266','0','bonus bMaxHP,50; bonus bMaxSP,10; skill AL_RUWACH,1;','','sc_end SC_RUWACH;');
REPLACE INTO `item_db_re` VALUES ('5213','Black_Bunny_Band','Sheila Hairnet','5','0','0','200','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','267','0','bonus bAgi,2; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('5214','Moonlight_Flower_Hat','Moonlight Flower Hat','5','0','0','200','0','0','3','0','0','4294967295','63','2','768','0','0',NULL,'1','268','0','bonus bDex,2; bonus3 bAutoSpell,AL_INCAGI,1,50;','','');
-REPLACE INTO `item_db_re` VALUES ('5215','Angelic_Chain_','Evolved Angel Wing','5','20','10','100','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bDex,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5216','Satanic_Chain_','Evolved Evil Wing','5','20','10','100','0','0','6','0','0','2147483647','63','2','256','0','0',NULL,'1','39','0','bonus bStr,1; bonus bAgi,1; bonus bFlee,3; bonus2 bSubRace,RC_Angel,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5215','Angelic_Chain_','Evolved Angel Wing','5','20','10','100','0','0','4','0','0','2147483646','63','2','256','0','0',NULL,'1','38','0','bonus bMdef,3; bonus bDex,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5216','Satanic_Chain_','Evolved Evil Wing','5','20','10','100','0','0','6','0','0','2147483646','63','2','256','0','0',NULL,'1','39','0','bonus bStr,1; bonus bAgi,1; bonus bFlee,3; bonus2 bSubRace,RC_Angel,3;','','');
REPLACE INTO `item_db_re` VALUES ('5217','Magestic_Goat_TW','Evolved Magestic Goat','5','20','10','800','0','0','10','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5218','Bunny_Band_','Evolved Bunny Band','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','15','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5219','Drooping_Kitty_','Evolved Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,18; bonus bFlee,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5220','Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5219','Drooping_Kitty_','Evolved Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','142','0','bonus bMdef,18; bonus bFlee,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5220','Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1; bonus2 bSubRace,RC_Brute,5;','','');
REPLACE INTO `item_db_re` VALUES ('5221','Pair_Of_Red_Ribbon_','Evolved Pair of Red Ribbon','5','20','10','100','0','0','2','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('5222','Fish_On_Head_','Evolved Blue Fish','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus bAgi,1; bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5223','Big_Golden_Bell_','Evolved Big Golden Bell','5','20','10','200','0','0','2','0','0','2147483647','63','2','768','0','35',NULL,'1','175','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5224','Orc_Hero_Helm_TW','Evolved Orc Hero Helm','5','500000','250000','900','0','0','5','0','0','2147483647','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1; bonus bMaxHPrate,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5223','Big_Golden_Bell_','Evolved Big Golden Bell','5','20','10','200','0','0','2','0','0','2147483646','63','2','768','0','35',NULL,'1','175','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5224','Orc_Hero_Helm_TW','Evolved Orc Hero Helm','5','500000','250000','900','0','0','5','0','0','2147483646','63','2','768','0','55',NULL,'1','178','0','bonus bStr,2; bonus bVit,1; bonus bMaxHPrate,10;','','');
REPLACE INTO `item_db_re` VALUES ('5225','Marcher_Hat','Parade Hat','5','20','10','200','0','0','4','0','1','4294967295','63','2','256','0','10',NULL,'1','269','0','bonus bMdef,2; bonus bStr,2; bonus4 bAutoSpellWhenHit,AL_ANGELUS,5,30,0; bonus4 bAutoSpellWhenHit,HP_ASSUMPTIO,1,1,0; bonus2 bResEff,Eff_Stun,1000; if(BaseClass==Job_Acolyte) bonus4 bAutoSpellOnSkill,AL_HEAL,PR_LEXAETERNA,1,1000;','','');
REPLACE INTO `item_db_re` VALUES ('5226','Mini_Propeller_','Mini Propeller','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','270','0','bonus bAgi,2; bonus bDex,1; bonus bFlee,10; bonus bVariableCastrate,-getrefine();','','');
-REPLACE INTO `item_db_re` VALUES ('5227','Red_Deviruchi_Cap','Red Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','64',NULL,'1','271','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5228','White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5229','Gray_Deviruchi_Cap','Brown Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','64',NULL,'1','273','0','bonus bStr,1; bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5230','White_Drooping_Kitty','Gray Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','274','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('5231','Gray_Drooping_Kitty','Brown Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','275','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('5232','Pink_Drooping_Kitty','Pink Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','276','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('5233','Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','277','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('5234','Yellow_Drooping_Kitty','Yellow Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','278','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5227','Red_Deviruchi_Cap','Red Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483646','63','2','256','0','64',NULL,'1','271','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5228','White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483646','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5229','Gray_Deviruchi_Cap','Brown Deviruchi Hat','5','20','10','800','0','0','4','0','0','2147483646','63','2','256','0','64',NULL,'1','273','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5230','White_Drooping_Kitty','Gray Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','274','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5231','Gray_Drooping_Kitty','Brown Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','275','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5232','Pink_Drooping_Kitty','Pink Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','276','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5233','Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','277','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5234','Yellow_Drooping_Kitty','Yellow Drooping Cat','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','278','0','bonus2 bResEff,Eff_Curse,3000; bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('5235','Gray_Fur_Hat','Brown Beanie','5','20','10','350','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','279','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5236','Blue_Fur_Hat','Blue Beanie','5','20','10','350','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','280','0','bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('5237','Pink_Fur_Hat','Pink Beanie','5','20','10','350','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','281','0','bonus bLuk,1;','','');
@@ -2933,18 +2933,18 @@ REPLACE INTO `item_db_re` VALUES ('5253','Lif_Doll_Hat','Lif Doll Hat','5','20',
REPLACE INTO `item_db_re` VALUES ('5254','Deviling_Hat','Deviling Hat','5','20','10','500','0','0','6','0','1','4294967295','63','2','256','0','0',NULL,'1','298','0','bonus bStr,1; bonus bCritical,3; bonus2 bSubRace,RC_Angel,-20; if(getrefine()>=6) { bonus bCritical,getrefine()-5; }','','');
REPLACE INTO `item_db_re` VALUES ('5255','Triple_Poring_Hat','Triple Poring Hat','5','20','10','600','0','0','6','0','0','4294967295','63','2','256','0','20',NULL,'0','299','0','bonus bLuk,3; bonus3 bAutoSpell,BS_GREED,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('5256','Valkyrie_Feather_Band','Valkyrie Feather Band','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','20',NULL,'1','300','0','bonus bInt,1; bonus3 bAutoSpellWhenHit,AL_HEAL,1,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5257','Soulless_Wing','Soul Ring','5','20','10','300','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','301','0','bonus bMdef,2; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,1,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5257','Soulless_Wing','Soul Ring','5','20','10','300','0','0','3','0','0','2147483646','63','2','256','0','20',NULL,'1','301','0','bonus bMdef,2; bonus3 bAutoSpellWhenHit,HP_ASSUMPTIO,1,10;','','');
REPLACE INTO `item_db_re` VALUES ('5258','Afro_Wig','Afro Wig','5','20','10','100','0','0','0','0','1','4294967295','63','2','768','0','10',NULL,'1','302','0','bonus3 bAutoSpellWhenHit,NV_FIRSTAID,1,300; bonus2 bSubEle,Ele_Neutral,1;','','');
REPLACE INTO `item_db_re` VALUES ('5259','Elephant_Hat_','Elephant Hat','5','20','10','500','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'1','215','0','bonus bVit,1; bonus3 bAutoSpell,WZ_WATERBALL,3,10; skill AL_HOLYWATER,1;','','');
REPLACE INTO `item_db_re` VALUES ('5260','Cookie_Hat','Cookie Hat','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','217','0','bonus bAgi,1; bonus bFlee2,5; bonus bCritAtkRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('5261','Silver_Tiara_','Silver Tiara','5','20','10','500','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','218','0','bonus bInt,2; if(BaseClass==Job_Mage) bonus bMatkRate,(JobLevel/20); if(BaseClass==Job_Acolyte) bonus bUseSPrate,-(JobLevel/10); if(BaseClass==Job_Archer) bonus bMaxSP,(JobLevel*2);','','');
REPLACE INTO `item_db_re` VALUES ('5262','Gold_Tiara_','Golden Tiara','5','20','10','500','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','232','0','bonus bStr,2; bonus bUnbreakableHelm,0; if((readparam(bDex)<56)&&(BaseClass==Job_Swordman||BaseClass==Job_Merchant||BaseClass==Job_Thief)) bonus bDex,JobLevel/7;','','');
-REPLACE INTO `item_db_re` VALUES ('5263','Ati_Atihan_Hat','Pagdayaw','5','20','10','100','0','0','1','0','0','2147483647','63','2','769','0','20',NULL,'1','303','0','bonus2 bSubEle,Ele_Water,1; bonus2 bSubEle,Ele_Earth,1; bonus2 bSubEle,Ele_Fire,1; bonus2 bSubEle,Ele_Wind,1; bonus2 bAddEff,Eff_Curse,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5263','Ati_Atihan_Hat','Pagdayaw','5','20','10','100','0','0','1','0','0','2147483646','63','2','769','0','20',NULL,'1','303','0','bonus2 bSubEle,Ele_Water,1; bonus2 bSubEle,Ele_Earth,1; bonus2 bSubEle,Ele_Fire,1; bonus2 bSubEle,Ele_Wind,1; bonus2 bAddEff,Eff_Curse,3;','','');
REPLACE INTO `item_db_re` VALUES ('5264','Aussie_Flag_Hat','Australian Flag Hat','5','20','10','500','0','0','8','0','0','4294967295','63','2','256','0','0',NULL,'1','304','0','bonus bAllStats,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5265','Apple_Of_Archer_C','Rental Apple of Archer','5','1','0','0','0','0','12','0','0','2147483647','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5265','Apple_Of_Archer_C','Rental Apple of Archer','5','1','0','0','0','0','12','0','0','2147483646','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
REPLACE INTO `item_db_re` VALUES ('5266','Bunny_Band_C','Rental Bunny Band','5','1','0','0','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','15','0','bonus bMdef,5; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5267','Sahkkat_C','Sahkkat C','5','1','0','0','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','67','0','bonus bAgi,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5268','Lord_Circlet_C','Grand Circlet','5','1','0','0','0','0','12','0','0','2147483647','63','2','256','0','0',NULL,'0','93','0','bonus bStr,3; bonus bInt,3; bonus bLuk,3; bonus bMdef,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5268','Lord_Circlet_C','Grand Circlet','5','1','0','0','0','0','12','0','0','2147483646','63','2','256','0','0',NULL,'0','93','0','bonus bStr,3; bonus bInt,3; bonus bLuk,3; bonus bMdef,4;','','');
REPLACE INTO `item_db_re` VALUES ('5269','Flying_Angel_','Flapping Angel Wing','5','20','10','300','0','0','3','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bInt,1; bonus bAgi,1; bonus bAspdRate,3; bonus bSpeedRate,25;','','');
REPLACE INTO `item_db_re` VALUES ('5270','Fallen_Leaves_','Autumn Leaves','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','241','0','bonus bFlee2,5;','','');
REPLACE INTO `item_db_re` VALUES ('5271','Chinese_Crown_','Phoenix Crown','5','20','10','500','0','0','4','0','1','4294967295','63','2','768','0','0',NULL,'1','221','0','bonus bMdef,3; bonus2 bSubRace,RC_Boss,getrefine();','','');
@@ -2953,11 +2953,11 @@ REPLACE INTO `item_db_re` VALUES ('5273','Happy_Wig','Happy Wig','5','20','10','
REPLACE INTO `item_db_re` VALUES ('5274','Shiny_Wig','Shiny Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','306','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db_re` VALUES ('5275','Marvelous_Wig','Marvelous Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','307','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db_re` VALUES ('5276','Fantastic_Wig','Fantastic Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','308','0','bonus bSpeedRate,25; bonus bDef,4; skill TF_HIDING,1;','','sc_end SC_HIDING;');
-REPLACE INTO `item_db_re` VALUES ('5277','Yellow_Bandana','Air Pirate\'s Bandana','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','20',NULL,'1','309','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5278','Yellow_Ribbon','Yellow Ribbon','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','20',NULL,'1','310','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5279','Drooping_Kitty_C','Refined Drooping Cat','5','2','1','0','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
-REPLACE INTO `item_db_re` VALUES ('5280','Magestic_Goat_C','Baphomet Horns','5','2','1','0','0','0','10','0','0','2147483647','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5281','Deviruchi_Cap_C','Refined Deviruchi Hat','5','2','1','0','0','0','4','0','0','2147483647','63','2','256','0','0',NULL,'0','123','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5277','Yellow_Bandana','Air Pirate\'s Bandana','5','20','10','100','0','0','2','0','0','2147483646','63','2','256','0','20',NULL,'1','309','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5278','Yellow_Ribbon','Yellow Ribbon','5','20','10','100','0','0','2','0','0','2147483646','63','2','256','0','20',NULL,'1','310','0','bonus bLuk,2; bonus bVit,2; bonus bLongAtkDef,10;','','');
+REPLACE INTO `item_db_re` VALUES ('5279','Drooping_Kitty_C','Refined Drooping Cat','5','2','1','0','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,3000;','','');
+REPLACE INTO `item_db_re` VALUES ('5280','Magestic_Goat_C','Baphomet Horns','5','2','1','0','0','0','10','0','0','2147483646','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5281','Deviruchi_Cap_C','Refined Deviruchi Hat','5','2','1','0','0','0','4','0','0','2147483646','63','2','256','0','0',NULL,'0','123','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5282','euRO_Baseball_Cap','Europe Baseball Cap','5','0','0','200','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','216','0','','','');
REPLACE INTO `item_db_re` VALUES ('5283','Chick_Hat','Chick Hat','5','20','10','100','0','0','2','0','0','4294967295','63','2','256','0','10',NULL,'0','311','0','bonus bLuk,2; bonus bMaxHP,50; bonus bMaxSP,50; skill TF_DOUBLE,2; bonus bDoubleRate,10; bonus2 bSubRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db_re` VALUES ('5284','Water_Lily_Crown','Water Lily Crown','5','20','10','200','0','0','0','0','1','4294967295','63','2','256','0','30',NULL,'0','312','0','bonus bDex,1; bonus bAgi,1; bonus bMdef,3; bonus bHPrecovRate,5; bonus bSPrecovRate,3;','','');
@@ -2976,13 +2976,13 @@ REPLACE INTO `item_db_re` VALUES ('5296','Drooping_Nine_Tail_','Drooping Nine Ta
REPLACE INTO `item_db_re` VALUES ('5297','Soulless_Wing_','Soul Wing','5','20','10','300','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','301','0','bonus bAllStats,1; bonus2 bSPRegenRate,2,10000;','','');
REPLACE INTO `item_db_re` VALUES ('5298','Marvelous_Wig_','Dokebi\'s Wig','5','20','10','100','0','0','1','0','1','4294967295','63','2','768','0','0',NULL,'1','307','0','bonus2 bSubEle,Ele_Neutral,5; bonus2 bSubEle,Ele_Fire,-5; bonus2 bSubEle,Ele_Water,-5;','','');
REPLACE INTO `item_db_re` VALUES ('5299','Ati_Atihan_Hat_','Pagdayaw','5','20','10','100','0','0','1','0','1','4294967295','63','2','769','0','0',NULL,'1','303','0','bonus3 bAutoSpell,DC_SCREAM,1,50;','','');
-REPLACE INTO `item_db_re` VALUES ('5300','Bullock_Helm','Bullock Helm','5','20','10','800','0','0','4','0','0','2147483647','63','2','256','0','45',NULL,'1','322','0','bonus bMaxHP,100;','','');
+REPLACE INTO `item_db_re` VALUES ('5300','Bullock_Helm','Bullock Helm','5','20','10','800','0','0','4','0','0','2147483646','63','2','256','0','45',NULL,'1','322','0','bonus bMaxHP,100;','','');
REPLACE INTO `item_db_re` VALUES ('5301','Russian_Ribbon','Victory Hairband','5','0','0','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','323','0','','','');
REPLACE INTO `item_db_re` VALUES ('5302','Lotus_Flower_Hat','Water Lily Hat','5','0','0','100','0','0','2','0','0','4294967295','63','2','256','0','30',NULL,'1','324','0','','','');
REPLACE INTO `item_db_re` VALUES ('5303','Flower_Coronet','Flower Crown','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','325','0','bonus bMdef,5; bonus bMaxHP,50;','','');
REPLACE INTO `item_db_re` VALUES ('5304','Cap_Of_Blindness','Cap Of Blindness','5','20','10','800','0','0','4','0','1','4294967295','63','2','769','0','30',NULL,'1','326','0','bonus2 bResEff,Eff_Curse,700; bonus2 bResEff,Eff_Blind,10000;','','');
REPLACE INTO `item_db_re` VALUES ('5305','Pirate_Dagger','Pirate Dagger','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','327','0','bonus bBaseAtk,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5306','Freyja_Crown','Freyja Crown','5','0','0','500','0','0','20','0','0','2147483647','63','2','256','0','0',NULL,'0','328','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5306','Freyja_Crown','Freyja Crown','5','0','0','500','0','0','20','0','0','2147483646','63','2','256','0','0',NULL,'0','328','0','bonus2 bSubRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('5307','Carmen_Miranda\'s_Hat','Carmen Miranda\'s Hat','5','20','10','400','0','0','5','0','0','4294967295','63','2','256','0','0',NULL,'1','329','0','bonus bMdef,3; bonus3 bAutoSpellWhenHit,DC_WINKCHARM,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('5308','Brazilian_Flag_Hat','Brazilian Flag Hat','5','20','10','300','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','330','0','bonus bSpeedAddRate,25;','','');
REPLACE INTO `item_db_re` VALUES ('5309','Mahican','Wool Mask','5','20','10','200','0','0','1','0','0','4294967295','63','2','769','0','0',NULL,'1','331','0','skill RG_GRAFFITI,1;','','');
@@ -2996,18 +2996,18 @@ REPLACE INTO `item_db_re` VALUES ('5316','Umbrella_Hat','Umbrella Hat','5','20',
REPLACE INTO `item_db_re` VALUES ('5317','Fisherman_Hat','Fisherman Hat','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','50',NULL,'1','339','0','bonus3 bAutoSpell,WZ_WATERBALL,3,50;','','');
REPLACE INTO `item_db_re` VALUES ('5318','Poring_Party_Hat','Poring Party Hat','5','20','10','0','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','340','0','bonus bAllStats,3;','','');
REPLACE INTO `item_db_re` VALUES ('5319','Hellomother_Hat','Arc Angeling Hat','5','20','10','200','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','341','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5320','Champion_Wreath','Champion Wreath','5','20','10','500','0','0','8','0','0','2147483647','63','2','256','0','0',NULL,'1','261','0','bonus bAllStats,2; bonus4 bAutoSpellWhenHit,AL_HEAL,1,50,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5320','Champion_Wreath','Champion Wreath','5','20','10','500','0','0','8','0','0','2147483646','63','2','256','0','0',NULL,'1','261','0','bonus bAllStats,2; bonus4 bAutoSpellWhenHit,AL_HEAL,1,50,0;','','');
REPLACE INTO `item_db_re` VALUES ('5321','Indonesian_Bandana','Indonesian Bandana','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','342','0','','','');
REPLACE INTO `item_db_re` VALUES ('5322','Scarf','Scarf','5','20','10','100','0','0','4','0','0','4294967295','63','2','256','0','24',NULL,'1','343','0','bonus bMdef,2; bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('5323','Misstrance_Crown','Misstrance Crown','5','20','10','0','0','0','14','0','0','4294967295','63','2','256','0','0',NULL,'0','165','0','bonus bAllStats,2;','','');
REPLACE INTO `item_db_re` VALUES ('5324','Little_Angel_Doll','Little Angel Doll','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','10',NULL,'1','344','0','bonus bDex,3; bonus4 bAutoSpellWhenHit,CR_GRANDCROSS,3,30,0;','','');
REPLACE INTO `item_db_re` VALUES ('5325','Robo_Eye','Robo Eye','5','20','10','200','0','0','2','0','0','4294967295','63','2','512','0','10',NULL,'0','345','0','bonus bUnbreakableHelm,0; bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('5326','Masquerade_C','Masquerade C','5','1','0','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','78','0','bonus2 bAddRace,RC_DemiHuman,7;','','');
-REPLACE INTO `item_db_re` VALUES ('5327','Orc_Hero_Helm_C','Refined Helmet of Orc Hero','5','1','0','0','0','0','10','0','0','2147483647','63','2','768','0','0',NULL,'0','178','0','bonus bStr,5; bonus bVit,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5327','Orc_Hero_Helm_C','Refined Helmet of Orc Hero','5','1','0','0','0','0','10','0','0','2147483646','63','2','768','0','0',NULL,'0','178','0','bonus bStr,5; bonus bVit,3;','','');
REPLACE INTO `item_db_re` VALUES ('5328','Evil_Wing_Ears_C','Evil Wing Ears C','5','1','0','0','0','0','4','0','0','4294967295','63','2','512','0','0',NULL,'0','152','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5329','Dark_Blindfold_C','Costume: Dark Blindfold','5','1','0','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,500;','','');
-REPLACE INTO `item_db_re` VALUES ('5330','kRO_Drooping_Kitty_C','kRO Drooping Kitty C','5','1','0','0','0','0','9','0','0','2147483647','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,4000; bonus2 bResEff,Eff_Curse,1000;','','');
-REPLACE INTO `item_db_re` VALUES ('5331','Corsair_C','Corsair C','5','1','0','0','0','0','14','0','0','2147483647','63','2','256','0','0',NULL,'0','105','0','bonus bVit,3; bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5330','kRO_Drooping_Kitty_C','kRO Drooping Kitty C','5','1','0','0','0','0','9','0','0','2147483646','63','2','256','0','0',NULL,'0','142','0','bonus bMdef,15; bonus2 bResEff,Eff_Curse,4000; bonus2 bResEff,Eff_Curse,1000;','','');
+REPLACE INTO `item_db_re` VALUES ('5331','Corsair_C','Corsair C','5','1','0','0','0','0','14','0','0','2147483646','63','2','256','0','0',NULL,'0','105','0','bonus bVit,3; bonus bInt,3;','','');
REPLACE INTO `item_db_re` VALUES ('5332','Loki_Mask','Loki Mask','5','0','0','200','0','0','2','0','0','4294967295','63','2','513','0','20',NULL,'0','346','0','bonus bFlee2,3;','','');
REPLACE INTO `item_db_re` VALUES ('5333','Radio_Antenna','Radio Antenna','5','0','0','1500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','347','0','bonus bMdef,5; bonus bCritical,5; bonus bFlee,5; skill MG_LIGHTNINGBOLT,1; bonus4 bAutoSpellWhenHit,MG_THUNDERSTORM,5,30,1;','','');
REPLACE INTO `item_db_re` VALUES ('5334','Angeling_Wanna_Fly','Flapping Angeling','5','0','0','700','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','348','0','bonus bDex,1; bonus bLuk,2; bonus bMdef,2;','','');
@@ -3023,12 +3023,12 @@ REPLACE INTO `item_db_re` VALUES ('5343','Tayelin_Doll_Hat','Telling Doll Hat','
REPLACE INTO `item_db_re` VALUES ('5344','Binit_Doll_Hat','Bennit Doll Hat','5','0','0','500','0','0','1','0','1','4294967295','63','2','256','0','60',NULL,'0','358','0','bonus2 bSubRace,RC_DemiHuman,5; autobonus \"{ bonus bAspdRate,5; }\",20,30000,0,\"{ specialeffect2 EF_HASTEUP; }\";','','');
REPLACE INTO `item_db_re` VALUES ('5345','Debril_Doll_Hat','W Doll Hat','5','0','0','500','0','0','1','0','1','4294967295','63','2','256','0','60',NULL,'0','359','0','bonus2 bSubRace,RC_DemiHuman,5; bonus2 bAddRace,RC_Undead,5; bonus2 bMagicAddRace,RC_Undead,5;','','');
REPLACE INTO `item_db_re` VALUES ('5346','Gf_Recruiter_Hat','Gf Recruiter Hat','5','0','0','0','0','0','4','0','0','4294967295','63','2','256','0','10',NULL,'1','360','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5347','Ph.D_Hat_','Ph.D Hat','5','20','10','200','0','0','5','0','1','2147483647','63','2','256','0','0',NULL,'1','98','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5348','Big_Sis\'_Ribbon_','Big Ribbon','5','15000','7500','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('5349','Boy\'s_Cap_','Boy\'s Cap','5','20','10','100','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','102','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5350','Pirate_Bandana_','Pirate Bandana','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5347','Ph.D_Hat_','Ph.D Hat','5','20','10','200','0','0','5','0','1','2147483646','63','2','256','0','0',NULL,'1','98','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5348','Big_Sis\'_Ribbon_','Big Ribbon','5','15000','7500','200','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','28','0','bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5349','Boy\'s_Cap_','Boy\'s Cap','5','20','10','100','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','102','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5350','Pirate_Bandana_','Pirate Bandana','5','20','10','100','0','0','4','0','1','2147483646','63','2','256','0','0',NULL,'1','74','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5351','Sunflower_','Sunflower','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'0','37','0','bonus2 bSubRace,RC_Insect,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5352','Poporing_Cap','Poporing Cap','5','20','10','700','0','0','4','0','0','2147483647','63','2','256','0','38',NULL,'1','361','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5352','Poporing_Cap','Poporing Cap','5','20','10','700','0','0','4','0','0','2147483646','63','2','256','0','38',NULL,'1','361','0','','','');
REPLACE INTO `item_db_re` VALUES ('5353','Helm_Of_Sun_','Hat of the Sun God','5','20','10','2400','0','0','4','0','1','1040256','63','2','768','0','0',NULL,'1','138','0','bonus bStr,3; bonus bInt,2; bonus5 bAutoSpellWhenHit,HP_ASSUMPTIO,1,1,BF_WEAPON|BF_MAGIC,0;','','');
REPLACE INTO `item_db_re` VALUES ('5354','Muslim_Hat_M','Muslim Hat M','5','0','0','100','0','0','4','0','0','4294967295','63','1','256','0','0',NULL,'0','362','0','bonus bVariableCastrate,-5;','','');
REPLACE INTO `item_db_re` VALUES ('5355','Muslim_Hat_F','Selendang','5','0','0','100','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'0','363','0','bonus bVariableCastrate,-5;','','');
@@ -3059,7 +3059,7 @@ REPLACE INTO `item_db_re` VALUES ('5379','Balloon_Hat','Tam','5','0','0','800','
REPLACE INTO `item_db_re` VALUES ('5380','Fish_Head_Hat','Fish Head Hat','5','20','10','400','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','386','0','bonus3 bAutoSpell,SA_FROSTWEAPON,1,5;','','');
REPLACE INTO `item_db_re` VALUES ('5381','Santa_Poring_Hat','Santa Poring Hat','5','20','10','100','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'0','387','0','bonus bMdef,2; bonus2 bAddEle,Ele_Dark,3; bonus2 bSubEle,Ele_Dark,3;','','');
REPLACE INTO `item_db_re` VALUES ('5382','Bell_Ribbon','Bell Ribbon','5','20','10','200','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','388','0','bonus bVit,1; skill AL_ANGELUS,1;','','sc_end SC_ANGELUS;');
-REPLACE INTO `item_db_re` VALUES ('5383','Hunting_Cap','Hunting Cap','5','20','10','250','0','0','6','0','1','2147483647','63','2','256','0','50',NULL,'1','389','0','bonus bLuk,1; bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5383','Hunting_Cap','Hunting Cap','5','20','10','250','0','0','6','0','1','2147483646','63','2','256','0','50',NULL,'1','389','0','bonus bLuk,1; bonus2 bAddRace,RC_Brute,10; bonus2 bAddRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('5384','Santa_Hat_1','Twin Pom Santa','5','20','10','200','0','0','4','0','1','4294967295','63','2','256','0','20',NULL,'1','390','0','bonus bLuk,3; skill WZ_ESTIMATION,1; bonus3 bAutoSpell,AL_INCAGI,1,500;','','');
REPLACE INTO `item_db_re` VALUES ('5385','Yoyo_Hat','Yoyo Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','20',NULL,'1','391','0','skill TF_HIDING,1;','','sc_end SC_HIDING;');
REPLACE INTO `item_db_re` VALUES ('5386','Ayam_','New Year\'s Hat','5','0','0','70','0','0','7','0','0','4294967295','63','2','256','0','0',NULL,'0','228','0','bonus bMdef,7; bonus bFlee,7; bonus2 bAddMonsterDropItem,12198,200;','','');
@@ -3092,12 +3092,12 @@ REPLACE INTO `item_db_re` VALUES ('5412','Sweet_Candy','Lollipop','5','20','10',
REPLACE INTO `item_db_re` VALUES ('5413','Popcorn_Hat','Popcorn Hat','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'0','415','0','bonus2 bSubEle,Ele_Wind,10;','','');
REPLACE INTO `item_db_re` VALUES ('5414','Campfire_Hat','Campfire Hat','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'0','416','0','bonus2 bSubEle,Ele_Fire,10; bonus4 bAutoSpellWhenHit,MG_FIREBALL,5,100,1;','','');
REPLACE INTO `item_db_re` VALUES ('5415','Poring_Cake_Cap','Poring Cake Hat','5','20','10','1000','0','0','10','0','0','4294967295','63','2','256','0','40',NULL,'1','417','0','bonus bMdef,5; bonus bCritical,5; bonus bFlee,5; bonus bFlee2,5; bonus bAspdRate,5; bonus bVariableCastrate,-5; bonus bDelayrate,-5;','','');
-REPLACE INTO `item_db_re` VALUES ('5416','Beer_Cap','Beer Hat','5','20','10','600','0','0','4','0','0','2147483647','63','2','256','0','18',NULL,'1','418','0','bonus bFlee2,5; skill SM_RECOVERY,3; skill MG_SRECOVERY,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5416','Beer_Cap','Beer Hat','5','20','10','600','0','0','4','0','0','2147483646','63','2','256','0','18',NULL,'1','418','0','bonus bFlee2,5; skill SM_RECOVERY,3; skill MG_SRECOVERY,3;','','');
REPLACE INTO `item_db_re` VALUES ('5417','Crown_Parrot','Crown Parrots','5','20','10','200','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'0','419','0','bonus bInt,1; bonus2 bResEff,Eff_Silence,10000; bonus3 bAutoSpell,DC_SCREAM,1,50;','','');
REPLACE INTO `item_db_re` VALUES ('5418','Soldier_Hat','Soldier Hat','5','20','10','400','0','0','8','0','1','4294967295','63','2','256','0','0',NULL,'1','420','0','bonus bStr,1; bonus2 bAddRace,RC_NonBoss,3; bonus2 bAddRace,RC_Boss,3; bonus bUseSPrate,10;','','');
REPLACE INTO `item_db_re` VALUES ('5419','Evolved_Leaf','Leaves Of Grass','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','57','0','bonus bUnbreakableHelm,0; bonus bVit,1; bonus2 bSubRace,RC_Plant,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5420','Mask_Of_Ifrit','Ifrit Mask','5','20','10','800','0','0','12','0','1','2147483647','63','2','769','0','50',NULL,'0','421','0','bonus bStr,2; bonus bInt,2; bonus bMdef,5; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,-10; skill MG_SIGHT,1; bonus3 bAutoSpellWhenHit,WZ_METEOR,3,50; bonus3 bAutoSpell,MG_FIREBOLT,3,50;','','sc_end SC_SIGHT;');
-REPLACE INTO `item_db_re` VALUES ('5421','Ifrit\'s_Ear','Ifrit\'s Ears','5','20','10','300','0','0','0','0','0','2147483647','63','2','512','0','50',NULL,'0','422','0','bonus bUnbreakableHelm,0; bonus bInt,1; bonus bStr,1; bonus bMdef,3; bonus2 bSkillAtk,MG_FIREBOLT,2; bonus2 bSkillAtk,WZ_FIREPILLAR,2; bonus2 bSkillAtk,WZ_METEOR,2; bonus2 bSkillAtk,SM_BASH,2; bonus2 bSkillAtk,SM_MAGNUM,2; bonus2 bSkillAtk,KN_PIERCE,2; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,-5;','','');
+REPLACE INTO `item_db_re` VALUES ('5420','Mask_Of_Ifrit','Ifrit Mask','5','20','10','800','0','0','12','0','1','2147483646','63','2','769','0','50',NULL,'0','421','0','bonus bStr,2; bonus bInt,2; bonus bMdef,5; bonus2 bSubEle,Ele_Fire,10; bonus2 bSubEle,Ele_Water,-10; skill MG_SIGHT,1; bonus3 bAutoSpellWhenHit,WZ_METEOR,3,50; bonus3 bAutoSpell,MG_FIREBOLT,3,50;','','sc_end SC_SIGHT;');
+REPLACE INTO `item_db_re` VALUES ('5421','Ifrit\'s_Ear','Ifrit\'s Ears','5','20','10','300','0','0','0','0','0','2147483646','63','2','512','0','50',NULL,'0','422','0','bonus bUnbreakableHelm,0; bonus bInt,1; bonus bStr,1; bonus bMdef,3; bonus2 bSkillAtk,MG_FIREBOLT,2; bonus2 bSkillAtk,WZ_FIREPILLAR,2; bonus2 bSkillAtk,WZ_METEOR,2; bonus2 bSkillAtk,SM_BASH,2; bonus2 bSkillAtk,SM_MAGNUM,2; bonus2 bSkillAtk,KN_PIERCE,2; bonus2 bSubEle,Ele_Fire,5; bonus2 bSubEle,Ele_Water,-5;','','');
REPLACE INTO `item_db_re` VALUES ('5422','Linguistic_Book_Cap','Linguistic Book Hat','5','20','10','70','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','423','0','bonus bInt,1; bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('5423','Lovecap_China','I LOVE CHINA','5','20','10','250','0','0','10','0','0','4294967295','63','2','256','0','0',NULL,'0','424','0','bonus bDex,3; bonus2 bSubRace,RC_DemiHuman,10;','','');
REPLACE INTO `item_db_re` VALUES ('5424','Fanta_Orange_Can','Fanta Orange Can Hat','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','425','0','','','');
@@ -3114,10 +3114,10 @@ REPLACE INTO `item_db_re` VALUES ('5434','Cola_Can','Coca-Cola Bottle','5','20',
REPLACE INTO `item_db_re` VALUES ('5435','Coke_Hat','Coca-Cola Hat','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','40',NULL,'1','436','0','bonus bInt,1; bonus bMaxSP,80; bonus bMdef,3; if(getrefine()>5) { bonus bMdef,getrefine()-5; bonus bMaxSP,(getrefine()-5)*10; }','','');
REPLACE INTO `item_db_re` VALUES ('5436','Bride\'s_Corolla','Bride\'s Corolla','5','20','10','200','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','437','0','bonus bLuk,3; bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('5437','Flower_Of_Fairy','Fairy Flower','5','20','10','200','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','438','0','bonus bInt,1; bonus bMdef,1; bonus2 bSubRace,RC_Insect,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5438','Fillet_Green','Cute Green Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','439','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db_re` VALUES ('5439','Fillet_Red','Cute Red Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','440','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db_re` VALUES ('5440','Fillet_Blue','Cute Blue Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','441','0','bonus bMaxSP,20;','','');
-REPLACE INTO `item_db_re` VALUES ('5441','Fillet_White','Cute White Ribbon','5','500','250','100','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'0','442','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('5438','Fillet_Green','Cute Green Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','439','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('5439','Fillet_Red','Cute Red Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','440','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('5440','Fillet_Blue','Cute Blue Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','441','0','bonus bMaxSP,20;','','');
+REPLACE INTO `item_db_re` VALUES ('5441','Fillet_White','Cute White Ribbon','5','500','250','100','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'0','442','0','bonus bMaxSP,20;','','');
REPLACE INTO `item_db_re` VALUES ('5442','Necktie','Necktie','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','70',NULL,'1','443','0','bonus bVit,1; bonus bHit,-5; bonus bUseSPrate,5;','','');
REPLACE INTO `item_db_re` VALUES ('5443','Status_Of_Baby_Angel','Statue Of Baby Angel','5','20','10','600','0','0','6','0','1','4294967295','63','2','256','0','70',NULL,'1','444','0','bonus bMdef,2; bonus4 bAutoSpellWhenHit,PR_STRECOVERY,1,20,0;','','');
REPLACE INTO `item_db_re` VALUES ('5444','Hair_Brush','Hair Brush','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','445','0','bonus bCritical,6;','','');
@@ -3126,7 +3126,7 @@ REPLACE INTO `item_db_re` VALUES ('5446','Cat_Foot_Hairpin','Catfoot Hairpin','5
REPLACE INTO `item_db_re` VALUES ('5447','Frog_Cap','Frog Hat','5','20','10','500','0','0','6','0','0','4294967295','63','2','256','0','70',NULL,'1','448','0','bonus bMdef,1; bonus2 bAddRace,RC_Insect,12; bonus2 bMagicAddRace,RC_Insect,12;','','');
REPLACE INTO `item_db_re` VALUES ('5448','Solo_Play_Box1','Indifferent Solo Hat','5','20','10','300','0','0','0','0','1','4294967295','63','2','769','0','0',NULL,'1','449','0','skill RG_GRAFFITI,1;','','');
REPLACE INTO `item_db_re` VALUES ('5449','Solo_Play_Box2','Angry Solo Hat','5','20','10','300','0','0','0','0','1','4294967295','63','2','769','0','0',NULL,'1','450','0','skill RG_GRAFFITI,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5450','Sun_Cap','Solar Hat','5','20','10','1000','0','0','0','0','0','2147483647','63','2','256','0','20',NULL,'1','451','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5450','Sun_Cap','Solar Hat','5','20','10','1000','0','0','0','0','0','2147483646','63','2','256','0','20',NULL,'1','451','0','','','');
REPLACE INTO `item_db_re` VALUES ('5451','Dragonhelm_Gold','Gold Dragonhelm','5','20','10','1500','0','0','14','0','1','4294967295','63','2','256','0','0',NULL,'0','452','0','bonus bAspdRate,10; bonus bAllStats,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
REPLACE INTO `item_db_re` VALUES ('5452','Dragonhelm_Silver','Silver Dragonhelm','5','20','10','1500','0','0','10','0','1','4294967295','63','2','256','0','0',NULL,'0','453','0','bonus bAspdRate,7; bonus bAllStats,2; bonus2 bAddRace,RC_DemiHuman,3;','','');
REPLACE INTO `item_db_re` VALUES ('5453','Dragonhelm_Copper','Copper Dragonhelm','5','20','10','1500','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'0','454','0','bonus bAspdRate,5; bonus bAllStats,2; bonus2 bAddRace,RC_DemiHuman,1;','','');
@@ -3168,12 +3168,12 @@ REPLACE INTO `item_db_re` VALUES ('5488','J_Twin_Santahat','Cute Santa Hat','5',
REPLACE INTO `item_db_re` VALUES ('5489','Love_Daddy','Love Daddy Hat','5','20','10','100','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','484','0','bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('5490','Anubis_Helm','Anubis Helm','5','20','10','0','0','0','8','0','0','4294967295','63','2','768','0','65',NULL,'0','485','0','bonus bUnbreakableHelm,0; bonus bMdef,5; bonus2 bSubRace,RC_Boss,10; bonus bHealPower2,10; bonus bAddItemHealRate,10;','','');
REPLACE INTO `item_db_re` VALUES ('5491','Hat_Of_Outlaw','Bandit Hat','5','20','10','800','0','0','6','0','1','4294967295','63','2','256','0','0',NULL,'1','486','0','bonus bStr,2; bonus2 bSubEle,Ele_Fire,10;','','');
-REPLACE INTO `item_db_re` VALUES ('5492','Boy\'s_Cap_I','Student Cap','5','0','0','0','0','0','10','0','0','2147483647','63','2','256','0','0',NULL,'0','102','0','bonus bMdef,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5493','Ulle_Cap_I','Ulle\'s Cap','5','0','0','0','0','0','12','0','0','2147483647','63','2','256','0','0',NULL,'0','254','0','bonus bDex,2; bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5492','Boy\'s_Cap_I','Student Cap','5','0','0','0','0','0','10','0','0','2147483646','63','2','256','0','0',NULL,'0','102','0','bonus bMdef,3; bonus2 bAddRace,RC_DemiHuman,5;','','');
+REPLACE INTO `item_db_re` VALUES ('5493','Ulle_Cap_I','Ulle\'s Cap','5','0','0','0','0','0','12','0','0','2147483646','63','2','256','0','0',NULL,'0','254','0','bonus bDex,2; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5494','Spinx_Helm_I','Sphinx Hat','5','0','0','0','0','0','10','0','0','16514','63','2','257','0','0',NULL,'0','137','0','bonus bStr,5;','','');
REPLACE INTO `item_db_re` VALUES ('5495','Power_Of_Thor','Power Of Thor','5','20','10','100','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','493','0','bonus bLuk,1; bonus bAgi,1; bonus bVit,1; bonus bStr,1; bonus bInt,1; bonus bDex,1; bonus bMdef,3; bonus bFlee,5;','','');
REPLACE INTO `item_db_re` VALUES ('5496','Dice_Hat','Dice Hat','5','20','10','300','0','0','6','0','0','4294967295','63','2','256','0','50',NULL,'0','494','0','bonus bLuk,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5497','King_Tiger_Doll_Hat','Edgga Doll','5','20','10','400','0','0','6','0','1','2147483647','63','2','256','0','0',NULL,'1','495','0','bonus bDex,2; bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('5497','King_Tiger_Doll_Hat','Edgga Doll','5','20','10','400','0','0','6','0','1','2147483646','63','2','256','0','0',NULL,'1','495','0','bonus bDex,2; bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5498','Wondering_Wolf_Helm','Vagabond Wolf Hat','5','20','10','600','0','0','5','0','0','4294967295','63','2','768','0','20',NULL,'0','490','0','bonus bVit,5; bonus bFlee,10;','','');
REPLACE INTO `item_db_re` VALUES ('5499','Pizza_Hat','Pizza Pie of Plenty','5','20','10','600','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','487','0','skill SM_PROVOKE,1;','','');
REPLACE INTO `item_db_re` VALUES ('5500','Icecream_Hat','Ice Cream Hat','5','20','10','300','0','0','6','0','0','4294967295','63','2','256','0','30',NULL,'1','488','0','bonus bMdef,3; skill MG_FROSTDIVER,3;','','');
@@ -3204,7 +3204,7 @@ REPLACE INTO `item_db_re` VALUES ('5524','Sakura_Milk_Tea_Hat','Sakura Milk Tea
REPLACE INTO `item_db_re` VALUES ('5525','First_Leaf_Tea_Hat','First Leaf Tea Hat','5','20','10','100','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'1','519','0','bonus bMaxHP,80; bonus bMaxSP,20;','','');
REPLACE INTO `item_db_re` VALUES ('5526','Lady_Tanee_Doll','Lady Tanee Doll','5','20','10','300','0','0','4','0','0','4294967295','63','2','256','0','60',NULL,'0','520','0','bonus bAgi,2; bonus bFlee,3; bonus2 bSubEle,Ele_Wind,5; bonus2 bAddMonsterDropItem,513,200;','','');
REPLACE INTO `item_db_re` VALUES ('5527','Lunatic_Hat','Lunatic Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','521','0','bonus bLuk,3; bonus bMdef,2; bonus bFlee2,5; bonus2 bAddMonsterDropItem,622,50;','','');
-REPLACE INTO `item_db_re` VALUES ('5528','King_Frog_Hat','Frog King Hat','5','20','10','500','0','0','4','0','1','2147483647','63','2','256','0','30',NULL,'0','522','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5528','King_Frog_Hat','Frog King Hat','5','20','10','500','0','0','4','0','1','2147483646','63','2','256','0','30',NULL,'0','522','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5529','Evil\'s_Bone_Hat','Frost Giant\'s Skull','5','20','10','600','0','0','12','0','1','4294967295','63','2','768','0','0',NULL,'1','523','0','bonus bMdef,2; bonus bInt,2; bonus bStr,2; bonus bDex,3; bonus2 bSubEle,Ele_Neutral,5; skill WZ_FROSTNOVA,1;','','');
REPLACE INTO `item_db_re` VALUES ('5530','Raven_Cap','Raven Cap','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','524','0','','','');
REPLACE INTO `item_db_re` VALUES ('5531','B_Dragon_Hat','Baby Dragon Hat','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','0',NULL,'1','525','0','','','');
@@ -3233,7 +3233,7 @@ REPLACE INTO `item_db_re` VALUES ('5553','Fest_Bunny_Band','Festival Bunny Band'
REPLACE INTO `item_db_re` VALUES ('5554','Octopus_Hat','Octopus Hat','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','538','0','bonus bMdef,3; bonus3 bAutoSpell,SM_PROVOKE,5,10; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5555','Leaf_Cat_Hat','Leaf Cat Hat','5','20','10','100','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'1','539','0','bonus bAgi,2; bonus3 bAutoSpellWhenHit,AL_HEAL,3,10;','','');
REPLACE INTO `item_db_re` VALUES ('5556','Fur_Seal_Hat','Seal Hat','5','20','10','500','0','0','5','0','0','4294967295','63','2','768','0','0',NULL,'1','540','0','bonus bInt,1; bonus3 bAutoSpell,WZ_FROSTNOVA,1,30;','','');
-REPLACE INTO `item_db_re` VALUES ('5557','Wild_Rose_Hat','Wild Rose Hat','5','20','10','500','0','0','6','0','1','2147483647','63','2','256','0','20',NULL,'1','541','0','bonus bAgi,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5557','Wild_Rose_Hat','Wild Rose Hat','5','20','10','500','0','0','6','0','1','2147483646','63','2','256','0','20',NULL,'1','541','0','bonus bAgi,3;','','');
REPLACE INTO `item_db_re` VALUES ('5558','Saci_Hat','Luxury Hat','5','20','10','100','0','0','6','0','1','4294967295','63','2','256','0','30',NULL,'1','542','0','bonus3 bAddMonsterDropItem,510,RC_Plant,500;','','');
REPLACE INTO `item_db_re` VALUES ('5559','Piece_Of_White_Cloth_E','Piece Of White Cloth','5','0','0','0','0','0','5','0','0','4294967295','63','2','768','0','0',NULL,'1','543','0','','','');
REPLACE INTO `item_db_re` VALUES ('5560','Bullock_Helm_J','Horned Helm','5','20','10','3000','0','0','6','0','0','4294967295','63','2','256','0','75',NULL,'1','322','0','bonus bMaxHP,100; bonus bNoKnockback,0; bonus2 bSubEle,Ele_Neutral,-20; bonus2 bSubEle,Ele_Fire,-20; bonus2 bSubEle,Ele_Water,-20; bonus2 bSubEle,Ele_Wind,-20; bonus2 bSubEle,Ele_Earth,-20; bonus2 bSubEle,Ele_Dark,-20; bonus2 bSubEle,Ele_Holy,-20; bonus2 bSubEle,Ele_Ghost,-20;','','');
@@ -3288,9 +3288,9 @@ REPLACE INTO `item_db_re` VALUES ('5608','Dorothy_Doll_Hat','Dorothy Doll Hat','
REPLACE INTO `item_db_re` VALUES ('5609','Chung_Hairband','Chung Hairpin','5','0','0','500','0','0','5','0','1','4294967295','63','2','256','0','60',NULL,'0','583','0','bonus bLuk,3; bonus bMdef,4; bonus3 bAutoSpellWhenHit,MC_MAMMONITE,5,5;','','');
REPLACE INTO `item_db_re` VALUES ('5610','Ice_Wing_Ear','Ice Ear Wing','5','0','0','100','0','0','0','0','0','4294967295','63','2','512','0','10',NULL,'0','584','0','bonus bUnbreakableHelm,0; bonus bLuk,1; bonus3 bAutoSpellWhenHit,MG_COLDBOLT,5,5;','','');
REPLACE INTO `item_db_re` VALUES ('5611','Turtle_Hat','Turtle Hat','5','0','0','300','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'1','585','0','bonus bAgi,1; bonus3 bAutoSpellWhenHit,AL_DECAGI,3,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5612','F_Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483647','63','2','256','0','0',NULL,'1','277','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('5612','F_Blue_Drooping_Kitty','Blue Drooping Cat','5','250000','125000','500','0','0','1','0','0','2147483646','63','2','256','0','0',NULL,'1','277','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('5613','F_Flying_Angel','Flapping Angel Wing','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bInt,1; bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5614','F_Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483647','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5614','F_Smoking_Pipe_','Evolved Pipe','5','20','10','100','0','0','0','0','0','2147483646','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('5615','F_Pair_Of_Red_Ribbon_','Evolved Pair of Red Ribbon','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','45',NULL,'0','169','0','','','');
REPLACE INTO `item_db_re` VALUES ('5616','F_Fish_On_Head_','Evolved Blue Fish','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','50',NULL,'1','149','0','bonus bDex,1; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5617','F_Hibiscus','Hibiscus','5','20','10','200','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'0','210','0','bonus bInt,1; bonus bDex,1; bonus bMdef,5;','','');
@@ -3299,10 +3299,10 @@ REPLACE INTO `item_db_re` VALUES ('5619','F_Bunny_Band_','Evolved Bunny Band','5
REPLACE INTO `item_db_re` VALUES ('5620','F_Magestic_Goat_TW','Evolved Magestic Goat','5','20','10','800','0','0','5','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5621','F_Sheep_Hat','Sheep Hat','5','20','10','150','0','0','1','0','0','33040','63','2','256','0','0',NULL,'0','205','0','','','');
REPLACE INTO `item_db_re` VALUES ('5622','F_Mini_Propeller_','Mini Propeller','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','270','0','bonus bDex,1; bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5623','F_Alice_Doll','Alice Doll','5','20','10','500','0','0','0','0','1','2147483647','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5623','F_Alice_Doll','Alice Doll','5','20','10','500','0','0','0','0','1','2147483646','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5624','F_Red_Glasses','Red Glasses','5','20','10','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','316','0','bonus bUnbreakableHelm,0; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5625','F_Chick_Hat','Chick Hat','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'0','311','0','bonus bLuk,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5626','F_White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5626','F_White_Deviruchi_Cap','Gray Deviruchi Hat','5','20','10','800','0','0','2','0','0','2147483646','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5627','F_Vane_Hairpin','Vane Hairpin','5','20','10','300','0','0','2','0','1','4294967295','63','2','256','0','30',NULL,'0','313','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('5628','F_Pecopeco_Hairband','Pecopeco Hairband','5','20','10','0','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','314','0','','','');
REPLACE INTO `item_db_re` VALUES ('5629','F_Vacation_Hat','Vacation Hat','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','30',NULL,'0','315','0','bonus bVit,1;','','');
@@ -3324,11 +3324,11 @@ REPLACE INTO `item_db_re` VALUES ('5644','F_Tiger_Mask','Tiger Mask','5','20','1
REPLACE INTO `item_db_re` VALUES ('5645','F_Fantastic_Wig','Fantastic Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','308','0','','','');
REPLACE INTO `item_db_re` VALUES ('5646','F_Whisper_Mask','Whisper Mask','5','20','10','0','0','0','0','0','0','4294967295','63','2','769','0','0',NULL,'0','321','0','bonus bUnbreakableHelm,0; bonus bAgi,3;','','');
REPLACE INTO `item_db_re` VALUES ('5647','F_Bunny_Band_C','Bunny Band','5','1','0','0','0','0','9','0','0','4294967295','63','2','256','0','0',NULL,'0','15','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5648','F_Centimental_Flower_C','Centimental Flower','5','1','0','0','0','0','1','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5649','F_Apple_Of_Archer_C','Apple Of Archer','5','1','0','0','0','0','7','0','0','2147483647','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5650','F_Elven_Ears_C','Elven Ears','5','1','0','0','0','0','2','0','0','2147483647','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5651','F_Brooch_C','Brooch','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5652','F_Magestic_Goat_C','Magestic Goat','5','2','1','0','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5648','F_Centimental_Flower_C','Centimental Flower','5','1','0','0','0','0','1','0','0','2147483646','63','2','1','0','0',NULL,'0','56','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5649','F_Apple_Of_Archer_C','Apple Of Archer','5','1','0','0','0','0','7','0','0','2147483646','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5650','F_Elven_Ears_C','Elven Ears','5','1','0','0','0','0','2','0','0','2147483646','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5651','F_Brooch_C','Brooch','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5652','F_Magestic_Goat_C','Magestic Goat','5','2','1','0','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5653','Darkness_Helm_J','Darkness Helm','5','20','10','500','0','0','3','0','1','4294967295','63','2','256','0','70',NULL,'1','586','0','','','');
REPLACE INTO `item_db_re` VALUES ('5654','Holy_Marching_Hat_J','Holy Marching Hat','5','20','10','200','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','587','0','bonus bMdef,5; bonus bDex,1; bonus bInt,1; bonus bStr,2; bonus3 bAutoSpell,PR_ASPERSIO,2,30;','','');
REPLACE INTO `item_db_re` VALUES ('5655','Dark_Snake_Lord_Hat_J','Dark Snake Lord Hat','5','20','10','500','0','0','2','0','0','4294967295','63','2','256','0','60',NULL,'1','372','0','bonus bInt,2; bonus bAgi,2; bonus bDex,-2; autobonus \"{ bonus bVariableCastrate,-50; bonus bFlee,30; }\",50,5000,BF_MAGIC,\"{ specialeffect2 EF_SUFFRAGIUM; }\";','','');
@@ -3370,7 +3370,7 @@ REPLACE INTO `item_db_re` VALUES ('5690','Red_Wing_Hat','Red Wing Hat','5','20',
REPLACE INTO `item_db_re` VALUES ('5691','Catain_Bandanna','Sailor\'s Bandana','5','20','10','10','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'1','542','0','bonus bUnbreakableHelm,0; bonus bDex,1; bonus2 bSubEle,Ele_Poison,20;','','');
REPLACE INTO `item_db_re` VALUES ('5692','Sea_Cat_Hat','Sea Cat Hat','5','20','10','10','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','539','0','bonus bUnbreakableHelm,0; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('5693','No_Fear_Underware','NoFear Underwear','5','0','0','0','0','0','10','0','0','4294967295','63','2','256','0','20',NULL,'0','30','0','bonus bStr,1; bonus bInt,1; bonus bDex,1; bonus bUnbreakableHelm,0;','','');
-REPLACE INTO `item_db_re` VALUES ('5694','No_Fear_P_Headgear','NoFear Headband','5','0','0','0','0','0','1','0','1','2147483647','63','2','256','0','20',NULL,'0','614','0','bonus bVit,1; bonus bUnbreakableHelm,0;','','');
+REPLACE INTO `item_db_re` VALUES ('5694','No_Fear_P_Headgear','NoFear Headband','5','0','0','0','0','0','1','0','1','2147483646','63','2','256','0','20',NULL,'0','614','0','bonus bVit,1; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('5695','E_Blue_Drooping_Kitty','E Blue Drooping Kitty','5','250000','125000','500','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','277','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('5696','E_Flying_Angel','E Flying Angel','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'1','264','0','bonus bInt,1; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('5697','E_Smoking_Pipe_','E Smoking Pipe ','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','55','0','bonus bVit,1;','','');
@@ -3382,10 +3382,10 @@ REPLACE INTO `item_db_re` VALUES ('5702','E_Bunny_Band_','E Bunny Band ','5','20
REPLACE INTO `item_db_re` VALUES ('5703','E_Magestic_Goat_TW','E Magestic Goat TW','5','20','10','800','0','0','5','0','0','6571170','63','2','256','0','0',NULL,'1','41','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('5704','E_Sheep_Hat','E Sheep Hat','5','20','10','150','0','0','1','0','0','33040','63','2','256','0','0',NULL,'0','205','0','','','');
REPLACE INTO `item_db_re` VALUES ('5705','E_Mini_Propeller_','E Mini Propeller ','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','270','0','bonus bDex,1; bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5706','E_Alice_Doll','E Alice Doll','5','20','10','500','0','0','0','0','1','2147483647','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5706','E_Alice_Doll','E Alice Doll','5','20','10','500','0','0','0','0','1','2147483646','63','2','256','0','30',NULL,'0','208','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5707','E_Red_Glasses','E Red Glasses','5','20','10','0','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'0','316','0','bonus bUnbreakableHelm,0; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5708','E_Chick_Hat','E Chick Hat','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','10',NULL,'0','311','0','bonus bLuk,2;','','');
-REPLACE INTO `item_db_re` VALUES ('5709','E_White_Deviruchi_Cap','E White Deviruchi Cap','5','20','10','800','0','0','2','0','0','2147483647','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5709','E_White_Deviruchi_Cap','E White Deviruchi Cap','5','20','10','800','0','0','2','0','0','2147483646','63','2','256','0','64',NULL,'1','272','0','bonus bStr,1; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('5710','E_Vane_Hairpin','E Vane Hairpin','5','20','10','300','0','0','2','0','1','4294967295','63','2','256','0','30',NULL,'0','313','0','bonus bAgi,2;','','');
REPLACE INTO `item_db_re` VALUES ('5711','E_Pecopeco_Hairband','E Pecopeco Hairband','5','20','10','0','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','314','0','','','');
REPLACE INTO `item_db_re` VALUES ('5712','E_Vacation_Hat','E Vacation Hat','5','20','10','200','0','0','1','0','1','4294967295','63','2','256','0','30',NULL,'0','315','0','bonus bVit,1;','','');
@@ -3406,11 +3406,11 @@ REPLACE INTO `item_db_re` VALUES ('5726','E_Crescent_Helm','E Crescent Helm','5'
REPLACE INTO `item_db_re` VALUES ('5727','E_Tiger_Mask','E Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','181','0','bonus bStr,3;','','');
REPLACE INTO `item_db_re` VALUES ('5728','E_Fantastic_Wig','E Fantastic Wig','5','20','10','100','0','0','1','0','0','4294967295','63','2','768','0','0',NULL,'1','308','0','','','');
REPLACE INTO `item_db_re` VALUES ('5729','E_Bunny_Band_C','E Bunny Band C','5','1','0','0','0','0','9','0','0','4294967295','63','2','256','0','0',NULL,'0','15','0','bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('5730','E_Centimental_Flower_C','E Centimental Flower C','5','1','0','0','0','0','1','0','0','2147483647','63','2','1','0','0',NULL,'0','56','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5731','E_Apple_OE_Archer_C','E Apple OE Archer C','5','1','0','0','0','0','7','0','0','2147483647','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5732','E_Elven_Ears_C','E Elven Ears C','5','1','0','0','0','0','2','0','0','2147483647','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('5733','E_Brooch_C','E Brooch C','5','1','0','0','0','0','0','0','0','2147483647','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
-REPLACE INTO `item_db_re` VALUES ('5734','E_Magestic_Goat_C','E Magestic Goat C','5','2','1','0','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5730','E_Centimental_Flower_C','E Centimental Flower C','5','1','0','0','0','0','1','0','0','2147483646','63','2','1','0','0',NULL,'0','56','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5731','E_Apple_OE_Archer_C','E Apple OE Archer C','5','1','0','0','0','0','7','0','0','2147483646','63','2','256','0','0',NULL,'0','72','0','bonus bDex,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5732','E_Elven_Ears_C','E Elven Ears C','5','1','0','0','0','0','2','0','0','2147483646','63','2','512','0','0',NULL,'0','73','0','bonus bInt,1;','','');
+REPLACE INTO `item_db_re` VALUES ('5733','E_Brooch_C','E Brooch C','5','1','0','0','0','0','0','0','0','2147483646','63','2','136','0','0',NULL,'0','0','0','bonus bAgi,4;','','');
+REPLACE INTO `item_db_re` VALUES ('5734','E_Magestic_Goat_C','E Magestic Goat C','5','2','1','0','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'0','41','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('5735','E_Ribbon_Green','E Ribbon Green','5','800','400','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','244','0','bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('5736','EF_Whisper_Mask','EF Whisper Mask','5','20','10','0','0','0','0','0','0','4294967295','63','2','769','0','0',NULL,'0','321','0','bonus bUnbreakableHelm,0; bonus bAgi,3; bonus2 bSubEle,Ele_Ghost,-10;','','');
REPLACE INTO `item_db_re` VALUES ('5737','Cactus_Hat','Potted Muka Hat','5','20','10','300','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'0','615','0','','','');
@@ -3483,10 +3483,10 @@ REPLACE INTO `item_db_re` VALUES ('5803','Flower_Love_Hat','Love Flower Hat','5'
REPLACE INTO `item_db_re` VALUES ('5804','Pirate_Eyepatch','Pirate Eye Bandage','5','1000','500','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','13','0','','','');
REPLACE INTO `item_db_re` VALUES ('5805','Victorious_Coronet','Victorious Coronet','5','0','0','150','0','0','2','0','0','4294967295','63','2','256','0','70',NULL,'0','43','0','bonus bMaxHPrate,15; bonus bSPrecovRate,5;','','');
REPLACE INTO `item_db_re` VALUES ('5806','Poem_Natalia_Hat','Poem Natalia Hat','5','20','10','300','0','0','9','0','0','4294967295','63','2','256','0','0',NULL,'0','67','0','','','');
-REPLACE INTO `item_db_re` VALUES ('5807','October_Fest_Cap','October Fest Cap','5','20','10','100','0','0','2','0','0','2147483647','63','2','256','0','50',NULL,'1','104','0','','','');
+REPLACE INTO `item_db_re` VALUES ('5807','October_Fest_Cap','October Fest Cap','5','20','10','100','0','0','2','0','0','2147483646','63','2','256','0','50',NULL,'1','104','0','','','');
REPLACE INTO `item_db_re` VALUES ('5808','Diabolus_Helmet','Dark Bacilium','5','20','10','250','0','0','5','0','1','1040256','58','2','769','0','0',NULL,'1','364','0','bonus2 bResEff,Eff_Stone,2000+(getrefine()*200); bonus2 bResEff,Eff_Freeze,2000+(getrefine()*200); bonus2 bResEff,Eff_Stun,2000+(getrefine()*200);','','');
REPLACE INTO `item_db_re` VALUES ('5809','Boom_Boom_Hat','Boom Boom Hat','5','0','0','100','0','0','6','0','0','4294967295','63','2','256','0','0',NULL,'0','216','0','bonus bAllStats,5; bonus bSpeedRate,25;','','');
-REPLACE INTO `item_db_re` VALUES ('5810','Ph.D_Hat_V','Ph.D Hat V','5','20','10','100','0','0','5','0','0','2147483647','63','2','256','0','0',NULL,'1','98','0','bonus bInt,5; bonus bVit,3; bonus bDex,3;','','');
+REPLACE INTO `item_db_re` VALUES ('5810','Ph.D_Hat_V','Ph.D Hat V','5','20','10','100','0','0','5','0','0','2147483646','63','2','256','0','0',NULL,'1','98','0','bonus bInt,5; bonus bVit,3; bonus bDex,3;','','');
REPLACE INTO `item_db_re` VALUES ('5811','Santa_Beard','Santa\'s Beard','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','bonus2 bSubRace,RC_Brute,5;','','');
REPLACE INTO `item_db_re` VALUES ('5812','Hat_Of_Expert','Hat Of Expert','5','0','0','0','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','16','0','bonus3 bAddEffWhenHit,Eff_Bleeding,500,ATF_TARGET|ATF_SELF; bonus3 bAddEffWhenHit,Eff_Silence,500,ATF_TARGET|ATF_SELF; bonus3 bAddEffWhenHit,Eff_Confusion,500,ATF_TARGET|ATF_SELF; bonus3 bAddEffWhenHit,Eff_Curse,500,ATF_TARGET|ATF_SELF; bonus3 bAddEffWhenHit,Eff_Blind,500,ATF_TARGET|ATF_SELF;','','');
REPLACE INTO `item_db_re` VALUES ('5813','Red_Ph.D_Hat','Red Scholar Hat','5','1000','500','500','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','481','0','bonus bInt,1;','','');
@@ -7250,7 +7250,7 @@ REPLACE INTO `item_db_re` VALUES ('14489','Pink_Pajamas_Hat_Box','Pink Pajamas H
REPLACE INTO `item_db_re` VALUES ('14500','Insurance60','Life Insurrance Certificate','2','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_CASH_DEATHPENALTY,3600000,0;','','');
REPLACE INTO `item_db_re` VALUES ('14508','Zeny_Scroll','Zeny Pet Egg Scroll','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('14509','Light_Center_Pot','Light Concentration Potion','2','800','400','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION1,1800000,0;','','');
-REPLACE INTO `item_db_re` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','1500','750','20','0','0','0','0','0','2147483647','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
+REPLACE INTO `item_db_re` VALUES ('14510','Light_Awakening_Pot','Light Awakening Potion','2','1500','750','20','0','0','0','0','0','2146959087','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION2,1800000,0;','','');
REPLACE INTO `item_db_re` VALUES ('14511','Light_Berserk_Pot','Light Berserk Potion','2','3000','1500','20','0','0','0','0','0','31868582','63','2','0','0','0',NULL,'0','0','0','sc_start SC_ATTHASTE_POTION3,1800000,0;','','');
REPLACE INTO `item_db_re` VALUES ('14512','Meteor_10_Scroll','Meteor Storm Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill WZ_METEOR,10;','','');
REPLACE INTO `item_db_re` VALUES ('14513','Storm_10_Scroll','Storm Gust Scroll','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','itemskill WZ_STORMGUST,10;','','');
@@ -7358,7 +7358,7 @@ REPLACE INTO `item_db_re` VALUES ('14616','STR_Biscuit_Stick','Bar of Strength',
REPLACE INTO `item_db_re` VALUES ('14617','VIT_Biscuit_Stick','Bar of Fitness','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('14618','AGI_Biscuit_Stick','Bar of Agility','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15000','Bone_Plate','Bone Plate','5','20','10','1000','0','0','60','0','1','414946','58','2','16','0','0',NULL,'1','0','0','bonus bStr,1; bonus bMdef,3; bonus2 bIgnoreDefRate,RC_DemiHuman,10; bonus2 bIgnoreDefRate,RC_Brute,10; bonus3 bAutoSpellWhenHit,NPC_WIDEBLEEDING,1,10;','','');
-REPLACE INTO `item_db_re` VALUES ('15001','Odin\'s_Blessing_I','Odin\'s Blessing','5','0','0','0','0','0','10','0','0','2147483647','63','2','16','0','0',NULL,'0','0','0','','','');
+REPLACE INTO `item_db_re` VALUES ('15001','Odin\'s_Blessing_I','Odin\'s Blessing','5','0','0','0','0','0','10','0','0','2147483646','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15002','Rune_Plate','Rune Plate','5','0','0','0','0','0','95','0','1','16512','56','2','16','0','99',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15003','Freyja_SRobe7','Freya Soul Robe','5','0','0','300','0','0','7','0','0','4294967295','63','2','16','0','20',NULL,'0','0','0','bonus bMaxHP,700;','','');
REPLACE INTO `item_db_re` VALUES ('15004','Freyja_SRobe30','Freya Soul Robe','5','0','0','300','0','0','7','0','0','4294967295','63','2','16','0','20',NULL,'0','0','0','bonus bMaxHP,700;','','');
@@ -7373,12 +7373,12 @@ REPLACE INTO `item_db_re` VALUES ('15012','Puente_Robe','Puente Robe','5','12000
REPLACE INTO `item_db_re` VALUES ('15013','Claire_Suits','Claire Suits','5','28000','14000','2800','0','0','58','0','1','1040382','58','2','16','0','22',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15014','Ebone_Armor','Ebone Armor','5','40000','20000','4500','0','0','93','0','1','16512','56','2','16','0','100',NULL,'1','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15015','Upg_Adv_Suit','Reinforcement Adventure Suit','5','20','10','150','0','0','25','0','1','4294967295','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('15016','Upg_Coat','Reinforcement Coat','5','20','10','600','0','0','47','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('15016','Upg_Coat','Reinforcement Coat','5','20','10','600','0','0','47','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15017','Upg_Saint_Robe','Reinforcement Saint Robe','5','20','10','300','0','0','55','0','1','296240','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,5; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15018','Upg_Tights','Reinforcement Tight','5','20','10','250','0','0','32','0','1','526344','63','2','16','0','0',NULL,'1','0','0','bonus bDex,1; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15019','Upg_Thief_Cloth','Reinforcement Thief Clothes','5','20','10','100','0','0','45','0','1','570560576','63','2','16','0','0',NULL,'1','0','0','bonus bAgi,1; bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15020','Upg_Mail','Reinforcement Mail','5','20','10','1650','0','0','60','0','1','414946','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
-REPLACE INTO `item_db_re` VALUES ('15021','Upg_Formal_Dress','Reinforcement Formal Suit','5','20','10','150','0','0','45','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
+REPLACE INTO `item_db_re` VALUES ('15021','Upg_Formal_Dress','Reinforcement Formal Suit','5','20','10','150','0','0','45','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bMaxHPrate,3;','','');
REPLACE INTO `item_db_re` VALUES ('15022','Brazil_Swimsuit','Swimming Suit','5','20','10','100','0','0','1','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','bonus bStr,4; bonus bInt,4; bonus bMdef,3;','','');
REPLACE INTO `item_db_re` VALUES ('15023','Half_Brynhild','Brynhild (Trial Version)','5','20','10','0','0','0','60','0','0','4294967295','63','2','16','0','47',NULL,'0','0','0','bonus bMdef,10; bonus bMaxHP,20*BaseLevel; bonus bMaxSP,5*BaseLevel; bonus2 bAddRace,RC_NonBoss,5; bonus2 bAddRace,RC_Boss,5; bonus bMatkRate,5; bonus bUnbreakableArmor,0; bonus bNoKnockback,0;','','');
REPLACE INTO `item_db_re` VALUES ('15024','Army_Padding','Army Padding','5','0','0','10','0','0','10','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','','','');
@@ -7389,7 +7389,7 @@ REPLACE INTO `item_db_re` VALUES ('15028','Forest_Robe','Forest Robe','5','20','
REPLACE INTO `item_db_re` VALUES ('15029','Robe_Of_Affection','Robe Of Affection','5','20','10','300','0','0','22','0','0','256','56','2','16','0','100',NULL,'1','0','0','bonus bDefEle,Ele_Holy; bonus bMdef,10; bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('15030','Robe_Of_Judgement','Robe Of Judgement','5','20','10','300','0','0','22','0','0','256','56','2','16','0','100',NULL,'1','0','0','bonus bDefEle,Ele_Dark; bonus bMdef,10; bonus bStr,1; bonus bInt,1; bonus2 bSubRace,RC_Demon,10; bonus2 bSubRace,RC_Undead,10; bonus2 bSubRace,RC_Formless,-10; bonus2 bSubRace,RC_Brute,-10; bonus2 bSubRace,RC_DemiHuman,-10; bonus2 bSubRace,RC_Plant,-10; bonus2 bSubRace,RC_Insect,-10; bonus2 bSubRace,RC_Fish,-10; bonus2 bSubRace,RC_Angel,-10; bonus2 bSubRace,RC_Dragon,-10;','','');
REPLACE INTO `item_db_re` VALUES ('15031','Para_Team_Armor','Eden Group Armor','5','0','0','0','0','0','70','0','0','4294967295','63','2','16','0','60',NULL,'0','0','0','bonus bMdef,5; bonus bMaxHP,500; bonus bMaxSP,50; bonus bStr,1; bonus bInt,1; bonus bDex,1;','','');
-REPLACE INTO `item_db_re` VALUES ('15032','Tidung','Tidung','5','10','5','500','0','0','2','0','1','2147483647','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10; bonus2 bResEff,Eff_Stun,1500; bonus2 bResEff,Eff_Freeze,1500; bonus2 bSubRace,RC_NonBoss,5; bonus2 bSubRace,RC_Boss,5;','','');
+REPLACE INTO `item_db_re` VALUES ('15032','Tidung','Tidung','5','10','5','500','0','0','2','0','1','2147483646','63','2','16','0','0',NULL,'1','0','0','bonus bMdef,10; bonus2 bResEff,Eff_Stun,1500; bonus2 bResEff,Eff_Freeze,1500; bonus2 bSubRace,RC_NonBoss,5; bonus2 bSubRace,RC_Boss,5;','','');
REPLACE INTO `item_db_re` VALUES ('15033','Tutorial_Mattle','Tutorial Mantle','5','0','0','600','0','0','37','0','0','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15034','Tutorial_Mattle_','Tutorial Mantle','5','0','0','600','0','0','37','0','1','4294967295','63','2','16','0','0',NULL,'0','0','0','','','');
REPLACE INTO `item_db_re` VALUES ('15035','2010Love_Daddy','2010 Love Daddy Shirt','5','10','5','100','0','0','6','0','0','4294967295','63','2','16','0','0',NULL,'1','0','0','bonus bAllStats,1; bonus bMaxHP,150; bonus bMaxSP,150; bonus2 bResEff,Eff_Stone,9000; bonus2 bResEff,Eff_Freeze,9000; bonus2 bResEff,Eff_Stun,9000; bonus2 bResEff,Eff_Sleep,9000; bonus2 bResEff,Eff_Silence,9000; bonus2 bResEff,Eff_Curse,9000; bonus2 bResEff,Eff_Confusion,9000; bonus2 bResEff,Eff_Blind,9000; bonus2 bResEff,Eff_Poison,9000; bonus2 bResEff,Eff_Bleeding,9000;','','');
@@ -7803,17 +7803,17 @@ REPLACE INTO `item_db_re` VALUES ('18503','Small_Horn_Of_Devil','Small Devil Hor
REPLACE INTO `item_db_re` VALUES ('18504','Anubis_Helm_J','Anubis Helm J','5','20','10','1000','0','0','0','0','0','4294967295','63','2','769','0','70',NULL,'0','485','0','','','');
REPLACE INTO `item_db_re` VALUES ('18505','Umbala_Spirit','Umbala Spirit','5','0','0','0','0','0','1','0','0','4294967295','63','2','1','0','0',NULL,'0','675','0','bonus bVit,1; bonus bMaxHPrate,1; bonus2 bAddMonsterDropItem,517,500;','','');
REPLACE INTO `item_db_re` VALUES ('18506','Hattah_Black','Hata Black','5','12000','6000','4000','0','0','2','0','1','4294967295','63','2','769','0','0',NULL,'1','676','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18507','Elven_Ears_','Elven Ears','5','20','10','100','0','0','0','0','1','2147483647','63','2','512','0','70',NULL,'0','73','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18508','Garuda_Hat','Garuda Hat','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','30',NULL,'1','677','0','bonus bLuk,5; bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18509','RWC2010_Indonesia','RWC 2010 Indonesia','5','20','10','100','0','0','6','0','1','2147483647','63','2','256','0','15',NULL,'1','678','0','bonus bLuk,5;','','');
+REPLACE INTO `item_db_re` VALUES ('18507','Elven_Ears_','Elven Ears','5','20','10','100','0','0','0','0','1','2147483646','63','2','512','0','70',NULL,'0','73','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18508','Garuda_Hat','Garuda Hat','5','20','10','100','0','0','4','0','1','2147483646','63','2','256','0','30',NULL,'1','677','0','bonus bLuk,5; bonus bMdef,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18509','RWC2010_Indonesia','RWC 2010 Indonesia','5','20','10','100','0','0','6','0','1','2147483646','63','2','256','0','15',NULL,'1','678','0','bonus bLuk,5;','','');
REPLACE INTO `item_db_re` VALUES ('18510','Blood_Angel_Hair_Band','Bloody Angel Wings','5','0','0','0','0','0','1','0','0','4294967295','63','2','256','0','60',NULL,'0','679','0','','','');
REPLACE INTO `item_db_re` VALUES ('18511','Blood_Angel_Wing_Ear','Bloody Angel Wing Ears','5','0','0','0','0','0','1','0','0','4294967295','63','2','512','0','60',NULL,'0','680','0','','','');
REPLACE INTO `item_db_re` VALUES ('18512','Juho_Necktie','Necktie of Drunkard','5','0','0','0','0','0','1','0','1','4294967295','63','2','256','0','20',NULL,'1','443','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18513','Shining_Sunflower','Shining Sunflower','5','20','10','300','0','0','0','0','0','2147483647','63','2','256','0','0',NULL,'0','681','0','bonus bLuk,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18513','Shining_Sunflower','Shining Sunflower','5','20','10','300','0','0','0','0','0','2147483646','63','2','256','0','0',NULL,'0','681','0','bonus bLuk,2;','','');
REPLACE INTO `item_db_re` VALUES ('18514','Para_Team_Hat2','Eden Group Hat II','5','0','0','0','0','0','5','0','1','4294967295','63','2','256','0','60',NULL,'1','682','0','autobonus \"{ bonus bBaseAtk,10; }\",50,5000,BF_WEAPON,\"{ specialeffect2 EF_ENHANCE; }\"; autobonus \"{ bonus bMatk,10; }\",50,5000,BF_MAGIC,\"{ specialeffect2 EF_MAGICALATTHIT; }\";','','');
-REPLACE INTO `item_db_re` VALUES ('18515','RTC_1st_Helm','RTC winners Pitching','5','6000','3000','2500','0','0','0','0','1','2147483647','63','2','769','0','90',NULL,'0','683','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18516','RTC_2nd_Helm','RTC Second Pitching','5','6000','3000','2500','0','0','0','0','1','2147483647','63','2','769','0','90',NULL,'0','684','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18517','RTC_3rd_Helm','RTC 3rd Winner Hat','5','6000','3000','2500','0','0','0','0','1','2147483647','63','2','769','0','90',NULL,'0','685','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18515','RTC_1st_Helm','RTC winners Pitching','5','6000','3000','2500','0','0','0','0','1','2147483646','63','2','769','0','90',NULL,'0','683','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18516','RTC_2nd_Helm','RTC Second Pitching','5','6000','3000','2500','0','0','0','0','1','2147483646','63','2','769','0','90',NULL,'0','684','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18517','RTC_3rd_Helm','RTC 3rd Winner Hat','5','6000','3000','2500','0','0','0','0','1','2147483646','63','2','769','0','90',NULL,'0','685','0','','','');
REPLACE INTO `item_db_re` VALUES ('18518','Ear_Of_Angel\'s_Wing_','Angel Wing Ears','5','20','10','100','0','0','3','0','1','4294967295','63','2','512','0','70',NULL,'0','158','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('18519','Ear_Of_Devil\'s_Wing_','Wing of Diablo','5','20','10','100','0','0','3','0','1','4294967295','63','2','512','0','70',NULL,'0','152','0','bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('18520','Jaty_C','Jaty Crown','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','686','0','bonus2 bSubRace,RC_Plant,5; bonus2 bSubRace,RC_Brute,5; bonus2 bAddRace,RC_Plant,5; bonus2 bAddRace,RC_Brute,5;','','');
@@ -7879,18 +7879,18 @@ REPLACE INTO `item_db_re` VALUES ('18579','9th_Anni_Hat','kRO 9 Anniversary Hat'
REPLACE INTO `item_db_re` VALUES ('18580','Yggdrasil_Crown','Yggdrasil Crown','5','20','10','200','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','724','0','bonus bVit,2; bonus bInt,2; bonus bMdef,3; bonus bHealPower,2; bonus bHealPower2,10; if(getrefine() >= 7) { bonus bHealPower,5; } if(getrefine() >= 9) { bonus bHealPower,3; }','','');
REPLACE INTO `item_db_re` VALUES ('18581','Red_Tiger_Mask','Red Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','747','0','bonus bStr,3;','','');
REPLACE INTO `item_db_re` VALUES ('18582','Blue_Tiger_Mask','Blue Tiger Mask','5','20','10','400','0','0','2','0','0','4294967295','63','2','768','0','50',NULL,'0','748','0','bonus bStr,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18583','Navy_Drooping_Kitty','Navy Drooping Kitty','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','749','0','bonus bMdef,15;','','');
-REPLACE INTO `item_db_re` VALUES ('18584','Brown_Drooping_Kitty','Brown Drooping Kitty','5','250000','125000','500','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','750','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('18583','Navy_Drooping_Kitty','Navy Drooping Kitty','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','749','0','bonus bMdef,15;','','');
+REPLACE INTO `item_db_re` VALUES ('18584','Brown_Drooping_Kitty','Brown Drooping Kitty','5','250000','125000','500','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','750','0','bonus bMdef,15;','','');
REPLACE INTO `item_db_re` VALUES ('18585','Orange_Bunny_Hairband','Orange Bunny Band','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','751','0','bonus bStr,1; bonus bInt,2; bonus bVit,3;','','');
REPLACE INTO `item_db_re` VALUES ('18586','Violet_Bunny_Hairband','Violet Bunny Band','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','752','0','bonus bStr,1; bonus bInt,3; bonus bVit,2; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('18587','Blue_Bunny_Hairband','Blue Bunny Band','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','753','0','bonus bStr,3; bonus bInt,1; bonus bVit,2; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('18588','Silver_Bunny_Hairband','Silvah Bunny Band','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'1','754','0','bonus bStr,2; bonus bInt,3; bonus bVit,1; bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('18589','Strawberry_Hat','Strawberry Hat','5','20','10','100','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','755','0','','','');
REPLACE INTO `item_db_re` VALUES ('18590','Gemma_Hairband','Demon Hair Band','5','20','10','200','0','0','3','0','1','4294967295','63','2','256','0','10',NULL,'1','564','0','bonus bMdef,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18591','Mini_Glasses_','Mini Glasses','5','20','10','100','0','0','2','0','1','2147483647','63','2','512','0','0',NULL,'0','47','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18591','Mini_Glasses_','Mini Glasses','5','20','10','100','0','0','2','0','1','2147483646','63','2','512','0','0',NULL,'0','47','0','','','');
REPLACE INTO `item_db_re` VALUES ('18592','Nestea_Hat','Nestea Hat','5','20','10','200','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','756','0','bonus bUnbreakableHelm,0; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('18593','Fancy_Mini_Crown','Fancy Mini Crown','5','20','10','100','0','0','2','0','1','4294967295','63','2','256','0','30',NULL,'1','707','0','bonus bInt,1; bonus bMdef,5;','','');
-REPLACE INTO `item_db_re` VALUES ('18594','Magni_Cap_','Magni Cap','5','30000','15000','1000','0','0','9','0','1','2147483647','63','2','256','0','0',NULL,'1','250','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18594','Magni_Cap_','Magni Cap','5','30000','15000','1000','0','0','9','0','1','2147483646','63','2','256','0','0',NULL,'1','250','0','bonus bStr,2;','','');
REPLACE INTO `item_db_re` VALUES ('18595','Horn_Of_Ancient','Ancient Horns','5','20','10','400','0','0','8','0','1','4294967295','63','2','256','0','50',NULL,'1','757','0','autobonus \"{ bonus bBaseAtk,100; }\",5,10000,0,\"{ specialeffect2 EF_POTION_BERSERK; }\";','','');
REPLACE INTO `item_db_re` VALUES ('18596','Sprout_Hat','Sprout Hat','5','20','10','200','0','0','4','0','0','4294967295','63','2','256','0','70',NULL,'1','758','0','skill WZ_HEAVENDRIVE,3;','','');
REPLACE INTO `item_db_re` VALUES ('18597','Mercury_Helm','Mercury Riser','5','20','10','400','0','0','10','0','1','4294967295','63','2','256','0','70',NULL,'1','759','0','bonus bAspdRate,3; bonus bCritical,3; if(getrefine() >= 7) { bonus bAspdRate,2; bonus bCritical,2; } if(getrefine() >= 9) { bonus bAspdRate,2; bonus bCritical,2; }','','');
@@ -7905,17 +7905,17 @@ REPLACE INTO `item_db_re` VALUES ('18605','Dark_Age','Dark Age','5','20','10','2
REPLACE INTO `item_db_re` VALUES ('18606','Tear_Drop','Tear drop','5','20','10','100','0','0','1','0','0','4294967295','63','2','513','0','30',NULL,'0','767','0','','','');
REPLACE INTO `item_db_re` VALUES ('18607','Blush_','Blush','5','20','10','100','0','0','0','0','1','4294967295','63','2','512','0','0',NULL,'0','125','0','','','');
REPLACE INTO `item_db_re` VALUES ('18608','Pair_Of_Red_Ribbon2','Small Ribbons','5','20','10','100','0','0','2','0','1','4294967295','63','2','512','0','45',NULL,'0','169','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18609','Dark_Blindfold_','Dark Blinder','5','20','10','100','0','0','0','0','1','2147483647','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
+REPLACE INTO `item_db_re` VALUES ('18609','Dark_Blindfold_','Dark Blinder','5','20','10','100','0','0','0','0','1','2147483646','63','2','512','0','0',NULL,'0','187','0','bonus2 bResEff,Eff_Blind,10000; bonus2 bResEff,Eff_Stun,200;','','');
REPLACE INTO `item_db_re` VALUES ('18610','7th_Anni_Hat_B','7th Anni Hat B','5','20','10','500','0','0','4','0','0','4294967295','63','2','256','0','0',NULL,'1','778','0','bonus bAllStats,5; bonus bMdef,4;','','');
REPLACE INTO `item_db_re` VALUES ('18611','Black_Glasses_','Black Frame Glasses','5','20','10','200','0','0','2','0','1','4294967295','63','2','512','0','0',NULL,'0','404','0','bonus bUnbreakableHelm,0; bonus bInt,1; bonus bMdef,2;','','');
REPLACE INTO `item_db_re` VALUES ('18612','White_Musang_Hat','White Musang Hat','5','20','10','400','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','770','0','bonus bStr,2; bonus bVit,2; bonus bLuk,1; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18613','Black_Musang_Hat','Black Musang Hat','5','20','10','400','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','771','0','bonus bInt,2; bonus bDex,2; bonus bAgi,1; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18614','Grim_Reaper_Hat','Grim Reaper','5','20','10','200','0','0','2','0','1','4294967295','63','2','256','0','20',NULL,'1','732','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18615','Injured_Eyepatch','Injured Eyepatch','5','20','10','200','0','0','2','0','0','2147483647','63','2','512','0','20',NULL,'0','772','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18616','Long_Tongue','Long Tongue','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','773','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18617','Onigiri_In_Mouth','Onigiri','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','774','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18618','Airplane_Hat','Rockabilly Hair','5','20','10','200','0','0','8','0','1','2147483647','63','2','256','0','20',NULL,'1','775','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18619','Thief_Bandana','Thief Bandana','5','20','10','200','0','0','1','0','0','2147483647','63','2','256','0','20',NULL,'1','776','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18615','Injured_Eyepatch','Injured Eyepatch','5','20','10','200','0','0','2','0','0','2147483646','63','2','512','0','20',NULL,'0','772','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18616','Long_Tongue','Long Tongue','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','773','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18617','Onigiri_In_Mouth','Onigiri','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','774','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18618','Airplane_Hat','Rockabilly Hair','5','20','10','200','0','0','8','0','1','2147483646','63','2','256','0','20',NULL,'1','775','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18619','Thief_Bandana','Thief Bandana','5','20','10','200','0','0','1','0','0','2147483646','63','2','256','0','20',NULL,'1','776','0','','','');
REPLACE INTO `item_db_re` VALUES ('18620','Heart_Eyepatch','Heart Eyepatch','5','20','10','50','0','0','2','0','0','4294967295','63','2','512','0','20',NULL,'0','779','0','','','');
REPLACE INTO `item_db_re` VALUES ('18621','Gangster_Mask_A','Mobster\'s Disguise','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','52','0','','','');
REPLACE INTO `item_db_re` VALUES ('18622','Rocket_Helm1','Rocket Helm1','5','20','10','1000','0','0','20','0','1','4294967295','63','2','256','0','95',NULL,'1','764','0','bonus bMdef,5; bonus bAllStats,5; bonus bUnbreakableHelm,0;','','');
@@ -7926,7 +7926,7 @@ REPLACE INTO `item_db_re` VALUES ('18626','Gelato_Hat','Gelato Hat','5','20','10
REPLACE INTO `item_db_re` VALUES ('18627','Dried_Leaf','Dried Leaf','5','20','10','50','0','0','0','0','0','4294967295','63','2','1','0','10',NULL,'0','711','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18628','Tare_Brownie','Tare Brownie','5','20','10','500','0','0','5','0','1','4294967295','63','2','256','0','50',NULL,'0','781','0','','','');
REPLACE INTO `item_db_re` VALUES ('18629','B_Desert_Wolf_Hat','B Desert Wolf Hat','5','10','5','300','0','0','0','0','1','4294967295','63','2','256','0','0',NULL,'1','392','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18630','Droopy_Alice_Doll','Drooping Alicel','5','20','10','500','0','0','6','0','0','2147483647','63','2','256','0','70',NULL,'1','784','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18630','Droopy_Alice_Doll','Drooping Alicel','5','20','10','500','0','0','6','0','0','2147483646','63','2','256','0','70',NULL,'1','784','0','','','');
REPLACE INTO `item_db_re` VALUES ('18631','Ribbon_Chef_Hat','Ribbon Chef hat','5','20','10','300','0','0','5','0','0','4294967295','63','2','256','0','70',NULL,'1','785','0','bonus bDex,3; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('18632','Yellow_Poring_Pin','Yellow Poring Hairpin','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','786','0','','','');
REPLACE INTO `item_db_re` VALUES ('18633','Pink_Poring_Pin','Pink Poring Hairpin','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','787','0','','','');
@@ -7934,13 +7934,13 @@ REPLACE INTO `item_db_re` VALUES ('18634','Green_Poring_Pin','Green Poring Hairp
REPLACE INTO `item_db_re` VALUES ('18635','Blue_Poring_Pin','Blue Poring Hairpin','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','789','0','','','');
REPLACE INTO `item_db_re` VALUES ('18636','Bridal_Ribbon','Ribbon of bride','5','20','10','200','0','0','6','0','0','4294967295','63','2','256','0','30',NULL,'1','790','0','bonus bDex,1;','','');
REPLACE INTO `item_db_re` VALUES ('18637','Ancient_Admiral_Helm','Ancient Admiral Helm','5','20','10','700','0','0','4','0','1','4294967295','63','2','768','0','0',NULL,'1','660','0','bonus bStr,2; bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18638','Citron_Hat','Citron Hat','5','20','10','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','791','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18639','Naval_Officer_Hat','Naval Officer Hat','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','792','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18640','Starfish_Headband','Starfish Headband','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','793','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18641','Ribbon_Magic_Hat','Ribbon Magic Hat','5','20','10','200','0','0','2','0','0','2147483647','63','2','256','0','0',NULL,'1','794','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18642','hand_Scissorhand_Model','Scissorhand Model','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','795','0','bonus bAgi,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18643','Rockhand_Model','Rockhand Model','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','796','0','bonus bStr,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18644','Paperhand_Model','Paperhand Model','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','797','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18638','Citron_Hat','Citron Hat','5','20','10','400','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','791','0','bonus bLuk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18639','Naval_Officer_Hat','Naval Officer Hat','5','20','10','200','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','792','0','bonus bLuk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18640','Starfish_Headband','Starfish Headband','5','20','10','200','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','793','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18641','Ribbon_Magic_Hat','Ribbon Magic Hat','5','20','10','200','0','0','2','0','0','2147483646','63','2','256','0','0',NULL,'1','794','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18642','hand_Scissorhand_Model','Scissorhand Model','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','795','0','bonus bAgi,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18643','Rockhand_Model','Rockhand Model','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','796','0','bonus bStr,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18644','Paperhand_Model','Paperhand Model','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','797','0','','','');
REPLACE INTO `item_db_re` VALUES ('18645','Sailor_Hat','Sailor Hat','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','798','0','bonus bInt,1;','','');
REPLACE INTO `item_db_re` VALUES ('18646','Cow_Hat','Cow Hat','5','20','10','300','0','0','4','0','1','4294967295','63','2','256','0','0',NULL,'1','799','0','bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('18647','Star_Eyepatch','Stunning Star Eyepatch','5','20','10','100','0','0','0','0','0','4294967295','63','2','512','0','0',NULL,'0','800','0','','','');
@@ -7955,31 +7955,31 @@ REPLACE INTO `item_db_re` VALUES ('18656','Wit_Pumpkin_Hat','Witch\'s Pumpkin Ha
REPLACE INTO `item_db_re` VALUES ('18657','Pegasus_Wing_Ears','Pegasus Ear Wing','5','20','10','500','0','0','1','0','0','4294967295','63','2','512','0','80',NULL,'0','568','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18658','Holy_Santa_Beard','Santa\'s Beard Holy','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','25','0','','','');
REPLACE INTO `item_db_re` VALUES ('18659','Boitata_Hat','Boitata Hat','5','20','10','0','0','0','5','0','1','4294967295','63','2','768','0','0',NULL,'1','808','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18660','Indi_Feather_Band','Indian Feather Headband','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','809','0','bonus bAgi,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18661','Trident_Helmet','Trident Helmet','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','20',NULL,'1','810','0','bonus bStr,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18662','Antler_Fedora','Antler Fedora','5','20','10','400','0','0','3','0','0','2147483647','63','2','256','0','0',NULL,'1','811','0','bonus bInt,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18663','Sunglasses_Bball_Hat','Sunglasses Baseball Hat','5','20','10','200','0','0','2','0','1','2147483647','63','2','256','0','20',NULL,'1','812','0','bonus bInt,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18664','Blind_Glasses','Stunner Shades','5','20','10','400','0','0','3','0','0','2147483647','63','2','512','0','20',NULL,'1','813','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18665','Orange_In_Mouth','Orange In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','814','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18666','CD_In_Mouth','CD In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','815','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18667','Cat_Lace_Hairband','Cat Lace Hairband','5','20','10','500','0','0','2','0','0','2147483647','63','2','256','0','60',NULL,'0','816','0','bonus bDex,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18660','Indi_Feather_Band','Indian Feather Headband','5','20','10','400','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','809','0','bonus bAgi,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18661','Trident_Helmet','Trident Helmet','5','20','10','400','0','0','3','0','1','2147483646','63','2','256','0','20',NULL,'1','810','0','bonus bStr,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18662','Antler_Fedora','Antler Fedora','5','20','10','400','0','0','3','0','0','2147483646','63','2','256','0','0',NULL,'1','811','0','bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18663','Sunglasses_Bball_Hat','Sunglasses Baseball Hat','5','20','10','200','0','0','2','0','1','2147483646','63','2','256','0','20',NULL,'1','812','0','bonus bInt,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18664','Blind_Glasses','Stunner Shades','5','20','10','400','0','0','3','0','0','2147483646','63','2','512','0','20',NULL,'1','813','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18665','Orange_In_Mouth','Orange In Mouth','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','814','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18666','CD_In_Mouth','CD In Mouth','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','815','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18667','Cat_Lace_Hairband','Cat Lace Hairband','5','20','10','500','0','0','2','0','0','2147483646','63','2','256','0','60',NULL,'0','816','0','bonus bDex,3;','','');
REPLACE INTO `item_db_re` VALUES ('18668','Droopy_Turtle_Hat','Droopy Turtle Hat','5','20','10','300','0','0','1','0','1','4294967295','63','2','256','0','0',NULL,'1','694','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18669','Cowhide_Hat','Cowhide Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','11','0','bonus bDex,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18669','Cowhide_Hat','Cowhide Hat','5','20','10','200','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','11','0','bonus bDex,2;','','');
REPLACE INTO `item_db_re` VALUES ('18670','Hankie_In_Mouth','Handkerchief In Mouth','5','20','10','100','0','0','1','0','0','4294967295','63','2','1','0','12',NULL,'0','818','0','','','');
REPLACE INTO `item_db_re` VALUES ('18671','Rudolf_Hairband','Rudolf Hairband','5','20','10','200','0','0','5','0','0','4294967295','63','2','256','0','30',NULL,'1','836','0','','','');
REPLACE INTO `item_db_re` VALUES ('18672','Tare_Pope','Flap Pope','5','20','10','300','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','817','0','bonus bMdef,1; bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18673','Tare_Pope_','Chibi Pope','5','20','10','300','0','0','0','0','1','4294967295','63','2','256','0','0',NULL,'0','817','0','bonus bMdef,1; bonus bUnbreakableHelm,0;','','');
-REPLACE INTO `item_db_re` VALUES ('18674','Planewing_Hat','Planewing Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','11','0','bonus bAgi,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18675','Green_Apple_Hat','Green Apple Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','20',NULL,'1','11','0','bonus bDex,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18676','Hexagon_Spectacles','Hexagon Spectacles','5','20','10','400','0','0','3','0','0','2147483647','63','2','512','0','20',NULL,'0','822','0','bonus bFlee,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18677','Cherry_Twig_In_Mouth','Cherry Twig In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','823','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18678','Leek_In_Mouth','Leek In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','824','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18679','Abacus_In_Mouth','Abacus In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','825','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18674','Planewing_Hat','Planewing Hat','5','20','10','200','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','11','0','bonus bAgi,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18675','Green_Apple_Hat','Green Apple Hat','5','20','10','200','0','0','3','0','1','2147483646','63','2','256','0','20',NULL,'1','11','0','bonus bDex,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18676','Hexagon_Spectacles','Hexagon Spectacles','5','20','10','400','0','0','3','0','0','2147483646','63','2','512','0','20',NULL,'0','822','0','bonus bFlee,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18677','Cherry_Twig_In_Mouth','Cherry Twig In Mouth','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','823','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18678','Leek_In_Mouth','Leek In Mouth','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','824','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18679','Abacus_In_Mouth','Abacus In Mouth','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','825','0','','','');
REPLACE INTO `item_db_re` VALUES ('18680','Tw_Frog_Hat','Tw Frog Hat','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','35',NULL,'0','11','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('18681','Puppy_Ears_Hat','Puppy Ears Hat','5','20','10','200','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','11','0','bonus bVit,2;','','');
REPLACE INTO `item_db_re` VALUES ('18682','Teardrop','Teardrop','5','20','10','100','0','0','1','0','0','4294967295','63','2','512','0','0',NULL,'1','828','0','bonus bMaxSP,15;','','');
REPLACE INTO `item_db_re` VALUES ('18683','Carrot_In_Mouth','Carrot In Mouth','5','20','10','200','0','0','1','0','0','4294967295','63','2','1','0','0',NULL,'0','829','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18684','Showy_High_Cap','Showy High Cap','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','11','0','bonus bStr,3; bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18684','Showy_High_Cap','Showy High Cap','5','20','10','200','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','11','0','bonus bStr,3; bonus bInt,2;','','');
REPLACE INTO `item_db_re` VALUES ('18685','Stardust_Hairband','Stardust Hairband','5','20','10','1000','0','0','0','0','0','4294967295','63','2','256','0','10',NULL,'0','831','0','','','');
REPLACE INTO `item_db_re` VALUES ('18686','2011_RMSC_1','2011 RMSC 1','5','20','10','2500','0','0','20','0','1','4294967295','63','2','256','0','0',NULL,'0','832','0','bonus bUnbreakableHelm,0; bonus bAllStats,5;','','');
REPLACE INTO `item_db_re` VALUES ('18687','2011_RMSC_2','2011 RMSC 2','5','20','10','2500','0','0','20','0','1','4294967295','63','2','256','0','0',NULL,'0','832','0','bonus bUnbreakableHelm,0; bonus bAllStats,3;','','');
@@ -7987,29 +7987,29 @@ REPLACE INTO `item_db_re` VALUES ('18688','2011_RMSC_3','2011 RMSC 3','5','20','
REPLACE INTO `item_db_re` VALUES ('18689','2011_RMSC_4','2011 RMSC 4','5','20','10','10','0','0','0','0','0','4294967295','63','2','256','0','0',NULL,'0','832','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18690','Sirt_Evil_Eye','Sirt Evil Eye','5','20','10','400','0','0','0','0','0','4294967295','63','2','512','0','50',NULL,'0','345','0','bonus bUnbreakableHelm,0; bonus bStr,1;','','');
REPLACE INTO `item_db_re` VALUES ('18691','Rising_Black_Dragon','Ascension Black Dragon','5','20','10','100','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'1','166','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18692','Mike_Hat','Mike Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','837','0','bonus bDex,2; bonus bLuk,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18693','Sleeping_Kitty_Cat','Sleeping Kitty Cat','5','20','10','200','0','0','4','0','1','2147483647','63','2','256','0','20',NULL,'1','838','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18694','Red_Hood','Red Hood','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','20',NULL,'1','839','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18695','Phoenix_Crown','Phoenix Crown','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','20',NULL,'1','840','0','bonus bInt,2;','','');
-REPLACE INTO `item_db_re` VALUES ('18696','Orange_Hat','Orange Hat','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','841','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18697','Syringe_In_Mouth','Syringe In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','842','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18698','Cheesy_Snack_In_Mouth','Cheesy Snack In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','843','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18692','Mike_Hat','Mike Hat','5','20','10','200','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','837','0','bonus bDex,2; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18693','Sleeping_Kitty_Cat','Sleeping Kitty Cat','5','20','10','200','0','0','4','0','1','2147483646','63','2','256','0','20',NULL,'1','838','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18694','Red_Hood','Red Hood','5','20','10','200','0','0','3','0','1','2147483646','63','2','256','0','20',NULL,'1','839','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18695','Phoenix_Crown','Phoenix Crown','5','20','10','400','0','0','3','0','1','2147483646','63','2','256','0','20',NULL,'1','840','0','bonus bInt,2;','','');
+REPLACE INTO `item_db_re` VALUES ('18696','Orange_Hat','Orange Hat','5','20','10','200','0','0','3','0','0','2147483646','63','2','256','0','20',NULL,'1','841','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18697','Syringe_In_Mouth','Syringe In Mouth','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','842','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18698','Cheesy_Snack_In_Mouth','Cheesy Snack In Mouth','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','843','0','','','');
REPLACE INTO `item_db_re` VALUES ('18699','Starving_Fish_Hat','Starving Fish Hat','5','20','10','1200','0','0','3','0','0','4294967295','63','2','256','0','0',NULL,'0','844','0','','','');
REPLACE INTO `item_db_re` VALUES ('18700','Rabbit_Ribbon','Rabbit Ribbon Hat','5','20','10','500','0','0','3','0','1','4294967295','63','2','256','0','50',NULL,'1','845','0','bonus bInt,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18701','Ancient_Civil_Man','Ancient Civil Man Hat','5','20','10','500','0','0','2','0','0','2147483647','63','2','256','0','70',NULL,'0','846','0','bonus bInt,3; bonus bDex,2; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18701','Ancient_Civil_Man','Ancient Civil Man Hat','5','20','10','500','0','0','2','0','0','2147483646','63','2','256','0','70',NULL,'0','846','0','bonus bInt,3; bonus bDex,2; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('18702','Shaving_Cream','Shaving Cream','5','20','10','50','0','0','1','0','0','4294967295','63','2','1','0','10',NULL,'0','847','0','','','');
REPLACE INTO `item_db_re` VALUES ('18703','Stem_In_Mouth','Stem In Mouth','5','20','10','50','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','848','0','','','');
REPLACE INTO `item_db_re` VALUES ('18704','Drosera_Hairpin','Drosera Hairpin','5','20','10','640','0','0','6','0','1','4294967295','63','2','256','0','64',NULL,'1','850','0','bonus bMdef,4;','','');
-REPLACE INTO `item_db_re` VALUES ('18706','Can_Hat','Can Hat','5','20','10','400','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','851','0','bonus bLuk,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18707','Maneater_Flower_Hat','Maneater Flower Hat','5','20','10','500','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','852','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18708','Candy_Hat','Candy Hat','5','20','10','200','0','0','3','0','0','2147483647','63','2','256','0','20',NULL,'1','853','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18709','Black_Knitted_Hat','Black Knitted Hat','5','20','10','200','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','854','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18710','Sugared_Fruit_Stick','Sugared Fruit Stick','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','855','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18711','Electric_Sunglass','Electric Sunglass','5','20','10','400','0','0','3','0','0','2147483647','63','2','512','0','20',NULL,'0','856','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18712','Fan_In_Mouth','Fan In Mouth','5','20','10','200','0','0','0','0','0','2147483647','63','2','1','0','20',NULL,'0','857','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18706','Can_Hat','Can Hat','5','20','10','400','0','0','3','0','0','2147483646','63','2','256','0','20',NULL,'1','851','0','bonus bLuk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18707','Maneater_Flower_Hat','Maneater Flower Hat','5','20','10','500','0','0','3','0','0','2147483646','63','2','256','0','20',NULL,'1','852','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18708','Candy_Hat','Candy Hat','5','20','10','200','0','0','3','0','0','2147483646','63','2','256','0','20',NULL,'1','853','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18709','Black_Knitted_Hat','Black Knitted Hat','5','20','10','200','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','854','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18710','Sugared_Fruit_Stick','Sugared Fruit Stick','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','855','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18711','Electric_Sunglass','Electric Sunglass','5','20','10','400','0','0','3','0','0','2147483646','63','2','512','0','20',NULL,'0','856','0','','','');
+REPLACE INTO `item_db_re` VALUES ('18712','Fan_In_Mouth','Fan In Mouth','5','20','10','200','0','0','0','0','0','2147483646','63','2','1','0','20',NULL,'0','857','0','','','');
REPLACE INTO `item_db_re` VALUES ('18713','Monkey_On_Fur_Hat','Monkey Fur Hat','5','20','10','300','0','0','6','0','1','4294967295','63','2','256','0','20',NULL,'1','858','0','bonus bDex,1; bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('18714','Hippo_Hat','Hippo Hat','5','20','10','500','0','0','5','0','1','4294967295','63','2','256','0','10',NULL,'1','859','0','','','');
-REPLACE INTO `item_db_re` VALUES ('18715','Helm_Of_Thoth','Helm Of Thoth','5','20','10','2500','0','0','2','0','1','2147483647','63','2','768','0','80',NULL,'0','860','0','bonus bInt,2; bonus bMdef,5;','','');
+REPLACE INTO `item_db_re` VALUES ('18715','Helm_Of_Thoth','Helm Of Thoth','5','20','10','2500','0','0','2','0','1','2147483646','63','2','768','0','80',NULL,'0','860','0','bonus bInt,2; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('18716','Strawberry_In_Mouth','Strawberry In Mouth','5','20','10','50','0','0','2','0','0','4294967295','63','2','1','0','10',NULL,'0','861','0','','','');
REPLACE INTO `item_db_re` VALUES ('18718','Rose_Hairband','Rose Hairband','5','20','10','200','0','0','3','0','0','4294967295','63','2','256','0','30',NULL,'0','864','0','bonus bInt,1; bonus bVit,1;','','');
REPLACE INTO `item_db_re` VALUES ('18727','Sedora_Hat','Sedora Hat','5','20','10','300','0','0','13','0','1','4294967295','63','2','256','0','10',NULL,'1','869','0','','','');
@@ -8039,13 +8039,13 @@ REPLACE INTO `item_db_re` VALUES ('18786','Anemos_Mask','Anemos Mask','5','20','
REPLACE INTO `item_db_re` VALUES ('18790','Rainbow_Poring_Hat','Rainbow Poring Hat','5','20','10','100','0','0','3','0','1','4294967295','63','2','256','0','0',NULL,'1','900','0','','','');
REPLACE INTO `item_db_re` VALUES ('18805','Eclipse_Hat','Eclipse Hat','5','20','10','300','0','0','2','0','0','4294967295','63','2','256','0','0',NULL,'1','922','0','bonus bLuk,3; bonus bMdef,5;','','');
REPLACE INTO `item_db_re` VALUES ('18806','Black_Rabbit_Hat','Black Rabbit Hat','5','20','10','300','0','0','2','0','1','4294967295','63','2','256','0','0',NULL,'1','923','0','bonus bDex,2; bonus bAgi,3;','','');
-REPLACE INTO `item_db_re` VALUES ('18807','Yellow_Yuzu_Hat','White Citron Hat','5','20','10','400','0','0','3','0','1','2147483647','63','2','256','0','0',NULL,'1','924','0','bonus bVit,2; bonus bLuk,3;','','');
+REPLACE INTO `item_db_re` VALUES ('18807','Yellow_Yuzu_Hat','White Citron Hat','5','20','10','400','0','0','3','0','1','2147483646','63','2','256','0','0',NULL,'1','924','0','bonus bVit,2; bonus bLuk,3;','','');
REPLACE INTO `item_db_re` VALUES ('18808','Wing_Form_Spectacle','Wing Style Spectacle','5','20','10','100','0','0','1','0','0','4294967295','63','2','256','0','0',NULL,'1','925','0','bonus bAgi,1;','','');
REPLACE INTO `item_db_re` VALUES ('18810','Hell_Pumpkin_Hat','Hell Pumpkin Hat','5','20','10','500','0','0','12','0','0','4294967295','63','2','256','0','0',NULL,'1','717','0','bonus bMdef,12;','','');
-REPLACE INTO `item_db_re` VALUES ('18814','Angel_School_Cap','Angel School Cap','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','927','0','bonus bInt,2; bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18815','Devil_School_Cap','Devil School Cap','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','928','0','bonus bStr,2; bonus bVit,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18816','Adv_Angel_School_Cap','Evoked Angel School Cap','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','929','0','bonus bInt,2; bonus bVit,2; bonus bLuk,1;','','');
-REPLACE INTO `item_db_re` VALUES ('18817','Adv_Devil_School_Cap','Evoked Devil School Cap','5','20','10','100','0','0','4','0','1','2147483647','63','2','256','0','0',NULL,'1','930','0','bonus bStr,2; bonus bVit,2; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18814','Angel_School_Cap','Angel School Cap','5','20','10','100','0','0','4','0','1','2147483646','63','2','256','0','0',NULL,'1','927','0','bonus bInt,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18815','Devil_School_Cap','Devil School Cap','5','20','10','100','0','0','4','0','1','2147483646','63','2','256','0','0',NULL,'1','928','0','bonus bStr,2; bonus bVit,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18816','Adv_Angel_School_Cap','Evoked Angel School Cap','5','20','10','100','0','0','4','0','1','2147483646','63','2','256','0','0',NULL,'1','929','0','bonus bInt,2; bonus bVit,2; bonus bLuk,1;','','');
+REPLACE INTO `item_db_re` VALUES ('18817','Adv_Devil_School_Cap','Evoked Devil School Cap','5','20','10','100','0','0','4','0','1','2147483646','63','2','256','0','0',NULL,'1','930','0','bonus bStr,2; bonus bVit,2; bonus bLuk,1;','','');
REPLACE INTO `item_db_re` VALUES ('18818','Red_Pencil_In_Mouth','Red Pencil In Mouth','5','20','10','100','0','0','0','0','0','4294967295','63','2','1','0','0',NULL,'0','931','0','bonus bUnbreakableHelm,0;','','');
REPLACE INTO `item_db_re` VALUES ('18821','Rainbow_Feather_Deco','RWC Commemorative Pin','5','20','10','300','0','0','5','0','1','4294967295','63','2','256','0','0',NULL,'1','934','0','','','');
REPLACE INTO `item_db_re` VALUES ('18828','2012RMSCNO1','RMSC2012 Champion Headgear','5','0','0','1000','0','0','20','0','1','4294967295','63','2','256','0','95',NULL,'0','942','0','bonus bUnbreakableHelm,0; bonus bAllStats,5; bonus bMdef,5;','','');
diff --git a/src/map/battle.c b/src/map/battle.c
index b8143213a..1759bea05 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2234,7 +2234,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
case SC_FEINTBOMB:
skillratio += 100 + 100 * skill_lv;
break;
- case LG_CANNONSPEAR:// Stimated formula. Still need confirm it.
+ case LG_CANNONSPEAR:
skillratio += -100 + (50 + status_get_str(src)) * skill_lv;
RE_LVL_DMOD(100);
break;
@@ -2251,10 +2251,10 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
RE_LVL_DMOD(100);
break;
case LG_RAGEBURST:
- if( sd && sd->spiritball_old )
- skillratio += -100 + (sd->spiritball_old * 200);
- else
- skillratio += -100 + 15 * 200;
+ if( sc ){
+ skillratio += -100 + (status_get_max_hp(src) - status_get_hp(src)) / 100 + sc->fv_counter * 200;
+ clif->millenniumshield(sd, (sc->fv_counter = 0));
+ }
RE_LVL_DMOD(100);
break;
case LG_SHIELDSPELL:// [(Casters Base Level x 4) + (Shield DEF x 10) + (Casters VIT x 2)] %
@@ -2271,15 +2271,15 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
RE_LVL_DMOD(100);
break;
case LG_OVERBRAND:
- skillratio += -100 + 400 * skill_lv + (pc->checkskill(sd,CR_SPEARQUICKEN) * 30);
- RE_LVL_DMOD(100);
+ skillratio += -100 + 50 * (((sd) ? pc->checkskill(sd,CR_SPEARQUICKEN) : 1) + 8 * skill_lv);
+ RE_LVL_DMOD(150);
break;
case LG_OVERBRAND_BRANDISH:
- skillratio += -100 + 300 * skill_lv + (2 * (status_get_str(src) + status_get_dex(src)) / 3);
- RE_LVL_DMOD(100);
+ skillratio += -100 + 300 * skill_lv + status_get_str(src) + status_get_dex(src);
+ RE_LVL_DMOD(150);
break;
case LG_OVERBRAND_PLUSATK:
- skillratio += -100 + 150 * skill_lv;
+ skillratio += -100 + 100 * skill_lv;
RE_LVL_DMOD(100);
break;
case LG_RAYOFGENESIS:
@@ -2932,8 +2932,10 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
rnd()%100 < sce->val3)
status->heal(src, damage*sce->val4/100, 0, 3);
- if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON && rnd()%100 < sce->val2 )
- pc->addspiritball(sd,skill->get_time(LG_FORCEOFVANGUARD,sce->val1),sce->val3);
+ if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON
+ && rnd()%100 < sce->val2 && sc->fv_counter <= sce->val3 )
+ clif->millenniumshield(sd, sc->fv_counter++);
+
if (sc->data[SC_STYLE_CHANGE] && rnd()%2) {
TBL_HOM *hd = BL_CAST(BL_HOM,bl);
if (hd) homun->addspiritball(hd, 10); //add a sphere
@@ -4328,6 +4330,9 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
case GC_VENOMPRESSURE:
hitrate += 10 + 4 * skill_lv;
break;
+ case LG_BANISHINGPOINT:
+ hitrate += 3 * skill_lv;
+ break;
}
if( sd ) {
diff --git a/src/map/clif.c b/src/map/clif.c
index e69748809..4ae6c8d34 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -322,7 +322,7 @@ int clif_send_sub(struct block_list *bl, va_list ap) {
}
/* unless visible, hold it here */
- if( clif->ally_only && !sd->special_state.intravision && battle->check_target( src_bl, &sd->bl, BCT_ENEMY ) > 0 )
+ if( clif->ally_only && !sd->sc.data[SC_CLAIRVOYANCE] && !sd->special_state.intravision && battle->check_target( src_bl, &sd->bl, BCT_ENEMY ) > 0 )
return 0;
WFIFOHEAD(fd, len);
@@ -5947,9 +5947,15 @@ void clif_use_card(struct map_session_data *sd,int idx)
if( j == sd->inventory_data[i]->slot ) // No room
continue;
+ if( sd->status.inventory[i].equip > 0 ) // Do not check items that are already equipped
+ continue;
+
WFIFOW(fd,4+c*2)=i+2;
c++;
}
+
+ if( !c ) return; // no item is available for card insertion
+
WFIFOW(fd,2)=4+c*2;
WFIFOSET(fd,WFIFOW(fd,2));
}
diff --git a/src/map/npc.c b/src/map/npc.c
index dc29f04aa..9ed6d2a7e 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1426,9 +1426,11 @@ void npc_market_fromsql(void) {
if( !(nd = npc->name2id(name)) ) {
ShowError("npc_market_fromsql: NPC '%s' not found! skipping...\n",name);
+ npc->market_delfromsql_sub(name, USHRT_MAX);
continue;
} else if ( nd->subtype != SCRIPT || !nd->u.scr.shop || !nd->u.scr.shop->items || nd->u.scr.shop->type != NST_MARKET ) {
ShowError("npc_market_fromsql: NPC '%s' is not proper for market, skipping...\n",name);
+ npc->market_delfromsql_sub(name, USHRT_MAX);
continue;
}
@@ -1441,9 +1443,7 @@ void npc_market_fromsql(void) {
if( i == nd->u.scr.shop->items ) {
ShowError("npc_market_fromsql: NPC '%s' does not sell item %d (qty %d), deleting...\n",name,itemid,amount);
- /* TODO inter-server.conf npc_market_data */
- if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `npc_market_data` WHERE `name`='%s' AND `itemid`='%d' LIMIT 1", name,itemid) )
- Sql_ShowDebug(map->mysql_handle);
+ npc->market_delfromsql_sub(name, itemid);
continue;
}
@@ -1461,18 +1461,24 @@ void npc_market_tosql(struct npc_data *nd, unsigned short index) {
}
/**
* Removes persistent NPC Market Data from SQL
- **/
-void npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
+ */
+void npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
/* TODO inter-server.conf npc_market_data */
if( index == USHRT_MAX ) {
- if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `npc_market_data` WHERE `name`='%s'", nd->exname) )
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `npc_market_data` WHERE `name`='%s'", npcname) )
Sql_ShowDebug(map->mysql_handle);
} else {
- if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `npc_market_data` WHERE `name`='%s' AND `itemid`='%d' LIMIT 1", nd->exname, nd->u.scr.shop->item[index].nameid) )
+ if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `npc_market_data` WHERE `name`='%s' AND `itemid`='%d' LIMIT 1", npcname, index) )
Sql_ShowDebug(map->mysql_handle);
}
}
/**
+ * Removes persistent NPC Market Data from SQL
+ **/
+void npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
+ npc->market_delfromsql_sub(nd->exname, index == USHRT_MAX ? index : nd->u.scr.shop->item[index].nameid);
+}
+/**
* Judges whether to allow and spawn a trader's window.
**/
bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd) {
@@ -4579,4 +4585,5 @@ void npc_defaults(void) {
npc->market_fromsql = npc_market_fromsql;
npc->market_tosql = npc_market_tosql;
npc->market_delfromsql = npc_market_delfromsql;
+ npc->market_delfromsql_sub = npc_market_delfromsql_sub;
}
diff --git a/src/map/npc.h b/src/map/npc.h
index 792d85d59..a3f07e79c 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -268,6 +268,7 @@ struct npc_interface {
void (*market_fromsql) (void);
void (*market_tosql) (struct npc_data *nd, unsigned short index);
void (*market_delfromsql) (struct npc_data *nd, unsigned short index);
+ void (*market_delfromsql_sub) (const char *npcname, unsigned short index);
/**
* For the Secure NPC Timeout option (check config/Secure.h) [RR]
**/
diff --git a/src/map/script.c b/src/map/script.c
index 20485d880..8bd4bc028 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8,7 +8,7 @@
#include "../common/nullpo.h"
#include "../common/random.h"
#include "../common/showmsg.h"
-#include "../common/socket.h" // usage: getcharip
+#include "../common/socket.h" // usage: getcharip
#include "../common/strlib.h"
#include "../common/timer.h"
#include "../common/utils.h"
@@ -504,7 +504,7 @@ int script_add_str(const char* p)
// append node to end of list
script->str_data[i].next = script->str_num;
}
-
+
#ifdef ENABLE_CASE_CHECK
if( (strncmp(p, ".@", 2) == 0) ) // Local scope vars are checked separately to decrease false positives
existingentry = script->local_casecheck.add_str(p);
@@ -512,9 +512,9 @@ int script_add_str(const char* p)
existingentry = script->global_casecheck.add_str(p);
if( existingentry ) {
if( strcasecmp(p, "disguise") == 0 || strcasecmp(p, "Poison_Spore") == 0
- || strcasecmp(p, "PecoPeco_Egg") == 0 || strcasecmp(p, "Soccer_Ball") == 0
- || strcasecmp(p, "Horn") == 0 || strcasecmp(p, "Treasure_Box_") == 0
- || strcasecmp(p, "Lord_of_Death") == 0
+ || strcasecmp(p, "PecoPeco_Egg") == 0 || strcasecmp(p, "Soccer_Ball") == 0
+ || strcasecmp(p, "Horn") == 0 || strcasecmp(p, "Treasure_Box_") == 0
+ || strcasecmp(p, "Lord_of_Death") == 0
) // Known duplicates, don't bother warning the user
existingentry = NULL;
}
@@ -603,7 +603,7 @@ void add_scriptl(int l)
{
int backpatch = script->str_data[l].backpatch;
- switch(script->str_data[l].type){
+ switch(script->str_data[l].type) {
case C_POS:
case C_USERFUNC_POS:
script->addc(C_POS);
@@ -641,18 +641,18 @@ void set_label(int l,int pos, const char* script_pos)
{
int i,next;
- if(script->str_data[l].type==C_INT || script->str_data[l].type==C_PARAM || script->str_data[l].type==C_FUNC)
- { //Prevent overwriting constants values, parameters and built-in functions [Skotlex]
+ if(script->str_data[l].type==C_INT || script->str_data[l].type==C_PARAM || script->str_data[l].type==C_FUNC) {
+ //Prevent overwriting constants values, parameters and built-in functions [Skotlex]
disp_error_message("set_label: invalid label name",script_pos);
return;
}
- if(script->str_data[l].label!=-1){
+ if(script->str_data[l].label!=-1) {
disp_error_message("set_label: dup label ",script_pos);
return;
}
script->str_data[l].type=(script->str_data[l].type == C_USERFUNC ? C_USERFUNC_POS : C_POS);
script->str_data[l].label=pos;
- for(i=script->str_data[l].backpatch;i>=0 && i!=0x00ffffff;){
+ for(i=script->str_data[l].backpatch;i>=0 && i!=0x00ffffff;) {
next=GETVALUE(script->buf,i);
script->buf[i-1]=(script->str_data[l].type == C_USERFUNC ? C_USERFUNC_POS : C_POS);
SETVALUE(script->buf,i,pos);
@@ -739,13 +739,13 @@ int add_word(const char* p) {
// Duplicate the word
if( len+1 > script->word_size )
RECREATE(script->word_buf, char, (script->word_size = (len+1)));
-
+
memcpy(script->word_buf, p, len);
script->word_buf[len] = 0;
// add the word
i = script->add_str(script->word_buf);
-
+
return i;
}
@@ -761,13 +761,13 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
int func;
func = script->add_word(p);
- if( script->str_data[func].type == C_FUNC ){
+ if( script->str_data[func].type == C_FUNC ) {
// buildin function
script->addl(func);
script->addc(C_ARG);
arg = script->buildin[script->str_data[func].val];
if( !arg ) arg = &null_arg; // Use a dummy, null string
- } else if( script->str_data[func].type == C_USERFUNC || script->str_data[func].type == C_USERFUNC_POS ){
+ } else if( script->str_data[func].type == C_USERFUNC || script->str_data[func].type == C_USERFUNC_POS ) {
// script defined function
script->addl(script->buildin_callsub_ref);
script->addc(C_ARG);
@@ -813,12 +813,12 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_NO_PAREN;
*/
} else {// <func name> <arg list>
- if( require_paren ){
+ if( require_paren ) {
if( *p != '(' )
disp_error_message("need '('",p);
++p; // skip '('
script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_PAREN;
- } else if( *p == '(' ){
+ } else if( *p == '(' ) {
script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_UNDEFINED;
} else {
script->syntax.curly[script->syntax.curly_count].flag = ARGLIST_NO_PAREN;
@@ -842,7 +842,7 @@ const char* parse_callfunc(const char* p, int require_paren, int is_custom)
disp_error_message2("parse_callfunc: not enough arguments, expected ','", p, script->config.warn_func_mismatch_paramnum);
if( script->syntax.curly[script->syntax.curly_count].type != TYPE_ARGLIST )
disp_error_message("parse_callfunc: DEBUG last curly is not an argument list",p);
- if( script->syntax.curly[script->syntax.curly_count].flag == ARGLIST_PAREN ){
+ if( script->syntax.curly[script->syntax.curly_count].flag == ARGLIST_PAREN ) {
if( *p != ')' )
disp_error_message("parse_callfunc: expected ')' to close argument list",p);
++p;
@@ -1135,7 +1135,7 @@ const char* parse_simpleexpr(const char *p) {
}
if(!*p)
disp_error_message("parse_simpleexpr: unexpected end of file @ string",p);
- p++; //'"'
+ p++; //'"'
p = script->skip_space(p);
} while( *p && *p == '"' );
script->addb(0);
@@ -1196,7 +1196,7 @@ const char* script_parse_subexpr(const char* p,int limit) {
p=script->skip_space(p);
if( *p == '-' ) {
- tmpp = script->skip_space(p+1);
+ tmpp = script->skip_space(p+1);
if( *tmpp == ';' || *tmpp == ',' ) {
script->addl(LABEL_NEXTLINE);
p++;
@@ -1256,7 +1256,7 @@ const char* script_parse_subexpr(const char* p,int limit) {
*------------------------------------------*/
const char* parse_expr(const char *p)
{
- switch(*p){
+ switch(*p) {
case ')': case ';': case ':': case '[': case ']':
case '}':
disp_error_message("parse_expr: unexpected char",p);
@@ -1367,7 +1367,7 @@ const char* parse_curly_close(const char* p)
sprintf(label,"__SW%x_FIN",script->syntax.curly[pos].index);
l=script->add_str(label);
script->set_label(l,script->pos, p);
- linkdb_final(&script->syntax.curly[pos].case_label); // free the list of case label
+ linkdb_final(&script->syntax.curly[pos].case_label); // free the list of case label
script->syntax.curly_count--;
//Closing decision if, for , while
p = script->parse_syntax_close(p + 1);
@@ -1855,8 +1855,8 @@ const char* parse_syntax_close(const char *p) {
}
// Close judgment if, for, while, of do
-// flag == 1 : closed
-// flag == 0 : not closed
+// flag == 1 : closed
+// flag == 0 : not closed
const char* parse_syntax_close_sub(const char* p,int* flag)
{
char label[256];
@@ -2089,10 +2089,10 @@ void script_set_constant2(const char *name, int value, bool isparameter) {
/* same as constant2 except it will override if necessary, used to clear conflicts during reload */
void script_set_constant_force(const char *name, int value, bool isparameter) {
int n = script->add_str(name);
-
+
if( script->str_data[n].type == C_PARAM )
return;/* the one type we don't mess with, reload doesn't affect it. */
-
+
if( script->str_data[n].type != C_NOP ) {
script->str_data[n].type = C_NOP;
script->str_data[n].val = 0;
@@ -2112,7 +2112,7 @@ void read_constdb(void) {
sprintf(line, "%s/const.txt", map->db_path);
fp=fopen(line, "r");
- if(fp==NULL){
+ if(fp==NULL) {
ShowError("can't read %s\n", line);
return ;
}
@@ -2122,7 +2122,7 @@ void read_constdb(void) {
continue;
type=0;
if(sscanf(line,"%[A-Za-z0-9_],%[-0-9xXA-Fa-f],%d",name,val,&type)>=2 ||
- sscanf(line,"%[A-Za-z0-9_] %[-0-9xXA-Fa-f] %d",name,val,&type)>=2){
+ sscanf(line,"%[A-Za-z0-9_] %[-0-9xXA-Fa-f] %d",name,val,&type)>=2) {
script->set_constant(name, (int)strtol(val, NULL, 0), (bool)type);
}
}
@@ -2186,9 +2186,9 @@ void script_errorwarning_sub(StringBuf *buf, const char* src, const char* file,
const char *p, *error_linepos;
const char *linestart[CONTEXTLINES] = { NULL };
- for(p=src;p && *p;line++){
+ for(p=src;p && *p;line++) {
const char *lineend=strchr(p,'\n');
- if(lineend==NULL || error_pos<lineend){
+ if(lineend==NULL || error_pos<lineend) {
break;
}
for( j = 0; j < CONTEXTLINES-1; j++ ) {
@@ -2248,7 +2248,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
struct script_code* code = NULL;
char end;
bool unresolved_names = false;
-
+
script->parser_current_src = src;
script->parser_current_file = file;
script->parser_current_line = line;
@@ -2326,11 +2326,11 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
}
// clear references of labels, variables and internal functions
- for(i=LABEL_START;i<script->str_num;i++){
+ for(i=LABEL_START;i<script->str_num;i++) {
if(
script->str_data[i].type==C_POS || script->str_data[i].type==C_NAME ||
script->str_data[i].type==C_USERFUNC || script->str_data[i].type == C_USERFUNC_POS
- ){
+ ) {
script->str_data[i].type=C_NOP;
script->str_data[i].backpatch=-1;
script->str_data[i].label=-1;
@@ -2367,12 +2367,12 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
RECREATE(script->buf,unsigned char,script->pos);
// default unknown references to variables
- for(i=LABEL_START;i<script->str_num;i++){
- if(script->str_data[i].type==C_NOP){
+ for(i=LABEL_START;i<script->str_num;i++) {
+ if(script->str_data[i].type==C_NOP) {
int j,next;
script->str_data[i].type=C_NAME;
script->str_data[i].label=i;
- for(j=script->str_data[i].backpatch;j>=0 && j!=0x00ffffff;){
+ for(j=script->str_data[i].backpatch;j>=0 && j!=0x00ffffff;) {
next=GETVALUE(script->buf,j);
SETVALUE(script->buf,j,i);
j=next;
@@ -2391,7 +2391,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
}
#ifdef SCRIPT_DEBUG_DISP
- for(i=0;i<script->pos;i++){
+ for(i=0;i<script->pos;i++) {
if((i&15)==0) ShowMessage("%04x : ",i);
ShowMessage("%02x ",script->buf[i]);
if((i&15)==15) ShowMessage("\n");
@@ -2444,7 +2444,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
/// If there is no player attached, the script is terminated.
TBL_PC *script_rid2sd(struct script_state *st) {
TBL_PC *sd;
- if( !( sd = map->id2sd(st->rid) ) ){
+ if( !( sd = map->id2sd(st->rid) ) ) {
ShowError("script_rid2sd: fatal error ! player not attached!\n");
script->reportfunc(st);
script->reportsrc(st);
@@ -2453,19 +2453,21 @@ TBL_PC *script_rid2sd(struct script_state *st) {
return sd;
}
-/// Dereferences a variable/constant, replacing it with a copy of the value.
-///
-/// @param st Script state
-/// @param data Variable/constant
-void get_val(struct script_state* st, struct script_data* data)
-{
+/**
+ * Dereferences a variable/constant, replacing it with a copy of the value.
+ *
+ * @param st Script state
+ * @param data Variable/constant
+ * @return pointer to data, for convenience
+ */
+struct script_data *get_val(struct script_state* st, struct script_data* data) {
const char* name;
char prefix;
char postfix;
TBL_PC* sd = NULL;
if( !data_isreference(data) )
- return;// not a variable/constant
+ return data;// not a variable/constant
name = reference_getname(data);
prefix = name[0];
@@ -2484,7 +2486,7 @@ void get_val(struct script_state* st, struct script_data* data)
data->type = C_INT;
data->u.num = 0;
}
- return;
+ return data;
}
}
@@ -2505,10 +2507,10 @@ void get_val(struct script_state* st, struct script_data* data)
break;
case '.':
{
- struct DBMap* n =
- data->ref ? *data->ref:
- name[1] == '@' ? st->stack->var_function:// instance/scope variable
- st->script->script_vars;// npc variable
+ struct DBMap* n = data->ref ?
+ *data->ref : name[1] == '@' ?
+ st->stack->var_function : // instance/scope variable
+ st->script->script_vars; // npc variable
if( n )
data->u.str = (char*)idb_get(n,reference_getuid(data));
else
@@ -2560,10 +2562,10 @@ void get_val(struct script_state* st, struct script_data* data)
break;
case '.':
{
- struct DBMap* n =
- data->ref ? *data->ref:
- name[1] == '@' ? st->stack->var_function:// instance/scope variable
- st->script->script_vars;// npc variable
+ struct DBMap* n = data->ref ?
+ *data->ref : name[1] == '@' ?
+ st->stack->var_function : // instance/scope variable
+ st->script->script_vars; // npc variable
if( n )
data->u.num = (int)idb_iget(n,reference_getuid(data));
else
@@ -2585,7 +2587,7 @@ void get_val(struct script_state* st, struct script_data* data)
}
- return;
+ return data;
}
/// Retrieves the value of a reference identified by uid (variable, constant, param)
@@ -2689,9 +2691,8 @@ int set_reg(struct script_state* st, TBL_PC* sd, int num, const char* name, cons
}
}
-int set_var(TBL_PC* sd, char* name, void* val)
-{
- return script->set_reg(NULL, sd, reference_uid(script->add_str(name),0), name, val, NULL);
+int set_var(TBL_PC* sd, char* name, void* val) {
+ return script->set_reg(NULL, sd, reference_uid(script->add_str(name),0), name, val, NULL);
}
void setd_sub(struct script_state *st, TBL_PC *sd, const char *varname, int elem, void *value, struct DBMap **ref)
@@ -2899,12 +2900,18 @@ void pop_stack(struct script_state* st, int start, int end)
stack->stack_data[i].type = C_NOP;
}
// adjust stack pointers
- if( st->start > end ) st->start -= end - start;
- else if( st->start > start ) st->start = start;
- if( st->end > end ) st->end -= end - start;
- else if( st->end > start ) st->end = start;
- if( stack->defsp > end ) stack->defsp -= end - start;
- else if( stack->defsp > start ) stack->defsp = start;
+ if( st->start > end )
+ st->start -= end - start;
+ else if( st->start > start )
+ st->start = start;
+ if( st->end > end )
+ st->end -= end - start;
+ else if( st->end > start )
+ st->end = start;
+ if( stack->defsp > end )
+ stack->defsp -= end - start;
+ else if( stack->defsp > start )
+ stack->defsp = start;
stack->sp -= end - start;
}
@@ -2938,7 +2945,7 @@ void script_free_code(struct script_code* code)
/// @return Script state
struct script_state* script_alloc_state(struct script_code* rootscript, int pos, int rid, int oid) {
struct script_state* st;
-
+
st = ers_alloc(script->st_ers, struct script_state);
st->stack = ers_alloc(script->stack_ers, struct script_stack);
st->stack->sp = 0;
@@ -2953,15 +2960,15 @@ struct script_state* script_alloc_state(struct script_code* rootscript, int pos,
st->oid = oid;
st->sleep.timer = INVALID_TIMER;
st->npc_item_flag = battle_config.item_enabled_npc;
-
+
if( !st->script->script_vars )
st->script->script_vars = idb_alloc(DB_OPT_RELEASE_DATA);
-
+
st->id = script->next_id++;
script->active_scripts++;
idb_put(script->st_db, st->id, st);
-
+
return st;
}
@@ -3006,10 +3013,10 @@ c_op get_com(unsigned char *scriptbuf,int *pos)
{
int i = 0, j = 0;
- if(scriptbuf[*pos]>=0x80){
+ if(scriptbuf[*pos]>=0x80) {
return C_INT;
}
- while(scriptbuf[*pos]>=0x40){
+ while(scriptbuf[*pos]>=0x40) {
i=scriptbuf[(*pos)++]<<j;
j+=6;
}
@@ -3023,7 +3030,7 @@ int get_num(unsigned char *scriptbuf,int *pos)
{
int i,j;
i=0; j=0;
- while(scriptbuf[*pos]>=0xc0){
+ while(scriptbuf[*pos]>=0xc0) {
i+=(scriptbuf[(*pos)++]&0x7f)<<j;
j+=6;
}
@@ -3086,7 +3093,7 @@ void op_2str(struct script_state* st, int op, const char* s1, const char* s2)
{
int a = 0;
- switch(op){
+ switch(op) {
case C_EQ: a = (strcmp(s1,s2) == 0); break;
case C_NE: a = (strcmp(s1,s2) != 0); break;
case C_GT: a = (strcmp(s1,s2) > 0); break;
@@ -3119,21 +3126,20 @@ void op_2num(struct script_state* st, int op, int i1, int i2)
int ret;
double ret_double;
- switch( op )
- {
- case C_AND: ret = i1 & i2; break;
- case C_OR: ret = i1 | i2; break;
- case C_XOR: ret = i1 ^ i2; break;
- case C_LAND: ret = (i1 && i2); break;
- case C_LOR: ret = (i1 || i2); break;
- case C_EQ: ret = (i1 == i2); break;
- case C_NE: ret = (i1 != i2); break;
- case C_GT: ret = (i1 > i2); break;
- case C_GE: ret = (i1 >= i2); break;
- case C_LT: ret = (i1 < i2); break;
- case C_LE: ret = (i1 <= i2); break;
- case C_R_SHIFT: ret = i1>>i2; break;
- case C_L_SHIFT: ret = i1<<i2; break;
+ switch( op ) {
+ case C_AND: ret = i1 & i2; break;
+ case C_OR: ret = i1 | i2; break;
+ case C_XOR: ret = i1 ^ i2; break;
+ case C_LAND: ret = (i1 && i2); break;
+ case C_LOR: ret = (i1 || i2); break;
+ case C_EQ: ret = (i1 == i2); break;
+ case C_NE: ret = (i1 != i2); break;
+ case C_GT: ret = (i1 > i2); break;
+ case C_GE: ret = (i1 >= i2); break;
+ case C_LT: ret = (i1 < i2); break;
+ case C_LE: ret = (i1 <= i2); break;
+ case C_R_SHIFT: ret = i1>>i2; break;
+ case C_L_SHIFT: ret = i1<<i2; break;
case C_DIV:
case C_MOD:
if( i2 == 0 )
@@ -3303,7 +3309,7 @@ void script_check_buildin_argtype(struct script_state* st, int func)
struct script_data* data = script_getdata(st, idx);
type = sf[idx-2];
-
+
if( type == '?' || type == '*' ) {// optional argument or unknown number of optional parameters ( no types are after this )
break;
} else if( type == 0 ) {// more arguments than necessary ( should not happen, as it is checked before )
@@ -3408,7 +3414,7 @@ int run_func(struct script_state *st)
script->check_buildin_argtype(st, func);
}
- if(script->str_data[func].func){
+ if(script->str_data[func].func) {
if (!(script->str_data[func].func(st))) //Report error
script->reportsrc(st);
} else {
@@ -3462,30 +3468,30 @@ void run_script(struct script_code *rootscript,int pos,int rid,int oid) {
if( rootscript == NULL || pos < 0 )
return;
-
+
// TODO In jAthena, this function can take over the pending script in the player. [FlavioJS]
// It is unclear how that can be triggered, so it needs the be traced/checked in more detail.
// NOTE At the time of this change, this function wasn't capable of taking over the script state because st->scriptroot was never set.
st = script->alloc_state(rootscript, pos, rid, oid);
-
+
script->run_main(st);
}
void script_stop_instances(struct script_code *code) {
DBIterator *iter;
struct script_state* st;
-
+
if( !script->active_scripts )
return;//dont even bother.
-
+
iter = db_iterator(script->st_db);
-
+
for( st = dbi_first(iter); dbi_exists(iter); st = dbi_next(iter) ) {
if( st->script == code ) {
script->free_state(st);
}
}
-
+
dbi_destroy(iter);
}
@@ -3525,13 +3531,9 @@ void script_detach_state(struct script_state* st, bool dequeue_event) {
st->bk_st = NULL;
st->bk_npcid = 0;
} else if(dequeue_event) {
- /**
- * For the Secure NPC Timeout option (check config/Secure.h) [RR]
- **/
+ // For the Secure NPC Timeout option (check config/Secure.h) [RR]
#ifdef SECURE_NPCTIMEOUT
- /**
- * We're done with this NPC session, so we cancel the timer (if existent) and move on
- **/
+ // We're done with this NPC session, so we cancel the timer (if existent) and move on
if( sd->npc_idle_timer != INVALID_TIMER ) {
timer->delete(sd->npc_idle_timer,npc->secure_timeout_timer);
sd->npc_idle_timer = INVALID_TIMER;
@@ -3604,9 +3606,9 @@ void run_script_main(struct script_state *st) {
} else if(st->state != END)
st->state = RUN;
- while( st->state == RUN ){
+ while( st->state == RUN ) {
enum c_op c = script->get_com(st->script->script_buf,&st->pos);
- switch(c){
+ switch(c) {
case C_EOL:
if( stack->defsp > stack->sp )
ShowError("script:run_script_main: unexpected stack position (defsp=%d sp=%d). please report this!!!\n", stack->defsp, stack->sp);
@@ -3630,9 +3632,9 @@ void run_script_main(struct script_state *st) {
break;
case C_FUNC:
script->run_func(st);
- if(st->state==GOTO){
+ if(st->state==GOTO) {
st->state = RUN;
- if( !st->freeloop && gotocount>0 && (--gotocount)<=0 ){
+ if( !st->freeloop && gotocount>0 && (--gotocount)<=0 ) {
ShowError("run_script: infinity loop !\n");
script->reportsrc(st);
st->state=END;
@@ -3684,7 +3686,7 @@ void run_script_main(struct script_state *st) {
st->state=END;
break;
}
- if( !st->freeloop && cmdcount>0 && (--cmdcount)<=0 ){
+ if( !st->freeloop && cmdcount>0 && (--cmdcount)<=0 ) {
ShowError("run_script: too many opeartions being processed non-stop !\n");
script->reportsrc(st);
st->state=END;
@@ -3699,7 +3701,7 @@ void run_script_main(struct script_state *st) {
st->sleep.charid = sd?sd->status.char_id:0;
st->sleep.timer = timer->add(timer->gettick()+st->sleep.tick,
script->run_timer, st->sleep.charid, (intptr_t)st->id);
- } else if(st->state != END && st->rid){
+ } else if(st->state != END && st->rid) {
//Resume later (st is already attached to player).
if(st->bk_st) {
ShowWarning("Unable to restore stack! Double continuation!\n");
@@ -3715,7 +3717,7 @@ void run_script_main(struct script_state *st) {
} else {
//Dispose of script.
if ((sd = map->id2sd(st->rid))!=NULL) { //Restore previous stack and save char.
- if(sd->state.using_fake_npc){
+ if(sd->state.using_fake_npc) {
clif->clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd);
sd->state.using_fake_npc = 0;
}
@@ -3737,7 +3739,7 @@ int script_config_read(char *cfgName) {
FILE *fp;
- if( !( fp = fopen(cfgName,"r") ) ){
+ if( !( fp = fopen(cfgName,"r") ) ) {
ShowError("File not found: %s\n", cfgName);
return 1;
}
@@ -3766,7 +3768,7 @@ int script_config_read(char *cfgName) {
else if(strcmpi(w1,"warn_func_mismatch_argtypes")==0) {
script->config.warn_func_mismatch_argtypes = config_switch(w2);
}
- else if(strcmpi(w1,"import")==0){
+ else if(strcmpi(w1,"import")==0) {
script->config_read(w2);
}
else {
@@ -3882,7 +3884,7 @@ void do_final_script(void) {
int i;
DBIterator *iter;
struct script_state *st;
-
+
#ifdef SCRIPT_DEBUG_HASH
if (battle_config.etc_log)
{
@@ -3909,19 +3911,19 @@ void do_final_script(void) {
for(i=0; i<SCRIPT_HASH_SIZE; i++) {
fprintf(fp," hash %3d = %d\n",i,count[i]);
if(min > count[i])
- min = count[i]; // minimun count of collision
+ min = count[i]; // minimun count of collision
if(max < count[i])
- max = count[i]; // maximun count of collision
+ max = count[i]; // maximun count of collision
if(count[i] == 0)
zero++;
++count2[count[i]];
}
fprintf(fp,"\n--------------------\n items : buckets\n--------------------\n");
- for( i=min; i <= max; ++i ){
+ for( i=min; i <= max; ++i ) {
fprintf(fp," %5d : %7d\n",i,count2[i]);
mean += 1.0f*i*count2[i]/SCRIPT_HASH_SIZE; // Note: this will always result in <nr labels>/<nr buckets>
}
- for( i=min; i <= max; ++i ){
+ for( i=min; i <= max; ++i ) {
n += count2[i];
if( n*2 >= SCRIPT_HASH_SIZE )
{
@@ -3939,18 +3941,18 @@ void do_final_script(void) {
#endif
iter = db_iterator(script->st_db);
-
+
for( st = dbi_first(iter); dbi_exists(iter); st = dbi_next(iter) ) {
script->free_state(st);
}
-
+
dbi_destroy(iter);
-
+
mapreg->final();
script->userfunc_db->destroy(script->userfunc_db, script->db_free_code_sub);
script->autobonus_db->destroy(script->autobonus_db, script->db_free_code_sub);
-
+
if (script->str_data)
aFree(script->str_data);
if (script->str_buf)
@@ -3962,7 +3964,7 @@ void do_final_script(void) {
if( atcommand->binding_count != 0 )
aFree(atcommand->binding);
-
+
for( i = 0; i < script->buildin_count; i++) {
if( script->buildin[i] ) {
aFree(script->buildin[i]);
@@ -3971,7 +3973,7 @@ void do_final_script(void) {
}
aFree(script->buildin);
-
+
if( script->hqs ) {
for( i = 0; i < script->hqs; i++ ) {
if( script->hq[i].item != NULL )
@@ -3990,17 +3992,17 @@ void do_final_script(void) {
aFree(script->hqi);
if( script->word_buf != NULL )
aFree(script->word_buf);
-
+
#ifdef ENABLE_CASE_CHECK
script->global_casecheck.clear();
script->local_casecheck.clear();
#endif // ENABLE_CASE_CHECK
-
+
ers_destroy(script->st_ers);
ers_destroy(script->stack_ers);
-
+
db_destroy(script->st_db);
-
+
if( script->labels != NULL )
aFree(script->labels);
}
@@ -4017,7 +4019,7 @@ void do_init_script(bool minimal) {
ers_chunk_size(script->st_ers, 10);
ers_chunk_size(script->stack_ers, 10);
-
+
script->parse_builtin();
script->read_constdb();
@@ -4037,13 +4039,13 @@ int script_reload(void) {
#endif // ENABLE_CASE_CHECK
iter = db_iterator(script->st_db);
-
+
for( st = dbi_first(iter); dbi_exists(iter); st = dbi_next(iter) ) {
script->free_state(st);
}
-
+
dbi_destroy(iter);
-
+
script->userfunc_db->clear(script->userfunc_db, script->db_free_code_sub);
script->label_count = 0;
@@ -4055,24 +4057,24 @@ int script_reload(void) {
aFree(atcommand->binding);
atcommand->binding_count = 0;
-
+
db_clear(script->st_db);
-
+
mapreg->reload();
-
+
itemdb->force_name_constants();
-
+
return 0;
}
/* returns name of current function being run, from within the stack [Ind/Hercules] */
const char *script_getfuncname(struct script_state *st) {
struct script_data *data;
-
+
data = &st->stack->stack_data[st->start];
-
+
if( data->type == C_NAME && script->str_data[data->u.num].type == C_FUNC )
return script->get_str(data->u.num);
-
+
return NULL;
}
@@ -4092,18 +4094,18 @@ BUILDIN(mes) {
TBL_PC* sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if( !script_hasdata(st, 3) ) {// only a single line detected in the script
clif->scriptmes(sd, st->oid, script_getstr(st, 2));
} else {// parse multiple lines as they exist
int i;
-
+
for( i = 2; script_hasdata(st, i); i++ ) {
// send the message to the client
clif->scriptmes(sd, st->oid, script_getstr(st, i));
}
}
-
+
return true;
}
@@ -4114,7 +4116,7 @@ BUILDIN(mes) {
BUILDIN(next)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -4132,11 +4134,11 @@ BUILDIN(next)
/// close;
BUILDIN(close) {
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
st->state = sd->state.dialog == 1 ? CLOSE : END;
clif->scriptclose(sd, st->oid);
return true;
@@ -4148,11 +4150,11 @@ BUILDIN(close) {
/// close2;
BUILDIN(close2) {
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if( sd->state.dialog == 1 )
st->state = STOP;
else {
@@ -4171,11 +4173,11 @@ int menu_countoptions(const char* str, int max_count, int* total)
{
int count = 0;
int bogus_total;
-
+
if( total == NULL )
total = &bogus_total;
++(*total);
-
+
// initial empty options
while( *str == ':' )
{
@@ -4221,35 +4223,35 @@ BUILDIN(menu)
int i;
const char* text;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
#ifdef SECURE_NPCTIMEOUT
sd->npc_idle_type = NPCT_MENU;
#endif
-
+
// TODO detect multiple scripts waiting for input at the same time, and what to do when that happens
if( sd->state.menu_or_input == 0 )
{
struct StringBuf buf;
struct script_data* data;
-
+
if( script_lastdata(st) % 2 == 0 )
{// argument count is not even (1st argument is at index 2)
ShowError("script:menu: illegal number of arguments (%d).\n", (script_lastdata(st) - 1));
st->state = END;
return false;
}
-
+
StrBuf->Init(&buf);
sd->npc_menu = 0;
for( i = 2; i < script_lastdata(st); i += 2 )
{
// menu options
text = script_getstr(st, i);
-
+
// target label
data = script_getdata(st, i+1);
if( !data_islabel(data) )
@@ -4260,7 +4262,7 @@ BUILDIN(menu)
st->state = END;
return false;
}
-
+
// append option(s)
if( text[0] == '\0' )
continue;// empty string, ignore
@@ -4271,10 +4273,8 @@ BUILDIN(menu)
}
st->state = RERUNLINE;
sd->state.menu_or_input = 1;
-
- /**
- * menus beyond this length crash the client (see bugreport:6402)
- **/
+
+ /* menus beyond this length crash the client (see bugreport:6402) */
if( StrBuf->Length(&buf) >= 2047 ) {
struct npc_data * nd = map->id2nd(st->oid);
char* menu;
@@ -4285,9 +4285,9 @@ BUILDIN(menu)
aFree(menu);
} else
clif->scriptmenu(sd, st->oid, StrBuf->Value(&buf));
-
+
StrBuf->Destroy(&buf);
-
+
if( sd->npc_menu >= 0xff )
{// client supports only up to 254 entries; 0 is not used and 255 is reserved for cancel; excess entries are displayed but cause 'uint8' overflow
ShowWarning("buildin_menu: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
@@ -4302,7 +4302,7 @@ BUILDIN(menu)
else
{// goto target label
int menu = 0;
-
+
sd->state.menu_or_input = 0;
if( sd->npc_menu <= 0 )
{
@@ -4310,7 +4310,7 @@ BUILDIN(menu)
st->state = END;
return false;
}
-
+
// get target label
for( i = 2; i < script_lastdata(st); i += 2 )
{
@@ -4350,36 +4350,34 @@ BUILDIN(select)
int i;
const char* text;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
#ifdef SECURE_NPCTIMEOUT
sd->npc_idle_type = NPCT_MENU;
#endif
-
+
if( sd->state.menu_or_input == 0 ) {
struct StringBuf buf;
-
+
StrBuf->Init(&buf);
sd->npc_menu = 0;
for( i = 2; i <= script_lastdata(st); ++i ) {
text = script_getstr(st, i);
-
+
if( sd->npc_menu > 0 )
StrBuf->AppendStr(&buf, ":");
-
+
StrBuf->AppendStr(&buf, text);
sd->npc_menu += script->menu_countoptions(text, 0, NULL);
}
-
+
st->state = RERUNLINE;
sd->state.menu_or_input = 1;
-
- /**
- * menus beyond this length crash the client (see bugreport:6402)
- **/
+
+ /* menus beyond this length crash the client (see bugreport:6402) */
if( StrBuf->Length(&buf) >= 2047 ) {
struct npc_data * nd = map->id2nd(st->oid);
char* menu;
@@ -4391,7 +4389,7 @@ BUILDIN(select)
} else
clif->scriptmenu(sd, st->oid, StrBuf->Value(&buf));
StrBuf->Destroy(&buf);
-
+
if( sd->npc_menu >= 0xff ) {
ShowWarning("buildin_select: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
script->reportsrc(st);
@@ -4401,7 +4399,7 @@ BUILDIN(select)
st->state = END;
} else {// return selected option
int menu = 0;
-
+
sd->state.menu_or_input = 0;
for( i = 2; i <= script_lastdata(st); ++i ) {
text = script_getstr(st, i);
@@ -4429,19 +4427,19 @@ BUILDIN(prompt)
int i;
const char *text;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
#ifdef SECURE_NPCTIMEOUT
sd->npc_idle_type = NPCT_MENU;
#endif
-
+
if( sd->state.menu_or_input == 0 )
{
struct StringBuf buf;
-
+
StrBuf->Init(&buf);
sd->npc_menu = 0;
for( i = 2; i <= script_lastdata(st); ++i )
@@ -4452,13 +4450,11 @@ BUILDIN(prompt)
StrBuf->AppendStr(&buf, text);
sd->npc_menu += script->menu_countoptions(text, 0, NULL);
}
-
+
st->state = RERUNLINE;
sd->state.menu_or_input = 1;
-
- /**
- * menus beyond this length crash the client (see bugreport:6402)
- **/
+
+ /* menus beyond this length crash the client (see bugreport:6402) */
if( StrBuf->Length(&buf) >= 2047 ) {
struct npc_data * nd = map->id2nd(st->oid);
char* menu;
@@ -4470,7 +4466,7 @@ BUILDIN(prompt)
} else
clif->scriptmenu(sd, st->oid, StrBuf->Value(&buf));
StrBuf->Destroy(&buf);
-
+
if( sd->npc_menu >= 0xff )
{
ShowWarning("buildin_prompt: Too many options specified (current=%d, max=254).\n", sd->npc_menu);
@@ -4487,7 +4483,7 @@ BUILDIN(prompt)
else
{// return selected option
int menu = 0;
-
+
sd->state.menu_or_input = 0;
for( i = 2; i <= script_lastdata(st); ++i )
{
@@ -4519,7 +4515,7 @@ BUILDIN(goto)
st->state = END;
return false;
}
-
+
st->pos = script_getnum(st,2);
st->state = GOTO;
return true;
@@ -4535,7 +4531,7 @@ BUILDIN(callfunc)
struct script_code* scr;
const char* str = script_getstr(st,2);
DBMap **ref = NULL;
-
+
scr = (struct script_code*)strdb_get(script->userfunc_db, str);
if( !scr )
{
@@ -4543,7 +4539,7 @@ BUILDIN(callfunc)
st->state = END;
return false;
}
-
+
for( i = st->start+3, j = 0; i < st->end; i++, j++ )
{
struct script_data* data = script->push_copy(st->stack,i);
@@ -4559,7 +4555,7 @@ BUILDIN(callfunc)
}
}
}
-
+
CREATE(ri, struct script_retinfo, 1);
ri->script = st->script;// script code
ri->var_function = st->stack->var_function;// scope variables
@@ -4567,13 +4563,13 @@ BUILDIN(callfunc)
ri->nargs = j;// argument count
ri->defsp = st->stack->defsp;// default stack pointer
script->push_retinfo(st->stack, ri, ref);
-
+
st->pos = 0;
st->script = scr;
st->stack->defsp = st->stack->sp;
st->state = GOTO;
st->stack->var_function = idb_alloc(DB_OPT_RELEASE_DATA);
-
+
return true;
}
/*==========================================
@@ -4585,7 +4581,7 @@ BUILDIN(callsub)
struct script_retinfo* ri;
int pos = script_getnum(st,2);
DBMap **ref = NULL;
-
+
if( !data_islabel(script_getdata(st,2)) && !data_isfunclabel(script_getdata(st,2)) )
{
ShowError("script:callsub: argument is not a label\n");
@@ -4593,7 +4589,7 @@ BUILDIN(callsub)
st->state = END;
return false;
}
-
+
for( i = st->start+3, j = 0; i < st->end; i++, j++ )
{
struct script_data* data = script->push_copy(st->stack,i);
@@ -4609,7 +4605,7 @@ BUILDIN(callsub)
}
}
}
-
+
CREATE(ri, struct script_retinfo, 1);
ri->script = st->script;// script code
ri->var_function = st->stack->var_function;// scope variables
@@ -4617,12 +4613,12 @@ BUILDIN(callsub)
ri->nargs = j;// argument count
ri->defsp = st->stack->defsp;// default stack pointer
script->push_retinfo(st->stack, ri, ref);
-
+
st->pos = pos;
st->stack->defsp = st->stack->sp;
st->state = GOTO;
st->stack->var_function = idb_alloc(DB_OPT_RELEASE_DATA);
-
+
return true;
}
@@ -4634,7 +4630,7 @@ BUILDIN(getarg)
{
struct script_retinfo* ri;
int idx;
-
+
if( st->stack->defsp < 1 || st->stack->stack_data[st->stack->defsp - 1].type != C_RETINFO )
{
ShowError("script:getarg: no callfunc or callsub!\n");
@@ -4642,9 +4638,9 @@ BUILDIN(getarg)
return false;
}
ri = st->stack->stack_data[st->stack->defsp - 1].u.ri;
-
+
idx = script_getnum(st,2);
-
+
if( idx >= 0 && idx < ri->nargs )
script->push_copy(st->stack, st->stack->defsp - 1 - ri->nargs + idx);
else if( script_hasdata(st,3) )
@@ -4655,7 +4651,7 @@ BUILDIN(getarg)
st->state = END;
return false;
}
-
+
return true;
}
@@ -4703,7 +4699,7 @@ BUILDIN(rand)
int range;
int min;
int max;
-
+
if( script_hasdata(st,3) )
{// min,max
min = script_getnum(st,2);
@@ -4721,7 +4717,7 @@ BUILDIN(rand)
script_pushint(st, min);
else
script_pushint(st, rnd()%range + min);
-
+
return true;
}
@@ -4734,27 +4730,27 @@ BUILDIN(warp)
int x,y;
const char* str;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
str = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
-
+
if(strcmp(str,"Random")==0)
ret = pc->randomwarp(sd,CLR_TELEPORT);
else if(strcmp(str,"SavePoint")==0 || strcmp(str,"Save")==0)
ret = pc->setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
else
ret = pc->setpos(sd,mapindex->name2id(str),x,y,CLR_OUTSIGHT);
-
+
if( ret ) {
ShowError("buildin_warp: moving player '%s' to \"%s\",%d,%d failed.\n", sd->status.name, str, x, y);
script->reportsrc(st);
}
-
+
return true;
}
/*==========================================
@@ -4764,29 +4760,29 @@ int buildin_areawarp_sub(struct block_list *bl,va_list ap)
{
int x2,y2,x3,y3;
unsigned int index;
-
+
index = va_arg(ap,unsigned int);
x2 = va_arg(ap,int);
y2 = va_arg(ap,int);
x3 = va_arg(ap,int);
y3 = va_arg(ap,int);
-
+
if(index == 0)
pc->randomwarp((TBL_PC *)bl,CLR_TELEPORT);
else if(x3 && y3) {
int max, tx, ty, j = 0;
-
+
// choose a suitable max number of attempts
if( (max = (y3-y2+1)*(x3-x2+1)*3) > 1000 )
max = 1000;
-
+
// find a suitable map cell
do {
tx = rnd()%(x3-x2+1)+x2;
ty = rnd()%(y3-y2+1)+y2;
j++;
} while( map->getcell(index,tx,ty,CELL_CHKNOPASS) && j < max );
-
+
pc->setpos((TBL_PC *)bl,index,tx,ty,CLR_OUTSIGHT);
}
else
@@ -4799,7 +4795,7 @@ BUILDIN(areawarp)
unsigned int index;
const char *str;
const char *mapname;
-
+
mapname = script_getstr(st,2);
x0 = script_getnum(st,3);
y0 = script_getnum(st,4);
@@ -4808,9 +4804,9 @@ BUILDIN(areawarp)
str = script_getstr(st,7);
x2 = script_getnum(st,8);
y2 = script_getnum(st,9);
-
+
if( script_hasdata(st,10) && script_hasdata(st,11) ) { // Warp area to area
- if( (x3 = script_getnum(st,10)) < 0 || (y3 = script_getnum(st,11)) < 0 ){
+ if( (x3 = script_getnum(st,10)) < 0 || (y3 = script_getnum(st,11)) < 0 ) {
x3 = 0;
y3 = 0;
} else if( x3 && y3 ) {
@@ -4819,15 +4815,15 @@ BUILDIN(areawarp)
if( y3 < y2 ) swap(y3,y2);
}
}
-
+
if( (m = map->mapname2mapid(mapname)) < 0 )
return true;
-
+
if( strcmp(str,"Random") == 0 )
index = 0;
else if( !(index=mapindex->name2id(str)) )
return true;
-
+
map->foreachinarea(script->buildin_areawarp_sub, m,x0,y0,x1,y1, BL_PC, index,x2,y2,x3,y3);
return true;
}
@@ -4847,7 +4843,7 @@ BUILDIN(areapercentheal) {
int hp,sp,m;
const char *mapname;
int x0,y0,x1,y1;
-
+
mapname=script_getstr(st,2);
x0=script_getnum(st,3);
y0=script_getnum(st,4);
@@ -4855,10 +4851,10 @@ BUILDIN(areapercentheal) {
y1=script_getnum(st,6);
hp=script_getnum(st,7);
sp=script_getnum(st,8);
-
+
if( (m=map->mapname2mapid(mapname))< 0)
return true;
-
+
map->foreachinarea(script->buildin_areapercentheal_sub,m,x0,y0,x1,y1,BL_PC,hp,sp);
return true;
}
@@ -4873,16 +4869,16 @@ BUILDIN(warpchar) {
int x,y,a;
const char *str;
TBL_PC *sd;
-
+
str=script_getstr(st,2);
x=script_getnum(st,3);
y=script_getnum(st,4);
a=script_getnum(st,5);
-
+
sd = map->charid2sd(a);
if( sd == NULL )
return true;
-
+
if(strcmp(str, "Random") == 0)
pc->randomwarp(sd, CLR_TELEPORT);
else
@@ -4890,7 +4886,7 @@ BUILDIN(warpchar) {
pc->setpos(sd, sd->status.save_point.map,sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
else
pc->setpos(sd, mapindex->name2id(str), x, y, CLR_TELEPORT);
-
+
return true;
}
/*==========================================
@@ -4906,7 +4902,7 @@ BUILDIN(warpparty)
int type;
int map_index;
int i;
-
+
const char* str = script_getstr(st,2);
int x = script_getnum(st,3);
int y = script_getnum(st,4);
@@ -4914,17 +4910,17 @@ BUILDIN(warpparty)
const char* str2 = NULL;
if ( script_hasdata(st,6) )
str2 = script_getstr(st,6);
-
+
p = party->search(p_id);
if(!p)
return true;
-
+
type = ( strcmp(str,"Random")==0 ) ? 0
: ( strcmp(str,"SavePointAll")==0 ) ? 1
: ( strcmp(str,"SavePoint")==0 ) ? 2
: ( strcmp(str,"Leader")==0 ) ? 3
: 4;
-
+
switch (type)
{
case 3:
@@ -4947,17 +4943,17 @@ BUILDIN(warpparty)
map_index = 0;
break;
}
-
+
for (i = 0; i < MAX_PARTY; i++) {
if( !(pl_sd = p->data[i].sd) || pl_sd->status.party_id != p_id )
continue;
-
+
if( str2 && strcmp(str2, map->list[pl_sd->bl.m].name) != 0 )
continue;
-
+
if( pc_isdead(pl_sd) )
continue;
-
+
switch( type )
{
case 0: // Random
@@ -4979,7 +4975,7 @@ BUILDIN(warpparty)
break;
}
}
-
+
return true;
}
/*==========================================
@@ -4993,32 +4989,32 @@ BUILDIN(warpguild)
struct guild* g;
struct s_mapiterator* iter;
int type;
-
+
const char* str = script_getstr(st,2);
int x = script_getnum(st,3);
int y = script_getnum(st,4);
int gid = script_getnum(st,5);
-
+
g = guild->search(gid);
if( g == NULL )
return true;
-
+
type = ( strcmp(str,"Random")==0 ) ? 0
: ( strcmp(str,"SavePointAll")==0 ) ? 1
: ( strcmp(str,"SavePoint")==0 ) ? 2
: 3;
-
+
if( type == 2 && ( sd = script->rid2sd(st) ) == NULL )
{// "SavePoint" uses save point of the currently attached player
return true;
}
-
+
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
if( pl_sd->status.guild_id != gid )
continue;
-
+
switch( type )
{
case 0: // Random
@@ -5040,7 +5036,7 @@ BUILDIN(warpguild)
}
}
mapit->free(iter);
-
+
return true;
}
/*==========================================
@@ -5049,10 +5045,10 @@ BUILDIN(warpguild)
BUILDIN(heal) {
TBL_PC *sd;
int hp,sp;
-
+
sd = script->rid2sd(st);
if (!sd) return true;
-
+
hp=script_getnum(st,2);
sp=script_getnum(st,3);
status->heal(&sd->bl, hp, sp, 1);
@@ -5065,16 +5061,16 @@ BUILDIN(itemheal)
{
TBL_PC *sd;
int hp,sp;
-
+
hp=script_getnum(st,2);
sp=script_getnum(st,3);
-
+
if(script->potion_flag==1) {
script->potion_hp = hp;
script->potion_sp = sp;
return true;
}
-
+
sd = script->rid2sd(st);
if (!sd) return true;
pc->itemheal(sd,sd->itemid,hp,sp);
@@ -5087,16 +5083,16 @@ BUILDIN(percentheal)
{
int hp,sp;
TBL_PC* sd;
-
+
hp=script_getnum(st,2);
sp=script_getnum(st,3);
-
+
if(script->potion_flag==1) {
script->potion_per_hp = hp;
script->potion_per_sp = sp;
return true;
}
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
@@ -5114,22 +5110,22 @@ BUILDIN(percentheal)
BUILDIN(jobchange)
{
int job, upper=-1;
-
+
job=script_getnum(st,2);
if( script_hasdata(st,3) )
upper=script_getnum(st,3);
-
+
if (pcdb_checkid(job))
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
pc->jobchange(sd, job, upper);
}
-
+
return true;
}
@@ -5158,13 +5154,13 @@ BUILDIN(input)
const char* name;
int min;
int max;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
data = script_getdata(st,2);
- if( !data_isreference(data) ){
+ if( !data_isreference(data) ) {
ShowError("script:input: not a variable\n");
script->reportdata(data);
st->state = END;
@@ -5174,22 +5170,21 @@ BUILDIN(input)
name = reference_getname(data);
min = (script_hasdata(st,3) ? script_getnum(st,3) : script->config.input_min_value);
max = (script_hasdata(st,4) ? script_getnum(st,4) : script->config.input_max_value);
-
+
#ifdef SECURE_NPCTIMEOUT
sd->npc_idle_type = NPCT_WAIT;
#endif
-
- if( !sd->state.menu_or_input )
- { // first invocation, display npc input box
+
+ if( !sd->state.menu_or_input ) {
+ // first invocation, display npc input box
sd->state.menu_or_input = 1;
st->state = RERUNLINE;
if( is_string_variable(name) )
clif->scriptinputstr(sd,st->oid);
else
clif->scriptinput(sd,st->oid);
- }
- else
- { // take received text/value and store it in the designated variable
+ } else {
+ // take received text/value and store it in the designated variable
sd->state.menu_or_input = 0;
if( is_string_variable(name) )
{
@@ -5222,7 +5217,7 @@ BUILDIN(setr) {
int num;
const char* name;
char prefix;
-
+
data = script_getdata(st,2);
//datavalue = script_getdata(st,3);
if( !data_isreference(data) ) {
@@ -5231,11 +5226,11 @@ BUILDIN(setr) {
st->state = END;
return false;
}
-
+
num = reference_getuid(data);
name = reference_getname(data);
prefix = *name;
-
+
if( not_server_variable(prefix) ) {
sd = script->rid2sd(st);
if( sd == NULL ) {
@@ -5243,13 +5238,13 @@ BUILDIN(setr) {
return true;
}
}
-
+
#if 0
// TODO: see de43fa0f73be01080bd11c08adbfb7c158324c81
if( data_isreference(datavalue) ) {
// the value being referenced is a variable
const char* namevalue = reference_getname(datavalue);
-
+
if( !not_array_variable(*namevalue) ) {
// array variable being copied into another array variable
if( sd == NULL && not_server_variable(*namevalue) && !(sd = script->rid2sd(st)) ) {
@@ -5257,22 +5252,22 @@ BUILDIN(setr) {
ShowError("script:set: no player attached for player variable '%s'\n", namevalue);
return true;
}
-
+
if( is_string_variable(namevalue) != is_string_variable(name) ) {
// non-matching array value types
ShowWarning("script:set: two array variables do not match in type.\n");
return true;
}
-
+
// push the maximum number of array values to the stack
script->push_val(st->stack, C_INT, SCRIPT_MAX_ARRAYSIZE,NULL);
-
+
// call the copy array method directly
return buildin_copyarray(st);
}
}
#endif
-
+
if( script_hasdata(st, 4) ) {
// Optional argument used by post-increment/post-decrement constructs to return the previous value
if( is_string_variable(name) ) {
@@ -5289,7 +5284,7 @@ BUILDIN(setr) {
script->set_reg(st,sd,num,name,(void*)script_getstr(st,3),script_getref(st,2));
else
script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(script_getnum(st,3)),script_getref(st,2));
-
+
return true;
}
@@ -5301,7 +5296,7 @@ BUILDIN(setr) {
int32 getarraysize(struct script_state* st, int32 id, int32 idx, int isstring, struct DBMap** ref)
{
int32 ret = idx;
-
+
if( isstring )
{
for( ; idx < SCRIPT_MAX_ARRAYSIZE; ++idx )
@@ -5338,7 +5333,7 @@ BUILDIN(setarray)
int32 id;
int32 i;
TBL_PC* sd = NULL;
-
+
data = script_getdata(st, 2);
if( !data_isreference(data) )
{
@@ -5347,7 +5342,7 @@ BUILDIN(setarray)
st->state = END;
return false;// not a variable
}
-
+
id = reference_getid(data);
start = reference_getindex(data);
name = reference_getname(data);
@@ -5358,18 +5353,18 @@ BUILDIN(setarray)
st->state = END;
return false;// not supported
}
-
+
if( not_server_variable(*name) )
{
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
-
+
end = start + script_lastdata(st) - 2;
if( end > SCRIPT_MAX_ARRAYSIZE )
end = SCRIPT_MAX_ARRAYSIZE;
-
+
if( is_string_variable(name) )
{// string array
for( i = 3; start < end; ++start, ++i )
@@ -5396,7 +5391,7 @@ BUILDIN(cleararray)
int32 id;
void* v;
TBL_PC* sd = NULL;
-
+
data = script_getdata(st, 2);
if( !data_isreference(data) )
{
@@ -5405,7 +5400,7 @@ BUILDIN(cleararray)
st->state = END;
return false;// not a variable
}
-
+
id = reference_getid(data);
start = reference_getindex(data);
name = reference_getname(data);
@@ -5416,23 +5411,23 @@ BUILDIN(cleararray)
st->state = END;
return false;// not supported
}
-
+
if( not_server_variable(*name) )
{
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
-
+
if( is_string_variable(name) )
v = (void*)script_getstr(st, 3);
else
v = (void*)__64BPTRSIZE(script_getnum(st, 3));
-
+
end = start + script_getnum(st, 4);
if( end > SCRIPT_MAX_ARRAYSIZE )
end = SCRIPT_MAX_ARRAYSIZE;
-
+
for( ; start < end; ++start )
script->set_reg(st, sd, reference_uid(id, start), name, v, script_getref(st,2));
return true;
@@ -5456,7 +5451,7 @@ BUILDIN(copyarray)
int32 i;
int32 count;
TBL_PC* sd = NULL;
-
+
data1 = script_getdata(st, 2);
data2 = script_getdata(st, 3);
if( !data_isreference(data1) || !data_isreference(data2) )
@@ -5467,7 +5462,7 @@ BUILDIN(copyarray)
st->state = END;
return false;// not a variable
}
-
+
id1 = reference_getid(data1);
id2 = reference_getid(data2);
idx1 = reference_getindex(data1);
@@ -5482,7 +5477,7 @@ BUILDIN(copyarray)
st->state = END;
return false;// not supported
}
-
+
if( is_string_variable(name1) != is_string_variable(name2) )
{
ShowError("script:copyarray: type mismatch\n");
@@ -5491,20 +5486,20 @@ BUILDIN(copyarray)
st->state = END;
return false;// data type mismatch
}
-
+
if( not_server_variable(*name1) || not_server_variable(*name2) )
{
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
-
+
count = script_getnum(st, 4);
if( count > SCRIPT_MAX_ARRAYSIZE - idx1 )
count = SCRIPT_MAX_ARRAYSIZE - idx1;
if( count <= 0 || (id1 == id2 && idx1 == idx2) )
return true;// nothing to copy
-
+
if( id1 == id2 && idx1 > idx2 )
{// destination might be overlapping the source - copy in reverse order
for( i = count - 1; i >= 0; --i )
@@ -5540,7 +5535,7 @@ BUILDIN(getarraysize)
{
struct script_data* data;
const char* name;
-
+
data = script_getdata(st, 2);
if( !data_isreference(data) )
{
@@ -5550,7 +5545,7 @@ BUILDIN(getarraysize)
st->state = END;
return false;// not a variable
}
-
+
name = reference_getname(data);
if( not_array_variable(*name) )
{
@@ -5560,7 +5555,7 @@ BUILDIN(getarraysize)
st->state = END;
return false;// not supported
}
-
+
script_pushint(st, script->getarraysize(st, reference_getid(data), reference_getindex(data), is_string_variable(name), reference_getref(data)));
return true;
}
@@ -5578,7 +5573,7 @@ BUILDIN(deletearray)
int end;
int id;
TBL_PC *sd = NULL;
-
+
data = script_getdata(st, 2);
if( !data_isreference(data) )
{
@@ -5587,7 +5582,7 @@ BUILDIN(deletearray)
st->state = END;
return false;// not a variable
}
-
+
id = reference_getid(data);
start = reference_getindex(data);
name = reference_getname(data);
@@ -5598,19 +5593,19 @@ BUILDIN(deletearray)
st->state = END;
return false;// not supported
}
-
+
if( not_server_variable(*name) )
{
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
-
+
end = SCRIPT_MAX_ARRAYSIZE;
-
+
if( start >= end )
return true;// nothing to free
-
+
if( script_hasdata(st,3) )
{
int count = script_getnum(st, 3);
@@ -5618,7 +5613,7 @@ BUILDIN(deletearray)
count = end - start;
if( count <= 0 )
return true;// nothing to free
-
+
// move rest of the elements backward
for( ; start + count < end; ++start )
{
@@ -5627,7 +5622,7 @@ BUILDIN(deletearray)
script_removetop(st, -1, 0);
}
}
-
+
// clear the rest of the array
if( is_string_variable(name) )
{
@@ -5652,7 +5647,7 @@ BUILDIN(getelementofarray)
const char* name;
int32 id;
int i;
-
+
data = script_getdata(st, 2);
if( !data_isreference(data) )
{
@@ -5662,7 +5657,7 @@ BUILDIN(getelementofarray)
st->state = END;
return false;// not a variable
}
-
+
id = reference_getid(data);
name = reference_getname(data);
if( not_array_variable(*name) )
@@ -5673,7 +5668,7 @@ BUILDIN(getelementofarray)
st->state = END;
return false;// not supported
}
-
+
i = script_getnum(st, 3);
if( i < 0 || i >= SCRIPT_MAX_ARRAYSIZE )
{
@@ -5683,7 +5678,7 @@ BUILDIN(getelementofarray)
st->state = END;
return false;// out of range
}
-
+
script->push_val(st->stack, C_NAME, reference_uid(id, i), reference_getref(data));
return true;
}
@@ -5699,16 +5694,16 @@ BUILDIN(setlook)
{
int type,val;
TBL_PC* sd;
-
+
type=script_getnum(st,2);
val=script_getnum(st,3);
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
pc->changelook(sd,type,val);
-
+
return true;
}
@@ -5716,16 +5711,16 @@ BUILDIN(changelook)
{ // As setlook but only client side
int type,val;
TBL_PC* sd;
-
+
type=script_getnum(st,2);
val=script_getnum(st,3);
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
clif->changelook(&sd->bl,type,val);
-
+
return true;
}
@@ -5735,11 +5730,11 @@ BUILDIN(changelook)
BUILDIN(cutin)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
clif->cutin(sd,script_getstr(st,2),script_getnum(st,3));
return true;
}
@@ -5751,104 +5746,90 @@ BUILDIN(viewpoint)
{
int type,x,y,id,color;
TBL_PC* sd;
-
+
type=script_getnum(st,2);
x=script_getnum(st,3);
y=script_getnum(st,4);
id=script_getnum(st,5);
color=script_getnum(st,6);
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
clif->viewpoint(sd,st->oid,type,x,y,id,color);
-
+
return true;
}
/*==========================================
*
*------------------------------------------*/
-BUILDIN(countitem)
-{
+BUILDIN(countitem) {
int nameid, i;
int count = 0;
struct item_data* id = NULL;
- struct script_data* data;
-
+
TBL_PC* sd = script->rid2sd(st);
if (!sd) {
script_pushint(st,0);
return true;
}
-
- data = script_getdata(st,2);
- script->get_val(st, data); // convert into value in case of a variable
-
- if( data_isstring(data) )
- {// item name
- id = itemdb->search_name(script->conv_str(st, data));
- }
- else
- {// item id
- id = itemdb->exists(script->conv_num(st, data));
+
+ if( script_isstringtype(st, 2) ) {
+ // item name
+ id = itemdb->search_name(script_getstr(st, 2));
+ } else {
+ // item id
+ id = itemdb->exists(script_getnum(st, 2));
}
-
- if( id == NULL )
- {
+
+ if( id == NULL ) {
ShowError("buildin_countitem: Invalid item '%s'.\n", script_getstr(st,2)); // returns string, regardless of what it was
script_pushint(st,0);
return false;
}
-
+
nameid = id->nameid;
-
+
for(i = 0; i < MAX_INVENTORY; i++)
if(sd->status.inventory[i].nameid == nameid)
count += sd->status.inventory[i].amount;
-
+
script_pushint(st,count);
return true;
}
/*==========================================
- * countitem2(nameID,Identified,Refine,Attribute,Card0,Card1,Card2,Card3) [Lupus]
- * returns number of items that meet the conditions
+ * countitem2(nameID,Identified,Refine,Attribute,Card0,Card1,Card2,Card3) [Lupus]
+ * returns number of items that meet the conditions
*------------------------------------------*/
-BUILDIN(countitem2)
-{
+BUILDIN(countitem2) {
int nameid, iden, ref, attr, c1, c2, c3, c4;
int count = 0;
int i;
struct item_data* id = NULL;
- struct script_data* data;
-
+
TBL_PC* sd = script->rid2sd(st);
if (!sd) {
script_pushint(st,0);
return true;
}
-
- data = script_getdata(st,2);
- script->get_val(st, data); // convert into value in case of a variable
-
- if( data_isstring(data) )
- {// item name
- id = itemdb->search_name(script->conv_str(st, data));
- }
- else
- {// item id
- id = itemdb->exists(script->conv_num(st, data));
+
+ if( script_isstringtype(st, 2) ) {
+ // item name
+ id = itemdb->search_name(script_getstr(st, 2));
+ } else {
+ // item id
+ id = itemdb->exists(script_getnum(st, 2));
}
-
- if( id == NULL )
- {
+
+ if( id == NULL ) {
ShowError("buildin_countitem2: Invalid item '%s'.\n", script_getstr(st,2)); // returns string, regardless of what it was
script_pushint(st,0);
return false;
}
-
+
nameid = id->nameid;
iden = script_getnum(st,3);
ref = script_getnum(st,4);
@@ -5857,7 +5838,7 @@ BUILDIN(countitem2)
c2 = (short)script_getnum(st,7);
c3 = (short)script_getnum(st,8);
c4 = (short)script_getnum(st,9);
-
+
for(i = 0; i < MAX_INVENTORY; i++)
if (sd->status.inventory[i].nameid > 0 && sd->inventory_data[i] != NULL &&
sd->status.inventory[i].amount > 0 && sd->status.inventory[i].nameid == nameid &&
@@ -5867,7 +5848,7 @@ BUILDIN(countitem2)
sd->status.inventory[i].card[3] == c4
)
count += sd->status.inventory[i].amount;
-
+
script_pushint(st,count);
return true;
}
@@ -5876,8 +5857,8 @@ BUILDIN(countitem2)
* Check if item with this amount can fit in inventory
* Checking : weight, stack amount >32k, slots amount >(MAX_INVENTORY)
* Return
- * 0 : fail
- * 1 : success (npc side only)
+ * 0 : fail
+ * 1 : success (npc side only)
*------------------------------------------*/
BUILDIN(checkweight)
{
@@ -5885,73 +5866,76 @@ BUILDIN(checkweight)
unsigned int weight=0, i, nbargs;
struct item_data* id = NULL;
struct map_session_data* sd;
- struct script_data* data;
-
- if( ( sd = script->rid2sd(st) ) == NULL ){
+
+ if( ( sd = script->rid2sd(st) ) == NULL ) {
return true;
}
nbargs = script_lastdata(st)+1;
- if(nbargs%2){
- ShowError("buildin_checkweight: Invalid nb of args should be a multiple of 2.\n");
- script_pushint(st,0);
- return false;
+ if(nbargs%2) {
+ ShowError("buildin_checkweight: Invalid nb of args should be a multiple of 2.\n");
+ script_pushint(st,0);
+ return false;
}
slots = pc->inventoryblank(sd); //nb of empty slot
-
- for(i=2; i<nbargs; i=i+2){
- data = script_getdata(st,i);
- script->get_val(st, data); // convert into value in case of a variable
- if( data_isstring(data) ){// item name
- id = itemdb->search_name(script->conv_str(st, data));
- } else {// item id
- id = itemdb->exists(script->conv_num(st, data));
- }
- if( id == NULL ) {
- ShowError("buildin_checkweight: Invalid item '%s'.\n", script_getstr(st,i)); // returns string, regardless of what it was
- script_pushint(st,0);
- return false;
- }
- nameid = id->nameid;
-
- amount = script_getnum(st,i+1);
- if( amount < 1 ) {
- ShowError("buildin_checkweight: Invalid amount '%d'.\n", amount);
- script_pushint(st,0);
- return false;
- }
-
- weight += itemdb_weight(nameid)*amount; //total weight for all chk
- if( weight + sd->weight > sd->max_weight )
- {// too heavy
- script_pushint(st,0);
- return true;
- }
-
- switch( pc->checkadditem(sd, nameid, amount) )
- {
- case ADDITEM_EXIST:
- // item is already in inventory, but there is still space for the requested amount
- break;
- case ADDITEM_NEW:
- if( itemdb->isstackable(nameid) ) {// stackable
- amount2++;
- if( slots < amount2 ) {
- script_pushint(st,0);
- return true;
- }
- }
- else {// non-stackable
- amount2 += amount;
- if( slots < amount2){
- script_pushint(st,0);
- return true;
- }
- }
- break;
- case ADDITEM_OVERAMOUNT:
- script_pushint(st,0);
- return true;
- }
+
+ for( i = 2; i < nbargs; i += 2 ) {
+ if( script_isstringtype(st, i) ) {
+ // item name
+ id = itemdb->search_name(script_getstr(st, i));
+ } else if ( script_isinttype(st, i) ) {
+ // item id
+ id = itemdb->exists(script_getnum(st, i));
+ } else {
+ ShowError("buildin_checkweight: invalid type for argument '%d'.\n", i);
+ script_pushint(st,0);
+ return false;
+ }
+ if( id == NULL ) {
+ ShowError("buildin_checkweight: Invalid item '%s'.\n", script_getstr(st,i)); // returns string, regardless of what it was
+ script_pushint(st,0);
+ return false;
+ }
+ nameid = id->nameid;
+
+ amount = script_getnum(st,i+1);
+ if( amount < 1 ) {
+ ShowError("buildin_checkweight: Invalid amount '%d'.\n", amount);
+ script_pushint(st,0);
+ return false;
+ }
+
+ weight += itemdb_weight(nameid)*amount; //total weight for all chk
+ if( weight + sd->weight > sd->max_weight )
+ {// too heavy
+ script_pushint(st,0);
+ return true;
+ }
+
+ switch( pc->checkadditem(sd, nameid, amount) ) {
+ case ADDITEM_EXIST:
+ // item is already in inventory, but there is still space for the requested amount
+ break;
+ case ADDITEM_NEW:
+ if( itemdb->isstackable(nameid) ) {
+ // stackable
+ amount2++;
+ if( slots < amount2 ) {
+ script_pushint(st,0);
+ return true;
+ }
+ } else {
+ // non-stackable
+ amount2 += amount;
+ if( slots < amount2) {
+ script_pushint(st,0);
+ return true;
+ }
+ }
+ break;
+ case ADDITEM_OVERAMOUNT:
+ script_pushint(st,0);
+ return true;
+ }
}
script_pushint(st,1);
return true;
@@ -5963,7 +5947,7 @@ BUILDIN(checkweight2)
int32 nameid=-1, amount=-1;
int i=0, amount2=0, slots=0, weight=0;
short fail=0;
-
+
//variable for array parsing
struct script_data* data_it;
struct script_data* data_nb;
@@ -5972,13 +5956,13 @@ BUILDIN(checkweight2)
int32 id_it, id_nb;
int32 idx_it, idx_nb;
int nb_it, nb_nb; //array size
-
+
TBL_PC *sd = script->rid2sd(st);
nullpo_retr(false,sd);
-
+
data_it = script_getdata(st, 2);
data_nb = script_getdata(st, 3);
-
+
if( !data_isreference(data_it) || !data_isreference(data_nb))
{
ShowError("script:checkweight2: parameter not a variable\n");
@@ -5991,70 +5975,70 @@ BUILDIN(checkweight2)
idx_nb = reference_getindex(data_nb);
name_it = reference_getname(data_it);
name_nb = reference_getname(data_nb);
-
+
if( not_array_variable(*name_it) || not_array_variable(*name_nb))
{
ShowError("script:checkweight2: illegal scope\n");
script_pushint(st,0);
return false;// not supported
}
- if(is_string_variable(name_it) || is_string_variable(name_nb)){
+ if(is_string_variable(name_it) || is_string_variable(name_nb)) {
ShowError("script:checkweight2: illegal type, need int\n");
script_pushint(st,0);
return false;// not supported
}
nb_it = script->getarraysize(st, id_it, idx_it, 0, reference_getref(data_it));
nb_nb = script->getarraysize(st, id_nb, idx_nb, 0, reference_getref(data_nb));
- if(nb_it != nb_nb){
+ if(nb_it != nb_nb) {
ShowError("Size mistmatch: nb_it=%d, nb_nb=%d\n",nb_it,nb_nb);
fail = 1;
}
-
+
slots = pc->inventoryblank(sd);
- for(i=0; i<nb_it; i++){
+ for(i=0; i<nb_it; i++) {
nameid = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it)));
- script_removetop(st, -1, 0);
- amount = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb)));
- script_removetop(st, -1, 0);
- if(fail) continue; //cpntonie to depop rest
-
- if(itemdb->exists(nameid) == NULL ){
+ script_removetop(st, -1, 0);
+ amount = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb)));
+ script_removetop(st, -1, 0);
+ if(fail) continue; //cpntonie to depop rest
+
+ if(itemdb->exists(nameid) == NULL ) {
ShowError("buildin_checkweight2: Invalid item '%d'.\n", nameid);
fail=1;
continue;
}
- if(amount < 0 ){
+ if(amount < 0 ) {
ShowError("buildin_checkweight2: Invalid amount '%d'.\n", amount);
fail = 1;
continue;
}
- weight += itemdb_weight(nameid)*amount;
- if( weight + sd->weight > sd->max_weight ){
+ weight += itemdb_weight(nameid)*amount;
+ if( weight + sd->weight > sd->max_weight ) {
fail = 1;
continue;
- }
- switch( pc->checkadditem(sd, nameid, amount) ) {
- case ADDITEM_EXIST:
+ }
+ switch( pc->checkadditem(sd, nameid, amount) ) {
+ case ADDITEM_EXIST:
// item is already in inventory, but there is still space for the requested amount
- break;
- case ADDITEM_NEW:
- if( itemdb->isstackable(nameid) ){// stackable
- amount2++;
- if( slots < amount2 )
- fail = 1;
- }
- else {// non-stackable
- amount2 += amount;
- if( slots < amount2 ){
- fail = 1;
- }
- }
- break;
- case ADDITEM_OVERAMOUNT:
- fail = 1;
- } //end switch
+ break;
+ case ADDITEM_NEW:
+ if( itemdb->isstackable(nameid) ) {// stackable
+ amount2++;
+ if( slots < amount2 )
+ fail = 1;
+ }
+ else {// non-stackable
+ amount2 += amount;
+ if( slots < amount2 ) {
+ fail = 1;
+ }
+ }
+ break;
+ case ADDITEM_OVERAMOUNT:
+ fail = 1;
+ } //end switch
} //end loop DO NOT break it prematurly we need to depop all stack
-
+
fail?script_pushint(st,0):script_pushint(st,1);
return true;
}
@@ -6066,52 +6050,46 @@ BUILDIN(checkweight2)
* getitembound <item id>,<amount>,<type>{,<account ID>};
* getitembound "<item id>",<amount>,<type>{,<account ID>};
*------------------------------------------*/
-BUILDIN(getitem)
-{
+BUILDIN(getitem) {
int nameid,amount,get_count,i,flag = 0, offset = 0;
struct item it;
TBL_PC *sd;
- struct script_data *data;
struct item_data *item_data;
-
- data=script_getdata(st,2);
- script->get_val(st,data);
- if( data_isstring(data) )
- {// "<item name>"
- const char *name=script->conv_str(st,data);
- if( (item_data = itemdb->search_name(name)) == NULL ){
+
+ if( script_isstringtype(st, 2) ) {
+ // "<item name>"
+ const char *name = script_getstr(st, 2);
+ if( (item_data = itemdb->search_name(name)) == NULL ) {
ShowError("buildin_%s: Nonexistant item %s requested.\n", script->getfuncname(st), name);
return false; //No item created.
}
nameid=item_data->nameid;
- } else if( data_isint(data) ) {// <item id>
- nameid=script->conv_num(st,data);
+ } else {
+ // <item id>
+ nameid = script_getnum(st, 2);
//Violet Box, Blue Box, etc - random item pick
if( nameid < 0 ) {
nameid = -nameid;
flag = 1;
}
- if( nameid <= 0 || !(item_data = itemdb->exists(nameid)) ){
+ if( nameid <= 0 || !(item_data = itemdb->exists(nameid)) ) {
ShowError("buildin_%s: Nonexistant item %d requested.\n", script->getfuncname(st), nameid);
return false; //No item created.
}
- } else {
- ShowError("buildin_%s: invalid data type for argument #1 (%d).", script->getfuncname(st), data->type);
- return false;
}
-
+
// <amount>
if( (amount=script_getnum(st,3)) <= 0)
return true; //return if amount <=0, skip the useles iteration
-
+
memset(&it,0,sizeof(it));
it.nameid=nameid;
-
+
if(!flag)
it.identify=1;
else
it.identify=itemdb->isidentified2(item_data);
-
+
if( !strcmp(script->getfuncname(st),"getitembound") ) {
int bound = script_getnum(st,4);
if( bound < IBT_MIN || bound > IBT_MAX ) { //Not a correct bound type
@@ -6125,21 +6103,21 @@ BUILDIN(getitem)
it.bound = (unsigned char)bound;
offset += 1;
}
-
+
if( script_hasdata(st,4+offset) )
sd=map->id2sd(script_getnum(st,4+offset)); // <Account ID>
else
sd=script->rid2sd(st); // Attached player
-
+
if( sd == NULL ) // no target
return true;
-
+
//Check if it's stackable.
if (!itemdb->isstackable(nameid))
get_count = 1;
else
get_count = amount;
-
+
for (i = 0; i < amount; i += get_count) {
// if not pet egg
if (!pet->create_egg(sd, nameid)) {
@@ -6150,20 +6128,18 @@ BUILDIN(getitem)
}
}
}
-
+
return true;
}
/*==========================================
*
*------------------------------------------*/
-BUILDIN(getitem2)
-{
+BUILDIN(getitem2) {
int nameid,amount,i,flag = 0, offset = 0;
int iden,ref,attr,c1,c2,c3,c4, bound = 0;
TBL_PC *sd;
- struct script_data *data;
-
+
if( !strcmp(script->getfuncname(st),"getitembound2") ) {
bound = script_getnum(st,11);
if( bound < IBT_MIN || bound > IBT_MAX ) { //Not a correct bound type
@@ -6172,27 +6148,26 @@ BUILDIN(getitem2)
}
offset += 1;
}
-
+
if( script_hasdata(st,11+offset) )
sd=map->id2sd(script_getnum(st,11+offset)); // <Account ID>
else
sd=script->rid2sd(st); // Attached player
-
+
if( sd == NULL ) // no target
return true;
-
- data=script_getdata(st,2);
- script->get_val(st,data);
- if( data_isstring(data) ){
- const char *name=script->conv_str(st,data);
+
+ if( script_isstringtype(st, 2) ) {
+ const char *name = script_getstr(st, 2);
struct item_data *item_data = itemdb->search_name(name);
if( item_data )
nameid=item_data->nameid;
else
nameid=UNKNOWN_ITEM_ID;
- }else
- nameid=script->conv_num(st,data);
-
+ } else {
+ nameid = script_getnum(st, 2);
+ }
+
amount=script_getnum(st,3);
iden=script_getnum(st,4);
ref=script_getnum(st,5);
@@ -6201,17 +6176,17 @@ BUILDIN(getitem2)
c2=(short)script_getnum(st,8);
c3=(short)script_getnum(st,9);
c4=(short)script_getnum(st,10);
-
+
if( bound && (itemdb_type(nameid) == IT_PETEGG || itemdb_type(nameid) == IT_PETARMOR) ) {
ShowError("script_getitembound2: can't bind a pet egg/armor!\n",bound);
return false;
}
-
+
if(nameid<0) { // Invalide nameid
nameid = -nameid;
flag = 1;
}
-
+
if(nameid > 0) {
struct item item_tmp;
struct item_data *item_data = itemdb->exists(nameid);
@@ -6219,7 +6194,7 @@ BUILDIN(getitem2)
memset(&item_tmp,0,sizeof(item_tmp));
if (item_data == NULL)
return -1;
- if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR){
+ if(item_data->type==IT_WEAPON || item_data->type==IT_ARMOR) {
if(ref > MAX_REFINE) ref = MAX_REFINE;
}
else if(item_data->type==IT_PETEGG) {
@@ -6230,7 +6205,7 @@ BUILDIN(getitem2)
iden = 1;
ref = attr = 0;
}
-
+
item_tmp.nameid=nameid;
if(!flag)
item_tmp.identify=iden;
@@ -6243,13 +6218,13 @@ BUILDIN(getitem2)
item_tmp.card[1]=(short)c2;
item_tmp.card[2]=(short)c3;
item_tmp.card[3]=(short)c4;
-
+
//Check if it's stackable.
if (!itemdb->isstackable(nameid))
get_count = 1;
else
get_count = amount;
-
+
for (i = 0; i < amount; i += get_count) {
// if not pet egg
if (!pet->create_egg(sd, nameid)) {
@@ -6261,7 +6236,7 @@ BUILDIN(getitem2)
}
}
}
-
+
return true;
}
@@ -6269,23 +6244,17 @@ BUILDIN(getitem2)
* rentitem <item id>,<seconds>
* rentitem "<item name>",<seconds>
*------------------------------------------*/
-BUILDIN(rentitem)
-{
+BUILDIN(rentitem) {
struct map_session_data *sd;
- struct script_data *data;
struct item it;
int seconds;
int nameid = 0, flag;
-
- data = script_getdata(st,2);
- script->get_val(st,data);
-
+
if( (sd = script->rid2sd(st)) == NULL )
return true;
-
- if( data_isstring(data) )
- {
- const char *name = script->conv_str(st,data);
+
+ if( script_isstringtype(st, 2) ) {
+ const char *name = script_getstr(st, 2);
struct item_data *itd = itemdb->search_name(name);
if( itd == NULL )
{
@@ -6293,35 +6262,27 @@ BUILDIN(rentitem)
return false;
}
nameid = itd->nameid;
- }
- else if( data_isint(data) )
- {
- nameid = script->conv_num(st,data);
- if( nameid <= 0 || !itemdb->exists(nameid) )
- {
+ } else {
+ nameid = script_getnum(st, 2);
+ if( nameid <= 0 || !itemdb->exists(nameid) ) {
ShowError("buildin_rentitem: Nonexistant item %d requested.\n", nameid);
return false;
}
}
- else
- {
- ShowError("buildin_rentitem: invalid data type for argument #1 (%d).\n", data->type);
- return false;
- }
-
+
seconds = script_getnum(st,3);
memset(&it, 0, sizeof(it));
it.nameid = nameid;
it.identify = 1;
it.expire_time = (unsigned int)(time(NULL) + seconds);
it.bound = 0;
-
+
if( (flag = pc->additem(sd, &it, 1, LOG_TYPE_SCRIPT)) )
{
clif->additem(sd, 0, 0, flag);
return false;
}
-
+
return true;
}
@@ -6331,53 +6292,48 @@ BUILDIN(rentitem)
* Returned Qty is always 1, only works on equip-able
* equipment
*------------------------------------------*/
-BUILDIN(getnameditem)
-{
+BUILDIN(getnameditem) {
int nameid;
struct item item_tmp;
TBL_PC *sd, *tsd;
- struct script_data *data;
-
+
sd = script->rid2sd(st);
- if (sd == NULL)
- { //Player not attached!
+ if (sd == NULL) {
+ //Player not attached!
script_pushint(st,0);
return true;
}
-
- data=script_getdata(st,2);
- script->get_val(st,data);
- if( data_isstring(data) ){
- const char *name=script->conv_str(st,data);
+
+ if( script_isstringtype(st, 2) ) {
+ const char *name = script_getstr(st, 2);
struct item_data *item_data = itemdb->search_name(name);
- if( item_data == NULL)
- { //Failed
+ if( item_data == NULL) {
+ //Failed
script_pushint(st,0);
return true;
}
nameid = item_data->nameid;
- }else
- nameid = script->conv_num(st,data);
-
- if(!itemdb->exists(nameid)/* || itemdb->isstackable(nameid)*/)
- { //Even though named stackable items "could" be risky, they are required for certain quests.
+ } else {
+ nameid = script_getnum(st, 2);
+ }
+
+ if(!itemdb->exists(nameid)/* || itemdb->isstackable(nameid)*/) {
+ //Even though named stackable items "could" be risky, they are required for certain quests.
script_pushint(st,0);
return true;
}
-
- data=script_getdata(st,3);
- script->get_val(st,data);
- if( data_isstring(data) ) //Char Name
- tsd=map->nick2sd(script->conv_str(st,data));
+
+ if( script_isstringtype(st, 3) ) //Char Name
+ tsd=map->nick2sd(script_getstr(st, 3));
else //Char Id was given
- tsd=map->charid2sd(script->conv_num(st,data));
-
- if( tsd == NULL )
- { //Failed
+ tsd=map->charid2sd(script_getnum(st, 3));
+
+ if( tsd == NULL ) {
+ //Failed
script_pushint(st,0);
return true;
}
-
+
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid=nameid;
item_tmp.amount=1;
@@ -6387,9 +6343,9 @@ BUILDIN(getnameditem)
item_tmp.card[3]=tsd->status.char_id >> 16;
if(pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT)) {
script_pushint(st,0);
- return true; //Failed to add item, we will not drop if they don't fit
+ return true; //Failed to add item, we will not drop if they don't fit
}
-
+
script_pushint(st,1);
return true;
}
@@ -6401,7 +6357,7 @@ BUILDIN(getnameditem)
BUILDIN(grouprandomitem) {
struct item_data *data;
int nameid;
-
+
if( script_hasdata(st, 2) )
nameid = script_getnum(st, 2);
else if ( script->current_item_id )
@@ -6411,7 +6367,7 @@ BUILDIN(grouprandomitem) {
script_pushint(st, 0);
return true;
}
-
+
if( !(data = itemdb->exists(nameid)) ) {
ShowWarning("buildin_grouprandomitem: unknown item id %d\n",nameid);
script_pushint(st, 0);
@@ -6421,7 +6377,7 @@ BUILDIN(grouprandomitem) {
} else {
script_pushint(st, itemdb->group_item(data->group));
}
-
+
return true;
}
@@ -6434,29 +6390,26 @@ BUILDIN(makeitem)
int x,y,m;
const char *mapname;
struct item item_tmp;
- struct script_data *data;
struct item_data *item_data;
- data=script_getdata(st,2);
- script->get_val(st,data);
- if( data_isstring(data) ){
- const char *name=script->conv_str(st,data);
+ if( script_isstringtype(st, 2) ) {
+ const char *name = script_getstr(st, 2);
if( (item_data = itemdb->search_name(name)) )
nameid=item_data->nameid;
else
nameid=UNKNOWN_ITEM_ID;
} else {
- nameid=script->conv_num(st,data);
- if( nameid <= 0 || !(item_data = itemdb->exists(nameid)) ){
+ nameid = script_getnum(st, 2);
+ if( nameid <= 0 || !(item_data = itemdb->exists(nameid)) ) {
ShowError("makeitem: Nonexistant item %d requested.\n", nameid);
return false; //No item created.
}
}
- amount=script_getnum(st,3);
- mapname =script_getstr(st,4);
- x =script_getnum(st,5);
- y =script_getnum(st,6);
-
+ amount = script_getnum(st,3);
+ mapname = script_getstr(st,4);
+ x = script_getnum(st,5);
+ y = script_getnum(st,6);
+
if(strcmp(mapname,"this")==0) {
TBL_PC *sd;
sd = script->rid2sd(st);
@@ -6464,22 +6417,22 @@ BUILDIN(makeitem)
m=sd->bl.m;
} else
m=map->mapname2mapid(mapname);
-
+
if( m == -1 ) {
ShowError("makeitem: creating map on unexistent map '%s'!\n", mapname);
return false;
}
-
-
+
+
memset(&item_tmp,0,sizeof(item_tmp));
item_tmp.nameid=nameid;
if(!flag)
item_tmp.identify=1;
else
item_tmp.identify=itemdb->isidentified2(item_data);
-
+
map->addflooritem(&item_tmp,amount,m,x,y,0,0,0,0);
-
+
return true;
}
@@ -6491,9 +6444,9 @@ void buildin_delitem_delete(struct map_session_data* sd, int idx, int* amount, b
{
int delamount;
struct item* inv = &sd->status.inventory[idx];
-
+
delamount = ( amount[0] < inv->amount ) ? amount[0] : inv->amount;
-
+
if( delete_items )
{
if( sd->inventory_data[idx]->type == IT_PETEGG && inv->card[0] == CARD0_PET )
@@ -6502,7 +6455,7 @@ void buildin_delitem_delete(struct map_session_data* sd, int idx, int* amount, b
}
pc->delitem(sd, idx, delamount, 0, 0, LOG_TYPE_SCRIPT);
}
-
+
amount[0]-= delamount;
}
@@ -6517,10 +6470,10 @@ bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool e
bool delete_items = false;
int i, amount, important;
struct item* inv;
-
+
// prefer always non-equipped items
it->equip = 0;
-
+
// when searching for nameid only, prefer additionally
if( !exact_match )
{
@@ -6529,28 +6482,28 @@ bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool e
// card-less items
memset(it->card, 0, sizeof(it->card));
}
-
+
for(;;)
{
amount = it->amount;
important = 0;
-
+
// 1st pass -- less important items / exact match
for( i = 0; amount && i < ARRAYLENGTH(sd->status.inventory); i++ )
{
inv = &sd->status.inventory[i];
-
+
if( !inv->nameid || !sd->inventory_data[i] || inv->nameid != it->nameid )
{// wrong/invalid item
continue;
}
-
+
if( inv->equip != it->equip || inv->refine != it->refine )
{// not matching attributes
important++;
continue;
}
-
+
if( exact_match )
{
if( inv->identify != it->identify || inv->attribute != it->attribute || memcmp(inv->card, it->card, sizeof(inv->card)) )
@@ -6573,11 +6526,11 @@ bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool e
continue;
}
}
-
+
// count / delete item
script->buildin_delitem_delete(sd, i, &amount, delete_items);
}
-
+
// 2nd pass -- any matching item
if( amount == 0 || important == 0 )
{// either everything was already consumed or no items were skipped
@@ -6586,17 +6539,17 @@ bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool e
else for( i = 0; amount && i < ARRAYLENGTH(sd->status.inventory); i++ )
{
inv = &sd->status.inventory[i];
-
+
if( !inv->nameid || !sd->inventory_data[i] || inv->nameid != it->nameid )
{// wrong/invalid item
continue;
}
-
+
if( sd->inventory_data[i]->type == IT_PETEGG && inv->card[0] == CARD0_PET && intif->CheckForCharServer() )
{// pet which cannot be deleted
continue;
}
-
+
if( exact_match )
{
if( inv->refine != it->refine || inv->identify != it->identify || inv->attribute != it->attribute || memcmp(inv->card, it->card, sizeof(inv->card)) )
@@ -6604,11 +6557,11 @@ bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool e
continue;
}
}
-
+
// count / delete item
script->buildin_delitem_delete(sd, i, &amount, delete_items);
}
-
+
if( amount )
{// not enough items
return false;
@@ -6630,12 +6583,10 @@ bool buildin_delitem_search(struct map_session_data* sd, struct item* it, bool e
///
/// delitem <item id>,<amount>{,<account id>}
/// delitem "<item name>",<amount>{,<account id>}
-BUILDIN(delitem)
-{
+BUILDIN(delitem) {
TBL_PC *sd;
struct item it;
- struct script_data *data;
-
+
if( script_hasdata(st,4) )
{
int account_id = script_getnum(st,4);
@@ -6653,24 +6604,18 @@ BUILDIN(delitem)
if( sd == NULL )
return true;
}
-
- data = script_getdata(st,2);
- script->get_val(st,data);
- if( data_isstring(data) )
- {
- const char* item_name = script->conv_str(st,data);
+
+ if( script_isstringtype(st, 2) ) {
+ const char* item_name = script_getstr(st, 2);
struct item_data* id = itemdb->search_name(item_name);
- if( id == NULL )
- {
+ if( id == NULL ) {
ShowError("script:delitem: unknown item \"%s\".\n", item_name);
st->state = END;
return false;
}
it.nameid = id->nameid;// "<item name>"
- }
- else
- {
- it.nameid = script->conv_num(st,data);// <item id>
+ } else {
+ it.nameid = script_getnum(st, 2);// <item id>
if( !itemdb->exists( it.nameid ) )
{
ShowError("script:delitem: unknown item \"%d\".\n", it.nameid);
@@ -6678,17 +6623,17 @@ BUILDIN(delitem)
return false;
}
}
-
+
it.amount=script_getnum(st,3);
-
+
if( it.amount <= 0 )
return true;// nothing to do
-
+
if( script->buildin_delitem_search(sd, &it, false) )
{// success
return true;
}
-
+
ShowError("script:delitem: failed to delete %d items (AID=%d item_id=%d).\n", it.amount, sd->status.account_id, it.nameid);
st->state = END;
clif->scriptclose(sd, st->oid);
@@ -6702,8 +6647,7 @@ BUILDIN(delitem)
BUILDIN(delitem2) {
TBL_PC *sd;
struct item it;
- struct script_data *data;
-
+
if( script_hasdata(st,11) ) {
int account_id = script_getnum(st,11);
sd = map->id2sd(account_id); // <account id>
@@ -6719,32 +6663,25 @@ BUILDIN(delitem2) {
if( sd == NULL )
return true;
}
-
- data = script_getdata(st,2);
- script->get_val(st,data);
- if( data_isstring(data) )
- {
- const char* item_name = script->conv_str(st,data);
+
+ if( script_isstringtype(st, 2) ) {
+ const char* item_name = script_getstr(st, 2);
struct item_data* id = itemdb->search_name(item_name);
- if( id == NULL )
- {
+ if( id == NULL ) {
ShowError("script:delitem2: unknown item \"%s\".\n", item_name);
st->state = END;
return false;
}
it.nameid = id->nameid;// "<item name>"
- }
- else
- {
- it.nameid = script->conv_num(st,data);// <item id>
- if( !itemdb->exists( it.nameid ) )
- {
+ } else {
+ it.nameid = script_getnum(st, 2);// <item id>
+ if( !itemdb->exists( it.nameid ) ) {
ShowError("script:delitem: unknown item \"%d\".\n", it.nameid);
st->state = END;
return false;
}
}
-
+
it.amount=script_getnum(st,3);
it.identify=script_getnum(st,4);
it.refine=script_getnum(st,5);
@@ -6753,15 +6690,15 @@ BUILDIN(delitem2) {
it.card[1]=(short)script_getnum(st,8);
it.card[2]=(short)script_getnum(st,9);
it.card[3]=(short)script_getnum(st,10);
-
+
if( it.amount <= 0 )
return true;// nothing to do
-
+
if( script->buildin_delitem_search(sd, &it, true) )
{// success
return true;
}
-
+
ShowError("script:delitem2: failed to delete %d items (AID=%d item_id=%d).\n", it.amount, sd->status.account_id, it.nameid);
st->state = END;
clif->scriptclose(sd, st->oid);
@@ -6796,47 +6733,47 @@ BUILDIN(disableitemuse)
BUILDIN(readparam) {
int type;
TBL_PC *sd;
-
+
type=script_getnum(st,2);
if( script_hasdata(st,3) )
sd=map->nick2sd(script_getstr(st,3));
else
sd=script->rid2sd(st);
-
- if(sd==NULL){
+
+ if(sd==NULL) {
script_pushint(st,-1);
return true;
}
-
+
script_pushint(st,pc->readparam(sd,type));
-
+
return true;
}
/*==========================================
* Return charid identification
* return by @num :
- * 0 : char_id
- * 1 : party_id
- * 2 : guild_id
- * 3 : account_id
- * 4 : bg_id
+ * 0 : char_id
+ * 1 : party_id
+ * 2 : guild_id
+ * 3 : account_id
+ * 4 : bg_id
*------------------------------------------*/
BUILDIN(getcharid) {
int num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
if( script_hasdata(st,3) )
sd=map->nick2sd(script_getstr(st,3));
else
sd=script->rid2sd(st);
-
- if(sd==NULL){
- script_pushint(st,0); //return 0, according docs
+
+ if(sd==NULL) {
+ script_pushint(st,0); //return 0, according docs
return true;
}
-
+
switch( num ) {
case 0: script_pushint(st,sd->status.char_id); break;
case 1: script_pushint(st,sd->status.party_id); break;
@@ -6848,7 +6785,7 @@ BUILDIN(getcharid) {
script_pushint(st,0);
break;
}
-
+
return true;
}
/*==========================================
@@ -6858,7 +6795,7 @@ BUILDIN(getnpcid)
{
int num = script_getnum(st,2);
struct npc_data* nd = NULL;
-
+
if( script_hasdata(st,3) )
{// unique npc name
if( ( nd = npc->name2id(script_getstr(st,3)) ) == NULL )
@@ -6868,7 +6805,7 @@ BUILDIN(getnpcid)
return false;
}
}
-
+
switch (num) {
case 0:
script_pushint(st,nd ? nd->bl.id : st->oid);
@@ -6878,7 +6815,7 @@ BUILDIN(getnpcid)
script_pushint(st,0);
return false;
}
-
+
return true;
}
@@ -6890,9 +6827,9 @@ BUILDIN(getpartyname)
{
int party_id;
struct party_data* p;
-
+
party_id = script_getnum(st,2);
-
+
if( ( p = party->search(party_id) ) != NULL )
{
script_pushstrcopy(st,p->party.name);
@@ -6908,23 +6845,23 @@ BUILDIN(getpartyname)
* Get the information of the members of a party by type
* @party_id, @type
* return by @type :
- * - : nom des membres
- * 1 : char_id des membres
- * 2 : account_id des membres
+ * - : nom des membres
+ * 1 : char_id des membres
+ * 2 : account_id des membres
*------------------------------------------*/
BUILDIN(getpartymember)
{
struct party_data *p;
int i,j=0,type=0;
-
+
p=party->search(script_getnum(st,2));
-
+
if( script_hasdata(st,3) )
- type=script_getnum(st,3);
-
- if(p!=NULL){
- for(i=0;i<MAX_PARTY;i++){
- if(p->party.member[i].account_id){
+ type=script_getnum(st,3);
+
+ if(p!=NULL) {
+ for(i=0;i<MAX_PARTY;i++) {
+ if(p->party.member[i].account_id) {
switch (type) {
case 2:
mapreg->setreg(reference_uid(script->add_str("$@partymemberaid"), j),p->party.member[i].account_id);
@@ -6940,7 +6877,7 @@ BUILDIN(getpartymember)
}
}
mapreg->setreg(script->add_str("$@partymembercount"),j);
-
+
return true;
}
@@ -6952,16 +6889,16 @@ BUILDIN(getpartyleader)
{
int party_id, type = 0, i=0;
struct party_data *p;
-
+
party_id=script_getnum(st,2);
if( script_hasdata(st,3) )
- type=script_getnum(st,3);
-
+ type=script_getnum(st,3);
+
p=party->search(party_id);
-
+
if (p) //Search leader
for(i = 0; i < MAX_PARTY && !p->party.member[i].leader; i++);
-
+
if (!p || i == MAX_PARTY) { //leader not found
if (type)
script_pushint(st,-1);
@@ -6969,7 +6906,7 @@ BUILDIN(getpartyleader)
script_pushconststr(st,"null");
return true;
}
-
+
switch (type) {
case 1: script_pushint(st,p->party.member[i].account_id); break;
case 2: script_pushint(st,p->party.member[i].char_id); break;
@@ -6989,9 +6926,9 @@ BUILDIN(getguildname)
{
int guild_id;
struct guild* g;
-
+
guild_id = script_getnum(st,2);
-
+
if( ( g = guild->search(guild_id) ) != NULL )
{
script_pushstrcopy(st,g->name);
@@ -7011,9 +6948,9 @@ BUILDIN(getguildmaster)
{
int guild_id;
struct guild* g;
-
+
guild_id = script_getnum(st,2);
-
+
if( ( g = guild->search(guild_id) ) != NULL )
{
script_pushstrcopy(st,g->member[0].name);
@@ -7029,9 +6966,9 @@ BUILDIN(getguildmasterid)
{
int guild_id;
struct guild* g;
-
+
guild_id = script_getnum(st,2);
-
+
if( ( g = guild->search(guild_id) ) != NULL )
{
script_pushint(st,g->member[0].char_id);
@@ -7046,11 +6983,11 @@ BUILDIN(getguildmasterid)
/*==========================================
* Get char string information by type :
* Return by @type :
- * 0 : char_name
- * 1 : party_name or ""
- * 2 : guild_name or ""
- * 3 : map_name
- * - : ""
+ * 0 : char_name
+ * 1 : party_name or ""
+ * 2 : guild_name or ""
+ * 3 : map_name
+ * - : ""
*------------------------------------------*/
BUILDIN(strcharinfo)
{
@@ -7058,14 +6995,14 @@ BUILDIN(strcharinfo)
int num;
struct guild* g;
struct party_data* p;
-
+
sd=script->rid2sd(st);
if (!sd) { //Avoid crashing....
script_pushconststr(st,"");
return true;
}
num=script_getnum(st,2);
- switch(num){
+ switch(num) {
case 0:
script_pushstrcopy(st,sd->status.name);
break;
@@ -7091,32 +7028,32 @@ BUILDIN(strcharinfo)
script_pushconststr(st,"");
break;
}
-
+
return true;
}
/*==========================================
* Get npc string information by type
* return by @type:
- * 0 : name
- * 1 : str#
- * 2 : #str
- * 3 : ::str
- * 4 : map name
+ * 0 : name
+ * 1 : str#
+ * 2 : #str
+ * 3 : ::str
+ * 4 : map name
*------------------------------------------*/
BUILDIN(strnpcinfo) {
TBL_NPC* nd;
int num;
char *buf,*name=NULL;
-
+
nd = map->id2nd(st->oid);
if (!nd) {
script_pushconststr(st, "");
return true;
}
-
+
num = script_getnum(st,2);
- switch(num){
+ switch(num) {
case 0: // display name
name = aStrdup(nd->name);
break;
@@ -7139,12 +7076,12 @@ BUILDIN(strnpcinfo) {
name = aStrdup(map->list[nd->bl.m].name);
break;
}
-
+
if(name)
script_pushstr(st, name);
else
script_pushconststr(st, "");
-
+
return true;
}
@@ -7156,18 +7093,18 @@ BUILDIN(getequipid)
int i, num;
TBL_PC* sd;
struct item_data* item;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
num = script_getnum(st,2) - 1;
if( num < 0 || num >= ARRAYLENGTH(script->equip) )
{
script_pushint(st,-1);
return true;
}
-
+
// get inventory position of item
i = pc->checkequip(sd,script->equip[num]);
if( i < 0 )
@@ -7175,13 +7112,13 @@ BUILDIN(getequipid)
script_pushint(st,-1);
return true;
}
-
+
item = sd->inventory_data[i];
if( item != 0 )
script_pushint(st,item->nameid);
else
script_pushint(st,0);
-
+
return true;
}
@@ -7194,18 +7131,18 @@ BUILDIN(getequipname)
int i, num;
TBL_PC* sd;
struct item_data* item;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
num = script_getnum(st,2) - 1;
if( num < 0 || num >= ARRAYLENGTH(script->equip) )
{
script_pushconststr(st,"");
return true;
}
-
+
// get inventory position of item
i = pc->checkequip(sd,script->equip[num]);
if( i < 0 )
@@ -7213,13 +7150,13 @@ BUILDIN(getequipname)
script_pushconststr(st,"");
return true;
}
-
+
item = sd->inventory_data[i];
if( item != 0 )
script_pushstrcopy(st,item->jname);
else
script_pushconststr(st,"");
-
+
return true;
}
@@ -7230,24 +7167,24 @@ BUILDIN(getbrokenid)
{
int i,num,id=0,brokencounter=0;
TBL_PC *sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
num=script_getnum(st,2);
for(i=0; i<MAX_INVENTORY; i++) {
- if(sd->status.inventory[i].attribute){
+ if(sd->status.inventory[i].attribute) {
brokencounter++;
- if(num==brokencounter){
+ if(num==brokencounter) {
id=sd->status.inventory[i].nameid;
break;
}
}
}
-
+
script_pushint(st,id);
-
+
return true;
}
@@ -7259,16 +7196,16 @@ BUILDIN(repair)
int i,num;
int repaircounter=0;
TBL_PC *sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
num=script_getnum(st,2);
for(i=0; i<MAX_INVENTORY; i++) {
- if(sd->status.inventory[i].attribute){
+ if(sd->status.inventory[i].attribute) {
repaircounter++;
- if(num==repaircounter){
+ if(num==repaircounter) {
sd->status.inventory[i].attribute=0;
clif->equiplist(sd);
clif->produce_effect(sd, 0, sd->status.inventory[i].nameid);
@@ -7277,7 +7214,7 @@ BUILDIN(repair)
}
}
}
-
+
return true;
}
@@ -7288,11 +7225,11 @@ BUILDIN(repairall)
{
int i, repaircounter = 0;
TBL_PC *sd;
-
+
sd = script->rid2sd(st);
if(sd == NULL)
return true;
-
+
for(i = 0; i < MAX_INVENTORY; i++)
{
if(sd->status.inventory[i].nameid && sd->status.inventory[i].attribute)
@@ -7302,13 +7239,13 @@ BUILDIN(repairall)
repaircounter++;
}
}
-
+
if(repaircounter)
{
clif->misceffect(&sd->bl, 3);
clif->equiplist(sd);
}
-
+
return true;
}
@@ -7319,15 +7256,15 @@ BUILDIN(getequipisequiped)
{
int i = -1,num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
-
+
if(i >= 0)
script_pushint(st,1);
else
@@ -7339,78 +7276,78 @@ BUILDIN(getequipisequiped)
* Chk if the player have something equiped at pos
* if so chk if this item ain't marked not refinable or rental
* return (npc)
- * 1 : true
- * 0 : false
+ * 1 : true
+ * 0 : false
*------------------------------------------*/
BUILDIN(getequipisenableref)
{
int i = -1,num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if( num > 0 && num <= ARRAYLENGTH(script->equip) )
i = pc->checkequip(sd,script->equip[num-1]);
if( i >= 0 && sd->inventory_data[i] && !sd->inventory_data[i]->flag.no_refine && !sd->status.inventory[i].expire_time )
script_pushint(st,1);
else
script_pushint(st,0);
-
+
return true;
}
/*==========================================
* Chk if the item equiped at pos is identify (huh ?)
* return (npc)
- * 1 : true
- * 0 : false
+ * 1 : true
+ * 0 : false
*------------------------------------------*/
BUILDIN(getequipisidentify)
{
int i = -1,num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0)
script_pushint(st,sd->status.inventory[i].identify);
else
script_pushint(st,0);
-
+
return true;
}
/*==========================================
* Get the item refined value at pos
* return (npc)
- * x : refine amount
- * 0 : false (not refined)
+ * x : refine amount
+ * 0 : false (not refined)
*------------------------------------------*/
BUILDIN(getequiprefinerycnt)
{
int i = -1,num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0)
script_pushint(st,sd->status.inventory[i].refine);
else
script_pushint(st,0);
-
+
return true;
}
@@ -7418,51 +7355,51 @@ BUILDIN(getequiprefinerycnt)
* Get the weapon level value at pos
* (pos should normally only be EQI_HAND_L or EQI_HAND_R)
* return (npc)
- * x : weapon level
- * 0 : false
+ * x : weapon level
+ * 0 : false
*------------------------------------------*/
BUILDIN(getequipweaponlv)
{
int i = -1,num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0 && sd->inventory_data[i])
script_pushint(st,sd->inventory_data[i]->wlv);
else
script_pushint(st,0);
-
+
return true;
}
/*==========================================
* Get the item refine chance (from refine.txt) for item at pos
* return (npc)
- * x : refine chance
- * 0 : false (max refine level or unequip..)
+ * x : refine chance
+ * 0 : false (max refine level or unequip..)
*------------------------------------------*/
BUILDIN(getequippercentrefinery) {
int i = -1,num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0 && sd->status.inventory[i].nameid && sd->status.inventory[i].refine < MAX_REFINE)
script_pushint(st,status->get_refine_chance(itemdb_wlv(sd->status.inventory[i].nameid), (int)sd->status.inventory[i].refine));
else
script_pushint(st,0);
-
+
return true;
}
@@ -7473,40 +7410,40 @@ BUILDIN(successrefitem)
{
int i=-1,num,ep;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0) {
ep=sd->status.inventory[i].equip;
-
+
//Logs items, got from (N)PC scripts [Lupus]
logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]);
-
+
if (sd->status.inventory[i].refine >= MAX_REFINE)
return true;
-
+
sd->status.inventory[i].refine++;
pc->unequipitem(sd,i,2); // status calc will happen in pc->equipitem() below
-
+
clif->refine(sd->fd,0,i,sd->status.inventory[i].refine);
clif->delitem(sd,i,1,3);
-
+
//Logs items, got from (N)PC scripts [Lupus]
logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i],sd->inventory_data[i]);
-
+
clif->additem(sd,i,1,0);
pc->equipitem(sd,i,ep);
clif->misceffect(&sd->bl,3);
if(sd->status.inventory[i].refine == 10 &&
sd->status.inventory[i].card[0] == CARD0_FORGE &&
sd->status.char_id == (int)MakeDWord(sd->status.inventory[i].card[2],sd->status.inventory[i].card[3])
- ){ // Fame point system [DracoRPG]
- switch (sd->inventory_data[i]->wlv){
+ ) { // Fame point system [DracoRPG]
+ switch (sd->inventory_data[i]->wlv) {
case 1:
pc->addfame(sd,1); // Success to refine to +10 a lv1 weapon you forged = +1 fame point
break;
@@ -7519,7 +7456,7 @@ BUILDIN(successrefitem)
}
}
}
-
+
return true;
}
@@ -7530,24 +7467,24 @@ BUILDIN(failedrefitem)
{
int i=-1,num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0) {
sd->status.inventory[i].refine = 0;
pc->unequipitem(sd,i,3); //recalculate bonus
clif->refine(sd->fd,1,i,sd->status.inventory[i].refine); //notify client of failure
-
+
pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
-
- clif->misceffect(&sd->bl,2); // display failure effect
+
+ clif->misceffect(&sd->bl,2); // display failure effect
}
-
+
return true;
}
@@ -7558,37 +7495,37 @@ BUILDIN(downrefitem)
{
int i = -1,num,ep, down = 1;
TBL_PC *sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
num = script_getnum(st,2);
if( script_hasdata(st, 3) )
down = script_getnum(st, 3);
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i = pc->checkequip(sd,script->equip[num-1]);
if(i >= 0) {
ep = sd->status.inventory[i].equip;
-
+
//Logs items, got from (N)PC scripts [Lupus]
logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]);
-
+
pc->unequipitem(sd,i,2); // status calc will happen in pc->equipitem() below
sd->status.inventory[i].refine -= down;
sd->status.inventory[i].refine = cap_value( sd->status.inventory[i].refine, 0, MAX_REFINE);
clif->refine(sd->fd,2,i,sd->status.inventory[i].refine);
clif->delitem(sd,i,1,3);
-
+
//Logs items, got from (N)PC scripts [Lupus]
logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i],sd->inventory_data[i]);
-
+
clif->additem(sd,i,1,0);
pc->equipitem(sd,i,ep);
clif->misceffect(&sd->bl,2);
}
-
+
return true;
}
@@ -7599,19 +7536,19 @@ BUILDIN(delequip)
{
int i=-1,num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
if(i >= 0) {
pc->unequipitem(sd,i,3); //recalculate bonus
pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
}
-
+
return true;
}
@@ -7622,14 +7559,14 @@ BUILDIN(statusup)
{
int type;
TBL_PC *sd;
-
+
type=script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
pc->statusup(sd,type);
-
+
return true;
}
/*==========================================
@@ -7639,15 +7576,15 @@ BUILDIN(statusup2)
{
int type,val;
TBL_PC *sd;
-
+
type=script_getnum(st,2);
val=script_getnum(st,3);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
pc->statusup2(sd,type,val);
-
+
return true;
}
@@ -7658,8 +7595,7 @@ BUILDIN(statusup2)
/// bonus3 <bonus type>,<val1>,<val2>,<val3>;
/// bonus4 <bonus type>,<val1>,<val2>,<val3>,<val4>;
/// bonus5 <bonus type>,<val1>,<val2>,<val3>,<val4>,<val5>;
-BUILDIN(bonus)
-{
+BUILDIN(bonus) {
int type;
int val1;
int val2 = 0;
@@ -7667,11 +7603,11 @@ BUILDIN(bonus)
int val4 = 0;
int val5 = 0;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true; // no player attached
-
+
type = script_getnum(st,2);
switch( type ) {
case SP_AUTOSPELL:
@@ -7691,13 +7627,16 @@ BUILDIN(bonus)
case SP_FIXCASTRATE:
case SP_SKILL_USE_SP:
// these bonuses support skill names
- val1 = ( script_isstring(st,3) ? skill->name2id(script_getstr(st,3)) : script_getnum(st,3) );
- break;
+ if (script_isstringtype(st, 3)) {
+ val1 = skill->name2id(script_getstr(st, 3));
+ break;
+ }
+ // else fall through
default:
val1 = script_getnum(st,3);
break;
}
-
+
switch( script_lastdata(st)-2 ) {
case 1:
pc->bonus(sd, type, val1);
@@ -7712,21 +7651,21 @@ BUILDIN(bonus)
pc->bonus3(sd, type, val1, val2, val3);
break;
case 4:
- if( type == SP_AUTOSPELL_ONSKILL && script_isstring(st,4) )
+ if( type == SP_AUTOSPELL_ONSKILL && script_isstringtype(st,4) )
val2 = skill->name2id(script_getstr(st,4)); // 2nd value can be skill name
else
val2 = script_getnum(st,4);
-
+
val3 = script_getnum(st,5);
val4 = script_getnum(st,6);
pc->bonus4(sd, type, val1, val2, val3, val4);
break;
case 5:
- if( type == SP_AUTOSPELL_ONSKILL && script_isstring(st,4) )
+ if( type == SP_AUTOSPELL_ONSKILL && script_isstringtype(st,4) )
val2 = skill->name2id(script_getstr(st,4)); // 2nd value can be skill name
else
val2 = script_getnum(st,4);
-
+
val3 = script_getnum(st,5);
val4 = script_getnum(st,6);
val5 = script_getnum(st,7);
@@ -7736,7 +7675,7 @@ BUILDIN(bonus)
ShowDebug("buildin_bonus: unexpected number of arguments (%d)\n", (script_lastdata(st) - 1));
break;
}
-
+
return true;
}
@@ -7746,25 +7685,25 @@ BUILDIN(autobonus) {
short atk_type = 0;
TBL_PC* sd;
const char *bonus_script, *other_script = NULL;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true; // no player attached
-
+
if( sd->state.autobonus&sd->status.inventory[status->current_equip_item_index].equip )
return true;
-
+
rate = script_getnum(st,3);
dur = script_getnum(st,4);
bonus_script = script_getstr(st,2);
if( !rate || !dur || !bonus_script )
return true;
-
+
if( script_hasdata(st,5) )
atk_type = script_getnum(st,5);
if( script_hasdata(st,6) )
other_script = script_getstr(st,6);
-
+
if( pc->addautobonus(sd->autobonus,ARRAYLENGTH(sd->autobonus),bonus_script,rate,dur,atk_type,other_script,
sd->status.inventory[status->current_equip_item_index].equip,false)
) {
@@ -7772,7 +7711,7 @@ BUILDIN(autobonus) {
if( other_script )
script->add_autobonus(other_script);
}
-
+
return true;
}
@@ -7782,25 +7721,25 @@ BUILDIN(autobonus2) {
short atk_type = 0;
TBL_PC* sd;
const char *bonus_script, *other_script = NULL;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true; // no player attached
-
+
if( sd->state.autobonus&sd->status.inventory[status->current_equip_item_index].equip )
return true;
-
+
rate = script_getnum(st,3);
dur = script_getnum(st,4);
bonus_script = script_getstr(st,2);
if( !rate || !dur || !bonus_script )
return true;
-
+
if( script_hasdata(st,5) )
atk_type = script_getnum(st,5);
if( script_hasdata(st,6) )
other_script = script_getstr(st,6);
-
+
if( pc->addautobonus(sd->autobonus2,ARRAYLENGTH(sd->autobonus2),bonus_script,rate,dur,atk_type,other_script,
sd->status.inventory[status->current_equip_item_index].equip,false)
) {
@@ -7808,7 +7747,7 @@ BUILDIN(autobonus2) {
if( other_script )
script->add_autobonus(other_script);
}
-
+
return true;
}
@@ -7817,24 +7756,24 @@ BUILDIN(autobonus3) {
short rate,atk_type;
TBL_PC* sd;
const char *bonus_script, *other_script = NULL;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true; // no player attached
-
+
if( sd->state.autobonus&sd->status.inventory[status->current_equip_item_index].equip )
return true;
-
+
rate = script_getnum(st,3);
dur = script_getnum(st,4);
- atk_type = ( script_isstring(st,5) ? skill->name2id(script_getstr(st,5)) : script_getnum(st,5) );
+ atk_type = ( script_isstringtype(st,5) ? skill->name2id(script_getstr(st,5)) : script_getnum(st,5) );
bonus_script = script_getstr(st,2);
if( !rate || !dur || !atk_type || !bonus_script )
return true;
-
+
if( script_hasdata(st,6) )
other_script = script_getstr(st,6);
-
+
if( pc->addautobonus(sd->autobonus3,ARRAYLENGTH(sd->autobonus3),bonus_script,rate,dur,atk_type,other_script,
sd->status.inventory[status->current_equip_item_index].equip,true)
) {
@@ -7842,7 +7781,7 @@ BUILDIN(autobonus3) {
if( other_script )
script->add_autobonus(other_script);
}
-
+
return true;
}
@@ -7856,23 +7795,22 @@ BUILDIN(autobonus3) {
/// skill <skill id>,<level>
/// skill "<skill name>",<level>,<flag>
/// skill "<skill name>",<level>
-BUILDIN(skill)
-{
+BUILDIN(skill) {
int id;
int level;
int flag = 1;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
- id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
level = script_getnum(st,3);
if( script_hasdata(st,4) )
flag = script_getnum(st,4);
pc->skill(sd, id, level, flag);
-
+
return true;
}
@@ -7885,23 +7823,22 @@ BUILDIN(skill)
/// addtoskill "<skill name>",<amount>
///
/// @see skill
-BUILDIN(addtoskill)
-{
+BUILDIN(addtoskill) {
int id;
int level;
int flag = 2;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
- id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
level = script_getnum(st,3);
if( script_hasdata(st,4) )
flag = script_getnum(st,4);
pc->skill(sd, id, level, flag);
-
+
return true;
}
@@ -7909,22 +7846,21 @@ BUILDIN(addtoskill)
///
/// guildskill <skill id>,<amount>;
/// guildskill "<skill name>",<amount>;
-BUILDIN(guildskill)
-{
+BUILDIN(guildskill) {
int id;
int level;
TBL_PC* sd;
int i;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
- id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
level = script_getnum(st,3);
for( i=0; i < level; i++ )
guild->skillup(sd, id);
-
+
return true;
}
@@ -7932,18 +7868,17 @@ BUILDIN(guildskill)
///
/// getskilllv(<skill id>) -> <level>
/// getskilllv("<skill name>") -> <level>
-BUILDIN(getskilllv)
-{
+BUILDIN(getskilllv) {
int id;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
- id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ id = ( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
script_pushint(st, pc->checkskill(sd,id));
-
+
return true;
}
@@ -7951,20 +7886,19 @@ BUILDIN(getskilllv)
///
/// getgdskilllv(<guild id>,<skill id>) -> <level>
/// getgdskilllv(<guild id>,"<skill name>") -> <level>
-BUILDIN(getgdskilllv)
-{
+BUILDIN(getgdskilllv) {
int guild_id;
uint16 skill_id;
struct guild* g;
-
+
guild_id = script_getnum(st,2);
- skill_id = ( script_isstring(st,3) ? skill->name2id(script_getstr(st,3)) : script_getnum(st,3) );
+ skill_id = ( script_isstringtype(st,3) ? skill->name2id(script_getstr(st,3)) : script_getnum(st,3) );
g = guild->search(guild_id);
if( g == NULL )
script_pushint(st, -1);
else
script_pushint(st, guild->checkskill(g,skill_id));
-
+
return true;
}
@@ -7985,13 +7919,13 @@ BUILDIN(basicskillcheck)
BUILDIN(getgmlevel)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
script_pushint(st, pc_get_group_level(sd));
-
+
return true;
}
@@ -8001,12 +7935,12 @@ BUILDIN(getgmlevel)
BUILDIN(getgroupid)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if (sd == NULL)
return false; // no player attached, report source
script_pushint(st, pc_get_group_id(sd));
-
+
return true;
}
@@ -8025,17 +7959,17 @@ BUILDIN(checkoption)
{
int option;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
option = script_getnum(st,2);
if( sd->sc.option&option )
script_pushint(st, 1);
else
script_pushint(st, 0);
-
+
return true;
}
@@ -8046,17 +7980,17 @@ BUILDIN(checkoption1)
{
int opt1;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
opt1 = script_getnum(st,2);
if( sd->sc.opt1 == opt1 )
script_pushint(st, 1);
else
script_pushint(st, 0);
-
+
return true;
}
@@ -8067,17 +8001,17 @@ BUILDIN(checkoption2)
{
int opt2;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
opt2 = script_getnum(st,2);
if( sd->sc.opt2&opt2 )
script_pushint(st, 1);
else
script_pushint(st, 0);
-
+
return true;
}
@@ -8093,28 +8027,28 @@ BUILDIN(setoption)
int option;
int flag = 1;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
option = script_getnum(st,2);
if( script_hasdata(st,3) )
flag = script_getnum(st,3);
- else if( !option ){// Request to remove everything.
+ else if( !option ) {// Request to remove everything.
flag = 0;
option = OPTION_FALCON|OPTION_RIDING;
#ifndef NEW_CARTS
option |= OPTION_CART;
#endif
}
- if( flag ){// Add option
+ if( flag ) {// Add option
if( option&OPTION_WEDDING && !battle_config.wedding_modifydisplay )
option &= ~OPTION_WEDDING;// Do not show the wedding sprites
pc->setoption(sd, sd->sc.option|option);
} else// Remove option
pc->setoption(sd, sd->sc.option&~option);
-
+
return true;
}
@@ -8126,16 +8060,16 @@ BUILDIN(setoption)
BUILDIN(checkcart)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( pc_iscarton(sd) )
script_pushint(st, 1);
else
script_pushint(st, 0);
-
+
return true;
}
@@ -8154,15 +8088,15 @@ BUILDIN(setcart)
{
int type = 1;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( script_hasdata(st,2) )
type = script_getnum(st,2);
pc->setcart(sd, type);
-
+
return true;
}
@@ -8174,16 +8108,16 @@ BUILDIN(setcart)
BUILDIN(checkfalcon)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( pc_isfalcon(sd) )
script_pushint(st, 1);
else
script_pushint(st, 0);
-
+
return true;
}
@@ -8196,16 +8130,16 @@ BUILDIN(setfalcon)
{
int flag = 1;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( script_hasdata(st,2) )
flag = script_getnum(st,2);
-
+
pc->setfalcon(sd, flag);
-
+
return true;
}
@@ -8217,16 +8151,16 @@ BUILDIN(setfalcon)
BUILDIN(checkriding)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( pc_isriding(sd) || pc_isridingwug(sd) || pc_isridingdragon(sd) )
script_pushint(st, 1);
else
script_pushint(st, 0);
-
+
return true;
}
@@ -8239,15 +8173,15 @@ BUILDIN(setriding)
{
int flag = 1;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( script_hasdata(st,2) )
flag = script_getnum(st,2);
pc->setriding(sd, flag);
-
+
return true;
}
@@ -8258,16 +8192,16 @@ BUILDIN(setriding)
BUILDIN(checkwug)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( pc_iswug(sd) || pc_isridingwug(sd) )
script_pushint(st, 1);
else
script_pushint(st, 0);
-
+
return true;
}
@@ -8278,16 +8212,16 @@ BUILDIN(checkwug)
BUILDIN(checkmadogear)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( pc_ismadogear(sd) )
script_pushint(st, 1);
else
script_pushint(st, 0);
-
+
return true;
}
@@ -8300,15 +8234,15 @@ BUILDIN(setmadogear)
{
int flag = 1;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
if( script_hasdata(st,2) )
flag = script_getnum(st,2);
pc->setmadogear(sd, flag);
-
+
return true;
}
@@ -8322,18 +8256,18 @@ BUILDIN(savepoint) {
short mapid;
const char* str;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached, report source
-
+
str = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
mapid = mapindex->name2id(str);
if( mapid )
pc->setsavepoint(sd, mapid, x, y);
-
+
return true;
}
@@ -8344,10 +8278,10 @@ BUILDIN(gettimetick) { /* Asgard Version */
int type;
time_t clock;
struct tm *t;
-
+
type=script_getnum(st,2);
-
- switch(type){
+
+ switch(type) {
case 2:
//type 2:(Get the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC
// from the system clock.)
@@ -8377,13 +8311,13 @@ BUILDIN(gettime) { /* Asgard Version */
int type;
time_t clock;
struct tm *t;
-
+
type=script_getnum(st,2);
-
+
time(&clock);
t=localtime(&clock);
-
- switch(type){
+
+ switch(type) {
case 1://Sec(0~59)
script_pushint(st,t->tm_sec);
break;
@@ -8424,14 +8358,14 @@ BUILDIN(gettimestr)
const char *fmtstr;
int maxlen;
time_t now = time(NULL);
-
+
fmtstr=script_getstr(st,2);
maxlen=script_getnum(st,3);
-
+
tmpstr=(char *)aMalloc((maxlen+1)*sizeof(char));
strftime(tmpstr,maxlen,fmtstr,localtime(&now));
tmpstr[maxlen]='\0';
-
+
script_pushstr(st,tmpstr);
return true;
}
@@ -8441,11 +8375,11 @@ BUILDIN(gettimestr)
*------------------------------------------*/
BUILDIN(openstorage) {
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
storage->open(sd);
return true;
}
@@ -8453,11 +8387,11 @@ BUILDIN(openstorage) {
BUILDIN(guildopenstorage) {
TBL_PC* sd;
int ret;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
ret = gstorage->open(sd);
script_pushint(st,ret);
return true;
@@ -8472,12 +8406,12 @@ BUILDIN(itemskill) {
int id;
int lv;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL || sd->ud.skilltimer != INVALID_TIMER )
return true;
-
- id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ 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
@@ -8498,11 +8432,11 @@ BUILDIN(produce)
{
int trigger;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
trigger=script_getnum(st,2);
clif->skill_produce_mix_list(sd, -1, trigger);
return true;
@@ -8514,11 +8448,11 @@ BUILDIN(cooking)
{
int trigger;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
trigger=script_getnum(st,2);
clif->cooking_list(sd, trigger, AM_PHARMACY, 1, 1);
return true;
@@ -8530,25 +8464,24 @@ BUILDIN(makepet)
{
TBL_PC* sd;
int id,pet_id;
-
+
id=script_getnum(st,2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
pet_id = pet->search_petDB_index(id, PET_CLASS);
-
+
if (pet_id < 0)
pet_id = pet->search_petDB_index(id, PET_EGG);
if (pet_id >= 0 && sd) {
sd->catch_target_class = pet->db[pet_id].class_;
- intif->create_pet(
- sd->status.account_id, sd->status.char_id,
- (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
- (short)pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
- 100, 0, 1, pet->db[pet_id].jname);
+ intif->create_pet(sd->status.account_id, sd->status.char_id,
+ (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv,
+ (short)pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate,
+ 100, 0, 1, pet->db[pet_id].jname);
}
-
+
return true;
}
/*==========================================
@@ -8559,23 +8492,23 @@ BUILDIN(getexp)
TBL_PC* sd;
int base=0,job=0;
double bonus;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
base=script_getnum(st,2);
job =script_getnum(st,3);
if(base<0 || job<0)
return true;
-
+
// bonus for npc-given exp
bonus = battle_config.quest_exp_rate / 100.;
base = (int) cap_value(base * bonus, 0, INT_MAX);
job = (int) cap_value(job * bonus, 0, INT_MAX);
-
+
pc->gainexp(sd, NULL, base, job, true);
-
+
return true;
}
@@ -8586,17 +8519,17 @@ BUILDIN(guildgetexp)
{
TBL_PC* sd;
int exp;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
exp = script_getnum(st,2);
if(exp < 0)
return true;
if(sd && sd->status.guild_id > 0)
guild->getexp (sd, exp);
-
+
return true;
}
@@ -8607,49 +8540,49 @@ BUILDIN(guildchangegm) {
TBL_PC *sd;
int guild_id;
const char *name;
-
+
guild_id = script_getnum(st,2);
name = script_getstr(st,3);
sd=map->nick2sd(name);
-
+
if (!sd)
script_pushint(st,0);
else
script_pushint(st,guild->gm_change(guild_id, sd));
-
+
return true;
}
/*==========================================
* Spawn a monster :
- @mapn,x,y : location
- @str : monster name
- @class_ : mob_id
- @amount : nb to spawn
- @event : event to attach to mob
+ * @mapn,x,y : location
+ * @str : monster name
+ * @class_ : mob_id
+ * @amount : nb to spawn
+ * @event : event to attach to mob
*------------------------------------------*/
BUILDIN(monster)
{
- const char* mapn = script_getstr(st,2);
- int x = script_getnum(st,3);
- int y = script_getnum(st,4);
- const char* str = script_getstr(st,5);
- int class_ = script_getnum(st,6);
- int amount = script_getnum(st,7);
- const char* event = "";
- unsigned int size = SZ_MEDIUM;
- unsigned int ai = AI_NONE;
+ const char *mapn = script_getstr(st,2);
+ int x = script_getnum(st,3);
+ int y = script_getnum(st,4);
+ const char *str = script_getstr(st,5);
+ int class_ = script_getnum(st,6);
+ int amount = script_getnum(st,7);
+ const char *event = "";
+ unsigned int size = SZ_MEDIUM;
+ unsigned int ai = AI_NONE;
int mob_id;
-
+
struct map_session_data* sd;
int16 m;
-
+
if (script_hasdata(st, 8))
{
event = script_getstr(st, 8);
script->check_event(st, event);
}
-
+
if (script_hasdata(st, 9))
{
size = script_getnum(st, 9);
@@ -8659,7 +8592,7 @@ BUILDIN(monster)
return false;
}
}
-
+
if (script_hasdata(st, 10))
{
ai = script_getnum(st, 10);
@@ -8669,15 +8602,15 @@ BUILDIN(monster)
return false;
}
}
-
+
if (class_ >= 0 && !mob->db_checkid(class_))
{
ShowWarning("buildin_monster: Attempted to spawn non-existing monster class %d\n", class_);
return false;
}
-
+
sd = map->id2sd(st->rid);
-
+
if (sd && strcmp(mapn, "this") == 0)
m = sd->bl.m;
else {
@@ -8685,7 +8618,7 @@ BUILDIN(monster)
ShowWarning("buildin_monster: Attempted to spawn monster class %d on non-existing map '%s'\n",class_, mapn);
return false;
}
-
+
if (map->list[m].flag.src4instance && st->instance_id >= 0) { // Try to redirect to the instance map, not the src map
if ((m = instance->mapid2imapid(m, st->instance_id)) < 0) {
ShowError("buildin_monster: Trying to spawn monster (%d) on instance map (%s) without instance attached.\n", class_, mapn);
@@ -8693,7 +8626,7 @@ BUILDIN(monster)
}
}
}
-
+
mob_id = mob->once_spawn(sd, m, x, y, str, class_, amount, event, size, ai);
script_pushint(st, mob_id);
return true;
@@ -8706,59 +8639,58 @@ BUILDIN(getmobdrops)
int class_ = script_getnum(st,2);
int i, j = 0;
struct mob_db *monster;
-
+
if( !mob->db_checkid(class_) )
{
script_pushint(st, 0);
return true;
}
-
+
monster = mob->db(class_);
-
+
for( i = 0; i < MAX_MOB_DROP; i++ )
{
if( monster->dropitem[i].nameid < 1 )
continue;
if( itemdb->exists(monster->dropitem[i].nameid) == NULL )
continue;
-
+
mapreg->setreg(reference_uid(script->add_str("$@MobDrop_item"), j), monster->dropitem[i].nameid);
mapreg->setreg(reference_uid(script->add_str("$@MobDrop_rate"), j), monster->dropitem[i].p);
-
+
j++;
}
-
+
mapreg->setreg(script->add_str("$@MobDrop_count"), j);
script_pushint(st, 1);
-
+
return true;
}
/*==========================================
* Same as monster but randomize location in x0,x1,y0,y1 area
*------------------------------------------*/
-BUILDIN(areamonster)
-{
- const char* mapn = script_getstr(st,2);
- int x0 = script_getnum(st,3);
- int y0 = script_getnum(st,4);
- int x1 = script_getnum(st,5);
- int y1 = script_getnum(st,6);
- const char* str = script_getstr(st,7);
- int class_ = script_getnum(st,8);
- int amount = script_getnum(st,9);
- const char* event = "";
- unsigned int size = SZ_MEDIUM;
- unsigned int ai = AI_NONE;
+BUILDIN(areamonster) {
+ const char *mapn = script_getstr(st,2);
+ int x0 = script_getnum(st,3);
+ int y0 = script_getnum(st,4);
+ int x1 = script_getnum(st,5);
+ int y1 = script_getnum(st,6);
+ const char *str = script_getstr(st,7);
+ int class_ = script_getnum(st,8);
+ int amount = script_getnum(st,9);
+ const char *event = "";
+ unsigned int size = SZ_MEDIUM;
+ unsigned int ai = AI_NONE;
int mob_id;
-
+
struct map_session_data* sd;
int16 m;
-
+
if (script_hasdata(st,10)) {
event = script_getstr(st, 10);
script->check_event(st, event);
}
-
+
if (script_hasdata(st, 11)) {
size = script_getnum(st, 11);
if (size > 3) {
@@ -8766,7 +8698,7 @@ BUILDIN(areamonster)
return false;
}
}
-
+
if (script_hasdata(st, 12)) {
ai = script_getnum(st, 12);
if (ai > 4) {
@@ -8774,9 +8706,9 @@ BUILDIN(areamonster)
return false;
}
}
-
+
sd = map->id2sd(st->rid);
-
+
if (sd && strcmp(mapn, "this") == 0)
m = sd->bl.m;
else {
@@ -8791,10 +8723,10 @@ BUILDIN(areamonster)
}
}
}
-
+
mob_id = mob->once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, amount, event, size, ai);
script_pushint(st, mob_id);
-
+
return true;
}
/*==========================================
@@ -8805,13 +8737,13 @@ int buildin_killmonster_sub_strip(struct block_list *bl,va_list ap)
TBL_MOB* md = (TBL_MOB*)bl;
char *event=va_arg(ap,char *);
int allflag=va_arg(ap,int);
-
+
md->state.npc_killmonster = 1;
-
- if(!allflag){
+
+ if(!allflag) {
if(strcmp(event,md->npc_event)==0)
status_kill(bl);
- }else{
+ } else {
if(!md->spawn)
status_kill(bl);
}
@@ -8823,11 +8755,11 @@ int buildin_killmonster_sub(struct block_list *bl,va_list ap)
TBL_MOB* md = (TBL_MOB*)bl;
char *event=va_arg(ap,char *);
int allflag=va_arg(ap,int);
-
- if(!allflag){
+
+ if(!allflag) {
if(strcmp(event,md->npc_event)==0)
status_kill(bl);
- }else{
+ } else {
if(!md->spawn)
status_kill(bl);
}
@@ -8842,20 +8774,20 @@ BUILDIN(killmonster) {
allflag = 1;
else
script->check_event(st, event);
-
+
if( (m=map->mapname2mapid(mapname))<0 )
return true;
-
+
if( map->list[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
-
+
if( script_hasdata(st,4) ) {
if ( script_getnum(st,4) == 1 ) {
map->foreachinmap(script->buildin_killmonster_sub, m, BL_MOB, event ,allflag);
return true;
}
}
-
+
map->freeblock_lock();
map->foreachinmap(script->buildin_killmonster_sub_strip, m, BL_MOB, event ,allflag);
map->freeblock_unlock();
@@ -8865,11 +8797,11 @@ BUILDIN(killmonster) {
int buildin_killmonsterall_sub_strip(struct block_list *bl,va_list ap)
{ //Strips the event from the mob if it's killed the old method.
struct mob_data *md;
-
+
md = BL_CAST(BL_MOB, bl);
if (md->npc_event[0])
md->npc_event[0] = 0;
-
+
status_kill(bl);
return 0;
}
@@ -8882,20 +8814,20 @@ BUILDIN(killmonsterall) {
const char *mapname;
int16 m;
mapname=script_getstr(st,2);
-
+
if( (m = map->mapname2mapid(mapname))<0 )
return true;
-
+
if( map->list[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
-
+
if( script_hasdata(st,3) ) {
if ( script_getnum(st,3) == 1 ) {
map->foreachinmap(script->buildin_killmonsterall_sub,m,BL_MOB);
return true;
}
}
-
+
map->foreachinmap(script->buildin_killmonsterall_sub_strip,m,BL_MOB);
return true;
}
@@ -8909,32 +8841,32 @@ BUILDIN(clone) {
int char_id,master_id=0,x,y, mode = 0, flag = 0, m;
unsigned int duration = 0;
const char *mapname, *event="";
-
+
mapname=script_getstr(st,2);
x=script_getnum(st,3);
y=script_getnum(st,4);
event=script_getstr(st,5);
char_id=script_getnum(st,6);
-
+
if( script_hasdata(st,7) )
master_id=script_getnum(st,7);
-
+
if( script_hasdata(st,8) )
mode=script_getnum(st,8);
-
+
if( script_hasdata(st,9) )
flag=script_getnum(st,9);
-
+
if( script_hasdata(st,10) )
duration=script_getnum(st,10);
-
+
script->check_event(st, event);
-
+
m = map->mapname2mapid(mapname);
if (m < 0) return true;
-
+
sd = map->charid2sd(char_id);
-
+
if (master_id) {
msd = map->charid2sd(master_id);
if (msd)
@@ -8946,7 +8878,7 @@ BUILDIN(clone) {
script_pushint(st,mob->clone_spawn(sd, m, x, y, event, master_id, mode, flag, 1000*duration));
else //Failed to create clone.
script_pushint(st,0);
-
+
return true;
}
/*==========================================
@@ -8955,12 +8887,12 @@ BUILDIN(doevent)
{
const char* event = script_getstr(st,2);
struct map_session_data* sd;
-
+
if( ( sd = script->rid2sd(st) ) == NULL )
{
return true;
}
-
+
script->check_event(st, event);
npc->event(sd, event, 0);
return true;
@@ -8981,9 +8913,8 @@ BUILDIN(donpcevent)
}
/// for Aegis compatibility
-/// basically a specialized 'donpcevent', with the event specified as two arguments instead of one
-BUILDIN(cmdothernpc) // Added by RoVeRT
-{
+/// basically a specialized 'donpcevent', with the event specified as two arguments instead of one [RoVeRT]
+BUILDIN(cmdothernpc) {
const char* npc_name = script_getstr(st,2);
const char* command = script_getstr(st,3);
char event[EVENT_NAME_LENGTH];
@@ -9000,12 +8931,12 @@ BUILDIN(addtimer)
int tick = script_getnum(st,2);
const char* event = script_getstr(st, 3);
TBL_PC* sd;
-
+
script->check_event(st, event);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
pc->addeventtimer(sd,tick,event);
return true;
}
@@ -9015,12 +8946,12 @@ BUILDIN(deltimer)
{
const char *event;
TBL_PC* sd;
-
+
event=script_getstr(st, 2);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
script->check_event(st, event);
pc->deleventtimer(sd,event);
return true;
@@ -9032,13 +8963,13 @@ BUILDIN(addtimercount)
const char *event;
int tick;
TBL_PC* sd;
-
+
event=script_getstr(st, 2);
tick=script_getnum(st,3);
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
script->check_event(st, event);
pc->addeventtimercount(sd,event,tick);
return true;
@@ -9050,17 +8981,16 @@ BUILDIN(initnpctimer)
{
struct npc_data *nd;
int flag = 0;
-
- if( script_hasdata(st,3) )
- { //Two arguments: NPC name and attach flag.
+
+ if( script_hasdata(st,3) ) {
+ //Two arguments: NPC name and attach flag.
nd = npc->name2id(script_getstr(st, 2));
flag = script_getnum(st,3);
- }
- else if( script_hasdata(st,2) )
- { //Check if argument is numeric (flag) or string (npc name)
+ } else if( script_hasdata(st,2) ) {
+ //Check if argument is numeric (flag) or string (npc name)
struct script_data *data;
data = script_getdata(st,2);
- script->get_val(st,data);
+ script->get_val(st,data); // dereference if it's a variable
if( data_isstring(data) ) //NPC name
nd = npc->name2id(script->conv_str(st, data));
else if( data_isint(data) ) {
@@ -9073,7 +9003,7 @@ BUILDIN(initnpctimer)
}
} else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( !nd )
return true;
if( flag ) //Attach
@@ -9083,7 +9013,7 @@ BUILDIN(initnpctimer)
return true;
nd->u.scr.rid = sd->bl.id;
}
-
+
nd->u.scr.timertick = 0;
npc->settimerevent_tick(nd,0);
npc->timerevent_start(nd, st->rid);
@@ -9095,17 +9025,16 @@ BUILDIN(startnpctimer)
{
struct npc_data *nd;
int flag = 0;
-
- if( script_hasdata(st,3) )
- { //Two arguments: NPC name and attach flag.
+
+ if( script_hasdata(st,3) ) {
+ //Two arguments: NPC name and attach flag.
nd = npc->name2id(script_getstr(st, 2));
flag = script_getnum(st,3);
- }
- else if( script_hasdata(st,2) )
- { //Check if argument is numeric (flag) or string (npc name)
+ } else if( script_hasdata(st,2) ) {
+ //Check if argument is numeric (flag) or string (npc name)
struct script_data *data;
data = script_getdata(st,2);
- script->get_val(st,data);
+ script->get_val(st,data); // dereference if it's a variable
if( data_isstring(data) ) //NPC name
nd = npc->name2id(script->conv_str(st, data));
else if( data_isint(data) ) {
@@ -9118,7 +9047,7 @@ BUILDIN(startnpctimer)
}
} else
nd=(struct npc_data *)map->id2bl(st->oid);
-
+
if( !nd )
return true;
if( flag ) //Attach
@@ -9128,7 +9057,7 @@ BUILDIN(startnpctimer)
return true;
nd->u.scr.rid = sd->bl.id;
}
-
+
npc->timerevent_start(nd, st->rid);
return true;
}
@@ -9137,17 +9066,16 @@ BUILDIN(startnpctimer)
BUILDIN(stopnpctimer) {
struct npc_data *nd;
int flag = 0;
-
- if( script_hasdata(st,3) )
- { //Two arguments: NPC name and attach flag.
+
+ if( script_hasdata(st,3) ) {
+ //Two arguments: NPC name and attach flag.
nd = npc->name2id(script_getstr(st, 2));
flag = script_getnum(st,3);
- }
- else if( script_hasdata(st,2) )
- { //Check if argument is numeric (flag) or string (npc name)
+ } else if( script_hasdata(st,2) ) {
+ //Check if argument is numeric (flag) or string (npc name)
struct script_data *data;
data = script_getdata(st,2);
- script->get_val(st,data);
+ script->get_val(st,data); // Dereference if it's a variable
if( data_isstring(data) ) //NPC name
nd = npc->name2id(script->conv_str(st, data));
else if( data_isint(data) ) {
@@ -9160,12 +9088,12 @@ BUILDIN(stopnpctimer) {
}
} else
nd=(struct npc_data *)map->id2bl(st->oid);
-
+
if( !nd )
return true;
if( flag ) //Detach
nd->u.scr.rid = 0;
-
+
npc->timerevent_stop(nd);
return true;
}
@@ -9176,19 +9104,19 @@ BUILDIN(getnpctimer) {
TBL_PC *sd;
int type = script_getnum(st,2);
int val = 0;
-
+
if( script_hasdata(st,3) )
nd = npc->name2id(script_getstr(st,3));
else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( !nd || nd->bl.type != BL_NPC )
{
script_pushint(st,0);
ShowError("getnpctimer: Invalid NPC.\n");
return false;
}
-
+
switch( type ) {
case 0: val = (int)npc->gettimerevent_tick(nd); break; // FIXME: change this to int64 when we'll support 64 bit script values
case 1:
@@ -9205,7 +9133,7 @@ BUILDIN(getnpctimer) {
break;
case 2: val = nd->u.scr.timeramount; break;
}
-
+
script_pushint(st,val);
return true;
}
@@ -9215,19 +9143,19 @@ BUILDIN(setnpctimer)
{
int tick;
struct npc_data *nd;
-
+
tick = script_getnum(st,2);
if( script_hasdata(st,3) )
nd = npc->name2id(script_getstr(st,3));
else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( !nd || nd->bl.type != BL_NPC ) {
script_pushint(st,1);
ShowError("setnpctimer: Invalid NPC.\n");
return false;
}
-
+
npc->settimerevent_tick(nd,tick);
script_pushint(st,0);
return true;
@@ -9239,26 +9167,26 @@ BUILDIN(setnpctimer)
BUILDIN(attachnpctimer) {
TBL_PC *sd;
struct npc_data *nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( !nd || nd->bl.type != BL_NPC )
{
script_pushint(st,1);
ShowError("setnpctimer: Invalid NPC.\n");
return false;
}
-
+
if( script_hasdata(st,2) )
sd = map->nick2sd(script_getstr(st,2));
else
sd = script->rid2sd(st);
-
+
if( !sd )
{
script_pushint(st,1);
ShowWarning("attachnpctimer: Invalid player.\n");
return false;
}
-
+
nd->u.scr.rid = sd->bl.id;
script_pushint(st,0);
return true;
@@ -9269,19 +9197,19 @@ BUILDIN(attachnpctimer) {
*------------------------------------------*/
BUILDIN(detachnpctimer) {
struct npc_data *nd;
-
+
if( script_hasdata(st,2) )
nd = npc->name2id(script_getstr(st,2));
else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( !nd || nd->bl.type != BL_NPC )
{
script_pushint(st,1);
ShowError("detachnpctimer: Invalid NPC.\n");
return false;
}
-
+
nd->u.scr.rid = 0;
script_pushint(st,0);
return true;
@@ -9310,14 +9238,14 @@ BUILDIN(announce) {
int fontSize = script_hasdata(st,6) ? script_getnum(st,6) : 12; // default fontSize
int fontAlign = script_hasdata(st,7) ? script_getnum(st,7) : 0; // default fontAlign
int fontY = script_hasdata(st,8) ? script_getnum(st,8) : 0; // default fontY
-
+
if( flag&(BC_TARGET_MASK|BC_SOURCE_MASK) ) {
// Broadcast source or broadcast region defined
send_target target;
struct block_list *bl = (flag&BC_NPC) ? map->id2bl(st->oid) : (struct block_list *)script->rid2sd(st); // If bc_npc flag is set, use NPC as broadcast source
if (bl == NULL)
return true;
-
+
switch( flag&BC_TARGET_MASK ) {
case BC_MAP: target = ALL_SAMEMAP; break;
case BC_AREA: target = AREA; break;
@@ -9361,36 +9289,29 @@ int buildin_announce_sub(struct block_list *bl, va_list ap)
BUILDIN(itemeffect) {
TBL_NPC *nd;
TBL_PC *sd;
- struct script_data *data;
struct item_data *item_data;
-
+
nullpo_retr( false, ( sd = script->rid2sd( st ) ) );
nullpo_retr( false, ( nd = (TBL_NPC *)map->id2bl( sd->npc_id ) ) );
-
- data = script_getdata( st, 2 );
- script->get_val( st, data );
-
- if( data_isstring( data ) ){
- const char *name = script->conv_str( st, data );
-
- if( ( item_data = itemdb->search_name( name ) ) == NULL ){
+
+ if( script_isstringtype(st, 2) ) {
+ const char *name = script_getstr(st, 2);
+
+ if( ( item_data = itemdb->search_name( name ) ) == NULL ) {
ShowError( "buildin_itemeffect: Nonexistant item %s requested.\n", name );
return false;
}
- } else if( data_isint( data ) ){
- int nameid = script->conv_num( st, data );
-
- if( ( item_data = itemdb->exists( nameid ) ) == NULL ){
+ } else {
+ int nameid = script_getnum(st, 2);
+
+ if( ( item_data = itemdb->exists( nameid ) ) == NULL ) {
ShowError("buildin_itemeffect: Nonexistant item %d requested.\n", nameid );
return false;
}
- } else {
- ShowError("buildin_itemeffect: invalid data type for argument #1 (%d).", data->type );
- return false;
}
-
+
script->run( item_data->script, 0, sd->bl.id, nd->bl.id );
-
+
return true;
}
@@ -9404,10 +9325,10 @@ BUILDIN(mapannounce) {
int fontAlign = script_hasdata(st,8) ? script_getnum(st,8) : 0; // default fontAlign
int fontY = script_hasdata(st,9) ? script_getnum(st,9) : 0; // default fontY
int16 m;
-
+
if ((m = map->mapname2mapid(mapname)) < 0)
return true;
-
+
map->foreachinmap(script->buildin_announce_sub, m, BL_PC,
mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY);
return true;
@@ -9428,10 +9349,10 @@ BUILDIN(areaannounce) {
int fontAlign = script_hasdata(st,12) ? script_getnum(st,12) : 0; // default fontAlign
int fontY = script_hasdata(st,13) ? script_getnum(st,13) : 0; // default fontY
int16 m;
-
+
if ((m = map->mapname2mapid(mapname)) < 0)
return true;
-
+
map->foreachinarea(script->buildin_announce_sub, m, x0, y0, x1, y1, BL_PC,
mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY);
return true;
@@ -9443,9 +9364,9 @@ BUILDIN(getusers) {
int flag, val = 0;
struct map_session_data* sd;
struct block_list* bl = NULL;
-
+
flag = script_getnum(st,2);
-
+
switch(flag&0x07) {
case 0:
if(flag&0x8) {
@@ -9455,7 +9376,7 @@ BUILDIN(getusers) {
// pc
bl = &sd->bl;
}
-
+
if(bl) {
val = map->list[bl->m].users;
}
@@ -9468,7 +9389,7 @@ BUILDIN(getusers) {
script_pushint(st,0);
return false;
}
-
+
script_pushint(st,val);
return true;
}
@@ -9480,17 +9401,17 @@ BUILDIN(getusersname)
TBL_PC *sd, *pl_sd;
int /*disp_num=1,*/ group_level = 0;
struct s_mapiterator* iter;
-
+
sd = script->rid2sd(st);
if (!sd) return true;
-
+
group_level = pc_get_group_level(sd);
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) )
{
if (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > group_level)
continue; // skip hidden sessions
-
+
/* Temporary fix for bugreport:1023.
* Do not uncomment unless you want thousands of 'next' buttons.
if((disp_num++)%10==0)
@@ -9498,7 +9419,7 @@ BUILDIN(getusersname)
clif->scriptmes(sd,st->oid,pl_sd->status.name);
}
mapit->free(iter);
-
+
return true;
}
/*==========================================
@@ -9518,15 +9439,15 @@ BUILDIN(getmapguildusers)
return true;
}
g = guild->search(gid);
-
- if (g){
+
+ if (g) {
for(i = 0; i < g->max_member; i++)
{
if (g->member[i].sd && g->member[i].sd->bl.m == m)
c++;
}
}
-
+
script_pushint(st,c);
return true;
}
@@ -9536,7 +9457,7 @@ BUILDIN(getmapusers) {
const char *str;
int16 m;
str=script_getstr(st,2);
- if( (m=map->mapname2mapid(str))< 0){
+ if( (m=map->mapname2mapid(str))< 0) {
script_pushint(st,-1);
return true;
}
@@ -9560,7 +9481,7 @@ BUILDIN(getareausers)
y0=script_getnum(st,4);
x1=script_getnum(st,5);
y1=script_getnum(st,6);
- if( (m=map->mapname2mapid(str))< 0){
+ if( (m=map->mapname2mapid(str))< 0) {
script_pushint(st,-1);
return true;
}
@@ -9577,37 +9498,34 @@ int buildin_getareadropitem_sub(struct block_list *bl,va_list ap)
int item=va_arg(ap,int);
int *amount=va_arg(ap,int *);
struct flooritem_data *drop=(struct flooritem_data *)bl;
-
+
if(drop->item_data.nameid==item)
(*amount)+=drop->item_data.amount;
-
+
return 0;
}
-BUILDIN(getareadropitem)
-{
+BUILDIN(getareadropitem) {
const char *str;
int16 m,x0,y0,x1,y1;
int item,amount=0;
- struct script_data *data;
-
+
str=script_getstr(st,2);
x0=script_getnum(st,3);
y0=script_getnum(st,4);
x1=script_getnum(st,5);
y1=script_getnum(st,6);
-
- data=script_getdata(st,7);
- script->get_val(st,data);
- if( data_isstring(data) ){
- const char *name=script->conv_str(st,data);
+
+ if( script_isstringtype(st, 7) ) {
+ const char *name = script_getstr(st, 7);
struct item_data *item_data = itemdb->search_name(name);
item=UNKNOWN_ITEM_ID;
if( item_data )
item=item_data->nameid;
- }else
- item=script->conv_num(st,data);
-
- if( (m=map->mapname2mapid(str))< 0){
+ } else {
+ item=script_getnum(st, 7);
+ }
+
+ if( (m=map->mapname2mapid(str))< 0) {
script_pushint(st,-1);
return true;
}
@@ -9663,7 +9581,7 @@ BUILDIN(sc_start) {
int tick;
int val1;
int val4 = 0;
-
+
type = (sc_type)script_getnum(st,2);
tick = script_getnum(st,3);
val1 = script_getnum(st,4);
@@ -9671,22 +9589,22 @@ BUILDIN(sc_start) {
bl = map->id2bl(script_getnum(st,5));
else
bl = map->id2bl(st->rid);
-
+
if( tick == 0 && val1 > 0 && type > SC_NONE && type < SC_MAX && status->sc2skill(type) != 0 ) {
// When there isn't a duration specified, try to get it from the skill_db
tick = skill->get_time(status->sc2skill(type), val1);
}
-
+
if( script->potion_flag == 1 && script->potion_target ) {
//skill.c set the flags before running the script, this must be a potion-pitched effect.
bl = map->id2bl(script->potion_target);
tick /= 2;// Thrown potions only last half.
val4 = 1;// Mark that this was a thrown sc_effect
}
-
+
if( bl )
status->change_start(bl, type, 10000, val1, 0, 0, val4, tick, 2);
-
+
return true;
}
@@ -9700,7 +9618,7 @@ BUILDIN(sc_start2) {
int val1;
int val4 = 0;
int rate;
-
+
type = (sc_type)script_getnum(st,2);
tick = script_getnum(st,3);
val1 = script_getnum(st,4);
@@ -9709,22 +9627,22 @@ BUILDIN(sc_start2) {
bl = map->id2bl(script_getnum(st,6));
else
bl = map->id2bl(st->rid);
-
+
if( tick == 0 && val1 > 0 && type > SC_NONE && type < SC_MAX && status->sc2skill(type) != 0 ) {
// When there isn't a duration specified, try to get it from the skill_db
tick = skill->get_time(status->sc2skill(type), val1);
}
-
+
if( script->potion_flag == 1 && script->potion_target ) {
//skill.c set the flags before running the script, this must be a potion-pitched effect.
bl = map->id2bl(script->potion_target);
tick /= 2;// Thrown potions only last half.
val4 = 1;// Mark that this was a thrown sc_effect
}
-
+
if( bl )
status->change_start(bl, type, rate, val1, 0, 0, val4, tick, 2);
-
+
return true;
}
@@ -9739,7 +9657,7 @@ BUILDIN(sc_start4) {
int val2;
int val3;
int val4;
-
+
type = (sc_type)script_getnum(st,2);
tick = script_getnum(st,3);
val1 = script_getnum(st,4);
@@ -9750,21 +9668,21 @@ BUILDIN(sc_start4) {
bl = map->id2bl(script_getnum(st,8));
else
bl = map->id2bl(st->rid);
-
+
if( tick == 0 && val1 > 0 && type > SC_NONE && type < SC_MAX && status->sc2skill(type) != 0 ) {
// When there isn't a duration specified, try to get it from the skill_db
tick = skill->get_time(status->sc2skill(type), val1);
}
-
+
if( script->potion_flag == 1 && script->potion_target ) {
//skill.c set the flags before running the script, this must be a potion-pitched effect.
bl = map->id2bl(script->potion_target);
tick /= 2;// Thrown potions only last half.
}
-
+
if( bl )
status->change_start(bl, type, 10000, val1, val2, val3, val4, tick, 2);
-
+
return true;
}
@@ -9774,26 +9692,26 @@ BUILDIN(sc_start4) {
BUILDIN(sc_end) {
struct block_list* bl;
int type;
-
+
type = script_getnum(st, 2);
if (script_hasdata(st, 3))
bl = map->id2bl(script_getnum(st, 3));
else
bl = map->id2bl(st->rid);
-
+
if (script->potion_flag == 1 && script->potion_target) //##TODO how does this work [FlavioJS]
bl = map->id2bl(script->potion_target);
-
+
if (!bl)
return true;
-
+
if (type >= 0 && type < SC_MAX) {
struct status_change *sc = status->get_sc(bl);
struct status_change_entry *sce = sc ? sc->data[type] : NULL;
-
+
if (!sce)
return true;
-
+
/* status that can't be individually removed (TODO sc_config option?) */
switch (type) {
case SC_WEIGHTOVER50:
@@ -9804,14 +9722,14 @@ BUILDIN(sc_end) {
default:
break;
}
-
+
//This should help status_change_end force disabling the SC in case it has no limit.
sce->val1 = sce->val2 = sce->val3 = sce->val4 = 0;
status_change_end(bl, (sc_type)type, INVALID_TIMER);
}
else
status->change_clear(bl, 3); // remove all effects
-
+
return true;
}
@@ -9821,17 +9739,17 @@ BUILDIN(sc_end) {
BUILDIN(getscrate) {
struct block_list *bl;
int type,rate;
-
+
type=script_getnum(st,2);
rate=script_getnum(st,3);
if( script_hasdata(st,4) ) //get for the bl assigned
bl = map->id2bl(script_getnum(st,4));
else
bl = map->id2bl(st->rid);
-
+
if (bl)
rate = status->get_sc_def(bl, (sc_type)type, 10000, 10000, 0);
-
+
script_pushint(st,rate);
return true;
}
@@ -9843,36 +9761,36 @@ BUILDIN(getstatus)
{
int id, type;
struct map_session_data* sd = script->rid2sd(st);
-
+
if( sd == NULL )
{// no player attached
return true;
}
-
+
id = script_getnum(st, 2);
type = script_hasdata(st, 3) ? script_getnum(st, 3) : 0;
-
+
if( id <= SC_NONE || id >= SC_MAX )
{// invalid status type given
ShowWarning("script.c:getstatus: Invalid status type given (%d).\n", id);
return true;
}
-
+
if( sd->sc.count == 0 || !sd->sc.data[id] )
{// no status is active
script_pushint(st, 0);
return true;
}
-
+
switch( type ) {
- case 1: script_pushint(st, sd->sc.data[id]->val1); break;
- case 2: script_pushint(st, sd->sc.data[id]->val2); break;
- case 3: script_pushint(st, sd->sc.data[id]->val3); break;
- case 4: script_pushint(st, sd->sc.data[id]->val4); break;
+ case 1: script_pushint(st, sd->sc.data[id]->val1); break;
+ case 2: script_pushint(st, sd->sc.data[id]->val2); break;
+ case 3: script_pushint(st, sd->sc.data[id]->val3); break;
+ case 4: script_pushint(st, sd->sc.data[id]->val4); break;
case 5:
{
struct TimerData* td = (struct TimerData*)timer->get(sd->sc.data[id]->timer);
-
+
if( td ) {
// return the amount of time remaining
script_pushint(st, (int)(td->tick - timer->gettick())); // TODO: change this to int64 when we'll support 64 bit script values
@@ -9881,7 +9799,7 @@ BUILDIN(getstatus)
break;
default: script_pushint(st, 1); break;
}
-
+
return true;
}
@@ -9902,12 +9820,12 @@ BUILDIN(catchpet)
{
int pet_id;
TBL_PC *sd;
-
+
pet_id= script_getnum(st,2);
sd=script->rid2sd(st);
if( sd == NULL )
return true;
-
+
pet->catch_process1(sd,pet_id);
return true;
}
@@ -9918,11 +9836,11 @@ BUILDIN(catchpet)
BUILDIN(homunculus_evolution)
{
TBL_PC *sd;
-
+
sd=script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if(homun_alive(sd->hd)) {
if (sd->hd->homunculus.intimacy > 91000)
homun->evolve(sd->hd);
@@ -9942,21 +9860,21 @@ BUILDIN(homunculus_mutate) {
enum homun_type m_class, m_id;
TBL_PC *sd;
bool success = false;
-
+
sd = script->rid2sd(st);
if( sd == NULL || sd->hd == NULL )
return true;
-
+
if( sd->hd->homunculus.vaporize == HOM_ST_MORPH ) {
int i = pc->search_inventory(sd, ITEMID_STRANGE_EMBRYO);
if( script_hasdata(st,2) )
homun_id = script_getnum(st,2);
else
homun_id = 6048 + (rnd() % 4);
-
+
m_class = homun->class2type(sd->hd->homunculus.class_);
m_id = homun->class2type(homun_id);
-
+
if( m_class == HT_EVO && m_id == HT_S &&
sd->hd->homunculus.level >= 99 && i >= 0 &&
!pc->delitem(sd, i, 1, 0, 0, LOG_TYPE_SCRIPT) ) {
@@ -9968,7 +9886,7 @@ BUILDIN(homunculus_mutate) {
clif->emotion(&sd->hd->bl, E_SWT);
} else
clif->emotion(&sd->hd->bl, E_SWT);
-
+
script_pushint(st,success?1:0);
return true;
}
@@ -9982,21 +9900,21 @@ BUILDIN(homunculus_morphembryo) {
int i = 0;
TBL_PC *sd;
bool success = false;
-
+
sd = script->rid2sd(st);
if( sd == NULL || sd->hd == NULL )
return true;
-
+
if( homun_alive(sd->hd) ) {
m_class = homun->class2type(sd->hd->homunculus.class_);
-
+
if ( m_class == HT_EVO && sd->hd->homunculus.level >= 99 ) {
struct item item_tmp;
-
+
memset(&item_tmp, 0, sizeof(item_tmp));
item_tmp.nameid = ITEMID_STRANGE_EMBRYO;
item_tmp.identify = 1;
-
+
if( (i = pc->additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT)) ) {
clif->additem(sd, 0, 0, i);
clif->emotion(&sd->hd->bl, E_SWT);
@@ -10008,7 +9926,7 @@ BUILDIN(homunculus_morphembryo) {
clif->emotion(&sd->hd->bl, E_SWT);
} else
clif->emotion(&sd->hd->bl, E_SWT);
-
+
script_pushint(st, success?1:0);
return true;
}
@@ -10027,7 +9945,7 @@ BUILDIN(homunculus_checkcall) {
script_pushint(st, -1);
else
script_pushint(st, sd->hd->homunculus.vaporize);
-
+
return true;
}
@@ -10035,14 +9953,14 @@ BUILDIN(homunculus_checkcall) {
// [Zephyrus]
BUILDIN(homunculus_shuffle) {
TBL_PC *sd;
-
+
sd=script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if(homun_alive(sd->hd))
homun->shuffle(sd->hd);
-
+
return true;
}
@@ -10091,12 +10009,12 @@ BUILDIN(birthpet)
sd=script->rid2sd(st);
if( sd == NULL )
return true;
-
+
if( sd->status.pet_id )
{// do not send egg list, when you already have a pet
return true;
}
-
+
clif->sendegg(sd);
return true;
}
@@ -10104,21 +10022,21 @@ BUILDIN(birthpet)
/*==========================================
* Added - AppleGirl For Advanced Classes, (Updated for Cleaner Script Purposes)
* @type
- * 1 : make like after rebirth
- * 2 : blvl,jlvl=1, skillpoint=0
- * 3 : don't reset skill, blvl=1
- * 4 : jlvl=0
+ * 1 : make like after rebirth
+ * 2 : blvl,jlvl=1, skillpoint=0
+ * 3 : don't reset skill, blvl=1
+ * 4 : jlvl=0
*------------------------------------------*/
BUILDIN(resetlvl)
{
TBL_PC *sd;
-
+
int type=script_getnum(st,2);
-
+
sd=script->rid2sd(st);
if( sd == NULL )
return true;
-
+
pc->resetlvl(sd,type);
return true;
}
@@ -10161,15 +10079,15 @@ BUILDIN(skillpointcount)
BUILDIN(changebase) {
TBL_PC *sd=NULL;
int vclass;
-
+
if( script_hasdata(st,3) )
sd=map->id2sd(script_getnum(st,3));
else
sd=script->rid2sd(st);
-
+
if(sd == NULL)
return true;
-
+
vclass = script_getnum(st,2);
if(vclass == JOB_WEDDING)
{
@@ -10178,7 +10096,7 @@ BUILDIN(changebase) {
)
return true;
}
-
+
if(sd->disguise == -1 && vclass != sd->vd.class_) {
status->set_viewdata(&sd->bl, vclass);
//Updated client view. Base, Weapon and Cloth Colors.
@@ -10188,7 +10106,7 @@ BUILDIN(changebase) {
clif->changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
clif->skillinfoblock(sd);
}
-
+
return true;
}
@@ -10200,7 +10118,7 @@ BUILDIN(changesex)
int i;
TBL_PC *sd = NULL;
sd = script->rid2sd(st);
-
+
pc->resetskill(sd,4);
// to avoid any problem with equipment and invalid sex, equipment is unequiped.
for( i=0; i<EQI_MAX; i++ )
@@ -10216,18 +10134,19 @@ BUILDIN(globalmes) {
struct block_list *bl = map->id2bl(st->oid);
struct npc_data *nd = (struct npc_data *)bl;
const char *name=NULL,*mes;
-
+
mes=script_getstr(st,2);
if(mes==NULL) return true;
-
- if(script_hasdata(st,3)){ // npc name to display
+
+ if(script_hasdata(st,3)) {
+ // npc name to display
name=script_getstr(st,3);
} else {
name=nd->name; //use current npc name
}
-
- npc->globalmessage(name,mes); // broadcast to all players connected
-
+
+ npc->globalmessage(name,mes); // broadcast to all players connected
+
return true;
}
@@ -10248,11 +10167,11 @@ BUILDIN(waitingroom) {
int zeny = script_hasdata(st,6) ? script_getnum(st,6) : 0;
int minLvl = script_hasdata(st,7) ? script_getnum(st,7) : 1;
int maxLvl = script_hasdata(st,8) ? script_getnum(st,8) : MAX_LEVEL;
-
+
nd = (struct npc_data *)map->id2bl(st->oid);
if( nd != NULL )
chat->create_npc_chat(nd, title, limit, pub, trigger, ev, zeny, minLvl, maxLvl);
-
+
return true;
}
@@ -10278,12 +10197,12 @@ BUILDIN(delwaitingroom) {
BUILDIN(waitingroomkickall) {
struct npc_data* nd;
struct chat_data* cd;
-
+
if( script_hasdata(st,2) )
nd = npc->name2id(script_getstr(st,2));
else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( nd != NULL && (cd=(struct chat_data *)map->id2bl(nd->chat_id)) != NULL )
chat->npc_kick_all(cd);
return true;
@@ -10296,12 +10215,12 @@ BUILDIN(waitingroomkickall) {
BUILDIN(enablewaitingroomevent) {
struct npc_data* nd;
struct chat_data* cd;
-
+
if( script_hasdata(st,2) )
nd = npc->name2id(script_getstr(st, 2));
else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( nd != NULL && (cd=(struct chat_data *)map->id2bl(nd->chat_id)) != NULL )
chat->enable_event(cd);
return true;
@@ -10314,12 +10233,12 @@ BUILDIN(enablewaitingroomevent) {
BUILDIN(disablewaitingroomevent) {
struct npc_data *nd;
struct chat_data *cd;
-
+
if( script_hasdata(st,2) )
nd = npc->name2id(script_getstr(st, 2));
else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( nd != NULL && (cd=(struct chat_data *)map->id2bl(nd->chat_id)) != NULL )
chat->disable_event(cd);
return true;
@@ -10343,18 +10262,18 @@ BUILDIN(getwaitingroomstate) {
struct npc_data *nd;
struct chat_data *cd;
int type;
-
+
type = script_getnum(st,2);
if( script_hasdata(st,3) )
nd = npc->name2id(script_getstr(st, 3));
else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( nd == NULL || (cd=(struct chat_data *)map->id2bl(nd->chat_id)) == NULL ) {
script_pushint(st, -1);
return true;
}
-
+
switch(type) {
case 0: script_pushint(st, cd->users); break;
case 1: script_pushint(st, cd->limit); break;
@@ -10391,27 +10310,27 @@ BUILDIN(warpwaitingpc) {
struct npc_data* nd;
struct chat_data* cd;
TBL_PC* sd;
-
+
nd = (struct npc_data *)map->id2bl(st->oid);
if( nd == NULL || (cd=(struct chat_data *)map->id2bl(nd->chat_id)) == NULL )
return true;
-
+
map_name = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
n = cd->trigger&0x7f;
-
+
if( script_hasdata(st,5) )
n = script_getnum(st,5);
-
+
for( i = 0; i < n && cd->users > 0; i++ ) {
sd = cd->usersd[0];
-
+
if( strcmp(map_name,"SavePoint") == 0 && map->list[sd->bl.m].flag.noteleport ) {
// can't teleport on this map
break;
}
-
+
if( cd->zeny ) {
// fee set
if( (uint32)sd->status.zeny < cd->zeny ) {
@@ -10420,9 +10339,9 @@ BUILDIN(warpwaitingpc) {
}
pc->payzeny(sd, cd->zeny, LOG_TYPE_NPC, NULL);
}
-
+
mapreg->setreg(reference_uid(script->add_str("$@warpwaitingpc"), i), sd->bl.id);
-
+
if( strcmp(map_name,"Random") == 0 )
pc->randomwarp(sd,CLR_TELEPORT);
else if( strcmp(map_name,"SavePoint") == 0 )
@@ -10453,10 +10372,10 @@ void script_detach_rid(struct script_state* st) {
*------------------------------------------*/
BUILDIN(attachrid) {
int rid = script_getnum(st,2);
-
+
if (map->id2sd(rid) != NULL) {
script->detach_rid(st);
-
+
st->rid = rid;
script->attach_state(st);
script_pushint(st,1);
@@ -10492,21 +10411,21 @@ BUILDIN(setmapflagnosave) {
int16 m,x,y;
unsigned short map_index;
const char *str,*str2;
-
+
str=script_getstr(st,2);
str2=script_getstr(st,3);
x=script_getnum(st,4);
y=script_getnum(st,5);
m = map->mapname2mapid(str);
map_index = mapindex->name2id(str2);
-
+
if(m >= 0 && map_index) {
map->list[m].flag.nosave=1;
map->list[m].save.map=map_index;
map->list[m].save.x=x;
map->list[m].save.y=y;
}
-
+
return true;
}
@@ -10514,10 +10433,10 @@ BUILDIN(getmapflag)
{
int16 m,i;
const char *str;
-
+
str=script_getstr(st,2);
i=script_getnum(st,3);
-
+
m = map->mapname2mapid(str);
if(m >= 0) {
switch(i) {
@@ -10574,7 +10493,7 @@ BUILDIN(getmapflag)
case MF_NOCASHSHOP: script_pushint(st,map->list[m].flag.nocashshop); break;
}
}
-
+
return true;
}
/* pvp timer handling */
@@ -10595,26 +10514,24 @@ int script_mapflag_pvp_sub(struct block_list *bl,va_list ap) {
BUILDIN(setmapflag) {
int16 m,i;
const char *str, *val2 = NULL;
- struct script_data* data;
int val=0;
-
+
str=script_getstr(st,2);
-
+
i = script_getnum(st, 3);
-
- if(script_hasdata(st,4)) {
- data = script_getdata(st,4);
- script->get_val(st, data);
-
-
- if( data_isstring(data) )
+
+ if (script_hasdata(st,4)) {
+ if (script_isstringtype(st, 4)) {
val2 = script_getstr(st, 4);
- else
+ } else if (script_isinttype(st, 4)) {
val = script_getnum(st, 4);
-
+ } else {
+ ShowError("buildin_setmapflag: invalid data type for argument 3.\n");
+ return false;
+ }
}
m = map->mapname2mapid(str);
-
+
if(m >= 0) {
switch(i) {
case MF_NOMEMO: map->list[m].flag.nomemo = 1; break;
@@ -10692,14 +10609,14 @@ BUILDIN(setmapflag) {
case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 1; break;
}
}
-
+
return true;
}
BUILDIN(removemapflag) {
int16 m,i;
const char *str;
-
+
str=script_getstr(st,2);
i=script_getnum(st,3);
@@ -10778,7 +10695,7 @@ BUILDIN(removemapflag) {
case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 0; break;
}
}
-
+
return true;
}
@@ -10788,34 +10705,34 @@ BUILDIN(pvpon) {
TBL_PC* sd = NULL;
struct s_mapiterator* iter;
struct block_list bl;
-
+
str = script_getstr(st,2);
m = map->mapname2mapid(str);
if( m < 0 || map->list[m].flag.pvp )
return true; // nothing to do
-
+
if( !strdb_exists(map->zone_db,MAP_ZONE_PVP_NAME) ) {
ShowError("buildin_pvpon: zone_db missing '%s'\n",MAP_ZONE_PVP_NAME);
return true;
}
-
+
map->zone_change2(m, strdb_get(map->zone_db, MAP_ZONE_PVP_NAME));
map->list[m].flag.pvp = 1;
clif->map_property_mapall(m, MAPPROPERTY_FREEPVPZONE);
bl.type = BL_NUL;
bl.m = m;
clif->maptypeproperty2(&bl,ALL_SAMEMAP);
-
-
+
+
if(battle_config.pk_mode) // disable ranking functions if pk_mode is on [Valaris]
return true;
-
+
iter = mapit_getallusers();
for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) )
{
if( sd->bl.m != m || sd->pvp_timer != INVALID_TIMER )
continue; // not applicable
-
+
sd->pvp_timer = timer->add(timer->gettick()+200,pc->calc_pvprank_timer,sd->bl.id,0);
sd->pvp_rank = 0;
sd->pvp_lastusers = 0;
@@ -10824,7 +10741,7 @@ BUILDIN(pvpon) {
sd->pvp_lost = 0;
}
mapit->free(iter);
-
+
return true;
}
@@ -10843,22 +10760,22 @@ BUILDIN(pvpoff) {
int16 m;
const char *str;
struct block_list bl;
-
+
str=script_getstr(st,2);
m = map->mapname2mapid(str);
if(m < 0 || !map->list[m].flag.pvp)
return true; //fixed Lupus
-
+
map->zone_change2(m, map->list[m].prev_zone);
map->list[m].flag.pvp = 0;
clif->map_property_mapall(m, MAPPROPERTY_NOTHING);
bl.type = BL_NUL;
bl.m = m;
clif->maptypeproperty2(&bl,ALL_SAMEMAP);
-
+
if(battle_config.pk_mode) // disable ranking options if pk_mode is on [Valaris]
return true;
-
+
map->foreachinmap(script->buildin_pvpoff_sub, m, BL_PC);
return true;
}
@@ -10866,17 +10783,17 @@ BUILDIN(pvpoff) {
BUILDIN(gvgon) {
int16 m;
const char *str;
-
+
str=script_getstr(st,2);
m = map->mapname2mapid(str);
if(m >= 0 && !map->list[m].flag.gvg) {
struct block_list bl;
-
+
if( !strdb_exists(map->zone_db,MAP_ZONE_GVG_NAME) ) {
ShowError("buildin_gvgon: zone_db missing '%s'\n",MAP_ZONE_GVG_NAME);
return true;
}
-
+
map->zone_change2(m, strdb_get(map->zone_db, MAP_ZONE_GVG_NAME));
map->list[m].flag.gvg = 1;
clif->map_property_mapall(m, MAPPROPERTY_AGITZONE);
@@ -10884,13 +10801,13 @@ BUILDIN(gvgon) {
bl.m = m;
clif->maptypeproperty2(&bl,ALL_SAMEMAP);
}
-
+
return true;
}
BUILDIN(gvgoff) {
int16 m;
const char *str;
-
+
str=script_getstr(st,2);
m = map->mapname2mapid(str);
if(m >= 0 && map->list[m].flag.gvg) {
@@ -10902,25 +10819,25 @@ BUILDIN(gvgoff) {
bl.m = m;
clif->maptypeproperty2(&bl,ALL_SAMEMAP);
}
-
+
return true;
}
/*==========================================
- * Shows an emoticon on top of the player/npc
- * emotion emotion#, <target: 0 - NPC, 1 - PC>, <NPC/PC name>
+ * Shows an emoticon on top of the player/npc
+ * emotion emotion#, <target: 0 - NPC, 1 - PC>, <NPC/PC name>
*------------------------------------------*/
//Optional second parameter added by [Skotlex]
BUILDIN(emotion) {
int type;
int player=0;
-
+
type=script_getnum(st,2);
if(type < 0 || type > 100)
return true;
-
+
if( script_hasdata(st,3) )
player=script_getnum(st,3);
-
+
if (player) {
TBL_PC *sd = NULL;
if( script_hasdata(st,4) )
@@ -10943,14 +10860,14 @@ int buildin_maprespawnguildid_sub_pc(struct map_session_data* sd, va_list ap)
int16 m=va_arg(ap,int);
int g_id=va_arg(ap,int);
int flag=va_arg(ap,int);
-
+
if(!sd || sd->bl.m != m)
return 0;
if(
- (sd->status.guild_id == g_id && flag&1) || //Warp out owners
- (sd->status.guild_id != g_id && flag&2) || //Warp out outsiders
- (sd->status.guild_id == 0) // Warp out players not in guild [Valaris]
- )
+ (sd->status.guild_id == g_id && flag&1) //Warp out owners
+ || (sd->status.guild_id != g_id && flag&2) //Warp out outsiders
+ || (sd->status.guild_id == 0) // Warp out players not in guild [Valaris]
+ )
pc->setpos(sd,sd->status.save_point.map,sd->status.save_point.x,sd->status.save_point.y,CLR_TELEPORT);
return 1;
}
@@ -10958,10 +10875,10 @@ int buildin_maprespawnguildid_sub_pc(struct map_session_data* sd, va_list ap)
int buildin_maprespawnguildid_sub_mob(struct block_list *bl,va_list ap)
{
struct mob_data *md=(struct mob_data *)bl;
-
+
if(!md->guardian_data && md->class_ != MOBID_EMPERIUM)
status_kill(bl);
-
+
return 0;
}
@@ -10969,12 +10886,12 @@ BUILDIN(maprespawnguildid) {
const char *mapname=script_getstr(st,2);
int g_id=script_getnum(st,3);
int flag=script_getnum(st,4);
-
+
int16 m=map->mapname2mapid(mapname);
-
+
if(m == -1)
return true;
-
+
//Catch ALL players (in case some are 'between maps' on execution time)
map->foreachpc(script->buildin_maprespawnguildid_sub_pc,m,g_id,flag);
if (flag&4) //Remove script mobs.
@@ -11011,7 +10928,7 @@ BUILDIN(agitend2) {
}
/*==========================================
- * Returns whether woe is on or off. // choice script
+ * Returns whether woe is on or off.
*------------------------------------------*/
BUILDIN(agitcheck) {
script_pushint(st,map->agit_flag);
@@ -11019,7 +10936,7 @@ BUILDIN(agitcheck) {
}
/*==========================================
- * Returns whether woese is on or off. // choice script
+ * Returns whether woese is on or off.
*------------------------------------------*/
BUILDIN(agitcheck2) {
script_pushint(st,map->agit2_flag);
@@ -11032,9 +10949,9 @@ BUILDIN(agitcheck2) {
BUILDIN(flagemblem) {
TBL_NPC* nd;
int g_id = script_getnum(st,2);
-
+
if(g_id < 0) return true;
-
+
nd = (TBL_NPC*)map->id2nd(st->oid);
if( nd == NULL ) {
ShowError("script:flagemblem: npc %d not found\n", st->oid);
@@ -11067,13 +10984,13 @@ BUILDIN(getcastledata)
const char *mapname = mapindex->getmapname(script_getstr(st,2),NULL);
int index = script_getnum(st,3);
struct guild_castle *gc = guild->mapname2gc(mapname);
-
+
if (gc == NULL) {
script_pushint(st,0);
ShowWarning("buildin_setcastledata: guild castle for map '%s' not found\n", mapname);
return false;
}
-
+
switch (index) {
case 1:
script_pushint(st,gc->guild_id); break;
@@ -11111,17 +11028,17 @@ BUILDIN(setcastledata)
int index = script_getnum(st,3);
int value = script_getnum(st,4);
struct guild_castle *gc = guild->mapname2gc(mapname);
-
+
if (gc == NULL) {
ShowWarning("buildin_setcastledata: guild castle for map '%s' not found\n", mapname);
return false;
}
-
+
if (index <= 0 || index > 9+MAX_GUARDIANS) {
ShowWarning("buildin_setcastledata: index = '%d' is out of allowed range\n", index);
return false;
}
-
+
guild->castledatasave(gc->castle_id, index, value);
return true;
}
@@ -11132,12 +11049,12 @@ BUILDIN(requestguildinfo)
{
int guild_id=script_getnum(st,2);
const char *event=NULL;
-
- if( script_hasdata(st,3) ){
+
+ if( script_hasdata(st,3) ) {
event=script_getstr(st,3);
script->check_event(st, event);
}
-
+
if(guild_id>0)
guild->npc_request_info(guild_id,event);
return true;
@@ -11150,28 +11067,28 @@ BUILDIN(getequipcardcnt)
int i=-1,j,num;
TBL_PC *sd;
int count;
-
+
num=script_getnum(st,2);
sd=script->rid2sd(st);
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
-
+
if (i < 0 || !sd->inventory_data[i]) {
script_pushint(st,0);
return true;
}
-
+
if(itemdb_isspecial(sd->status.inventory[i].card[0]))
{
script_pushint(st,0);
return true;
}
-
+
count = 0;
for( j = 0; j < sd->inventory_data[i]->slot; j++ )
if( sd->status.inventory[i].card[j] && itemdb_type(sd->status.inventory[i].card[j]) == IT_CARD )
count++;
-
+
script_pushint(st,count);
return true;
}
@@ -11181,20 +11098,20 @@ BUILDIN(getequipcardcnt)
/// successremovecards <slot>;
BUILDIN(successremovecards) {
int i=-1,j,c,cardflag=0;
-
+
TBL_PC* sd = script->rid2sd(st);
int num = script_getnum(st,2);
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
-
+
if (i < 0 || !sd->inventory_data[i]) {
return true;
}
-
+
if(itemdb_isspecial(sd->status.inventory[i].card[0]))
return true;
-
+
for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c ) {
if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD ) {// extract this card from the item
int flag;
@@ -11203,35 +11120,37 @@ BUILDIN(successremovecards) {
cardflag = 1;
item_tmp.nameid = sd->status.inventory[i].card[c];
item_tmp.identify = 1;
-
- if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // get back the cart in inventory
+
+ if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) {
+ // get back the cart in inventory
clif->additem(sd,0,0,flag);
map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
}
-
+
if(cardflag == 1) {//if card was remove remplace item with no card
int flag;
struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp));
-
+
item_tmp.nameid = sd->status.inventory[i].nameid;
item_tmp.identify = 1;
item_tmp.refine = sd->status.inventory[i].refine;
item_tmp.attribute = sd->status.inventory[i].attribute;
item_tmp.expire_time = sd->status.inventory[i].expire_time;
item_tmp.bound = sd->status.inventory[i].bound;
-
+
for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
item_tmp.card[j]=sd->status.inventory[i].card[j];
-
+
pc->delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT);
- if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ //chk if can be spawn in inventory otherwise put on floor
+ if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) {
+ //chk if can be spawn in inventory otherwise put on floor
clif->additem(sd,0,0,flag);
map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
-
+
clif->misceffect(&sd->bl,3);
}
return true;
@@ -11245,77 +11164,79 @@ BUILDIN(successremovecards) {
/// <type>=? : will just display the failure effect.
BUILDIN(failedremovecards) {
int i=-1,j,c,cardflag=0;
-
+
TBL_PC* sd = script->rid2sd(st);
int num = script_getnum(st,2);
int typefail = script_getnum(st,3);
-
+
if (num > 0 && num <= ARRAYLENGTH(script->equip))
i=pc->checkequip(sd,script->equip[num-1]);
-
+
if (i < 0 || !sd->inventory_data[i])
return true;
-
+
if(itemdb_isspecial(sd->status.inventory[i].card[0]))
return true;
-
+
for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c ) {
if( sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD ) {
cardflag = 1;
-
+
if(typefail == 2) {// add cards to inventory, clear
int flag;
struct item item_tmp;
-
+
memset(&item_tmp,0,sizeof(item_tmp));
-
+
item_tmp.nameid = sd->status.inventory[i].card[c];
item_tmp.identify = 1;
-
- if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){
+
+ if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) {
clif->additem(sd,0,0,flag);
map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
}
}
-
+
if(cardflag == 1) {
- if(typefail == 0 || typefail == 2){ // destroy the item
+ if(typefail == 0 || typefail == 2) {
+ // destroy the item
pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
}
- if(typefail == 1){ // destroy the card
+ if(typefail == 1) {
+ // destroy the card
int flag;
struct item item_tmp;
-
+
memset(&item_tmp,0,sizeof(item_tmp));
-
+
item_tmp.nameid = sd->status.inventory[i].nameid;
item_tmp.identify = 1;
item_tmp.refine = sd->status.inventory[i].refine;
item_tmp.attribute = sd->status.inventory[i].attribute;
item_tmp.expire_time = sd->status.inventory[i].expire_time;
item_tmp.bound = sd->status.inventory[i].bound;
-
+
for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
item_tmp.card[j]=sd->status.inventory[i].card[j];
-
+
pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
-
- if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){
+
+ if((flag=pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))) {
clif->additem(sd,0,0,flag);
map->addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
clif->misceffect(&sd->bl,2);
}
-
+
return true;
}
/* ================================================================
* mapwarp "<from map>","<to map>",<x>,<y>,<type>,<ID for Type>;
- * type: 0=everyone, 1=guild, 2=party; [Reddozen]
+ * type: 0=everyone, 1=guild, 2=party; [Reddozen]
* improved by [Lance]
* ================================================================*/
// Added by RoVeRT
@@ -11330,24 +11251,24 @@ BUILDIN(mapwarp) {
str=script_getstr(st,3);
x=script_getnum(st,4);
y=script_getnum(st,5);
- if(script_hasdata(st,7)){
+ if(script_hasdata(st,7)) {
check_val=script_getnum(st,6);
check_ID=script_getnum(st,7);
}
-
+
if((m=map->mapname2mapid(mapname))< 0)
return true;
-
+
if(!(index=mapindex->name2id(str)))
return true;
-
- switch(check_val){
+
+ switch(check_val) {
case 1:
g = guild->search(check_ID);
- if (g){
+ if (g) {
for( i=0; i < g->max_member; i++)
{
- if(g->member[i].sd && g->member[i].sd->bl.m==m){
+ if(g->member[i].sd && g->member[i].sd->bl.m==m) {
pc->setpos(g->member[i].sd,index,x,y,CLR_TELEPORT);
}
}
@@ -11355,9 +11276,9 @@ BUILDIN(mapwarp) {
break;
case 2:
p = party->search(check_ID);
- if(p){
- for(i=0;i<MAX_PARTY; i++){
- if(p->data[i].sd && p->data[i].sd->bl.m == m){
+ if(p) {
+ for(i=0;i<MAX_PARTY; i++) {
+ if(p->data[i].sd && p->data[i].sd->bl.m == m) {
pc->setpos(p->data[i].sd,index,x,y,CLR_TELEPORT);
}
}
@@ -11367,12 +11288,12 @@ BUILDIN(mapwarp) {
map->foreachinmap(script->buildin_areawarp_sub,m,BL_PC,index,x,y,0,0);
break;
}
-
+
return true;
}
-int buildin_mobcount_sub(struct block_list *bl,va_list ap) // Added by RoVeRT
-{
+// Added by RoVeRT
+int buildin_mobcount_sub(struct block_list *bl,va_list ap) {
char *event=va_arg(ap,char *);
struct mob_data *md = ((struct mob_data *)bl);
if( md->status.hp > 0 && (!event || strcmp(event,md->npc_event) == 0) )
@@ -11386,7 +11307,7 @@ BUILDIN(mobcount) {
int16 m;
mapname=script_getstr(st,2);
event=script_getstr(st,3);
-
+
if( strcmp(event, "all") == 0 )
event = NULL;
else
@@ -11411,7 +11332,7 @@ BUILDIN(mobcount) {
}
script_pushint(st,map->foreachinmap(script->buildin_mobcount_sub, m, BL_MOB, event));
-
+
return true;
}
@@ -11419,8 +11340,8 @@ BUILDIN(marriage) {
const char *partner=script_getstr(st,2);
TBL_PC *sd=script->rid2sd(st);
TBL_PC *p_sd=map->nick2sd(partner);
-
- if(sd==NULL || p_sd==NULL || pc->marriage(sd,p_sd) < 0){
+
+ if(sd==NULL || p_sd==NULL || pc->marriage(sd,p_sd) < 0) {
script_pushint(st,0);
return true;
}
@@ -11430,7 +11351,7 @@ BUILDIN(marriage) {
BUILDIN(wedding_effect) {
TBL_PC *sd=script->rid2sd(st);
struct block_list *bl;
-
+
if(sd==NULL) {
bl=map->id2bl(st->oid);
} else
@@ -11441,7 +11362,7 @@ BUILDIN(wedding_effect) {
BUILDIN(divorce)
{
TBL_PC *sd=script->rid2sd(st);
- if(sd==NULL || pc->divorce(sd) < 0){
+ if(sd==NULL || pc->divorce(sd) < 0) {
script_pushint(st,0);
return true;
}
@@ -11451,63 +11372,59 @@ BUILDIN(divorce)
BUILDIN(ispartneron) {
TBL_PC *sd=script->rid2sd(st);
-
- if(sd==NULL || !pc->ismarried(sd) ||
- map->charid2sd(sd->status.partner_id) == NULL) {
+
+ if (sd==NULL || !pc->ismarried(sd)
+ || map->charid2sd(sd->status.partner_id) == NULL) {
script_pushint(st,0);
return true;
}
-
+
script_pushint(st,1);
return true;
}
-BUILDIN(getpartnerid)
-{
- TBL_PC *sd=script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
-
- script_pushint(st,sd->status.partner_id);
- return true;
+BUILDIN(getpartnerid) {
+ TBL_PC *sd=script->rid2sd(st);
+ if (sd == NULL) {
+ script_pushint(st,0);
+ return true;
+ }
+
+ script_pushint(st,sd->status.partner_id);
+ return true;
}
-BUILDIN(getchildid)
-{
- TBL_PC *sd=script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
-
- script_pushint(st,sd->status.child);
- return true;
+BUILDIN(getchildid) {
+ TBL_PC *sd=script->rid2sd(st);
+ if (sd == NULL) {
+ script_pushint(st,0);
+ return true;
+ }
+
+ script_pushint(st,sd->status.child);
+ return true;
}
-BUILDIN(getmotherid)
-{
- TBL_PC *sd=script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
-
- script_pushint(st,sd->status.mother);
- return true;
+BUILDIN(getmotherid) {
+ TBL_PC *sd=script->rid2sd(st);
+ if (sd == NULL) {
+ script_pushint(st,0);
+ return true;
+ }
+
+ script_pushint(st,sd->status.mother);
+ return true;
}
-BUILDIN(getfatherid)
-{
- TBL_PC *sd=script->rid2sd(st);
- if (sd == NULL) {
- script_pushint(st,0);
- return true;
- }
-
- script_pushint(st,sd->status.father);
- return true;
+BUILDIN(getfatherid) {
+ TBL_PC *sd=script->rid2sd(st);
+ if (sd == NULL) {
+ script_pushint(st,0);
+ return true;
+ }
+
+ script_pushint(st,sd->status.father);
+ return true;
}
BUILDIN(warppartner)
@@ -11517,17 +11434,17 @@ BUILDIN(warppartner)
const char *str;
TBL_PC *sd=script->rid2sd(st);
TBL_PC *p_sd=NULL;
-
- if(sd==NULL || !pc->ismarried(sd) ||
- (p_sd=map->charid2sd(sd->status.partner_id)) == NULL) {
+
+ if ( sd==NULL || !pc->ismarried(sd)
+ || (p_sd=map->charid2sd(sd->status.partner_id)) == NULL) {
script_pushint(st,0);
return true;
}
-
+
str=script_getstr(st,2);
x=script_getnum(st,3);
y=script_getnum(st,4);
-
+
map_index = mapindex->name2id(str);
if (map_index) {
pc->setpos(p_sd,map_index,x,y,CLR_OUTSIGHT);
@@ -11542,10 +11459,10 @@ BUILDIN(warppartner)
*------------------------------------------------*/
BUILDIN(strmobinfo)
{
-
+
int num=script_getnum(st,2);
int class_=script_getnum(st,3);
-
+
if(!mob->db_checkid(class_))
{
if (num < 3) //requested a string
@@ -11554,7 +11471,7 @@ BUILDIN(strmobinfo)
script_pushint(st,0);
return true;
}
-
+
switch (num) {
case 1: script_pushstrcopy(st,mob->db(class_)->name); break;
case 2: script_pushstrcopy(st,mob->db(class_)->jname); break;
@@ -11577,28 +11494,27 @@ BUILDIN(strmobinfo)
BUILDIN(guardian) {
int class_ = 0, x = 0, y = 0, guardian = 0;
const char *str, *mapname, *evt="";
- struct script_data *data;
bool has_index = false;
-
+
mapname = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
str = script_getstr(st,5);
class_ = script_getnum(st,6);
-
+
if( script_hasdata(st,8) )
{// "<event label>",<guardian index>
evt=script_getstr(st,7);
guardian=script_getnum(st,8);
has_index = true;
- } else if( script_hasdata(st,7) ){
- data=script_getdata(st,7);
- script->get_val(st,data);
- if( data_isstring(data) )
- {// "<event label>"
+ } else if( script_hasdata(st,7) ) {
+ struct script_data *data = script_getdata(st,7);
+ script->get_val(st,data); // Dereference if it's a variable
+ if( data_isstring(data) ) {
+ // "<event label>"
evt=script_getstr(st,7);
- } else if( data_isint(data) )
- {// <guardian index>
+ } else if( data_isint(data) ) {
+ // <guardian index>
guardian=script_getnum(st,7);
has_index = true;
} else {
@@ -11607,10 +11523,10 @@ BUILDIN(guardian) {
return false;
}
}
-
+
script->check_event(st, evt);
script_pushint(st, mob->spawn_guardian(mapname,x,y,str,class_,evt,guardian,has_index));
-
+
return true;
}
/*==========================================
@@ -11620,7 +11536,7 @@ BUILDIN(setwall) {
const char *mapname, *name;
int x, y, m, size, dir;
bool shootable;
-
+
mapname = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
@@ -11628,17 +11544,17 @@ BUILDIN(setwall) {
dir = script_getnum(st,6);
shootable = script_getnum(st,7);
name = script_getstr(st,8);
-
+
if( (m = map->mapname2mapid(mapname)) < 0 )
return true; // Invalid Map
-
+
map->iwall_set(m, x, y, size, dir, shootable, name);
return true;
}
BUILDIN(delwall) {
const char *name = script_getstr(st,2);
map->iwall_remove(name);
-
+
return true;
}
@@ -11653,15 +11569,15 @@ BUILDIN(guardianinfo) {
const char* mapname = mapindex->getmapname(script_getstr(st,2),NULL);
int id = script_getnum(st,3);
int type = script_getnum(st,4);
-
+
struct guild_castle* gc = guild->mapname2gc(mapname);
struct mob_data* gd;
-
+
if( gc == NULL || id < 0 || id >= MAX_GUARDIANS ) {
script_pushint(st,-1);
return true;
}
-
+
if( type == 0 )
script_pushint(st, gc->guardian[id].visible);
else if( !gc->guardian[id].visible )
@@ -11674,39 +11590,34 @@ BUILDIN(guardianinfo) {
script_pushint(st,gd->status.hp);
else
script_pushint(st,-1);
-
+
return true;
}
/*==========================================
* Get the item name by item_id or null
*------------------------------------------*/
-BUILDIN(getitemname)
-{
+BUILDIN(getitemname) {
int item_id=0;
struct item_data *i_data;
char *item_name;
- struct script_data *data;
-
- data=script_getdata(st,2);
- script->get_val(st,data);
-
- if( data_isstring(data) ){
- const char *name=script->conv_str(st,data);
+
+ if( script_isstringtype(st, 2) ) {
+ const char *name = script_getstr(st, 2);
struct item_data *item_data = itemdb->search_name(name);
if( item_data )
item_id=item_data->nameid;
- }else
- item_id=script->conv_num(st,data);
-
+ } else {
+ item_id = script_getnum(st, 2);
+ }
+
i_data = itemdb->exists(item_id);
- if (i_data == NULL)
- {
+ if (i_data == NULL) {
script_pushconststr(st,"null");
return true;
}
item_name=(char *)aMalloc(ITEM_NAME_LENGTH*sizeof(char));
-
+
memcpy(item_name, i_data->jname, ITEM_NAME_LENGTH);
script_pushstr(st,item_name);
return true;
@@ -11718,11 +11629,11 @@ BUILDIN(getitemslots)
{
int item_id;
struct item_data *i_data;
-
+
item_id=script_getnum(st,2);
-
+
i_data = itemdb->exists(item_id);
-
+
if (i_data)
script_pushint(st,i_data->slot);
else
@@ -11735,35 +11646,35 @@ BUILDIN(getitemslots)
/*==========================================
* Returns some values of an item [Lupus]
* Price, Weight, etc...
- getiteminfo(itemID,n), where n
- 0 value_buy;
- 1 value_sell;
- 2 type;
- 3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
- if = 0, then monsters don't drop it at all (rare or a quest item)
- if = -1, then this item is sold in NPC shops only
- 4 sex;
- 5 equip;
- 6 weight;
- 7 atk;
- 8 def;
- 9 range;
- 10 slot;
- 11 look;
- 12 elv;
- 13 wlv;
- 14 view id
+ * getiteminfo(itemID,n), where n
+ * 0 value_buy;
+ * 1 value_sell;
+ * 2 type;
+ * 3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
+ * if = 0, then monsters don't drop it at all (rare or a quest item)
+ * if = -1, then this item is sold in NPC shops only
+ * 4 sex;
+ * 5 equip;
+ * 6 weight;
+ * 7 atk;
+ * 8 def;
+ * 9 range;
+ * 10 slot;
+ * 11 look;
+ * 12 elv;
+ * 13 wlv;
+ * 14 view id
*------------------------------------------*/
BUILDIN(getiteminfo)
{
int item_id,n;
int *item_arr;
struct item_data *i_data;
-
- item_id = script_getnum(st,2);
- n = script_getnum(st,3);
- i_data = itemdb->exists(item_id);
-
+
+ item_id = script_getnum(st,2);
+ n = script_getnum(st,3);
+ i_data = itemdb->exists(item_id);
+
if (i_data && n>=0 && n<=14) {
item_arr = (int*)&i_data->value_buy;
script_pushint(st,item_arr[n]);
@@ -11775,24 +11686,24 @@ BUILDIN(getiteminfo)
/*==========================================
* Set some values of an item [Lupus]
* Price, Weight, etc...
- setiteminfo(itemID,n,Value), where n
- 0 value_buy;
- 1 value_sell;
- 2 type;
- 3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
- if = 0, then monsters don't drop it at all (rare or a quest item)
- if = -1, then this item is sold in NPC shops only
- 4 sex;
- 5 equip;
- 6 weight;
- 7 atk;
- 8 def;
- 9 range;
- 10 slot;
- 11 look;
- 12 elv;
- 13 wlv;
- 14 view id
+ * setiteminfo(itemID,n,Value), where n
+ * 0 value_buy;
+ * 1 value_sell;
+ * 2 type;
+ * 3 maxchance = Max drop chance of this item e.g. 1 = 0.01% , etc..
+ * if = 0, then monsters don't drop it at all (rare or a quest item)
+ * if = -1, then this item is sold in NPC shops only
+ * 4 sex;
+ * 5 equip;
+ * 6 weight;
+ * 7 atk;
+ * 8 def;
+ * 9 range;
+ * 10 slot;
+ * 11 look;
+ * 12 elv;
+ * 13 wlv;
+ * 14 view id
* Returns Value or -1 if the wrong field's been set
*------------------------------------------*/
BUILDIN(setiteminfo)
@@ -11800,12 +11711,12 @@ BUILDIN(setiteminfo)
int item_id,n,value;
int *item_arr;
struct item_data *i_data;
-
- item_id = script_getnum(st,2);
- n = script_getnum(st,3);
- value = script_getnum(st,4);
- i_data = itemdb->exists(item_id);
-
+
+ item_id = script_getnum(st,2);
+ n = script_getnum(st,3);
+ value = script_getnum(st,4);
+ i_data = itemdb->exists(item_id);
+
if (i_data && n>=0 && n<=14) {
item_arr = (int*)&i_data->value_buy;
item_arr[n] = value;
@@ -11817,21 +11728,21 @@ BUILDIN(setiteminfo)
/*==========================================
* Returns value from equipped item slot n [Lupus]
- getequpcardid(num,slot)
- where
- num = eqip position slot
- slot = 0,1,2,3 (Card Slot N)
-
- This func returns CARD ID, 255,254,-255 (for card 0, if the item is produced)
- it's useful when you want to check item cards or if it's signed
- Useful for such quests as "Sign this refined item with players name" etc
- Hat[0] +4 -> Player's Hat[0] +4
+ * getequpcardid(num,slot)
+ * where
+ * num = eqip position slot
+ * slot = 0,1,2,3 (Card Slot N)
+ *
+ * This func returns CARD ID, 255,254,-255 (for card 0, if the item is produced)
+ * it's useful when you want to check item cards or if it's signed
+ * Useful for such quests as "Sign this refined item with players name" etc
+ * Hat[0] +4 -> Player's Hat[0] +4
*------------------------------------------*/
BUILDIN(getequipcardid)
{
int i=-1,num,slot;
TBL_PC *sd;
-
+
num=script_getnum(st,2);
slot=script_getnum(st,3);
sd=script->rid2sd(st);
@@ -11841,7 +11752,7 @@ BUILDIN(getequipcardid)
script_pushint(st,sd->status.inventory[i].card[slot]);
else
script_pushint(st,0);
-
+
return true;
}
@@ -11851,12 +11762,12 @@ BUILDIN(getequipcardid)
BUILDIN(petskillbonus)
{
struct pet_data *pd;
-
+
TBL_PC *sd=script->rid2sd(st);
-
+
if(sd==NULL || sd->pd==NULL)
return true;
-
+
pd=sd->pd;
if (pd->bonus)
{ //Clear previous bonus
@@ -11864,21 +11775,21 @@ BUILDIN(petskillbonus)
timer->delete(pd->bonus->timer, pet->skill_bonus_timer);
} else //init
pd->bonus = (struct pet_bonus *) aMalloc(sizeof(struct pet_bonus));
-
+
pd->bonus->type=script_getnum(st,2);
pd->bonus->val=script_getnum(st,3);
pd->bonus->duration=script_getnum(st,4);
pd->bonus->delay=script_getnum(st,5);
-
+
if (pd->state.skillbonus == 1)
- pd->state.skillbonus=0; // waiting state
-
+ pd->state.skillbonus=0; // waiting state
+
// wait for timer to start
if (battle_config.pet_equip_required && pd->pet.equip == 0)
pd->bonus->timer = INVALID_TIMER;
else
pd->bonus->timer = timer->add(timer->gettick()+pd->bonus->delay*1000, pet->skill_bonus_timer, sd->bl.id, 0);
-
+
return true;
}
@@ -11890,32 +11801,32 @@ BUILDIN(petloot)
int max;
struct pet_data *pd;
TBL_PC *sd=script->rid2sd(st);
-
+
if(sd==NULL || sd->pd==NULL)
return true;
-
+
max=script_getnum(st,2);
-
+
if(max < 1)
- max = 1; //Let'em loot at least 1 item.
+ max = 1; //Let'em loot at least 1 item.
else if (max > MAX_PETLOOT_SIZE)
max = MAX_PETLOOT_SIZE;
-
+
pd = sd->pd;
- if (pd->loot != NULL)
- { //Release whatever was there already and reallocate memory
+ if (pd->loot != NULL) {
+ //Release whatever was there already and reallocate memory
pet->lootitem_drop(pd, pd->msd);
aFree(pd->loot->item);
}
else
pd->loot = (struct pet_loot *)aMalloc(sizeof(struct pet_loot));
-
+
pd->loot->item = (struct item *)aCalloc(max,sizeof(struct item));
-
+
pd->loot->max=max;
pd->loot->count = 0;
pd->loot->weight = 0;
-
+
return true;
}
/*==========================================
@@ -11929,11 +11840,11 @@ BUILDIN(getinventorylist)
{
TBL_PC *sd=script->rid2sd(st);
char card_var[NAME_LENGTH];
-
+
int i,j=0,k;
if(!sd) return true;
- for(i=0;i<MAX_INVENTORY;i++){
- if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0){
+ for(i=0;i<MAX_INVENTORY;i++) {
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount > 0) {
pc->setreg(sd,reference_uid(script->add_str("@inventorylist_id"), j),sd->status.inventory[i].nameid);
pc->setreg(sd,reference_uid(script->add_str("@inventorylist_amount"), j),sd->status.inventory[i].amount);
pc->setreg(sd,reference_uid(script->add_str("@inventorylist_equip"), j),sd->status.inventory[i].equip);
@@ -11947,7 +11858,7 @@ BUILDIN(getinventorylist)
}
pc->setreg(sd,reference_uid(script->add_str("@inventorylist_expire"), j),sd->status.inventory[i].expire_time);
pc->setreg(sd,reference_uid(script->add_str("@inventorylist_bound"), j),sd->status.inventory[i].bound);
- j++;
+ j++;
}
}
pc->setreg(sd,script->add_str("@inventorylist_count"),j);
@@ -11959,8 +11870,8 @@ BUILDIN(getskilllist)
TBL_PC *sd=script->rid2sd(st);
int i,j=0;
if(!sd) return true;
- for(i=0;i<MAX_SKILL;i++){
- if(sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0){
+ for(i=0;i<MAX_SKILL;i++) {
+ if(sd->status.skill[i].id > 0 && sd->status.skill[i].lv > 0) {
pc->setreg(sd,reference_uid(script->add_str("@skilllist_id"), j),sd->status.skill[i].id);
pc->setreg(sd,reference_uid(script->add_str("@skilllist_lv"), j),sd->status.skill[i].lv);
pc->setreg(sd,reference_uid(script->add_str("@skilllist_flag"), j),sd->status.skill[i].flag);
@@ -11992,15 +11903,15 @@ BUILDIN(disguise)
int id;
TBL_PC* sd = script->rid2sd(st);
if (sd == NULL) return true;
-
+
id = script_getnum(st,2);
-
+
if (mob->db_checkid(id) || npcdb_checkid(id)) {
pc->disguise(sd, id);
script_pushint(st,id);
} else
script_pushint(st,0);
-
+
return true;
}
@@ -12011,7 +11922,7 @@ BUILDIN(undisguise)
{
TBL_PC* sd = script->rid2sd(st);
if (sd == NULL) return true;
-
+
if (sd->disguise != -1) {
pc->disguise(sd, -1);
script_pushint(st,0);
@@ -12028,9 +11939,9 @@ BUILDIN(undisguise)
BUILDIN(classchange) {
int _class,type;
struct block_list *bl=map->id2bl(st->oid);
-
+
if(bl==NULL) return true;
-
+
_class=script_getnum(st,2);
type=script_getnum(st,3);
clif->class_change(bl,_class,type);
@@ -12043,13 +11954,13 @@ BUILDIN(classchange) {
BUILDIN(misceffect)
{
int type;
-
+
type=script_getnum(st,2);
if(st->oid && st->oid != npc->fake_nd->bl.id) {
struct block_list *bl = map->id2bl(st->oid);
if (bl)
clif->specialeffect(bl,type,AREA);
- } else{
+ } else {
TBL_PC *sd=script->rid2sd(st);
if(sd)
clif->specialeffect(&sd->bl,type,AREA);
@@ -12063,30 +11974,30 @@ BUILDIN(playbgm)
{
const char* name;
struct map_session_data* sd;
-
+
if( ( sd = script->rid2sd(st) ) != NULL )
{
name = script_getstr(st,2);
-
+
clif->playBGM(sd, name);
}
-
+
return true;
}
int playbgm_sub(struct block_list* bl,va_list ap)
{
const char* name = va_arg(ap,const char*);
-
+
clif->playBGM(BL_CAST(BL_PC, bl), name);
-
+
return 0;
}
int playbgm_foreachpc_sub(struct map_session_data* sd, va_list args)
{
const char* name = va_arg(args, const char*);
-
+
clif->playBGM(sd, name);
return 0;
}
@@ -12096,9 +12007,9 @@ int playbgm_foreachpc_sub(struct map_session_data* sd, va_list args)
*------------------------------------------*/
BUILDIN(playbgmall) {
const char* name;
-
+
name = script_getstr(st,2);
-
+
if( script_hasdata(st,7) ) {
// specified part of map
const char *mapname = script_getstr(st,3);
@@ -12107,29 +12018,29 @@ BUILDIN(playbgmall) {
int x1 = script_getnum(st,6);
int y1 = script_getnum(st,7);
int m;
-
+
if ( ( m = map->mapname2mapid(mapname) ) == -1 ) {
ShowWarning("playbgmall: Attempted to play song '%s' on non-existent map '%s'\n",name, mapname);
return true;
}
-
+
map->foreachinarea(script->playbgm_sub, m, x0, y0, x1, y1, BL_PC, name);
} else if( script_hasdata(st,3) ) {
// entire map
const char* mapname = script_getstr(st,3);
int m;
-
+
if ( ( m = map->mapname2mapid(mapname) ) == -1 ) {
ShowWarning("playbgmall: Attempted to play song '%s' on non-existent map '%s'\n",name, mapname);
return true;
}
-
+
map->foreachinmap(script->playbgm_sub, m, BL_PC, name);
} else {
// entire server
map->foreachpc(script->playbgm_foreachpc_sub, name);
}
-
+
return true;
}
@@ -12141,7 +12052,7 @@ BUILDIN(soundeffect)
TBL_PC* sd = script->rid2sd(st);
const char* name = script_getstr(st,2);
int type = script_getnum(st,3);
-
+
if(sd)
{
clif->soundeffect(sd,&sd->bl,name,type);
@@ -12153,9 +12064,9 @@ int soundeffect_sub(struct block_list* bl,va_list ap)
{
char* name = va_arg(ap,char*);
int type = va_arg(ap,int);
-
+
clif->soundeffect((TBL_PC *)bl, bl, name, type);
-
+
return true;
}
@@ -12167,28 +12078,28 @@ BUILDIN(soundeffectall) {
struct block_list* bl;
const char* name;
int type;
-
+
bl = (st->rid) ? &(script->rid2sd(st)->bl) : map->id2bl(st->oid);
if (!bl)
return true;
-
+
name = script_getstr(st,2);
type = script_getnum(st,3);
-
+
//FIXME: enumerating map squares (map->foreach) is slower than enumerating the list of online players (map->foreachpc?) [ultramage]
-
+
if(!script_hasdata(st,4)) { // area around
clif->soundeffectall(bl, name, type, AREA);
} else {
if(!script_hasdata(st,5)) { // entire map
const char *mapname = script_getstr(st,4);
int m;
-
+
if ( ( m = map->mapname2mapid(mapname) ) == -1 ) {
ShowWarning("soundeffectall: Attempted to play song '%s' (type %d) on non-existent map '%s'\n",name,type, mapname);
return true;
}
-
+
map->foreachinmap(script->soundeffect_sub, m, BL_PC, name, type);
} else if(script_hasdata(st,8)) { // specified part of map
const char *mapname = script_getstr(st,4);
@@ -12197,18 +12108,18 @@ BUILDIN(soundeffectall) {
int x1 = script_getnum(st,7);
int y1 = script_getnum(st,8);
int m;
-
+
if ( ( m = map->mapname2mapid(mapname) ) == -1 ) {
ShowWarning("soundeffectall: Attempted to play song '%s' (type %d) on non-existent map '%s'\n",name,type, mapname);
return true;
}
-
+
map->foreachinarea(script->soundeffect_sub, m, x0, y0, x1, y1, BL_PC, name, type);
} else {
ShowError("buildin_soundeffectall: insufficient arguments for specific area broadcast.\n");
}
}
-
+
return true;
}
/*==========================================
@@ -12218,23 +12129,23 @@ BUILDIN(petrecovery)
{
struct pet_data *pd;
TBL_PC *sd=script->rid2sd(st);
-
+
if(sd==NULL || sd->pd==NULL)
return true;
-
+
pd=sd->pd;
-
+
if (pd->recovery)
{ //Halt previous bonus
if (pd->recovery->timer != INVALID_TIMER)
timer->delete(pd->recovery->timer, pet->recovery_timer);
} else //Init
pd->recovery = (struct pet_recovery *)aMalloc(sizeof(struct pet_recovery));
-
+
pd->recovery->type = (sc_type)script_getnum(st,2);
pd->recovery->delay = script_getnum(st,3);
pd->recovery->timer = INVALID_TIMER;
-
+
return true;
}
@@ -12245,10 +12156,10 @@ BUILDIN(petheal)
{
struct pet_data *pd;
TBL_PC *sd=script->rid2sd(st);
-
+
if(sd==NULL || sd->pd==NULL)
return true;
-
+
pd=sd->pd;
if (pd->s_skill)
{ //Clear previous skill
@@ -12261,20 +12172,20 @@ BUILDIN(petheal)
}
} else //init memory
pd->s_skill = (struct pet_skill_support *) aMalloc(sizeof(struct pet_skill_support));
-
+
pd->s_skill->id=0; //This id identifies that it IS petheal rather than pet_skillsupport
//Use the lv as the amount to heal
pd->s_skill->lv=script_getnum(st,2);
pd->s_skill->delay=script_getnum(st,3);
pd->s_skill->hp=script_getnum(st,4);
pd->s_skill->sp=script_getnum(st,5);
-
+
//Use delay as initial offset to avoid skill/heal exploits
if (battle_config.pet_equip_required && pd->pet.equip == 0)
pd->s_skill->timer = INVALID_TIMER;
else
pd->s_skill->timer = timer->add(timer->gettick()+pd->s_skill->delay*1000,pet->heal_timer,sd->bl.id,0);
-
+
return true;
}
@@ -12283,24 +12194,23 @@ BUILDIN(petheal)
*------------------------------------------*/
/// petskillattack <skill id>,<level>,<rate>,<bonusrate>
/// petskillattack "<skill name>",<level>,<rate>,<bonusrate>
-BUILDIN(petskillattack)
-{
+BUILDIN(petskillattack) {
struct pet_data *pd;
TBL_PC *sd=script->rid2sd(st);
-
+
if(sd==NULL || sd->pd==NULL)
return true;
-
+
pd=sd->pd;
if (pd->a_skill == NULL)
pd->a_skill = (struct pet_skill_attack *)aMalloc(sizeof(struct pet_skill_attack));
-
- pd->a_skill->id=( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ pd->a_skill->id=( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
pd->a_skill->lv=script_getnum(st,3);
pd->a_skill->div_ = 0;
pd->a_skill->rate=script_getnum(st,4);
pd->a_skill->bonusrate=script_getnum(st,5);
-
+
return true;
}
@@ -12309,24 +12219,23 @@ BUILDIN(petskillattack)
*------------------------------------------*/
/// petskillattack2 <skill id>,<level>,<div>,<rate>,<bonusrate>
/// petskillattack2 "<skill name>",<level>,<div>,<rate>,<bonusrate>
-BUILDIN(petskillattack2)
-{
+BUILDIN(petskillattack2) {
struct pet_data *pd;
TBL_PC *sd=script->rid2sd(st);
-
+
if(sd==NULL || sd->pd==NULL)
return true;
-
+
pd=sd->pd;
if (pd->a_skill == NULL)
pd->a_skill = (struct pet_skill_attack *)aMalloc(sizeof(struct pet_skill_attack));
-
- pd->a_skill->id=( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ pd->a_skill->id=( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
pd->a_skill->lv=script_getnum(st,3);
pd->a_skill->div_ = script_getnum(st,4);
pd->a_skill->rate=script_getnum(st,5);
pd->a_skill->bonusrate=script_getnum(st,6);
-
+
return true;
}
@@ -12335,14 +12244,13 @@ BUILDIN(petskillattack2)
*------------------------------------------*/
/// petskillsupport <skill id>,<level>,<delay>,<hp>,<sp>
/// petskillsupport "<skill name>",<level>,<delay>,<hp>,<sp>
-BUILDIN(petskillsupport)
-{
+BUILDIN(petskillsupport) {
struct pet_data *pd;
TBL_PC *sd=script->rid2sd(st);
-
+
if(sd==NULL || sd->pd==NULL)
return true;
-
+
pd=sd->pd;
if (pd->s_skill)
{ //Clear previous skill
@@ -12355,19 +12263,19 @@ BUILDIN(petskillsupport)
}
} else //init memory
pd->s_skill = (struct pet_skill_support *) aMalloc(sizeof(struct pet_skill_support));
-
- pd->s_skill->id=( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ pd->s_skill->id=( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
pd->s_skill->lv=script_getnum(st,3);
pd->s_skill->delay=script_getnum(st,4);
pd->s_skill->hp=script_getnum(st,5);
pd->s_skill->sp=script_getnum(st,6);
-
+
//Use delay as initial offset to avoid skill/heal exploits
if (battle_config.pet_equip_required && pd->pet.equip == 0)
pd->s_skill->timer = INVALID_TIMER;
else
pd->s_skill->timer = timer->add(timer->gettick()+pd->s_skill->delay*1000,pet->skill_support_timer,sd->bl.id,0);
-
+
return true;
}
@@ -12376,16 +12284,15 @@ BUILDIN(petskillsupport)
*------------------------------------------*/
/// skilleffect <skill id>,<level>
/// skilleffect "<skill name>",<level>
-BUILDIN(skilleffect)
-{
+BUILDIN(skilleffect) {
TBL_PC *sd;
-
- uint16 skill_id=( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ uint16 skill_id=( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
uint16 skill_lv=script_getnum(st,3);
sd=script->rid2sd(st);
-
+
clif->skill_nodamage(&sd->bl,&sd->bl,skill_id,skill_lv,1);
-
+
return true;
}
@@ -12396,15 +12303,15 @@ BUILDIN(skilleffect)
/// npcskilleffect "<skill name>",<level>,<x>,<y>
BUILDIN(npcskilleffect) {
struct block_list *bl= map->id2bl(st->oid);
-
- uint16 skill_id=( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
+
+ uint16 skill_id=( script_isstringtype(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
uint16 skill_lv=script_getnum(st,3);
int x=script_getnum(st,4);
int y=script_getnum(st,5);
-
+
if (bl)
clif->skill_poseffect(bl,skill_id,skill_lv,x,y,timer->gettick());
-
+
return true;
}
@@ -12415,10 +12322,10 @@ BUILDIN(specialeffect) {
struct block_list *bl=map->id2bl(st->oid);
int type = script_getnum(st,2);
enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA;
-
+
if(bl==NULL)
return true;
-
+
if( script_hasdata(st,4) )
{
TBL_NPC *nd = npc->name2id(script_getstr(st,4));
@@ -12435,7 +12342,7 @@ BUILDIN(specialeffect) {
clif->specialeffect(bl, type, target);
}
}
-
+
return true;
}
@@ -12443,13 +12350,13 @@ BUILDIN(specialeffect2) {
TBL_PC *sd=script->rid2sd(st);
int type = script_getnum(st,2);
enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA;
-
+
if( script_hasdata(st,4) )
sd = map->nick2sd(script_getstr(st,4));
-
+
if (sd)
clif->specialeffect(&sd->bl, type, target);
-
+
return true;
}
@@ -12460,10 +12367,10 @@ BUILDIN(nude)
{
TBL_PC *sd = script->rid2sd(st);
int i, calcflag = 0;
-
+
if( sd == NULL )
return true;
-
+
for( i = 0 ; i < EQI_MAX; i++ ) {
if( sd->equip_index[ i ] >= 0 ) {
if( !calcflag )
@@ -12471,10 +12378,10 @@ BUILDIN(nude)
pc->unequipitem( sd , sd->equip_index[ i ] , 2);
}
}
-
+
if( calcflag )
status_calc_pc(sd,SCO_NONE);
-
+
return true;
}
@@ -12486,16 +12393,16 @@ BUILDIN(atcommand) {
int fd;
const char* cmd;
bool ret = true;
-
+
cmd = script_getstr(st,2);
-
+
if (st->rid) {
sd = script->rid2sd(st);
fd = sd->fd;
} else { //Use a dummy character.
sd = dummy_sd = pc->get_dummy_sd();
fd = 0;
-
+
if (st->oid) {
struct block_list* bl = map->id2bl(st->oid);
memcpy(&sd->bl, bl, sizeof(struct block_list));
@@ -12503,7 +12410,7 @@ BUILDIN(atcommand) {
safestrncpy(sd->status.name, ((TBL_NPC*)bl)->name, NAME_LENGTH);
}
}
-
+
if (!atcommand->parse(fd, sd, cmd, 0)) {
ShowWarning("script: buildin_atcommand: failed to execute command '%s'\n", cmd);
script->reportsrc(st);
@@ -12534,7 +12441,7 @@ BUILDIN(recovery)
{
TBL_PC* sd;
struct s_mapiterator* iter;
-
+
iter = mapit_getallusers();
for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) )
{
@@ -12557,7 +12464,7 @@ BUILDIN(getpetinfo)
TBL_PC *sd=script->rid2sd(st);
TBL_PET *pd;
int type=script_getnum(st,2);
-
+
if(!sd || !sd->pd) {
if (type == 2)
script_pushconststr(st,"null");
@@ -12566,7 +12473,7 @@ BUILDIN(getpetinfo)
return true;
}
pd = sd->pd;
- switch(type){
+ switch(type) {
case 0: script_pushint(st,pd->pet.pet_id); break;
case 1: script_pushint(st,pd->pet.class_); break;
case 2: script_pushstrcopy(st,pd->pet.name); break;
@@ -12590,7 +12497,7 @@ BUILDIN(gethominfo)
{
TBL_PC *sd=script->rid2sd(st);
int type = script_getnum(st,2);
-
+
if(!sd || !sd->hd) {
if (type == 2)
script_pushconststr(st,"null");
@@ -12598,8 +12505,8 @@ BUILDIN(gethominfo)
script_pushint(st,0);
return true;
}
-
- switch(type){
+
+ switch(type) {
case 0: script_pushint(st,sd->hd->homunculus.hom_id); break;
case 1: script_pushint(st,sd->hd->homunculus.class_); break;
case 2: script_pushstrcopy(st,sd->hd->homunculus.name); break;
@@ -12620,12 +12527,12 @@ BUILDIN(getmercinfo) {
int type, char_id;
struct map_session_data* sd;
struct mercenary_data* md;
-
+
type = script_getnum(st,2);
-
+
if( script_hasdata(st,3) ) {
char_id = script_getnum(st,3);
-
+
if( ( sd = map->charid2sd(char_id) ) == NULL ) {
ShowError("buildin_getmercinfo: No such character (char_id=%d).\n", char_id);
script_pushnil(st);
@@ -12637,9 +12544,9 @@ BUILDIN(getmercinfo) {
return true;
}
}
-
+
md = ( sd->status.mer_id && sd->md ) ? sd->md : NULL;
-
+
switch( type )
{
case 0: script_pushint(st,md ? md->mercenary.mercenary_id : 0); break;
@@ -12660,29 +12567,29 @@ BUILDIN(getmercinfo) {
script_pushnil(st);
return false;
}
-
+
return true;
}
/*==========================================
* Shows wether your inventory(and equips) contain
- selected card or not.
- checkequipedcard(4001);
+ * selected card or not.
+ * checkequipedcard(4001);
*------------------------------------------*/
BUILDIN(checkequipedcard)
{
TBL_PC *sd=script->rid2sd(st);
-
- if(sd){
+
+ if(sd) {
int n,i,c=0;
c=script_getnum(st,2);
-
- for(i=0;i<MAX_INVENTORY;i++){
- if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount && sd->inventory_data[i]){
+
+ for(i=0;i<MAX_INVENTORY;i++) {
+ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount && sd->inventory_data[i]) {
if (itemdb_isspecial(sd->status.inventory[i].card[0]))
continue;
- for(n=0;n<sd->inventory_data[i]->slot;n++){
- if(sd->status.inventory[i].card[n]==c){
+ for(n=0;n<sd->inventory_data[i]->slot;n++) {
+ if(sd->status.inventory[i].card[n]==c) {
script_pushint(st,1);
return true;
}
@@ -12700,12 +12607,12 @@ BUILDIN(jump_zero)
sel=script_getnum(st,2);
if(!sel) {
int pos;
- if( !data_islabel(script_getdata(st,3)) ){
+ if( !data_islabel(script_getdata(st,3)) ) {
ShowError("script: jump_zero: not label !\n");
st->state=END;
return false;
}
-
+
pos=script_getnum(st,3);
st->pos=pos;
st->state=GOTO;
@@ -12720,14 +12627,14 @@ BUILDIN(movenpc) {
TBL_NPC *nd = NULL;
const char *npc_name;
int x,y;
-
+
npc_name = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
-
+
if ((nd = npc->name2id(npc_name)) == NULL)
return -1;
-
+
if (script_hasdata(st,5))
nd->dir = script_getnum(st,5) % 8;
npc->movenpc(nd, x, y);
@@ -12740,14 +12647,14 @@ BUILDIN(movenpc) {
BUILDIN(message) {
const char *msg,*player;
TBL_PC *pl_sd = NULL;
-
+
player = script_getstr(st,2);
msg = script_getstr(st,3);
-
+
if((pl_sd=map->nick2sd((char *) player)) == NULL)
return true;
clif->message(pl_sd->fd, msg);
-
+
return true;
}
@@ -12757,10 +12664,10 @@ BUILDIN(message) {
BUILDIN(npctalk) {
const char* str;
char name[NAME_LENGTH], message[256];
-
+
struct npc_data* nd = (struct npc_data *)map->id2bl(st->oid);
str = script_getstr(st,2);
-
+
if(nd)
{
safestrncpy(name, nd->name, sizeof(name));
@@ -12768,7 +12675,7 @@ BUILDIN(npctalk) {
safesnprintf(message, sizeof(message), "%s : %s", name, str);
clif->disp_overhead(&nd->bl, message);
}
-
+
return true;
}
@@ -12776,26 +12683,26 @@ BUILDIN(npctalk) {
BUILDIN(npcspeed) {
struct npc_data* nd;
int speed;
-
+
speed = script_getnum(st,2);
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( nd ) {
unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit
nd->speed = speed;
nd->ud->state.speed_changed = 1;
}
-
+
return true;
}
// make an npc walk to a position [Valaris]
BUILDIN(npcwalkto) {
struct npc_data *nd=(struct npc_data *)map->id2bl(st->oid);
int x=0,y=0;
-
+
x=script_getnum(st,2);
y=script_getnum(st,3);
-
+
if( nd ) {
unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit
if (!nd->status.hp) {
@@ -12805,18 +12712,18 @@ BUILDIN(npcwalkto) {
}
unit->walktoxy(&nd->bl,x,y,0);
}
-
+
return true;
}
// stop an npc's movement [Valaris]
BUILDIN(npcstop) {
struct npc_data *nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( nd ) {
unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit
unit->stop_walking(&nd->bl,1|4);
}
-
+
return true;
}
@@ -12829,22 +12736,22 @@ BUILDIN(getlook)
int type,val;
TBL_PC *sd;
sd=script->rid2sd(st);
-
+
type=script_getnum(st,2);
- val=-1;
+ val = -1;
switch(type) {
- case LOOK_HAIR: val=sd->status.hair; break; //1
- case LOOK_WEAPON: val=sd->status.weapon; break; //2
- case LOOK_HEAD_BOTTOM: val=sd->status.head_bottom; break; //3
- case LOOK_HEAD_TOP: val=sd->status.head_top; break; //4
- case LOOK_HEAD_MID: val=sd->status.head_mid; break; //5
- case LOOK_HAIR_COLOR: val=sd->status.hair_color; break; //6
- case LOOK_CLOTHES_COLOR:val=sd->status.clothes_color; break; //7
- case LOOK_SHIELD: val=sd->status.shield; break; //8
- case LOOK_SHOES: break; //9
- case LOOK_ROBE: val=sd->status.robe; break; //12
- }
-
+ case LOOK_HAIR: val = sd->status.hair; break; //1
+ case LOOK_WEAPON: val = sd->status.weapon; break; //2
+ case LOOK_HEAD_BOTTOM: val = sd->status.head_bottom; break; //3
+ case LOOK_HEAD_TOP: val = sd->status.head_top; break; //4
+ case LOOK_HEAD_MID: val = sd->status.head_mid; break; //5
+ case LOOK_HAIR_COLOR: val = sd->status.hair_color; break; //6
+ case LOOK_CLOTHES_COLOR: val = sd->status.clothes_color; break; //7
+ case LOOK_SHIELD: val = sd->status.shield; break; //8
+ case LOOK_SHOES: break; //9
+ case LOOK_ROBE: val = sd->status.robe; break; //12
+ }
+
script_pushint(st,val);
return true;
}
@@ -12856,15 +12763,15 @@ BUILDIN(getsavepoint)
{
TBL_PC* sd;
int type;
-
+
sd = script->rid2sd(st);
if (sd == NULL) {
script_pushint(st,0);
return true;
}
-
+
type = script_getnum(st,2);
-
+
switch(type) {
case 0: script_pushstrcopy(st,mapindex_id2name(sd->status.save_point.map)); break;
case 1: script_pushint(st,sd->status.save_point.x); break;
@@ -12902,44 +12809,44 @@ BUILDIN(getmapxy)
{
struct block_list *bl = NULL;
TBL_PC *sd=NULL;
-
+
int num;
const char *name;
char prefix;
-
+
int x,y,type;
char mapname[MAP_NAME_LENGTH];
-
- if( !data_isreference(script_getdata(st,2)) ){
+
+ if( !data_isreference(script_getdata(st,2)) ) {
ShowWarning("script: buildin_getmapxy: not mapname variable\n");
script_pushint(st,-1);
return false;
}
- if( !data_isreference(script_getdata(st,3)) ){
+ if( !data_isreference(script_getdata(st,3)) ) {
ShowWarning("script: buildin_getmapxy: not mapx variable\n");
script_pushint(st,-1);
return false;
}
- if( !data_isreference(script_getdata(st,4)) ){
+ if( !data_isreference(script_getdata(st,4)) ) {
ShowWarning("script: buildin_getmapxy: not mapy variable\n");
script_pushint(st,-1);
return false;
}
-
+
// Possible needly check function parameters on C_STR,C_INT,C_INT
type=script_getnum(st,5);
-
- switch (type){
- case 0: //Get Character Position
+
+ switch (type) {
+ case 0: //Get Character Position
if( script_hasdata(st,6) )
sd=map->nick2sd(script_getstr(st,6));
else
sd=script->rid2sd(st);
-
+
if (sd)
bl = &sd->bl;
break;
- case 1: //Get NPC Position
+ case 1: //Get NPC Position
if( script_hasdata(st,6) )
{
struct npc_data *nd;
@@ -12949,23 +12856,23 @@ BUILDIN(getmapxy)
} else //In case the origin is not an npc?
bl=map->id2bl(st->oid);
break;
- case 2: //Get Pet Position
+ case 2: //Get Pet Position
if(script_hasdata(st,6))
sd=map->nick2sd(script_getstr(st,6));
else
sd=script->rid2sd(st);
-
+
if (sd && sd->pd)
bl = &sd->pd->bl;
break;
- case 3: //Get Mob Position
+ case 3: //Get Mob Position
break; //Not supported?
- case 4: //Get Homun Position
+ case 4: //Get Homun Position
if(script_hasdata(st,6))
sd=map->nick2sd(script_getstr(st,6));
else
sd=script->rid2sd(st);
-
+
if (sd && sd->hd)
bl = &sd->hd->bl;
break;
@@ -12974,7 +12881,7 @@ BUILDIN(getmapxy)
sd=map->nick2sd(script_getstr(st,6));
else
sd=script->rid2sd(st);
-
+
if (sd && sd->md)
bl = &sd->md->bl;
break;
@@ -12983,7 +12890,7 @@ BUILDIN(getmapxy)
sd=map->nick2sd(script_getstr(st,6));
else
sd=script->rid2sd(st);
-
+
if (sd && sd->ed)
bl = &sd->ed->bl;
break;
@@ -12996,44 +12903,44 @@ BUILDIN(getmapxy)
script_pushint(st,-1);
return true;
}
-
+
x= bl->x;
y= bl->y;
safestrncpy(mapname, map->list[bl->m].name, MAP_NAME_LENGTH);
-
+
//Set MapName$
num=st->stack->stack_data[st->start+2].u.num;
name=script->get_str(num&0x00ffffff);
prefix=*name;
-
+
if(not_server_variable(prefix))
sd=script->rid2sd(st);
else
sd=NULL;
script->set_reg(st,sd,num,name,(void*)mapname,script_getref(st,2));
-
+
//Set MapX
num=st->stack->stack_data[st->start+3].u.num;
name=script->get_str(num&0x00ffffff);
prefix=*name;
-
+
if(not_server_variable(prefix))
sd=script->rid2sd(st);
else
sd=NULL;
script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(x),script_getref(st,3));
-
+
//Set MapY
num=st->stack->stack_data[st->start+4].u.num;
name=script->get_str(num&0x00ffffff);
prefix=*name;
-
+
if(not_server_variable(prefix))
sd=script->rid2sd(st);
else
sd=NULL;
script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(y),script_getref(st,4));
-
+
//Return Success value
script_pushint(st,0);
return true;
@@ -13046,11 +12953,11 @@ BUILDIN(logmes)
{
const char *str;
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return false;
-
+
str = script_getstr(st,2);
logs->npc(sd,str);
return true;
@@ -13063,21 +12970,21 @@ BUILDIN(summon)
TBL_PC *sd;
struct mob_data *md;
int64 tick = timer->gettick();
-
+
sd=script->rid2sd(st);
if (!sd) return true;
-
- str =script_getstr(st,2);
- _class=script_getnum(st,3);
+
+ str = script_getstr(st,2);
+ _class = script_getnum(st,3);
if( script_hasdata(st,4) )
timeout=script_getnum(st,4);
- if( script_hasdata(st,5) ){
+ if( script_hasdata(st,5) ) {
event=script_getstr(st,5);
script->check_event(st, event);
}
-
+
clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
-
+
md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event, SZ_MEDIUM, AI_NONE);
if (md) {
md->master_id=sd->bl.id;
@@ -13114,18 +13021,18 @@ BUILDIN(isequippedcnt)
TBL_PC *sd;
int i, j, k, id = 1;
int ret = 0;
-
+
sd = script->rid2sd(st);
if (!sd) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
script_pushint(st,0);
return true;
}
-
+
for (i=0; id!=0; i++) {
script_fetch(st,i+2, id);
if (id <= 0)
continue;
-
+
for (j=0; j<EQI_MAX; j++) {
int index;
index = sd->equip_index[j];
@@ -13133,10 +13040,10 @@ BUILDIN(isequippedcnt)
if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index) continue;
if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index) continue;
if(j == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index)) continue;
-
+
if(!sd->inventory_data[index])
continue;
-
+
if (itemdb_type(id) != IT_CARD) { //No card. Count amount in inventory.
if (sd->inventory_data[index]->nameid == id)
ret+= sd->status.inventory[index].amount;
@@ -13150,7 +13057,7 @@ BUILDIN(isequippedcnt)
}
}
}
-
+
script_pushint(st,ret);
return true;
}
@@ -13169,14 +13076,14 @@ BUILDIN(isequipped)
int ret = -1;
//Original hash to reverse it when full check fails.
unsigned int setitem_hash = 0, setitem_hash2 = 0;
-
+
sd = script->rid2sd(st);
-
+
if (!sd) { //If the player is not attached it is a script error anyway... but better prevent the map server from crashing...
script_pushint(st,0);
return true;
}
-
+
setitem_hash = sd->bonus.setitem_hash;
setitem_hash2 = sd->bonus.setitem_hash2;
for (i=0; id!=0; i++) {
@@ -13190,10 +13097,10 @@ BUILDIN(isequipped)
if(j == EQI_HAND_R && sd->equip_index[EQI_HAND_L] == index) continue;
if(j == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index) continue;
if(j == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index)) continue;
-
+
if(!sd->inventory_data[index])
continue;
-
+
if (itemdb_type(id) != IT_CARD) {
if (sd->inventory_data[index]->nameid != id)
continue;
@@ -13203,18 +13110,18 @@ BUILDIN(isequipped)
if (sd->inventory_data[index]->slot == 0 ||
itemdb_isspecial(sd->status.inventory[index].card[0]))
continue;
-
- for (k = 0; k < sd->inventory_data[index]->slot; k++)
- { //New hash system which should support up to 4 slots on any equipment. [Skotlex]
+
+ for (k = 0; k < sd->inventory_data[index]->slot; k++) {
+ //New hash system which should support up to 4 slots on any equipment. [Skotlex]
unsigned int hash = 0;
if (sd->status.inventory[index].card[k] != id)
continue;
-
+
hash = 1<<((j<5?j:j-5)*4 + k);
// check if card is already used by another set
if ( ( j < 5 ? sd->bonus.setitem_hash : sd->bonus.setitem_hash2 ) & hash)
continue;
-
+
// We have found a match
flag = 1;
// Set hash so this card cannot be used by another
@@ -13250,20 +13157,20 @@ BUILDIN(cardscnt) {
int i, k, id = 1;
int ret = 0;
int index;
-
+
sd = script->rid2sd(st);
-
+
for (i=0; id!=0; i++) {
script_fetch(st,i+2, id);
if (id <= 0)
continue;
-
+
index = status->current_equip_item_index; //we get CURRENT WEAPON inventory index from status.c [Lupus]
if(index < 0) continue;
-
+
if(!sd->inventory_data[index])
continue;
-
+
if(itemdb_type(id) != IT_CARD) {
if (sd->inventory_data[index]->nameid == id)
ret+= sd->status.inventory[index].amount;
@@ -13277,7 +13184,7 @@ BUILDIN(cardscnt) {
}
}
script_pushint(st,ret);
- // script_pushint(st,status->current_equip_item_index);
+ // script_pushint(st,status->current_equip_item_index);
return true;
}
@@ -13314,7 +13221,7 @@ BUILDIN(unequip)
int i;
size_t num;
TBL_PC *sd;
-
+
num = script_getnum(st,2);
sd = script->rid2sd(st);
if( sd != NULL && num >= 1 && num <= ARRAYLENGTH(script->equip) )
@@ -13331,9 +13238,9 @@ BUILDIN(equip)
int nameid=0,i;
TBL_PC *sd;
struct item_data *item_data;
-
+
sd = script->rid2sd(st);
-
+
nameid=script_getnum(st,2);
if((item_data = itemdb->exists(nameid)) == NULL)
{
@@ -13343,7 +13250,7 @@ BUILDIN(equip)
ARR_FIND( 0, MAX_INVENTORY, i, sd->status.inventory[i].nameid == nameid && sd->status.inventory[i].equip == 0 );
if( i < MAX_INVENTORY )
pc->equipitem(sd,i,item_data->equip);
-
+
return true;
}
@@ -13353,19 +13260,19 @@ BUILDIN(autoequip)
struct item_data *item_data;
nameid=script_getnum(st,2);
flag=script_getnum(st,3);
-
+
if( ( item_data = itemdb->exists(nameid) ) == NULL )
{
ShowError("buildin_autoequip: Invalid item '%d'.\n", nameid);
return false;
}
-
+
if( !itemdb->isequip2(item_data) )
{
ShowError("buildin_autoequip: Item '%d' cannot be equipped.\n", nameid);
return false;
}
-
+
item_data->flag.autoequip = flag>0?1:0;
return true;
}
@@ -13373,15 +13280,15 @@ BUILDIN(autoequip)
BUILDIN(setbattleflag)
{
const char *flag, *value;
-
+
flag = script_getstr(st,2);
value = script_getstr(st,3); // HACK: Retrieve number as string (auto-converted) for battle_set_value
-
+
if (battle->config_set_value(flag, value) == 0)
ShowWarning("buildin_setbattleflag: unknown battle_config flag '%s'\n",flag);
else
ShowInfo("buildin_setbattleflag: battle_config flag '%s' is now set to '%s'.\n",flag,value);
-
+
return true;
}
@@ -13398,10 +13305,10 @@ BUILDIN(getbattleflag)
//-------------------------------------------------------
BUILDIN(getstrlen)
{
-
+
const char *str = script_getstr(st,2);
int len = (str) ? (int)strlen(str) : 0;
-
+
script_pushint(st,len);
return true;
}
@@ -13413,9 +13320,9 @@ BUILDIN(charisalpha)
{
const char *str=script_getstr(st,2);
int pos=script_getnum(st,3);
-
+
int val = ( str && pos >= 0 && (unsigned int)pos < strlen(str) ) ? ISALPHA( str[pos] ) != 0 : 0;
-
+
script_pushint(st,val);
return true;
}
@@ -13427,9 +13334,9 @@ BUILDIN(charisupper)
{
const char *str = script_getstr(st,2);
int pos = script_getnum(st,3);
-
+
int val = ( str && pos >= 0 && (unsigned int)pos < strlen(str) ) ? ISUPPER( str[pos] ) : 0;
-
+
script_pushint(st,val);
return true;
}
@@ -13441,9 +13348,9 @@ BUILDIN(charislower)
{
const char *str = script_getstr(st,2);
int pos = script_getnum(st,3);
-
+
int val = ( str && pos >= 0 && (unsigned int)pos < strlen(str) ) ? ISLOWER( str[pos] ) : 0;
-
+
script_pushint(st,val);
return true;
}
@@ -13454,7 +13361,7 @@ BUILDIN(charislower)
BUILDIN(charat) {
const char *str = script_getstr(st,2);
int pos = script_getnum(st,3);
-
+
if( pos >= 0 && (unsigned int)pos < strlen(str) ) {
char output[2];
output[0] = str[pos];
@@ -13474,10 +13381,10 @@ BUILDIN(setchar)
const char *c = script_getstr(st,3);
int index = script_getnum(st,4);
char *output = aStrdup(str);
-
+
if(index >= 0 && index < strlen(output))
output[index] = *c;
-
+
script_pushstr(st, output);
return true;
}
@@ -13492,19 +13399,19 @@ BUILDIN(insertchar)
int index = script_getnum(st,4);
char *output;
size_t len = strlen(str);
-
+
if(index < 0)
index = 0;
else if(index > len)
index = (int)len;
-
+
output = (char*)aMalloc(len + 2);
-
+
memcpy(output, str, index);
output[index] = c[0];
memcpy(&output[index+1], &str[index], len - index);
output[len+1] = '\0';
-
+
script_pushstr(st, output);
return true;
}
@@ -13518,19 +13425,19 @@ BUILDIN(delchar)
int index = script_getnum(st,3);
char *output;
size_t len = strlen(str);
-
+
if(index < 0 || index > len) {
//return original
output = aStrdup(str);
script_pushstr(st, output);
return true;
}
-
+
output = (char*)aMalloc(len);
-
+
memcpy(output, str, index);
memcpy(&output[index], &str[index+1], len - index);
-
+
script_pushstr(st, output);
return true;
}
@@ -13543,12 +13450,12 @@ BUILDIN(strtoupper)
const char *str = script_getstr(st,2);
char *output = aStrdup(str);
char *cursor = output;
-
+
while (*cursor != '\0') {
*cursor = TOUPPER(*cursor);
cursor++;
}
-
+
script_pushstr(st, output);
return true;
}
@@ -13561,12 +13468,12 @@ BUILDIN(strtolower)
const char *str = script_getstr(st,2);
char *output = aStrdup(str);
char *cursor = output;
-
+
while (*cursor != '\0') {
*cursor = TOLOWER(*cursor);
cursor++;
}
-
+
script_pushstr(st, output);
return true;
}
@@ -13580,18 +13487,18 @@ BUILDIN(substr)
char *output;
int start = script_getnum(st,3);
int end = script_getnum(st,4);
-
+
int len = 0;
-
+
if(start >= 0 && end < strlen(str) && start <= end) {
len = end - start + 1;
output = (char*)aMalloc(len + 1);
memcpy(output, &str[start], len);
} else
output = (char*)aMalloc(1);
-
+
output[len] = '\0';
-
+
script_pushstr(st, output);
return true;
}
@@ -13609,15 +13516,15 @@ BUILDIN(explode)
size_t len = strlen(str);
int i = 0, j = 0;
int start;
-
-
+
+
char *temp;
const char* name;
-
+
TBL_PC* sd = NULL;
-
+
temp = (char*)aMalloc(len + 1);
-
+
if( !data_isreference(data) )
{
ShowError("script:explode: not a variable\n");
@@ -13625,11 +13532,11 @@ BUILDIN(explode)
st->state = END;
return false;// not a variable
}
-
+
id = reference_getid(data);
start = reference_getindex(data);
name = reference_getname(data);
-
+
if( not_array_variable(*name) )
{
ShowError("script:explode: illegal scope\n");
@@ -13637,7 +13544,7 @@ BUILDIN(explode)
st->state = END;
return false;// not supported
}
-
+
if( !is_string_variable(name) )
{
ShowError("script:explode: not string array\n");
@@ -13645,14 +13552,14 @@ BUILDIN(explode)
st->state = END;
return false;// data type mismatch
}
-
+
if( not_server_variable(*name) )
{
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
-
+
while(str[i] != '\0') {
if(str[i] == delimiter && start < SCRIPT_MAX_ARRAYSIZE-1) { //break at delimiter but ignore after reaching last array index
temp[j] = '\0';
@@ -13666,7 +13573,7 @@ BUILDIN(explode)
//set last string
temp[j] = '\0';
script->set_reg(st, sd, reference_uid(id, start), name, (void*)temp, reference_getref(data));
-
+
aFree(temp);
return true;
}
@@ -13682,11 +13589,11 @@ BUILDIN(implode)
int32 array_size, id;
size_t len = 0, glue_len = 0, k = 0;
int i;
-
+
TBL_PC* sd = NULL;
-
+
char *output;
-
+
if( !data_isreference(data) )
{
ShowError("script:implode: not a variable\n");
@@ -13694,10 +13601,10 @@ BUILDIN(implode)
st->state = END;
return false;// not a variable
}
-
+
id = reference_getid(data);
name = reference_getname(data);
-
+
if( not_array_variable(*name) )
{
ShowError("script:implode: illegal scope\n");
@@ -13705,7 +13612,7 @@ BUILDIN(implode)
st->state = END;
return false;// not supported
}
-
+
if( !is_string_variable(name) )
{
ShowError("script:implode: not string array\n");
@@ -13713,29 +13620,29 @@ BUILDIN(implode)
st->state = END;
return false;// data type mismatch
}
-
+
if( not_server_variable(*name) )
{
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
-
+
//count chars
array_size = script->getarraysize(st, id, reference_getindex(data), is_string_variable(name), reference_getref(data)) - 1;
-
- if(array_size == -1) //empty array check (AmsTaff)
- {
- ShowWarning("script:implode: array length = 0\n");
- output = (char*)aMalloc(sizeof(char)*5);
- sprintf(output,"%s","NULL");
+
+ if(array_size == -1) {
+ //empty array check (AmsTaff)
+ ShowWarning("script:implode: array length = 0\n");
+ output = (char*)aMalloc(sizeof(char)*5);
+ sprintf(output,"%s","NULL");
} else {
for(i = 0; i <= array_size; ++i) {
temp = (char*) script->get_val2(st, reference_uid(id, i), reference_getref(data));
len += strlen(temp);
script_removetop(st, -1, 0);
}
-
+
//allocate mem
if( script_hasdata(st,3) ) {
glue = script_getstr(st,3);
@@ -13743,7 +13650,7 @@ BUILDIN(implode)
len += glue_len * (array_size);
}
output = (char*)aMalloc(len + 1);
-
+
//build output
for(i = 0; i < array_size; ++i) {
temp = (char*) script->get_val2(st, reference_uid(id, i), reference_getref(data));
@@ -13761,10 +13668,10 @@ BUILDIN(implode)
memcpy(&output[k], temp, len);
k += len;
script_removetop(st, -1, 0);
-
+
output[k] = '\0';
}
-
+
script_pushstr(st, output);
return true;
}
@@ -13774,234 +13681,233 @@ BUILDIN(implode)
// Implements C sprintf, except format %n. The resulting string is
// returned, instead of being saved in variable by reference.
//-------------------------------------------------------
-BUILDIN(sprintf)
-{
- unsigned int argc = 0, arg = 0;
- const char* format;
- char* p;
- char* q;
- char* buf = NULL;
- char* buf2 = NULL;
- struct script_data* data;
+BUILDIN(sprintf) {
+ unsigned int argc = 0, arg = 0;
+ const char* format;
+ char* p;
+ char* q;
+ char* buf = NULL;
+ char* buf2 = NULL;
+ struct script_data* data;
size_t len, buf2_len = 0;
- StringBuf final_buf;
-
- // Fetch init data
- format = script_getstr(st, 2);
- argc = script_lastdata(st)-2;
- len = strlen(format);
-
- // Skip parsing, where no parsing is required.
- if(len==0){
- script_pushconststr(st,"");
- return true;
- }
-
- // Pessimistic alloc
- CREATE(buf, char, len+1);
-
- // Need not be parsed, just solve stuff like %%.
- if(argc==0){
+ StringBuf final_buf;
+
+ // Fetch init data
+ format = script_getstr(st, 2);
+ argc = script_lastdata(st)-2;
+ len = strlen(format);
+
+ // Skip parsing, where no parsing is required.
+ if(len==0) {
+ script_pushconststr(st,"");
+ return true;
+ }
+
+ // Pessimistic alloc
+ CREATE(buf, char, len+1);
+
+ // Need not be parsed, just solve stuff like %%.
+ if(argc==0) {
memcpy(buf,format,len+1);
- script_pushstrcopy(st, buf);
- aFree(buf);
- return true;
- }
-
- safestrncpy(buf, format, len+1);
-
- // Issue sprintf for each parameter
- StrBuf->Init(&final_buf);
- q = buf;
- while((p = strchr(q, '%'))!=NULL){
- if(p!=q){
- len = p-q+1;
- if(buf2_len<len){
- RECREATE(buf2, char, len);
- buf2_len = len;
- }
- safestrncpy(buf2, q, len);
- StrBuf->AppendStr(&final_buf, buf2);
- q = p;
- }
- p = q+1;
- if(*p=='%'){ // %%
- StrBuf->AppendStr(&final_buf, "%");
- q+=2;
- continue;
- }
- if(*p=='n'){ // %n
- ShowWarning("buildin_sprintf: Format %%n not supported! Skipping...\n");
- script->reportsrc(st);
- q+=2;
- continue;
- }
- if(arg>=argc){
- ShowError("buildin_sprintf: Not enough arguments passed!\n");
- if(buf) aFree(buf);
- if(buf2) aFree(buf2);
- StrBuf->Destroy(&final_buf);
- script_pushconststr(st,"");
- return false;
- }
- if((p = strchr(q+1, '%'))==NULL){
- p = strchr(q, 0); // EOS
- }
- len = p-q+1;
- if(buf2_len<len){
- RECREATE(buf2, char, len);
- buf2_len = len;
- }
- safestrncpy(buf2, q, len);
- q = p;
-
- // Note: This assumes the passed value being the correct
- // type to the current format specifier. If not, the server
- // probably crashes or returns anything else, than expected,
- // but it would behave in normal code the same way so it's
- // the scripter's responsibility.
- data = script_getdata(st, arg+3);
- if(data_isstring(data)){ // String
- StrBuf->Printf(&final_buf, buf2, script_getstr(st, arg+3));
- }else if(data_isint(data)){ // Number
- StrBuf->Printf(&final_buf, buf2, script_getnum(st, arg+3));
- }else if(data_isreference(data)){ // Variable
- char* name = reference_getname(data);
- if(name[strlen(name)-1]=='$'){ // var Str
- StrBuf->Printf(&final_buf, buf2, script_getstr(st, arg+3));
- }else{ // var Int
- StrBuf->Printf(&final_buf, buf2, script_getnum(st, arg+3));
- }
- }else{ // Unsupported type
- ShowError("buildin_sprintf: Unknown argument type!\n");
- if(buf) aFree(buf);
- if(buf2) aFree(buf2);
- StrBuf->Destroy(&final_buf);
- script_pushconststr(st,"");
- return false;
- }
- arg++;
- }
-
- // Append anything left
- if(*q){
- StrBuf->AppendStr(&final_buf, q);
- }
-
- // Passed more, than needed
- if(arg<argc){
- ShowWarning("buildin_sprintf: Unused arguments passed.\n");
- script->reportsrc(st);
- }
-
- script_pushstrcopy(st, StrBuf->Value(&final_buf));
-
- if(buf) aFree(buf);
- if(buf2) aFree(buf2);
- StrBuf->Destroy(&final_buf);
-
- return true;
+ script_pushstrcopy(st, buf);
+ aFree(buf);
+ return true;
+ }
+
+ safestrncpy(buf, format, len+1);
+
+ // Issue sprintf for each parameter
+ StrBuf->Init(&final_buf);
+ q = buf;
+ while((p = strchr(q, '%'))!=NULL) {
+ if(p!=q) {
+ len = p-q+1;
+ if(buf2_len<len) {
+ RECREATE(buf2, char, len);
+ buf2_len = len;
+ }
+ safestrncpy(buf2, q, len);
+ StrBuf->AppendStr(&final_buf, buf2);
+ q = p;
+ }
+ p = q+1;
+ if(*p=='%') { // %%
+ StrBuf->AppendStr(&final_buf, "%");
+ q+=2;
+ continue;
+ }
+ if(*p=='n') { // %n
+ ShowWarning("buildin_sprintf: Format %%n not supported! Skipping...\n");
+ script->reportsrc(st);
+ q+=2;
+ continue;
+ }
+ if(arg>=argc) {
+ ShowError("buildin_sprintf: Not enough arguments passed!\n");
+ if(buf) aFree(buf);
+ if(buf2) aFree(buf2);
+ StrBuf->Destroy(&final_buf);
+ script_pushconststr(st,"");
+ return false;
+ }
+ if((p = strchr(q+1, '%'))==NULL) {
+ p = strchr(q, 0); // EOS
+ }
+ len = p-q+1;
+ if(buf2_len<len) {
+ RECREATE(buf2, char, len);
+ buf2_len = len;
+ }
+ safestrncpy(buf2, q, len);
+ q = p;
+
+ // Note: This assumes the passed value being the correct
+ // type to the current format specifier. If not, the server
+ // probably crashes or returns anything else, than expected,
+ // but it would behave in normal code the same way so it's
+ // the scripter's responsibility.
+ data = script_getdata(st, arg+3);
+ if(data_isstring(data)) { // String
+ StrBuf->Printf(&final_buf, buf2, script_getstr(st, arg+3));
+ } else if(data_isint(data)) { // Number
+ StrBuf->Printf(&final_buf, buf2, script_getnum(st, arg+3));
+ } else if(data_isreference(data)) { // Variable
+ char* name = reference_getname(data);
+ if(name[strlen(name)-1]=='$') { // var Str
+ StrBuf->Printf(&final_buf, buf2, script_getstr(st, arg+3));
+ } else { // var Int
+ StrBuf->Printf(&final_buf, buf2, script_getnum(st, arg+3));
+ }
+ } else { // Unsupported type
+ ShowError("buildin_sprintf: Unknown argument type!\n");
+ if(buf) aFree(buf);
+ if(buf2) aFree(buf2);
+ StrBuf->Destroy(&final_buf);
+ script_pushconststr(st,"");
+ return false;
+ }
+ arg++;
+ }
+
+ // Append anything left
+ if(*q) {
+ StrBuf->AppendStr(&final_buf, q);
+ }
+
+ // Passed more, than needed
+ if(arg<argc) {
+ ShowWarning("buildin_sprintf: Unused arguments passed.\n");
+ script->reportsrc(st);
+ }
+
+ script_pushstrcopy(st, StrBuf->Value(&final_buf));
+
+ if(buf) aFree(buf);
+ if(buf2) aFree(buf2);
+ StrBuf->Destroy(&final_buf);
+
+ return true;
}
//=======================================================
// sscanf(<str>, <format>, ...);
// Implements C sscanf.
//-------------------------------------------------------
-BUILDIN(sscanf){
- unsigned int argc, arg = 0;
- struct script_data* data;
- struct map_session_data* sd = NULL;
- const char* str;
- const char* format;
- const char* p;
- const char* q;
- char* buf = NULL;
- char* buf_p;
- char* ref_str = NULL;
- int ref_int;
+BUILDIN(sscanf) {
+ unsigned int argc, arg = 0;
+ struct script_data* data;
+ struct map_session_data* sd = NULL;
+ const char* str;
+ const char* format;
+ const char* p;
+ const char* q;
+ char* buf = NULL;
+ char* buf_p;
+ char* ref_str = NULL;
+ int ref_int;
size_t len;
-
- // Get data
- str = script_getstr(st, 2);
- format = script_getstr(st, 3);
- argc = script_lastdata(st)-3;
-
- len = strlen(format);
- CREATE(buf, char, len*2+1);
-
- // Issue sscanf for each parameter
- *buf = 0;
- q = format;
- while((p = strchr(q, '%'))){
- if(p!=q){
- strncat(buf, q, (size_t)(p-q));
- q = p;
- }
- p = q+1;
- if(*p=='*' || *p=='%'){ // Skip
- strncat(buf, q, 2);
- q+=2;
- continue;
- }
- if(arg>=argc){
- ShowError("buildin_sscanf: Not enough arguments passed!\n");
- script_pushint(st, -1);
- if(buf) aFree(buf);
- if(ref_str) aFree(ref_str);
- return false;
- }
- if((p = strchr(q+1, '%'))==NULL){
- p = strchr(q, 0); // EOS
- }
- len = p-q;
- strncat(buf, q, len);
- q = p;
-
- // Validate output
- data = script_getdata(st, arg+4);
- if(!data_isreference(data) || !reference_tovariable(data)){
- ShowError("buildin_sscanf: Target argument is not a variable!\n");
- script_pushint(st, -1);
- if(buf) aFree(buf);
- if(ref_str) aFree(ref_str);
- return false;
- }
- buf_p = reference_getname(data);
- if(not_server_variable(*buf_p) && (sd = script->rid2sd(st))==NULL){
- script_pushint(st, -1);
- if(buf) aFree(buf);
- if(ref_str) aFree(ref_str);
- return true;
- }
-
- // Save value if any
- if(buf_p[strlen(buf_p)-1]=='$'){ // String
- if(ref_str==NULL){
- CREATE(ref_str, char, strlen(str)+1);
- }
- if(sscanf(str, buf, ref_str)==0){
- break;
- }
+
+ // Get data
+ str = script_getstr(st, 2);
+ format = script_getstr(st, 3);
+ argc = script_lastdata(st)-3;
+
+ len = strlen(format);
+ CREATE(buf, char, len*2+1);
+
+ // Issue sscanf for each parameter
+ *buf = 0;
+ q = format;
+ while((p = strchr(q, '%'))) {
+ if(p!=q) {
+ strncat(buf, q, (size_t)(p-q));
+ q = p;
+ }
+ p = q+1;
+ if(*p=='*' || *p=='%') { // Skip
+ strncat(buf, q, 2);
+ q+=2;
+ continue;
+ }
+ if(arg>=argc) {
+ ShowError("buildin_sscanf: Not enough arguments passed!\n");
+ script_pushint(st, -1);
+ if(buf) aFree(buf);
+ if(ref_str) aFree(ref_str);
+ return false;
+ }
+ if((p = strchr(q+1, '%'))==NULL) {
+ p = strchr(q, 0); // EOS
+ }
+ len = p-q;
+ strncat(buf, q, len);
+ q = p;
+
+ // Validate output
+ data = script_getdata(st, arg+4);
+ if(!data_isreference(data) || !reference_tovariable(data)) {
+ ShowError("buildin_sscanf: Target argument is not a variable!\n");
+ script_pushint(st, -1);
+ if(buf) aFree(buf);
+ if(ref_str) aFree(ref_str);
+ return false;
+ }
+ buf_p = reference_getname(data);
+ if(not_server_variable(*buf_p) && (sd = script->rid2sd(st))==NULL) {
+ script_pushint(st, -1);
+ if(buf) aFree(buf);
+ if(ref_str) aFree(ref_str);
+ return true;
+ }
+
+ // Save value if any
+ if(buf_p[strlen(buf_p)-1]=='$') { // String
+ if(ref_str==NULL) {
+ CREATE(ref_str, char, strlen(str)+1);
+ }
+ if(sscanf(str, buf, ref_str)==0) {
+ break;
+ }
script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)(ref_str), reference_getref(data));
- } else { // Number
- if(sscanf(str, buf, &ref_int)==0){
- break;
- }
+ } else { // Number
+ if(sscanf(str, buf, &ref_int)==0) {
+ break;
+ }
script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)__64BPTRSIZE(ref_int), reference_getref(data));
- }
- arg++;
-
- // Disable used format (%... -> %*...)
- buf_p = strchr(buf, 0);
- memmove(buf_p-len+2, buf_p-len+1, len);
- *(buf_p-len+1) = '*';
- }
-
- script_pushint(st, arg);
- if(buf) aFree(buf);
- if(ref_str) aFree(ref_str);
-
- return true;
+ }
+ arg++;
+
+ // Disable used format (%... -> %*...)
+ buf_p = strchr(buf, 0);
+ memmove(buf_p-len+2, buf_p-len+1, len);
+ *(buf_p-len+1) = '*';
+ }
+
+ script_pushint(st, arg);
+ if(buf) aFree(buf);
+ if(ref_str) aFree(ref_str);
+
+ return true;
}
//=======================================================
@@ -14016,17 +13922,17 @@ BUILDIN(strpos) {
const char *needle = script_getstr(st,3);
int i;
size_t len;
-
+
if( script_hasdata(st,4) )
i = script_getnum(st,4);
else
i = 0;
-
+
if (needle[0] == '\0') {
script_pushint(st, -1);
return true;
}
-
+
len = strlen(haystack);
for ( ; i < len; ++i ) {
if ( haystack[i] == *needle ) {
@@ -14064,48 +13970,47 @@ BUILDIN(replacestr)
size_t findlen = strlen(find);
struct StringBuf output;
bool usecase = true;
-
+
int count = 0;
int numFinds = 0;
int i = 0, f = 0;
-
+
if(findlen == 0) {
ShowError("script:replacestr: Invalid search length.\n");
st->state = END;
return false;
}
-
+
if(script_hasdata(st, 5)) {
- if( !script_isstring(st,5) )
+ if( script_isinttype(st,5) ) {
usecase = script_getnum(st, 5) != 0;
- else {
- ShowError("script:replacestr: Invalid usecase value. Expected int got string\n");
+ } else {
+ ShowError("script:replacestr: Invalid usecase value. Expected int.\n");
st->state = END;
return false;
}
}
-
+
if(script_hasdata(st, 6)) {
- count = script_getnum(st, 6);
- if(count == 0) {
- ShowError("script:replacestr: Invalid count value. Expected int got string\n");
+ if (!script_isinttype(st, 5) || (count = script_getnum(st, 6) == 0)) {
+ ShowError("script:replacestr: Invalid count value. Expected int.\n");
st->state = END;
return false;
}
}
-
+
StrBuf->Init(&output);
-
+
for(; i < inputlen; i++) {
- if(count && count == numFinds) { //found enough, stop looking
- break;
+ if(count && count == numFinds) {
+ break; //found enough, stop looking
}
-
+
for(f = 0; f <= findlen; f++) {
if(f == findlen) { //complete match
numFinds++;
StrBuf->AppendStr(&output, replace);
-
+
i += findlen - 1;
break;
} else {
@@ -14123,11 +14028,11 @@ BUILDIN(replacestr)
}
}
}
-
+
//append excess after enough found
if(i < inputlen)
StrBuf->AppendStr(&output, &(input[i]));
-
+
script_pushstrcopy(st, StrBuf->Value(&output));
StrBuf->Destroy(&output);
return true;
@@ -14146,26 +14051,26 @@ BUILDIN(countstr)
size_t inputlen = strlen(input);
size_t findlen = strlen(find);
bool usecase = true;
-
+
int numFinds = 0;
int i = 0, f = 0;
-
+
if(findlen == 0) {
ShowError("script:countstr: Invalid search length.\n");
st->state = END;
return false;
}
-
+
if(script_hasdata(st, 4)) {
- if( !script_isstring(st,4) )
+ if( script_isinttype(st,4) )
usecase = script_getnum(st, 4) != 0;
else {
- ShowError("script:countstr: Invalid usecase value. Expected int got string\n");
+ ShowError("script:countstr: Invalid usecase value. Expected int.\n");
st->state = END;
return false;
}
}
-
+
for(; i < inputlen; i++) {
for(f = 0; f <= findlen; f++) {
if(f == findlen) { //complete match
@@ -14197,50 +14102,40 @@ BUILDIN(countstr)
/// setnpcdisplay("<npc name>", "<new display name>", <new class id>) -> <int>
/// setnpcdisplay("<npc name>", "<new display name>") -> <int>
/// setnpcdisplay("<npc name>", <new class id>) -> <int>
-BUILDIN(setnpcdisplay)
-{
+BUILDIN(setnpcdisplay) {
const char* name;
const char* newname = NULL;
int class_ = -1, size = -1;
- struct script_data* data;
struct npc_data* nd;
-
+
name = script_getstr(st,2);
- data = script_getdata(st,3);
-
+
if( script_hasdata(st,4) )
class_ = script_getnum(st,4);
if( script_hasdata(st,5) )
size = script_getnum(st,5);
-
- script->get_val(st, data);
- if( data_isstring(data) )
- newname = script->conv_str(st,data);
- else if( data_isint(data) )
- class_ = script->conv_num(st,data);
+
+ if( script_isstringtype(st, 3) )
+ newname = script_getstr(st, 3);
else
- {
- ShowError("script:setnpcdisplay: expected string or number\n");
- script->reportdata(data);
- return false;
- }
-
+ class_ = script_getnum(st, 3);
+
nd = npc->name2id(name);
if( nd == NULL )
{// not found
script_pushint(st,1);
return true;
}
-
+
// update npc
if( newname )
npc->setdisplayname(nd, newname);
-
+
if( size != -1 && size != (int)nd->size )
nd->size = size;
else
size = -1;
-
+
if( class_ != -1 && nd->class_ != class_ )
npc->setclass(nd, class_);
else if( size != -1 )
@@ -14248,7 +14143,7 @@ BUILDIN(setnpcdisplay)
clif->clearunit_area(&nd->bl, CLR_OUTSIGHT);
clif->spawn(&nd->bl);
}
-
+
script_pushint(st,0);
return true;
}
@@ -14295,12 +14190,12 @@ BUILDIN(pow)
BUILDIN(distance)
{
int x0, y0, x1, y1;
-
+
x0 = script_getnum(st,2);
y0 = script_getnum(st,3);
x1 = script_getnum(st,4);
y1 = script_getnum(st,5);
-
+
script_pushint(st,distance_xy(x0,y0,x1,y1));
return true;
}
@@ -14311,7 +14206,7 @@ BUILDIN(md5)
{
const char *tmpstr;
char *md5str;
-
+
tmpstr = script_getstr(st,2);
md5str = (char *)aMalloc((32+1)*sizeof(char));
MD5_String(tmpstr, md5str);
@@ -14328,10 +14223,10 @@ BUILDIN(setd)
const char *buffer;
int elem;
buffer = script_getstr(st, 2);
-
+
if(sscanf(buffer, "%99[^[][%d]", varname, &elem) < 2)
elem = 0;
-
+
if( not_server_variable(*varname) )
{
sd = script->rid2sd(st);
@@ -14341,13 +14236,13 @@ BUILDIN(setd)
return true;
}
}
-
+
if( is_string_variable(varname) ) {
script->setd_sub(st, sd, varname, elem, (void *)script_getstr(st, 3), NULL);
} else {
script->setd_sub(st, sd, varname, elem, (void *)__64BPTRSIZE(script_getnum(st, 3)), NULL);
}
-
+
return true;
}
@@ -14361,7 +14256,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
int max_rows = SCRIPT_MAX_ARRAYSIZE; // maximum number of rows
int num_vars;
int num_cols;
-
+
// check target variables
for( i = 3; script_hasdata(st,i); ++i ) {
data = script_getdata(st, i);
@@ -14385,22 +14280,22 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
}
}
num_vars = i - 3;
-
+
// Execute the query
query = script_getstr(st,2);
-
+
if( SQL_ERROR == SQL->QueryStr(handle, query) ) {
Sql_ShowDebug(handle);
st->state = END;
return false;
}
-
+
if( SQL->NumRows(handle) == 0 ) { // No data received
SQL->FreeResult(handle);
script_pushint(st, 0);
return true;
}
-
+
// Count the number of columns to store
num_cols = SQL->NumColumns(handle);
if( num_vars < num_cols ) {
@@ -14410,15 +14305,15 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
ShowWarning("script:query_sql: Too many variables (%u extra).\n", (unsigned int)(num_vars-num_cols));
script->reportsrc(st);
}
-
+
// Store data
for( i = 0; i < max_rows && SQL_SUCCESS == SQL->NextRow(handle); ++i ) {
for( j = 0; j < num_vars; ++j ) {
char* str = NULL;
-
+
if( j < num_cols )
SQL->GetData(handle, j, &str, NULL);
-
+
data = script_getdata(st, j+3);
name = reference_getname(data);
if( is_string_variable(name) )
@@ -14431,11 +14326,11 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
ShowWarning("script:query_sql: Only %d/%u rows have been stored.\n", max_rows, (unsigned int)SQL->NumRows(handle));
script->reportsrc(st);
}
-
+
// Free data
SQL->FreeResult(handle);
script_pushint(st, i);
-
+
return true;
}
BUILDIN(query_sql) {
@@ -14457,7 +14352,7 @@ BUILDIN(escape_sql)
const char *str;
char *esc_str;
size_t len;
-
+
str = script_getstr(st,2);
len = strlen(str);
esc_str = (char*)aMalloc(len*2+1);
@@ -14471,15 +14366,15 @@ BUILDIN(getd)
char varname[100];
const char *buffer;
int elem;
-
+
buffer = script_getstr(st, 2);
-
+
if(sscanf(buffer, "%[^[][%d]", varname, &elem) < 2)
elem = 0;
-
+
// Push the 'pointer' so it's more flexible [Lance]
script->push_val(st->stack, C_NAME, reference_uid(script->add_str(varname), elem),NULL);
-
+
return true;
}
@@ -14491,7 +14386,7 @@ BUILDIN(petstat)
struct pet_data *pd;
int flag = script_getnum(st,2);
sd = script->rid2sd(st);
- if(!sd || !sd->status.pet_id || !sd->pd){
+ if(!sd || !sd->status.pet_id || !sd->pd) {
if(flag == 2)
script_pushconststr(st, "");
else
@@ -14499,7 +14394,7 @@ BUILDIN(petstat)
return true;
}
pd = sd->pd;
- switch(flag){
+ switch(flag) {
case 1: script_pushint(st,(int)pd->pet.class_); break;
case 2: script_pushstrcopy(st, pd->pet.name); break;
case 3: script_pushint(st,(int)pd->pet.level); break;
@@ -14533,12 +14428,12 @@ BUILDIN(callshop)
script_pushint(st,0);
return false;
}
-
+
if( nd->subtype == SHOP )
{
// flag the user as using a valid script call for opening the shop (for floating NPCs)
sd->state.callshop = 1;
-
+
switch( flag )
{
case 1: npc->buysellsel(sd,nd->bl.id,0); break; //Buy window
@@ -14548,7 +14443,7 @@ BUILDIN(callshop)
}
else
clif->cashshop_show(sd, nd);
-
+
sd->npc_shopid = nd->bl.id;
script_pushint(st,1);
return true;
@@ -14560,16 +14455,16 @@ BUILDIN(npcshopitem)
struct npc_data* nd = npc->name2id(npcname);
int n, i;
int amount;
-
- if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) )
- { //Not found.
+
+ if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) ) {
+ //Not found.
script_pushint(st,0);
return true;
}
-
+
// get the count of new entries
amount = (script_lastdata(st)-2)/2;
-
+
// generate new shop item list
RECREATE(nd->u.shop.shop_item, struct npc_item_list, amount);
for( n = 0, i = 3; n < amount; n++, i+=2 )
@@ -14578,7 +14473,7 @@ BUILDIN(npcshopitem)
nd->u.shop.shop_item[n].value = script_getnum(st,i+1);
}
nd->u.shop.count = n;
-
+
script_pushint(st,1);
return true;
}
@@ -14589,16 +14484,16 @@ BUILDIN(npcshopadditem)
struct npc_data* nd = npc->name2id(npcname);
int n, i;
int amount;
-
- if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) )
- { //Not found.
+
+ if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) ) {
+ //Not found.
script_pushint(st,0);
return true;
}
-
+
// get the count of new entries
amount = (script_lastdata(st)-2)/2;
-
+
// append new items to existing shop item list
RECREATE(nd->u.shop.shop_item, struct npc_item_list, nd->u.shop.count+amount);
for( n = nd->u.shop.count, i = 3; n < nd->u.shop.count+amount; n++, i+=2 )
@@ -14607,7 +14502,7 @@ BUILDIN(npcshopadditem)
nd->u.shop.shop_item[n].value = script_getnum(st,i+1);
}
nd->u.shop.count = n;
-
+
script_pushint(st,1);
return true;
}
@@ -14620,21 +14515,21 @@ BUILDIN(npcshopdelitem)
int n, i;
int amount;
int size;
-
- if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) )
- { //Not found.
+
+ if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) ) {
+ //Not found.
script_pushint(st,0);
return true;
}
-
+
amount = script_lastdata(st)-2;
size = nd->u.shop.count;
-
+
// remove specified items from the shop item list
for( i = 3; i < 3 + amount; i++ )
{
nameid = script_getnum(st,i);
-
+
ARR_FIND( 0, size, n, nd->u.shop.shop_item[n].nameid == nameid );
if( n < size )
{
@@ -14642,10 +14537,10 @@ BUILDIN(npcshopdelitem)
size--;
}
}
-
+
RECREATE(nd->u.shop.shop_item, struct npc_item_list, size);
nd->u.shop.count = size;
-
+
script_pushint(st,1);
return true;
}
@@ -14655,21 +14550,21 @@ BUILDIN(npcshopattach) {
const char* npcname = script_getstr(st,2);
struct npc_data* nd = npc->name2id(npcname);
int flag = 1;
-
+
if( script_hasdata(st,3) )
flag = script_getnum(st,3);
-
- if( !nd || nd->subtype != SHOP )
- { //Not found.
+
+ if( !nd || nd->subtype != SHOP ) {
+ //Not found.
script_pushint(st,0);
return true;
}
-
+
if (flag)
nd->master_nd = ((struct npc_data *)map->id2bl(st->oid));
else
nd->master_nd = NULL;
-
+
script_pushint(st,1);
return true;
}
@@ -14677,11 +14572,11 @@ BUILDIN(npcshopattach) {
/*==========================================
* Returns some values of an item [Lupus]
* Price, Weight, etc...
- setitemscript(itemID,"{new item bonus script}",[n]);
- Where n:
- 0 - script
- 1 - Equip script
- 2 - Unequip script
+ * setitemscript(itemID,"{new item bonus script}",[n]);
+ * Where n:
+ * 0 - script
+ * 1 - Equip script
+ * 2 - Unequip script
*------------------------------------------*/
BUILDIN(setitemscript)
{
@@ -14689,13 +14584,13 @@ BUILDIN(setitemscript)
const char *new_bonus_script;
struct item_data *i_data;
struct script_code **dstscript;
-
- item_id = script_getnum(st,2);
+
+ item_id = script_getnum(st,2);
new_bonus_script = script_getstr(st,3);
if( script_hasdata(st,4) )
n=script_getnum(st,4);
i_data = itemdb->exists(item_id);
-
+
if (!i_data || new_bonus_script==NULL || ( new_bonus_script[0] && new_bonus_script[0]!='{' )) {
script_pushint(st,0);
return true;
@@ -14713,7 +14608,7 @@ BUILDIN(setitemscript)
}
if(*dstscript)
script->free_code(*dstscript);
-
+
*dstscript = new_bonus_script[0] ? script->parse(new_bonus_script, "script_setitemscript", 0, 0) : NULL;
script_pushint(st,1);
return true;
@@ -14733,13 +14628,13 @@ BUILDIN(addmonsterdrop) {
struct mob_db *monster;
int item_id, rate, i, c = MAX_MOB_DROP;
- if( script_isstring(st,2) )
+ if( script_isstringtype(st,2) )
monster = mob->db(mob->db_searchname(script_getstr(st,2)));
else
monster = mob->db(script_getnum(st,2));
if( monster == mob->dummy ) {
- if( script_isstring(st,2) ) {
+ if( script_isstringtype(st,2) ) {
ShowError("buildin_addmonsterdrop: invalid mob name: '%s'.\n", script_getstr(st,2));
} else {
ShowError("buildin_addmonsterdrop: invalid mob id: '%d'.\n", script_getnum(st,2));
@@ -14793,13 +14688,13 @@ BUILDIN(delmonsterdrop) {
struct mob_db *monster;
int item_id, i;
- if( script_isstring(st,2) )
- monster = mob->db(mob->db_searchname(script_getstr(st,2)));
+ if( script_isstringtype(st, 2) )
+ monster = mob->db(mob->db_searchname(script_getstr(st, 2)));
else
- monster = mob->db(script_getnum(st,2));
+ monster = mob->db(script_getnum(st, 2));
if( monster == mob->dummy ) {
- if( script_isstring(st,2) ) {
+ if( script_isstringtype(st, 2) ) {
ShowError("buildin_delmonsterdrop: invalid mob name: '%s'.\n", script_getstr(st,2));
} else {
ShowError("buildin_delmonsterdrop: invalid mob id: '%d'.\n", script_getnum(st,2));
@@ -14829,14 +14724,14 @@ BUILDIN(delmonsterdrop) {
/*==========================================
* Returns some values of a monster [Lupus]
* Name, Level, race, size, etc...
- getmonsterinfo(monsterID,queryIndex);
+ * getmonsterinfo(monsterID,queryIndex);
*------------------------------------------*/
BUILDIN(getmonsterinfo)
{
struct mob_db *monster;
int mob_id;
-
- mob_id = script_getnum(st,2);
+
+ mob_id = script_getnum(st,2);
if (!mob->db_checkid(mob_id)) {
ShowError("buildin_getmonsterinfo: Wrong Monster ID: %i\n", mob_id);
if ( !script_getnum(st,3) ) //requested a string
@@ -14878,17 +14773,17 @@ BUILDIN(getmonsterinfo)
BUILDIN(checkvending) // check vending [Nab4]
{
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, sd->state.autotrade ? 2 : sd->state.vending);
else
script_pushint(st,0);
-
+
return true;
}
@@ -14896,33 +14791,33 @@ BUILDIN(checkvending) // check vending [Nab4]
// check chatting [Marka]
BUILDIN(checkchatting) {
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,(sd->chatID != 0));
else
script_pushint(st,0);
-
+
return true;
}
BUILDIN(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_TICK32(last_tick, sd->idletime)); // TODO: change this to int64 when we'll support 64 bit script values
else
script_pushint(st, 0);
-
+
return true;
}
@@ -14932,25 +14827,25 @@ BUILDIN(searchitem)
const char *itemname = script_getstr(st,3);
struct item_data *items[MAX_SEARCH];
int count;
-
+
char* name;
int32 start;
int32 id;
int32 i;
TBL_PC* sd = NULL;
-
+
if ((items[0] = itemdb->exists(atoi(itemname))))
count = 1;
else {
count = itemdb->search_name_array(items, ARRAYLENGTH(items), itemname, 0);
if (count > MAX_SEARCH) count = MAX_SEARCH;
}
-
+
if (!count) {
script_pushint(st, 0);
return true;
}
-
+
if( !data_isreference(data) )
{
ShowError("script:searchitem: not a variable\n");
@@ -14958,7 +14853,7 @@ BUILDIN(searchitem)
st->state = END;
return false;// not a variable
}
-
+
id = reference_getid(data);
start = reference_getindex(data);
name = reference_getname(data);
@@ -14969,14 +14864,14 @@ BUILDIN(searchitem)
st->state = END;
return false;// not supported
}
-
+
if( not_server_variable(*name) )
{
sd = script->rid2sd(st);
if( sd == NULL )
return true;// no player attached
}
-
+
if( is_string_variable(name) )
{// string array
ShowError("script:searchitem: not an integer array reference\n");
@@ -14984,13 +14879,13 @@ BUILDIN(searchitem)
st->state = END;
return false;// not supported
}
-
+
for( i = 0; i < count; ++start, ++i )
{// Set array
void* v = (void*)__64BPTRSIZE((int)items[i]->nameid);
script->set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data));
}
-
+
script_pushint(st, count);
return true;
}
@@ -15063,56 +14958,56 @@ BUILDIN(rid2name) {
BUILDIN(pcblockmove) {
int id, flag;
TBL_PC *sd = NULL;
-
+
id = script_getnum(st,2);
flag = script_getnum(st,3);
-
+
if(id)
sd = map->id2sd(id);
else
sd = script->rid2sd(st);
-
+
if(sd)
sd->state.blockedmove = flag > 0;
-
+
return true;
}
BUILDIN(pcfollow) {
int id, targetid;
TBL_PC *sd = NULL;
-
-
+
+
id = script_getnum(st,2);
targetid = script_getnum(st,3);
-
+
if(id)
sd = map->id2sd(id);
else
sd = script->rid2sd(st);
-
+
if(sd)
pc->follow(sd, targetid);
-
- return true;
+
+ return true;
}
BUILDIN(pcstopfollow)
{
int id;
TBL_PC *sd = NULL;
-
-
+
+
id = script_getnum(st,2);
-
+
if(id)
sd = map->id2sd(id);
else
sd = script->rid2sd(st);
-
+
if(sd)
pc->stop_following(sd);
-
+
return true;
}
// <--- [zBuffer] List of player cont commands
@@ -15126,7 +15021,7 @@ BUILDIN(pcstopfollow)
/// unitwalk(<unit_id>,<map_id>) -> <bool>
BUILDIN(unitwalk) {
struct block_list* bl;
-
+
bl = map->id2bl(script_getnum(st,2));
if( bl == NULL ) {
script_pushint(st, 0);
@@ -15144,7 +15039,7 @@ BUILDIN(unitwalk) {
int map_id = script_getnum(st,3);
script_pushint(st, unit->walktobl(bl,map->id2bl(map_id),65025,1));
}
-
+
return true;
}
@@ -15156,7 +15051,7 @@ BUILDIN(unitkill)
struct block_list* bl = map->id2bl(script_getnum(st,2));
if( bl != NULL )
status_kill(bl);
-
+
return true;
}
@@ -15171,29 +15066,29 @@ BUILDIN(unitwarp) {
short y;
struct block_list* bl;
const char *mapname;
-
+
unit_id = script_getnum(st,2);
mapname = script_getstr(st, 3);
x = (short)script_getnum(st,4);
y = (short)script_getnum(st,5);
-
+
if (!unit_id) //Warp the script's runner
bl = map->id2bl(st->rid);
else
bl = map->id2bl(unit_id);
-
+
if( strcmp(mapname,"this") == 0 )
mapid = bl?bl->m:-1;
else
mapid = map->mapname2mapid(mapname);
-
+
if( mapid >= 0 && bl != NULL ) {
unit->bl2ud2(bl); // ensure ((TBL_NPC*)bl)->ud is safe to edit
script_pushint(st, unit->warp(bl,mapid,x,y,CLR_OUTSIGHT));
} else {
script_pushint(st, 0);
}
-
+
return true;
}
@@ -15207,35 +15102,32 @@ BUILDIN(unitwarp) {
BUILDIN(unitattack) {
struct block_list* unit_bl;
struct block_list* target_bl = NULL;
- struct script_data* data;
int actiontype = 0;
-
+
// get unit
unit_bl = map->id2bl(script_getnum(st,2));
if( unit_bl == NULL ) {
script_pushint(st, 0);
return true;
}
-
- data = script_getdata(st, 3);
- script->get_val(st, data);
- if( data_isstring(data) ) {
- TBL_PC* sd = map->nick2sd(script->conv_str(st, data));
+
+ if( script_isstringtype(st, 3) ) {
+ TBL_PC* sd = map->nick2sd(script_getstr(st, 3));
if( sd != NULL )
target_bl = &sd->bl;
} else
- target_bl = map->id2bl(script->conv_num(st, data));
+ target_bl = map->id2bl(script_getnum(st, 3));
// request the attack
if( target_bl == NULL )
{
script_pushint(st, 0);
return true;
}
-
+
// get actiontype
if( script_hasdata(st,4) )
actiontype = script_getnum(st,4);
-
+
switch( unit_bl->type )
{
case BL_PC:
@@ -15263,9 +15155,9 @@ BUILDIN(unitattack) {
BUILDIN(unitstop) {
int unit_id;
struct block_list* bl;
-
+
unit_id = script_getnum(st,2);
-
+
bl = map->id2bl(unit_id);
if( bl != NULL ) {
unit->bl2ud2(bl); // ensure ((TBL_NPC*)bl)->ud is safe to edit
@@ -15274,7 +15166,7 @@ BUILDIN(unitstop) {
if( bl->type == BL_MOB )
((TBL_MOB*)bl)->target_id = 0;
}
-
+
return true;
}
@@ -15285,10 +15177,10 @@ BUILDIN(unittalk) {
int unit_id;
const char* message;
struct block_list* bl;
-
+
unit_id = script_getnum(st,2);
message = script_getstr(st, 3);
-
+
bl = map->id2bl(unit_id);
if( bl != NULL ) {
struct StringBuf sbuf;
@@ -15299,7 +15191,7 @@ BUILDIN(unittalk) {
clif->message(((TBL_PC*)bl)->fd, StrBuf->Value(&sbuf));
StrBuf->Destroy(&sbuf);
}
-
+
return true;
}
@@ -15312,13 +15204,13 @@ BUILDIN(unitemote) {
int unit_id;
int emotion;
struct block_list* bl;
-
+
unit_id = script_getnum(st,2);
emotion = script_getnum(st,3);
bl = map->id2bl(unit_id);
if( bl != NULL )
clif->emotion(bl, emotion);
-
+
return true;
}
@@ -15332,14 +15224,14 @@ BUILDIN(unitskilluseid) {
uint16 skill_lv;
int target_id;
struct block_list* bl;
-
+
unit_id = script_getnum(st,2);
- skill_id = ( script_isstring(st,3) ? skill->name2id(script_getstr(st,3)) : script_getnum(st,3) );
+ skill_id = ( script_isstringtype(st, 3) ? skill->name2id(script_getstr(st, 3)) : script_getnum(st, 3) );
skill_lv = script_getnum(st,4);
target_id = ( script_hasdata(st,5) ? script_getnum(st,5) : unit_id );
-
+
bl = map->id2bl(unit_id);
-
+
if( bl != NULL ) {
if( bl->type == BL_NPC ) {
if (!((TBL_NPC*)bl)->status.hp) {
@@ -15350,7 +15242,7 @@ BUILDIN(unitskilluseid) {
}
unit->skilluse_id(bl, target_id, skill_id, skill_lv);
}
-
+
return true;
}
@@ -15365,15 +15257,15 @@ BUILDIN(unitskillusepos) {
int skill_x;
int skill_y;
struct block_list* bl;
-
+
unit_id = script_getnum(st,2);
- skill_id = ( script_isstring(st,3) ? skill->name2id(script_getstr(st,3)) : script_getnum(st,3) );
+ skill_id = ( script_isstringtype(st, 3) ? skill->name2id(script_getstr(st, 3)) : script_getnum(st, 3) );
skill_lv = script_getnum(st,4);
skill_x = script_getnum(st,5);
skill_y = script_getnum(st,6);
-
+
bl = map->id2bl(unit_id);
-
+
if( bl != NULL ) {
if( bl->type == BL_NPC ) {
if (!((TBL_NPC*)bl)->status.hp) {
@@ -15384,7 +15276,7 @@ BUILDIN(unitskillusepos) {
}
unit->skilluse_pos(bl, skill_x, skill_y, skill_id, skill_lv);
}
-
+
return true;
}
@@ -15396,12 +15288,12 @@ BUILDIN(unitskillusepos) {
BUILDIN(sleep)
{
int ticks;
-
+
ticks = script_getnum(st,2);
-
+
// detach the player
script->detach_rid(st);
-
+
if( ticks <= 0 )
{// do nothing
}
@@ -15424,9 +15316,9 @@ BUILDIN(sleep)
/// sleep2(<mili secconds>) -> <bool>
BUILDIN(sleep2) {
int ticks;
-
+
ticks = script_getnum(st,2);
-
+
if( ticks <= 0 ) {
// do nothing
script_pushint(st, (map->id2sd(st->rid)!=NULL));
@@ -15450,18 +15342,18 @@ BUILDIN(awake) {
DBIterator *iter;
struct script_state *tst;
struct npc_data* nd;
-
+
if( ( nd = npc->name2id(script_getstr(st, 2)) ) == NULL ) {
ShowError("awake: NPC \"%s\" not found\n", script_getstr(st, 2));
return false;
}
-
+
iter = db_iterator(script->st_db);
-
+
for( tst = dbi_first(iter); dbi_exists(iter); tst = dbi_next(iter) ) {
if( tst->oid == nd->bl.id ) {
TBL_PC* sd = map->id2sd(tst->rid);
-
+
if( tst->sleep.timer == INVALID_TIMER ) {// already awake ???
continue;
}
@@ -15470,7 +15362,7 @@ BUILDIN(awake) {
tst->state = END;
tst->rid = 0;
}
-
+
timer->delete(tst->sleep.timer, script->run_timer);
tst->sleep.timer = INVALID_TIMER;
if(tst->state != RERUNLINE)
@@ -15478,9 +15370,9 @@ BUILDIN(awake) {
script->run_main(tst);
}
}
-
+
dbi_destroy(iter);
-
+
return true;
}
@@ -15493,7 +15385,7 @@ BUILDIN(getvariableofnpc)
struct script_data* data;
const char* name;
struct npc_data* nd;
-
+
data = script_getdata(st,2);
if( !data_isreference(data) )
{// Not a reference (aka varaible name)
@@ -15503,7 +15395,7 @@ BUILDIN(getvariableofnpc)
st->state = END;
return false;
}
-
+
name = reference_getname(data);
if( *name != '.' || name[1] == '@' )
{// not a npc variable
@@ -15513,7 +15405,7 @@ BUILDIN(getvariableofnpc)
st->state = END;
return false;
}
-
+
nd = npc->name2id(script_getstr(st,3));
if( nd == NULL || nd->subtype != SCRIPT || nd->u.scr.script == NULL )
{// NPC not found or has no script
@@ -15522,7 +15414,7 @@ BUILDIN(getvariableofnpc)
st->state = END;
return false;
}
-
+
script->push_val(st->stack, C_NAME, reference_getuid(data), &nd->u.scr.script->script_vars );
return true;
}
@@ -15541,56 +15433,56 @@ BUILDIN(warpportal) {
int tpy;
struct skill_unit_group* group;
struct block_list* bl;
-
+
bl = map->id2bl(st->oid);
if( bl == NULL )
{
ShowError("script:warpportal: npc is needed\n");
return false;
}
-
+
spx = script_getnum(st,2);
spy = script_getnum(st,3);
map_index = mapindex->name2id(script_getstr(st, 4));
tpx = script_getnum(st,5);
tpy = script_getnum(st,6);
-
+
if( map_index == 0 )
return true;// map not found
-
+
group = skill->unitsetting(bl, AL_WARP, 4, spx, spy, 0);
if( group == NULL )
return true;// failed
group->val1 = (group->val1<<16)|(short)0;
group->val2 = (tpx<<16) | tpy;
group->val3 = map_index;
-
+
return true;
}
BUILDIN(openmail)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
mail->openmail(sd);
-
+
return true;
}
BUILDIN(openauction)
{
TBL_PC* sd;
-
+
sd = script->rid2sd(st);
if( sd == NULL )
return true;
-
+
clif->auction_openwindow(sd);
-
+
return true;
}
@@ -15604,14 +15496,14 @@ BUILDIN(checkcell) {
int16 x = script_getnum(st,3);
int16 y = script_getnum(st,4);
cell_chk type = (cell_chk)script_getnum(st,5);
-
+
if ( m == -1 ) {
ShowWarning("checkcell: Attempted to run on unexsitent map '%s', type %d, x/y %d,%d\n",script_getstr(st,2),type,x,y);
return true;
}
-
+
script_pushint(st, map->getcell(m, x, y, type));
-
+
return true;
}
@@ -15628,21 +15520,21 @@ BUILDIN(setcell) {
int16 y2 = script_getnum(st,6);
cell_t type = (cell_t)script_getnum(st,7);
bool flag = (bool)script_getnum(st,8);
-
+
int x,y;
-
+
if ( m == -1 ) {
ShowWarning("setcell: Attempted to run on unexistent map '%s', type %d, x1/y1 - %d,%d | x2/y2 - %d,%d\n",script_getstr(st, 2),type,x1,y1,x2,y2);
return true;
}
-
+
if( x1 > x2 ) swap(x1,x2);
if( y1 > y2 ) swap(y1,y2);
-
+
for( y = y1; y <= y2; ++y )
for( x = x1; x <= x2; ++x )
map->list[m].setcell(m, x, y, type, flag);
-
+
return true;
}
@@ -15653,15 +15545,15 @@ BUILDIN(mercenary_create)
{
struct map_session_data *sd;
int class_, contract_time;
-
+
if( (sd = script->rid2sd(st)) == NULL || sd->md || sd->status.mer_id != 0 )
return true;
-
+
class_ = script_getnum(st,2);
-
+
if( !mercenary->class(class_) )
return true;
-
+
contract_time = script_getnum(st,3);
mercenary->create(sd, class_, contract_time);
return true;
@@ -15670,12 +15562,12 @@ BUILDIN(mercenary_create)
BUILDIN(mercenary_heal) {
struct map_session_data *sd = script->rid2sd(st);
int hp, sp;
-
+
if( sd == NULL || sd->md == NULL )
return true;
hp = script_getnum(st,2);
sp = script_getnum(st,3);
-
+
status->heal(&sd->md->bl, hp, sp, 0);
return true;
}
@@ -15684,14 +15576,14 @@ BUILDIN(mercenary_sc_start) {
struct map_session_data *sd = script->rid2sd(st);
enum sc_type type;
int tick, val1;
-
+
if( sd == NULL || sd->md == NULL )
return true;
-
+
type = (sc_type)script_getnum(st,2);
tick = script_getnum(st,3);
val1 = script_getnum(st,4);
-
+
status->change_start(&sd->md->bl, type, 10000, val1, 0, 0, 0, tick, 2);
return true;
}
@@ -15699,10 +15591,10 @@ BUILDIN(mercenary_sc_start) {
BUILDIN(mercenary_get_calls) {
struct map_session_data *sd = script->rid2sd(st);
int guild_id;
-
+
if( sd == NULL )
return true;
-
+
guild_id = script_getnum(st,2);
switch( guild_id ) {
case ARCH_MERC_GUILD:
@@ -15718,20 +15610,20 @@ BUILDIN(mercenary_get_calls) {
script_pushint(st,0);
break;
}
-
+
return true;
}
BUILDIN(mercenary_set_calls) {
struct map_session_data *sd = script->rid2sd(st);
int guild_id, value, *calls;
-
+
if( sd == NULL )
return true;
-
+
guild_id = script_getnum(st,2);
value = script_getnum(st,3);
-
+
switch( guild_id ) {
case ARCH_MERC_GUILD:
calls = &sd->status.arch_calls;
@@ -15745,20 +15637,20 @@ BUILDIN(mercenary_set_calls) {
default:
return true; // Invalid Guild
}
-
+
*calls += value;
*calls = cap_value(*calls, 0, INT_MAX);
-
+
return true;
}
BUILDIN(mercenary_get_faith) {
struct map_session_data *sd = script->rid2sd(st);
int guild_id;
-
+
if( sd == NULL )
return true;
-
+
guild_id = script_getnum(st,2);
switch( guild_id ) {
case ARCH_MERC_GUILD:
@@ -15774,20 +15666,20 @@ BUILDIN(mercenary_get_faith) {
script_pushint(st,0);
break;
}
-
+
return true;
}
BUILDIN(mercenary_set_faith) {
struct map_session_data *sd = script->rid2sd(st);
int guild_id, value, *calls;
-
+
if( sd == NULL )
return true;
-
+
guild_id = script_getnum(st,2);
value = script_getnum(st,3);
-
+
switch( guild_id ) {
case ARCH_MERC_GUILD:
calls = &sd->status.arch_faith;
@@ -15801,12 +15693,12 @@ BUILDIN(mercenary_set_faith) {
default:
return true; // Invalid Guild
}
-
+
*calls += value;
*calls = cap_value(*calls, 0, INT_MAX);
if( mercenary->get_guild(sd->md) == guild_id )
clif->mercenary_updatestatus(sd,SP_MERCFAITH);
-
+
return true;
}
@@ -15817,20 +15709,20 @@ BUILDIN(readbook)
{
struct map_session_data *sd;
int book_id, page;
-
+
if( (sd = script->rid2sd(st)) == NULL )
return true;
-
+
book_id = script_getnum(st,2);
page = script_getnum(st,3);
-
+
clif->readbook(sd->fd, book_id, page);
return true;
}
-/******************
- Questlog script commands
- *******************/
+/****************************
+ * Questlog script commands *
+ ****************************/
BUILDIN(questinfo)
{
@@ -15843,21 +15735,21 @@ BUILDIN(questinfo)
quest_id = script_getnum(st, 2);
icon = script_getnum(st, 3);
-
+
#if PACKETVER >= 20120410
if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
- icon = 9999; // Default to nothing if icon id is invalid.
+ icon = 9999; // Default to nothing if icon id is invalid.
#else
if(icon < 0 || icon > 7)
icon = 0;
else
icon = icon + 1;
#endif
-
+
qi.quest_id = quest_id;
qi.icon = (unsigned char)icon;
qi.nd = nd;
-
+
if( script_hasdata(st, 4) ) {
color = script_getnum(st, 4);
if( color < 0 || color > 3 ) {
@@ -15867,12 +15759,12 @@ BUILDIN(questinfo)
}
qi.color = (unsigned char)color;
}
-
+
qi.hasJob = false;
-
+
if(script_hasdata(st, 5)) {
job = script_getnum(st, 5);
-
+
if (!pcdb_checkid(job))
ShowError("buildin_questinfo: Nonexistant Job Class.\n");
else {
@@ -15880,7 +15772,7 @@ BUILDIN(questinfo)
qi.job = (unsigned short)job;
}
}
-
+
map->add_questinfo(nd->bl.m,&qi);
return true;
@@ -15914,7 +15806,7 @@ BUILDIN(setquest) {
BUILDIN(erasequest) {
struct map_session_data *sd = script->rid2sd(st);
nullpo_retr(false,sd);
-
+
quest->delete(sd, script_getnum(st, 2));
return true;
}
@@ -15922,7 +15814,7 @@ BUILDIN(erasequest) {
BUILDIN(completequest) {
struct map_session_data *sd = script->rid2sd(st);
nullpo_retr(false,sd);
-
+
quest->update_status(sd, script_getnum(st, 2), Q_COMPLETE);
return true;
}
@@ -15930,7 +15822,7 @@ BUILDIN(completequest) {
BUILDIN(changequest) {
struct map_session_data *sd = script->rid2sd(st);
nullpo_retr(false,sd);
-
+
quest->change(sd, script_getnum(st, 2),script_getnum(st, 3));
return true;
}
@@ -15938,14 +15830,14 @@ BUILDIN(changequest) {
BUILDIN(checkquest) {
struct map_session_data *sd = script->rid2sd(st);
enum quest_check_type type = HAVEQUEST;
-
+
nullpo_retr(false,sd);
-
+
if( script_hasdata(st, 3) )
type = (enum quest_check_type)script_getnum(st, 3);
-
+
script_pushint(st, quest->check(sd, script_getnum(st, 2), type));
-
+
return true;
}
@@ -15953,7 +15845,7 @@ BUILDIN(showevent) {
TBL_PC *sd = script->rid2sd(st);
struct npc_data *nd = map->id2nd(st->oid);
int icon, color = 0;
-
+
if( sd == NULL || nd == NULL )
return true;
@@ -15969,14 +15861,14 @@ BUILDIN(showevent) {
#if PACKETVER >= 20120410
if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
- icon = 9999; // Default to nothing if icon id is invalid.
+ icon = 9999; // Default to nothing if icon id is invalid.
#else
if(icon < 0 || icon > 7)
icon = 0;
else
icon = icon + 1;
#endif
-
+
clif->quest_show_event(sd, &nd->bl, icon, color);
return true;
}
@@ -15990,17 +15882,17 @@ BUILDIN(waitingroom2bg) {
const char *map_name, *ev = "", *dev = "";
int x, y, i, map_index = 0, bg_id, n;
struct map_session_data *sd;
-
+
if( script_hasdata(st,7) )
nd = npc->name2id(script_getstr(st,7));
else
nd = (struct npc_data *)map->id2bl(st->oid);
-
+
if( nd == NULL || (cd = (struct chat_data *)map->id2bl(nd->chat_id)) == NULL ) {
script_pushint(st,0);
return true;
}
-
+
map_name = script_getstr(st,2);
if( strcmp(map_name,"-") != 0 )
{
@@ -16011,18 +15903,18 @@ BUILDIN(waitingroom2bg) {
return true;
}
}
-
+
x = script_getnum(st,3);
y = script_getnum(st,4);
ev = script_getstr(st,5); // Logout Event
dev = script_getstr(st,6); // Die Event
-
+
if( (bg_id = bg->create(map_index, x, y, ev, dev)) == 0 )
{ // Creation failed
script_pushint(st,0);
return true;
}
-
+
n = cd->users;
for( i = 0; i < n && i < MAX_BG_MEMBERS; i++ )
{
@@ -16031,7 +15923,7 @@ BUILDIN(waitingroom2bg) {
else
mapreg->setreg(reference_uid(script->add_str("$@arenamembers"), i), 0);
}
-
+
mapreg->setreg(script->add_str("$@arenamembersnum"), i);
script_pushint(st,bg_id);
return true;
@@ -16043,22 +15935,22 @@ BUILDIN(waitingroom2bg_single) {
struct chat_data *cd;
struct map_session_data *sd;
int x, y, map_index, bg_id;
-
+
bg_id = script_getnum(st,2);
map_name = script_getstr(st,3);
if( (map_index = mapindex->name2id(map_name)) == 0 )
return true; // Invalid Map
-
+
x = script_getnum(st,4);
y = script_getnum(st,5);
nd = npc->name2id(script_getstr(st,6));
-
+
if( nd == NULL || (cd = (struct chat_data *)map->id2bl(nd->chat_id)) == NULL || cd->users <= 0 )
return true;
-
+
if( (sd = cd->usersd[0]) == NULL )
return true;
-
+
if( bg->team_join(bg_id, sd) )
{
pc->setpos(sd, map_index, x, y, CLR_TELEPORT);
@@ -16066,7 +15958,7 @@ BUILDIN(waitingroom2bg_single) {
}
else
script_pushint(st,0);
-
+
return true;
}
@@ -16074,11 +15966,11 @@ BUILDIN(bg_team_setxy)
{
struct battleground_data *bgd;
int bg_id;
-
+
bg_id = script_getnum(st,2);
if( (bgd = bg->team_search(bg_id)) == NULL )
return true;
-
+
bgd->x = script_getnum(st,3);
bgd->y = script_getnum(st,4);
return true;
@@ -16088,7 +15980,7 @@ BUILDIN(bg_warp)
{
int x, y, map_index, bg_id;
const char* map_name;
-
+
bg_id = script_getnum(st,2);
map_name = script_getstr(st,3);
if( (map_index = mapindex->name2id(map_name)) == 0 )
@@ -16103,7 +15995,7 @@ BUILDIN(bg_monster)
{
int class_ = 0, x = 0, y = 0, bg_id = 0;
const char *str, *mapname, *evt="";
-
+
bg_id = script_getnum(st,2);
mapname = script_getstr(st,3);
x = script_getnum(st,4);
@@ -16121,17 +16013,17 @@ BUILDIN(bg_monster_set_team) {
struct block_list *mbl;
int id = script_getnum(st,2),
bg_id = script_getnum(st,3);
-
+
if( (mbl = map->id2bl(id)) == NULL || mbl->type != BL_MOB )
return true;
md = (TBL_MOB *)mbl;
md->bg_id = bg_id;
-
+
mob_stop_attack(md);
mob_stop_walking(md, 0);
md->target_id = md->attacked_id = 0;
clif->charnameack(0, &md->bl);
-
+
return true;
}
@@ -16140,7 +16032,7 @@ BUILDIN(bg_leave)
struct map_session_data *sd = script->rid2sd(st);
if( sd == NULL || !sd->bg_id )
return true;
-
+
bg->team_leave(sd,0);
return true;
}
@@ -16159,20 +16051,20 @@ BUILDIN(bg_getareausers) {
int i = 0, c = 0;
struct battleground_data *bgd = NULL;
struct map_session_data *sd;
-
+
bg_id = script_getnum(st,2);
str = script_getstr(st,3);
-
+
if( (bgd = bg->team_search(bg_id)) == NULL || (m = map->mapname2mapid(str)) < 0 ) {
script_pushint(st,0);
return true;
}
-
+
x0 = script_getnum(st,4);
y0 = script_getnum(st,5);
x1 = script_getnum(st,6);
y1 = script_getnum(st,7);
-
+
for( i = 0; i < MAX_BG_MEMBERS; i++ )
{
if( (sd = bgd->members[i].sd) == NULL )
@@ -16181,7 +16073,7 @@ BUILDIN(bg_getareausers) {
continue;
c++;
}
-
+
script_pushint(st,c);
return true;
}
@@ -16189,14 +16081,14 @@ BUILDIN(bg_getareausers) {
BUILDIN(bg_updatescore) {
const char *str;
int16 m;
-
+
str = script_getstr(st,2);
if( (m = map->mapname2mapid(str)) < 0 )
return true;
-
+
map->list[m].bgscore_lion = script_getnum(st,3);
map->list[m].bgscore_eagle = script_getnum(st,4);
-
+
clif->bg_updatescore(m);
return true;
}
@@ -16206,13 +16098,13 @@ BUILDIN(bg_get_data)
struct battleground_data *bgd;
int bg_id = script_getnum(st,2),
type = script_getnum(st,3);
-
+
if( (bgd = bg->team_search(bg_id)) == NULL )
{
script_pushint(st,0);
return true;
}
-
+
switch( type )
{
case 0: script_pushint(st, bgd->count); break;
@@ -16220,7 +16112,7 @@ BUILDIN(bg_get_data)
ShowError("script:bg_get_data: unknown data identifier %d\n", type);
break;
}
-
+
return true;
}
@@ -16232,7 +16124,7 @@ BUILDIN(instance_create) {
const char *name;
int owner_id, res;
int type = IOT_PARTY;
-
+
name = script_getstr(st, 2);
owner_id = script_getnum(st, 3);
if( script_hasdata(st,4) ) {
@@ -16242,9 +16134,9 @@ BUILDIN(instance_create) {
return true;
}
}
-
+
res = instance->create(owner_id, name, (enum instance_owner_type) type);
- if( res == -4 ) { // Already exists
+ if( res == -4 ) { // Already exists
script_pushint(st, -1);
return true;
} else if( res < 0 ) {
@@ -16259,25 +16151,25 @@ BUILDIN(instance_create) {
script_pushint(st, -2);
return true;
}
-
+
script_pushint(st, res);
return true;
}
BUILDIN(instance_destroy) {
int instance_id = -1;
-
+
if( script_hasdata(st, 2) )
instance_id = script_getnum(st, 2);
else if( st->instance_id >= 0 )
instance_id = st->instance_id;
else return true;
-
+
if( !instance->valid(instance_id) ) {
ShowError("buildin_instance_destroy: Trying to destroy invalid instance %d.\n", instance_id);
return true;
}
-
+
instance->destroy(instance_id);
return true;
}
@@ -16287,22 +16179,22 @@ BUILDIN(instance_attachmap) {
int16 m;
int instance_id = -1;
bool usebasename = false;
-
+
name = script_getstr(st,2);
instance_id = script_getnum(st,3);
if( script_hasdata(st,4) && script_getnum(st,4) > 0 )
usebasename = true;
-
+
if( script_hasdata(st, 5) )
map_name = script_getstr(st, 5);
-
+
if( (m = instance->add_map(name, instance_id, usebasename, map_name)) < 0 ) { // [Saithis]
ShowError("buildin_instance_attachmap: instance creation failed (%s): %d\n", name, m);
script_pushconststr(st, "");
return true;
}
script_pushconststr(st, map->list[m].name);
-
+
return true;
}
@@ -16310,30 +16202,30 @@ BUILDIN(instance_detachmap) {
const char *str;
int16 m;
int instance_id = -1;
-
+
str = script_getstr(st, 2);
if( script_hasdata(st, 3) )
instance_id = script_getnum(st, 3);
else if( st->instance_id >= 0 )
instance_id = st->instance_id;
else return true;
-
+
if( (m = map->mapname2mapid(str)) < 0 || (m = instance->map2imap(m,instance_id)) < 0 ) {
ShowError("buildin_instance_detachmap: Trying to detach invalid map %s\n", str);
return true;
}
-
+
instance->del_map(m);
return true;
}
BUILDIN(instance_attach) {
int instance_id = -1;
-
+
instance_id = script_getnum(st, 2);
if( !instance->valid(instance_id) )
return true;
-
+
st->instance_id = instance_id;
return true;
}
@@ -16347,35 +16239,35 @@ BUILDIN(instance_set_timeout)
{
int progress_timeout, idle_timeout;
int instance_id = -1;
-
+
progress_timeout = script_getnum(st, 2);
idle_timeout = script_getnum(st, 3);
-
+
if( script_hasdata(st, 4) )
instance_id = script_getnum(st, 4);
else if( st->instance_id >= 0 )
instance_id = st->instance_id;
else return true;
-
+
if( instance_id >= 0 )
instance->set_timeout(instance_id, progress_timeout, idle_timeout);
-
+
return true;
}
BUILDIN(instance_init) {
int instance_id = script_getnum(st, 2);
-
+
if( !instance->valid(instance_id) ) {
ShowError("instance_init: invalid instance id %d.\n",instance_id);
return true;
}
-
+
if( instance->list[instance_id].state != INSTANCE_IDLE ) {
ShowError("instance_init: instance already initialized.\n");
return true;
}
-
+
instance->start(instance_id);
return true;
}
@@ -16389,23 +16281,23 @@ BUILDIN(instance_announce) {
int fontSize = script_hasdata(st,7) ? script_getnum(st,7) : 12; // default fontSize
int fontAlign = script_hasdata(st,8) ? script_getnum(st,8) : 0; // default fontAlign
int fontY = script_hasdata(st,9) ? script_getnum(st,9) : 0; // default fontY
-
+
int i;
-
+
if( instance_id == -1 ) {
if( st->instance_id >= 0 )
instance_id = st->instance_id;
else
return true;
}
-
+
if( !instance->valid(instance_id) )
return true;
-
+
for( i = 0; i < instance->list[instance_id].num_map; i++ )
map->foreachinmap(script->buildin_announce_sub, instance->list[instance_id].map[i], BL_PC,
mes, strlen(mes)+1, flag&BC_COLOR_MASK, fontColor, fontType, fontSize, fontAlign, fontY);
-
+
return true;
}
@@ -16413,39 +16305,39 @@ BUILDIN(instance_npcname) {
const char *str;
int instance_id = -1;
struct npc_data *nd;
-
+
str = script_getstr(st, 2);
if( script_hasdata(st, 3) )
instance_id = script_getnum(st, 3);
else if( st->instance_id >= 0 )
instance_id = st->instance_id;
-
+
if( instance_id >= 0 && (nd = npc->name2id(str)) != NULL ) {
static char npcname[NAME_LENGTH];
snprintf(npcname, sizeof(npcname), "dup_%d_%d", instance_id, nd->bl.id);
- script_pushconststr(st,npcname);
+ script_pushconststr(st,npcname);
} else {
ShowError("script:instance_npcname: invalid instance NPC (instance_id: %d, NPC name: \"%s\".)\n", instance_id, str);
st->state = END;
return false;
}
-
+
return true;
}
BUILDIN(has_instance) {
struct map_session_data *sd;
- const char *str;
+ const char *str;
int16 m;
int instance_id = -1;
-
- str = script_getstr(st, 2);
-
+
+ str = script_getstr(st, 2);
+
if( (m = map->mapname2mapid(str)) < 0 ) {
script_pushconststr(st, "");
return true;
}
-
+
if( script_hasdata(st, 3) )
instance_id = script_getnum(st, 3);
else if( st->instance_id >= 0 )
@@ -16487,12 +16379,12 @@ BUILDIN(has_instance) {
instance_id = sd->guild->instance[i];
}
}
-
+
if( !instance->valid(instance_id) || (m = instance->map2imap(m, instance_id)) < 0 ) {
script_pushconststr(st, "");
return true;
}
-
+
script_pushconststr(st, map->list[m].name);
return true;
}
@@ -16501,9 +16393,9 @@ int buildin_instance_warpall_sub(struct block_list *bl,va_list ap) {
int map_index = va_arg(ap,int);
int x = va_arg(ap,int);
int y = va_arg(ap,int);
-
+
pc->setpos(sd,map_index,x,y,CLR_TELEPORT);
-
+
return 0;
}
BUILDIN(instance_warpall) {
@@ -16512,23 +16404,23 @@ BUILDIN(instance_warpall) {
const char *mapn;
int x, y;
int map_index;
-
+
mapn = script_getstr(st,2);
x = script_getnum(st,3);
y = script_getnum(st,4);
-
+
if( script_hasdata(st,5) )
instance_id = script_getnum(st,5);
else if( st->instance_id >= 0 )
instance_id = st->instance_id;
else
return true;
-
+
if( (m = map->mapname2mapid(mapn)) < 0 || (map->list[m].flag.src4instance && (m = instance->mapid2imapid(m, instance_id)) < 0) )
return true;
-
+
map_index = map_id2index(m);
-
+
map->foreachininstance(script->buildin_instance_warpall_sub, instance_id, BL_PC,map_index,x,y);
return true;
@@ -16548,46 +16440,46 @@ BUILDIN(instance_check_party) {
struct map_session_data *pl_sd;
int amount, min, max, i, party_id, c = 0;
struct party_data *p = NULL;
-
+
amount = script_hasdata(st,3) ? script_getnum(st,3) : 1; // Amount of needed Partymembers for the Instance.
min = script_hasdata(st,4) ? script_getnum(st,4) : 1; // Minimum Level needed to join the Instance.
max = script_hasdata(st,5) ? script_getnum(st,5) : MAX_LEVEL; // Maxium Level allowed to join the Instance.
-
- if( min < 1 || min > MAX_LEVEL){
+
+ if( min < 1 || min > MAX_LEVEL) {
ShowError("instance_check_party: Invalid min level, %d\n", min);
return true;
- } else if( max < 1 || max > MAX_LEVEL){
+ } else if( max < 1 || max > MAX_LEVEL) {
ShowError("instance_check_party: Invalid max level, %d\n", max);
return true;
}
-
+
if( script_hasdata(st,2) )
party_id = script_getnum(st,2);
else return true;
-
- if( !(p = party->search(party_id)) ){
+
+ if( !(p = party->search(party_id)) ) {
script_pushint(st, 0); // Returns false if party does not exist.
return true;
}
-
+
for( i = 0; i < MAX_PARTY; i++ )
if( (pl_sd = p->data[i].sd) )
- if(map->id2bl(pl_sd->bl.id)){
- if(pl_sd->status.base_level < min){
+ if(map->id2bl(pl_sd->bl.id)) {
+ if(pl_sd->status.base_level < min) {
script_pushint(st, 0);
return true;
- }else if(pl_sd->status.base_level > max){
+ } else if(pl_sd->status.base_level > max) {
script_pushint(st, 0);
return true;
}
c++;
}
-
- if(c < amount){
+
+ if(c < amount) {
script_pushint(st, 0); // Not enough Members in the Party to join Instance.
- }else
+ } else
script_pushint(st, 1);
-
+
return true;
}
@@ -16600,53 +16492,53 @@ BUILDIN(setfont)
int font = script_getnum(st,2);
if( sd == NULL )
return true;
-
+
if( sd->status.font != font )
sd->status.font = font;
else
sd->status.font = 0;
-
+
clif->font(sd);
return true;
}
int buildin_mobuseskill_sub(struct block_list *bl,va_list ap)
{
- TBL_MOB* md = (TBL_MOB*)bl;
+ TBL_MOB* md = (TBL_MOB*)bl;
struct block_list *tbl;
- int mobid = va_arg(ap,int);
- uint16 skill_id = va_arg(ap,int);
- uint16 skill_lv = va_arg(ap,int);
- int casttime = va_arg(ap,int);
- int cancel = va_arg(ap,int);
- int emotion = va_arg(ap,int);
- int target = va_arg(ap,int);
-
+ int mobid = va_arg(ap,int);
+ uint16 skill_id = va_arg(ap,int);
+ uint16 skill_lv = va_arg(ap,int);
+ int casttime = va_arg(ap,int);
+ int cancel = va_arg(ap,int);
+ int emotion = va_arg(ap,int);
+ int target = va_arg(ap,int);
+
if( md->class_ != mobid )
return 0;
-
+
// 0:self, 1:target, 2:master, default:random
switch( target )
{
- case 0: tbl = map->id2bl(md->bl.id); break;
- case 1: tbl = map->id2bl(md->target_id); break;
- case 2: tbl = map->id2bl(md->master_id); break;
- default:tbl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md),skill->get_range2(&md->bl, skill_id, skill_lv)); break;
+ case 0: tbl = map->id2bl(md->bl.id); break;
+ case 1: tbl = map->id2bl(md->target_id); break;
+ case 2: tbl = map->id2bl(md->master_id); break;
+ default: tbl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md),skill->get_range2(&md->bl, skill_id, skill_lv)); break;
}
-
+
if( !tbl )
return 0;
-
+
if( md->ud.skilltimer != INVALID_TIMER ) // Cancel the casting skill.
unit->skillcastcancel(bl,0);
-
+
if( skill->get_casttype(skill_id) == CAST_GROUND )
unit->skilluse_pos2(&md->bl, tbl->x, tbl->y, skill_id, skill_lv, casttime, cancel);
else
unit->skilluse_id2(&md->bl, tbl->id, skill_id, skill_lv, casttime, cancel);
-
+
clif->emotion(&md->bl, emotion);
-
+
return 0;
}
/*==========================================
@@ -16656,27 +16548,27 @@ BUILDIN(areamobuseskill) {
struct block_list center;
int16 m;
int range,mobid,skill_id,skill_lv,casttime,emotion,target,cancel;
-
+
if( (m = map->mapname2mapid(script_getstr(st,2))) < 0 ) {
ShowError("areamobuseskill: invalid map name.\n");
return true;
}
-
+
if( map->list[m].flag.src4instance && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 )
return true;
-
+
center.m = m;
center.x = script_getnum(st,3);
center.y = script_getnum(st,4);
range = script_getnum(st,5);
mobid = script_getnum(st,6);
- skill_id = ( script_isstring(st,7) ? skill->name2id(script_getstr(st,7)) : script_getnum(st,7) );
+ skill_id = ( script_isstringtype(st, 7) ? skill->name2id(script_getstr(st, 7)) : script_getnum(st, 7) );
skill_lv = script_getnum(st,8);
casttime = script_getnum(st,9);
cancel = script_getnum(st,10);
emotion = script_getnum(st,11);
target = script_getnum(st,12);
-
+
map->foreachinrange(script->buildin_mobuseskill_sub, &center, range, BL_MOB, mobid, skill_id, skill_lv, casttime, cancel, emotion, target);
return true;
}
@@ -16687,21 +16579,21 @@ BUILDIN(progressbar)
struct map_session_data * sd = script->rid2sd(st);
const char * color;
unsigned int second;
-
+
if( !st || !sd )
return true;
-
+
st->state = STOP;
-
+
color = script_getstr(st,2);
second = script_getnum(st,3);
-
+
sd->progressbar.npc_id = st->oid;
sd->progressbar.timeout = timer->gettick() + second*1000;
sd->state.workinprogress = 3;
-
+
clif->progressbar(sd, (unsigned int)strtoul(color, (char **)NULL, 0), second);
- return true;
+ return true;
}
BUILDIN(pushpc)
@@ -16709,23 +16601,23 @@ BUILDIN(pushpc)
uint8 dir;
int cells, dx, dy;
struct map_session_data* sd;
-
+
if((sd = script->rid2sd(st))==NULL)
{
return true;
}
-
+
dir = script_getnum(st,2);
cells = script_getnum(st,3);
-
+
if(dir>7)
{
ShowWarning("buildin_pushpc: Invalid direction %d specified.\n", dir);
script->reportsrc(st);
-
+
dir%= 8; // trim spin-over
}
-
+
if(!cells)
{// zero distance
return true;
@@ -16735,10 +16627,10 @@ BUILDIN(pushpc)
dir = (dir+4)%8; // turn around
cells = -cells;
}
-
+
dx = dirx[dir];
dy = diry[dir];
-
+
unit->blown(&sd->bl, dx, dy, cells, 0);
return true;
}
@@ -16749,11 +16641,11 @@ BUILDIN(pushpc)
BUILDIN(buyingstore)
{
struct map_session_data* sd;
-
+
if( ( sd = script->rid2sd(st) ) == NULL ) {
return true;
}
-
+
buyingstore->setup(sd, script_getnum(st,2));
return true;
}
@@ -16766,27 +16658,27 @@ BUILDIN(searchstores)
unsigned short effect;
unsigned int uses;
struct map_session_data* sd;
-
+
if( ( sd = script->rid2sd(st) ) == NULL )
{
return true;
}
-
+
uses = script_getnum(st,2);
effect = script_getnum(st,3);
-
+
if( !uses )
{
ShowError("buildin_searchstores: Amount of uses cannot be zero.\n");
return false;
}
-
+
if( effect > 1 )
{
ShowError("buildin_searchstores: Invalid effect id %hu, specified.\n", effect);
return false;
}
-
+
searchstore->open(sd, uses, effect);
return true;
}
@@ -16797,25 +16689,25 @@ BUILDIN(showdigit)
unsigned int type = 0;
int value;
struct map_session_data* sd;
-
+
if( ( sd = script->rid2sd(st) ) == NULL )
{
return true;
}
-
+
value = script_getnum(st,2);
-
+
if( script_hasdata(st,3) )
{
type = script_getnum(st,3);
-
+
if( type > 3 )
{
ShowError("buildin_showdigit: Invalid type %u.\n", type);
return false;
}
}
-
+
clif->showdigit(sd, (unsigned char)type, value);
return true;
}
@@ -16856,7 +16748,7 @@ BUILDIN(checkdragon) {
BUILDIN(setdragon) {
TBL_PC* sd;
int color = script_hasdata(st,2) ? script_getnum(st,2) : 0;
-
+
if( (sd = script->rid2sd(st)) == NULL )
return true;
if( !pc->checkskill(sd,RK_DRAGONTRAINING) || (sd->class_&MAPID_THIRDMASK) != MAPID_RUNE_KNIGHT )
@@ -16868,10 +16760,10 @@ BUILDIN(setdragon) {
unsigned int option = OPTION_DRAGON1;
if( color ) {
option = ( color == 1 ? OPTION_DRAGON1 :
- color == 2 ? OPTION_DRAGON2 :
- color == 3 ? OPTION_DRAGON3 :
- color == 4 ? OPTION_DRAGON4 :
- color == 5 ? OPTION_DRAGON5 : 0);
+ color == 2 ? OPTION_DRAGON2 :
+ color == 3 ? OPTION_DRAGON3 :
+ color == 4 ? OPTION_DRAGON4 :
+ color == 5 ? OPTION_DRAGON5 : 0);
if( !option ) {
ShowWarning("script_setdragon: Unknown Color %d used; changing to green (1)\n",color);
option = OPTION_DRAGON1;
@@ -16907,10 +16799,10 @@ BUILDIN(setmounting) {
TBL_PC* sd;
if( (sd = script->rid2sd(st)) == NULL )
return true;
- if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) ){
+ if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) ) {
clif->msgtable(sd->fd, 0X78b);
script_pushint(st,0);//can't mount with one of these
- }else {
+ } else {
if( sd->sc.data[SC_ALL_RIDING] )
status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER);
else
@@ -16925,16 +16817,16 @@ BUILDIN(setmounting) {
**/
BUILDIN(getargcount) {
struct script_retinfo* ri;
-
+
if( st->stack->defsp < 1 || st->stack->stack_data[st->stack->defsp - 1].type != C_RETINFO ) {
ShowError("script:getargcount: used out of function or callsub label!\n");
st->state = END;
return false;
}
ri = st->stack->stack_data[st->stack->defsp - 1].u.ri;
-
+
script_pushint(st, ri->nargs);
-
+
return true;
}
/**
@@ -16942,40 +16834,39 @@ BUILDIN(getargcount) {
**/
BUILDIN(getcharip) {
struct map_session_data* sd = NULL;
-
+
/* check if a character name is specified */
if( script_hasdata(st, 2) ) {
- if (script_isstring(st, 2))
+ if (script_isstringtype(st, 2)) {
sd = map->nick2sd(script_getstr(st, 2));
- else if (script_isint(st, 2) || script_getnum(st, 2)) {
- int id;
- id = script_getnum(st, 2);
+ } else {
+ int id = script_getnum(st, 2);
sd = (map->id2sd(id) ? map->id2sd(id) : map->charid2sd(id));
}
- }
- else
+ } else {
sd = script->rid2sd(st);
-
+ }
+
/* check for sd and IP */
if (!sd || !session[sd->fd]->client_addr)
{
script_pushconststr(st, "");
return true;
}
-
+
/* return the client ip_addr converted for output */
if (sd && sd->fd && session[sd->fd])
{
/* initiliaze */
const char *ip_addr = NULL;
uint32 ip;
-
+
/* set ip, ip_addr and convert to ip and push str */
ip = session[sd->fd]->client_addr;
ip_addr = ip2str(ip, NULL);
script_pushstrcopy(st, ip_addr);
}
-
+
return true;
}
/**
@@ -16983,12 +16874,12 @@ BUILDIN(getcharip) {
**/
BUILDIN(is_function) {
const char* str = script_getstr(st,2);
-
+
if( strdb_exists(script->userfunc_db, str) )
script_pushint(st,1);
else
script_pushint(st,0);
-
+
return true;
}
/**
@@ -16996,35 +16887,35 @@ BUILDIN(is_function) {
**/
BUILDIN(get_revision) {
const char *svn = get_svn_revision();
-
+
if ( svn[0] != HERC_UNKNOWN_VER )
script_pushint(st,atoi(svn));
else
script_pushint(st,-1);//unknown
-
+
return true;
}
/**
* freeloop(<toggle>) -> toggles this script instance's looping-check ability
**/
BUILDIN(freeloop) {
-
+
if( script_getnum(st,2) )
st->freeloop = 1;
else
st->freeloop = 0;
-
+
script_pushint(st, st->freeloop);
-
+
return true;
}
BUILDIN(sit) {
struct map_session_data *sd = NULL;
-
+
if (script_hasdata(st, 2))
sd = map->nick2sd(script_getstr(st, 2));
-
+
if (sd == NULL)
sd = script->rid2sd(st);
@@ -17039,13 +16930,13 @@ BUILDIN(sit) {
BUILDIN(stand) {
struct map_session_data *sd = NULL;
-
+
if (script_hasdata(st, 2))
sd = map->nick2sd(script_getstr(st, 2));
-
+
if (sd == NULL)
sd = script->rid2sd(st);
-
+
if (pc_issit(sd))
{
pc->setstand(sd);
@@ -17057,10 +16948,10 @@ BUILDIN(stand) {
BUILDIN(issit) {
struct map_session_data *sd = NULL;
-
+
if (script_hasdata(st, 2))
sd = map->nick2sd(script_getstr(st, 2));
-
+
if (sd == NULL)
sd = script->rid2sd(st);
@@ -17080,21 +16971,21 @@ BUILDIN(bindatcmd) {
int i, group_lv = 0, group_lv_char = 99;
bool log = false;
bool create = false;
-
+
atcmd = script_getstr(st,2);
eventName = script_getstr(st,3);
-
+
if( *atcmd == atcommand->at_symbol || *atcmd == atcommand->char_symbol )
atcmd++;
-
+
if( script_hasdata(st,4) ) group_lv = script_getnum(st,4);
if( script_hasdata(st,5) ) group_lv_char = script_getnum(st,5);
if( script_hasdata(st,6) ) log = script_getnum(st,6) ? true : false;
-
+
if( atcommand->binding_count == 0 ) {
CREATE(atcommand->binding,struct atcmd_binding_data*,1);
-
+
create = true;
} else {
ARR_FIND(0, atcommand->binding_count, i, strcmp(atcommand->binding[i]->command,atcmd) == 0);
@@ -17106,39 +16997,39 @@ BUILDIN(bindatcmd) {
} else
create = true;
}
-
+
if( create ) {
i = atcommand->binding_count;
-
+
if( atcommand->binding_count++ != 0 )
RECREATE(atcommand->binding,struct atcmd_binding_data*,atcommand->binding_count);
-
+
CREATE(atcommand->binding[i],struct atcmd_binding_data,1);
-
+
safestrncpy(atcommand->binding[i]->command, atcmd, 50);
safestrncpy(atcommand->binding[i]->npc_event, eventName, 50);
atcommand->binding[i]->group_lv = group_lv;
atcommand->binding[i]->group_lv_char = group_lv_char;
atcommand->binding[i]->log = log;
}
-
+
return true;
}
BUILDIN(unbindatcmd) {
const char* atcmd;
int i = 0;
-
+
atcmd = script_getstr(st, 2);
-
+
if( *atcmd == atcommand->at_symbol || *atcmd == atcommand->char_symbol )
atcmd++;
-
+
if( atcommand->binding_count == 0 ) {
script_pushint(st, 0);
return true;
}
-
+
ARR_FIND(0, atcommand->binding_count, i, strcmp(atcommand->binding[i]->command, atcmd) == 0);
if( i < atcommand->binding_count ) {
int cursor = 0;
@@ -17148,21 +17039,21 @@ BUILDIN(unbindatcmd) {
for( i = 0, cursor = 0; i < atcommand->binding_count; i++ ) {
if( atcommand->binding[i] == NULL )
continue;
-
+
if( cursor != i ) {
memmove(&atcommand->binding[cursor], &atcommand->binding[i], sizeof(struct atcmd_binding_data*));
}
-
+
cursor++;
}
-
+
if( (atcommand->binding_count = cursor) == 0 )
aFree(atcommand->binding);
-
+
script_pushint(st, 1);
} else
script_pushint(st, 0);/* not found */
-
+
return true;
}
@@ -17170,9 +17061,9 @@ BUILDIN(useatcmd) {
TBL_PC *sd, *dummy_sd = NULL;
int fd;
const char* cmd;
-
+
cmd = script_getstr(st,2);
-
+
if( st->rid ) {
sd = script->rid2sd(st);
fd = sd->fd;
@@ -17180,7 +17071,7 @@ BUILDIN(useatcmd) {
// Use a dummy character.
sd = dummy_sd = pc->get_dummy_sd();
fd = 0;
-
+
if( st->oid ) {
struct block_list* bl = map->id2bl(st->oid);
memcpy(&sd->bl, bl, sizeof(struct block_list));
@@ -17188,14 +17079,14 @@ BUILDIN(useatcmd) {
safestrncpy(sd->status.name, ((TBL_NPC*)bl)->name, NAME_LENGTH);
}
}
-
+
// compatibility with previous implementation (deprecated!)
if( cmd[0] != atcommand->at_symbol ) {
cmd += strlen(sd->status.name);
while( *cmd != atcommand->at_symbol && *cmd != 0 )
cmd++;
}
-
+
atcommand->parse(fd, sd, cmd, 1);
if (dummy_sd) aFree(dummy_sd);
return true;
@@ -17204,9 +17095,9 @@ BUILDIN(useatcmd) {
BUILDIN(checkre)
{
int num;
-
+
num=script_getnum(st,2);
- switch(num){
+ switch(num) {
case 0:
#ifdef RENEWAL
script_pushint(st, 1);
@@ -17269,7 +17160,7 @@ BUILDIN(getrandgroupitem) {
struct map_session_data *sd = NULL;
int nameid = script_getnum(st, 2);
int count = script_getnum(st, 3);
-
+
if( !(data = itemdb->exists(nameid)) ) {
ShowWarning("buildin_getrandgroupitem: unknown item id %d\n",nameid);
script_pushint(st, 1);
@@ -17285,19 +17176,19 @@ BUILDIN(getrandgroupitem) {
} else {
int i, get_count, flag;
struct item it;
-
+
memset(&it,0,sizeof(it));
nameid = itemdb->group_item(data->group);
it.nameid = nameid;
it.identify = itemdb->isidentified(nameid);
-
+
if (!itemdb->isstackable(nameid))
get_count = 1;
else
get_count = count;
-
+
for (i = 0; i < count; i += get_count) {
// if not pet egg
if (!pet->create_egg(sd, nameid)) {
@@ -17308,10 +17199,10 @@ BUILDIN(getrandgroupitem) {
}
}
}
-
+
script_pushint(st, 0);
}
-
+
return true;
}
@@ -17320,7 +17211,7 @@ BUILDIN(getrandgroupitem) {
int script_cleanfloor_sub(struct block_list *bl, va_list ap) {
nullpo_ret(bl);
map->clearflooritem(bl);
-
+
return 0;
}
@@ -17328,12 +17219,12 @@ BUILDIN(cleanmap) {
const char *mapname;
int16 m = -1;
int16 x0 = 0, y0 = 0, x1 = 0, y1 = 0;
-
+
mapname = script_getstr(st, 2);
m = map->mapname2mapid(mapname);
if ( m == -1 )
return false;
-
+
if ((script_lastdata(st) - 2) < 4) {
map->foreachinmap(script->cleanfloor_sub, m, BL_ITEM);
} else {
@@ -17348,7 +17239,7 @@ BUILDIN(cleanmap) {
return false;
}
}
-
+
return true;
}
/* Cast a skill on the attached player.
@@ -17361,14 +17252,14 @@ BUILDIN(npcskill) {
unsigned int npc_level;
struct npc_data *nd;
struct map_session_data *sd;
-
- skill_id = script_isstring(st, 2) ? skill->name2id(script_getstr(st, 2)) : script_getnum(st, 2);
+
+ skill_id = script_isstringtype(st, 2) ? skill->name2id(script_getstr(st, 2)) : script_getnum(st, 2);
skill_level = script_getnum(st, 3);
stat_point = script_getnum(st, 4);
npc_level = script_getnum(st, 5);
sd = script->rid2sd(st);
nd = (struct npc_data *)map->id2bl(sd->npc_id);
-
+
if (stat_point > battle_config.max_third_parameter) {
ShowError("npcskill: stat point exceeded maximum of %d.\n",battle_config.max_third_parameter );
return false;
@@ -17380,22 +17271,22 @@ BUILDIN(npcskill) {
if (sd == NULL || nd == NULL) { //ain't possible, but I don't trust people.
return false;
}
-
+
nd->level = npc_level;
nd->stat_point = stat_point;
-
+
if (!nd->status.hp) {
status_calc_npc(nd, SCO_FIRST);
} else {
status_calc_npc(nd, SCO_NONE);
}
-
+
if (skill->get_inf(skill_id)&INF_GROUND_SKILL) {
unit->skilluse_pos(&nd->bl, sd->bl.x, sd->bl.y, skill_id, skill_level);
} else {
unit->skilluse_id(&nd->bl, sd->bl.id, skill_id, skill_level);
}
-
+
return true;
}
@@ -17407,33 +17298,33 @@ BUILDIN(montransform) {
struct block_list* bl;
char msg[CHAT_SIZE_MAX];
int mob_id, val1, val2, val3, val4;
-
+
if( (bl = map->id2bl(st->rid)) == NULL )
return true;
-
- if( script_isstring(st, 2) )
+
+ if( script_isstringtype(st, 2) ) {
mob_id = mob->db_searchname(script_getstr(st, 2));
- else{
+ } else {
mob_id = mob->db_checkid(script_getnum(st, 2));
}
- tick = script_getnum(st, 3);
- type = (sc_type)script_getnum(st, 4);
- val1 = val2 = val3 = val4 = 0;
-
if( mob_id == 0 ) {
- if( script_isstring(st,2) )
+ if( script_isstringtype(st, 2) )
ShowWarning("buildin_montransform: Attempted to use non-existing monster '%s'.\n", script_getstr(st, 2));
else
ShowWarning("buildin_montransform: Attempted to use non-existing monster of ID '%d'.\n", script_getnum(st, 2));
return false;
}
-
- if( !(type > SC_NONE && type < SC_MAX) ){
+
+ tick = script_getnum(st, 3);
+ type = (sc_type)script_getnum(st, 4);
+ val1 = val2 = val3 = val4 = 0;
+
+ if( !(type > SC_NONE && type < SC_MAX) ) {
ShowWarning("buildin_montransform: Unsupported status change id %d\n", type);
return false;
}
-
+
if (script_hasdata(st, 5))
val1 = script_getnum(st, 5);
@@ -17446,18 +17337,19 @@ BUILDIN(montransform) {
if (script_hasdata(st, 8))
val4 = script_getnum(st, 8);
- if( tick != 0 ){
+ if( tick != 0 ) {
struct map_session_data *sd = map->id2sd(bl->id);
struct mob_db *monster = mob->db(mob_id);
- if( !sd ) return true;
+ if( !sd )
+ return true;
- if( battle_config.mon_trans_disable_in_gvg && map_flag_gvg2(sd->bl.m) ){
+ if( battle_config.mon_trans_disable_in_gvg && map_flag_gvg2(sd->bl.m) ) {
clif->message(sd->fd, msg_txt(1488)); // Transforming into monster is not allowed in Guild Wars.
return true;
}
- if( sd->disguise != -1 ){
+ if( sd->disguise != -1 ) {
clif->message(sd->fd, msg_txt(1486)); // Cannot transform into monster while in disguise.
return true;
}
@@ -17479,19 +17371,19 @@ struct hQueue *script_hqueue_get(int idx) {
int script_hqueue_create(void) {
int idx = script->hqs;
int i;
-
+
for(i = 0; i < script->hqs; i++) {
if( script->hq[i].size == -1 ) {
break;
}
}
-
+
if( i == script->hqs ) {
RECREATE(script->hq, struct hQueue, ++script->hqs);
script->hq[ idx ].item = NULL;
} else
idx = i;
-
+
script->hq[ idx ].id = idx;
script->hq[ idx ].size = 0;
script->hq[ idx ].items = 0;
@@ -17510,14 +17402,14 @@ BUILDIN(queue) {
/* returns queue length */
BUILDIN(queuesize) {
int idx = script_getnum(st, 2);
-
+
if( idx < 0 || idx >= script->hqs || script->hq[idx].size == -1 ) {
ShowWarning("buildin_queuesize: unknown queue id %d\n",idx);
script_pushint(st, 0);
} else {
script_pushint(st, script->hq[ idx ].items);
}
-
+
return true;
}
bool script_hqueue_add(int idx, int var) {
@@ -17527,24 +17419,24 @@ bool script_hqueue_add(int idx, int var) {
} else {
struct map_session_data *sd;
int i;
-
+
for(i = 0; i < script->hq[idx].size; i++) {
if( script->hq[idx].item[i] == var ) {
return true;
}
}
-
+
if( i == script->hq[idx].size ) {
-
+
for(i = 0; i < script->hq[idx].size; i++) {
if( script->hq[idx].item[i] == 0 ) {
break;
}
}
-
+
if( i == script->hq[idx].size )
RECREATE(script->hq[idx].item, int, ++script->hq[idx].size);
-
+
script->hq[idx].item[i] = var;
script->hq[idx].items++;
if( var >= START_ACCOUNT_NUM && (sd = map->id2sd(var)) ) {
@@ -17553,13 +17445,13 @@ bool script_hqueue_add(int idx, int var) {
break;
}
}
-
+
if( i == sd->queues_count )
RECREATE(sd->queues, int, ++sd->queues_count);
-
+
sd->queues[i] = idx;
}
-
+
}
}
return false;
@@ -17569,9 +17461,9 @@ bool script_hqueue_add(int idx, int var) {
BUILDIN(queueadd) {
int idx = script_getnum(st, 2);
int var = script_getnum(st, 3);
-
+
script_pushint(st,script->queue_add(idx,var)?1:0);
-
+
return true;
}
bool script_hqueue_remove(int idx, int var) {
@@ -17580,30 +17472,30 @@ bool script_hqueue_remove(int idx, int var) {
return true;
} else {
int i;
-
+
for(i = 0; i < script->hq[idx].size; i++) {
if( script->hq[idx].item[i] == var ) {
break;
}
}
-
+
if( i != script->hq[idx].size ) {
struct map_session_data *sd;
-
+
script->hq[idx].item[i] = -1;
script->hq[idx].items--;
-
+
if( var >= START_ACCOUNT_NUM && (sd = map->id2sd(var)) ) {
for(i = 0; i < sd->queues_count; i++) {
if( sd->queues[i] == idx ) {
break;
}
}
-
+
if( i != sd->queues_count )
sd->queues[i] = -1;
}
-
+
}
}
return false;
@@ -17615,7 +17507,7 @@ BUILDIN(queueremove) {
int var = script_getnum(st, 3);
script_pushint(st, script->queue_remove(idx,var)?1:0);
-
+
return true;
}
@@ -17626,7 +17518,7 @@ BUILDIN(queueremove) {
BUILDIN(queueopt) {
int idx = script_getnum(st, 2);
int var = script_getnum(st, 3);
-
+
if( idx < 0 || idx >= script->hqs || script->hq[idx].size == -1 ) {
ShowWarning("buildin_queueopt: unknown queue id %d\n",idx);
script_pushint(st, 1);
@@ -17659,7 +17551,7 @@ BUILDIN(queueopt) {
break;
}
}
-
+
return true;
}
bool script_hqueue_del(int idx) {
@@ -17669,7 +17561,7 @@ bool script_hqueue_del(int idx) {
} else {
struct map_session_data *sd;
int i;
-
+
for(i = 0; i < script->hq[idx].size; i++) {
if( script->hq[idx].item[i] >= START_ACCOUNT_NUM && (sd = map->id2sd(script->hq[idx].item[i])) ) {
int j;
@@ -17678,13 +17570,13 @@ bool script_hqueue_del(int idx) {
break;
}
}
-
+
if( j != sd->queues_count )
sd->queues[j] = -1;
}
script->hq[idx].item[i] = 0;
}
-
+
script->hq[idx].size = -1;
script->hq[idx].items = 0;
}
@@ -17694,9 +17586,9 @@ bool script_hqueue_del(int idx) {
/* deletes queue of id .@queue_id, returns 1 if id not found, 0 otherwise */
BUILDIN(queuedel) {
int idx = script_getnum(st, 2);
-
+
script_pushint(st,script->queue_del(idx)?1:0);
-
+
return true;
}
void script_hqueue_clear(int idx) {
@@ -17706,7 +17598,7 @@ void script_hqueue_clear(int idx) {
} else {
struct map_session_data *sd;
int i, j;
-
+
for(i = 0; i < script->hq[idx].size; i++) {
if( script->hq[idx].item[i] > 0 ) {
@@ -17716,7 +17608,7 @@ void script_hqueue_clear(int idx) {
break;
}
}
-
+
if( j != sd->queues_count )
sd->queues[j] = -1;
}
@@ -17734,37 +17626,37 @@ BUILDIN(queueiterator) {
struct hQueue *queue = NULL;
int idx = script->hqis;
int i;
-
+
if( qid < 0 || qid >= script->hqs || script->hq[qid].size == -1 || !(queue = script->queue(qid)) ) {
ShowWarning("queueiterator: invalid queue id %d\n",qid);
return true;
}
-
+
/* what if queue->size is 0? (iterating a empty queue?) */
if( queue->size <= 0 ) {
ShowWarning("queueiterator: attempting to iterate on on empty queue id %d!\n",qid);
return true;
}
-
+
for(i = 0; i < script->hqis; i++) {
if( script->hqi[i].items == -1 ) {
break;
}
}
-
+
if( i == script->hqis ) {
RECREATE(script->hqi, struct hQueueIterator, ++script->hqis);
script->hqi[ idx ].item = NULL;
} else
idx = i;
-
+
RECREATE(script->hqi[ idx ].item, int, queue->size);
memcpy(script->hqi[idx].item, queue->item, sizeof(int)*queue->size);
-
+
script->hqi[ idx ].items = queue->size;
script->hqi[ idx ].pos = 0;
-
+
script_pushint(st,idx);
return true;
}
@@ -17772,7 +17664,7 @@ BUILDIN(queueiterator) {
/* returns next/first member in the iterator, 0 if none */
BUILDIN(qiget) {
int idx = script_getnum(st, 2);
-
+
if( idx < 0 || idx >= script->hqis ) {
ShowWarning("buildin_qiget: unknown queue iterator id %d\n",idx);
script_pushint(st, 0);
@@ -17789,7 +17681,7 @@ BUILDIN(qiget) {
/* returns 1:0 if there is a next member in the iterator */
BUILDIN(qicheck) {
int idx = script_getnum(st, 2);
-
+
if( idx < 0 || idx >= script->hqis ) {
ShowWarning("buildin_qicheck: unknown queue iterator id %d\n",idx);
script_pushint(st, 0);
@@ -17798,13 +17690,13 @@ BUILDIN(qicheck) {
} else {
script_pushint(st, 1);
}
-
+
return true;
}
/* Queue Iterator Check */
BUILDIN(qiclear) {
int idx = script_getnum(st, 2);
-
+
if( idx < 0 || idx >= script->hqis ) {
ShowWarning("buildin_qiclear: unknown queue iterator id %d\n",idx);
script_pushint(st, 1);
@@ -17812,7 +17704,7 @@ BUILDIN(qiclear) {
script->hqi[idx].items = -1;
script_pushint(st, 0);
}
-
+
return true;
}
/**
@@ -17833,7 +17725,7 @@ BUILDIN(packageitem) {
script_pushint(st, 1);
return true;
}
-
+
if( !(data = itemdb->exists(nameid)) ) {
ShowWarning("buildin_packageitem: unknown item id %d\n",nameid);
script_pushint(st, 1);
@@ -17847,7 +17739,7 @@ BUILDIN(packageitem) {
itemdb->package_item(sd,data->package);
script_pushint(st, 0);
}
-
+
return true;
}
/* New Battlegrounds Stuff */
@@ -17856,7 +17748,7 @@ BUILDIN(packageitem) {
BUILDIN(bg_create_team) {
const char *map_name, *ev = "", *dev = "";//ev and dev will be dropped.
int x, y, map_index = 0, bg_id;
-
+
map_name = script_getstr(st,2);
if( strcmp(map_name,"-") != 0 ) {
map_index = mapindex->name2id(map_name);
@@ -17865,15 +17757,15 @@ BUILDIN(bg_create_team) {
return true;
}
}
-
+
x = script_getnum(st,3);
y = script_getnum(st,4);
-
+
if( (bg_id = bg->create(map_index, x, y, ev, dev)) == 0 ) { // Creation failed
script_pushint(st,-1);
} else
script_pushint(st,bg_id);
-
+
return true;
}
@@ -17883,28 +17775,28 @@ BUILDIN(bg_create_team) {
BUILDIN(bg_join_team) {
struct map_session_data *sd;
int team_id = script_getnum(st, 2);
-
+
if( script_hasdata(st, 3) )
sd = map->id2sd(script_getnum(st, 3));
else
sd = script->rid2sd(st);
-
+
if( !sd )
script_pushint(st, 1);
else
script_pushint(st,bg->team_join(team_id, sd)?0:1);
-
+
return true;
}
/*==============[Mhalicot]==================
- * countbound {<type>};
+ * countbound {<type>};
* Creates an array of bounded item IDs
* Returns amount of items found
* Type:
- * 1 - Account Bound
- * 2 - Guild Bound
- * 3 - Party Bound
- * 4 - Character Bound
+ * 1 - Account Bound
+ * 2 - Guild Bound
+ * 3 - Party Bound
+ * 4 - Character Bound
*------------------------------------------*/
BUILDIN(countbound)
{
@@ -17916,7 +17808,7 @@ BUILDIN(countbound)
type = script_hasdata(st,2)?script_getnum(st,2):0;
- for(i=0;i<MAX_INVENTORY;i++){
+ for(i=0;i<MAX_INVENTORY;i++) {
if(sd->status.inventory[i].nameid > 0 && (
(!type && sd->status.inventory[i].bound > 0) ||
(type && sd->status.inventory[i].bound == type)
@@ -17926,7 +17818,7 @@ BUILDIN(countbound)
j += sd->status.inventory[i].amount;
}
}
-
+
script_pushint(st,j);
return 0;
}
@@ -17936,34 +17828,34 @@ BUILDIN(countbound)
BUILDIN(bg_match_over) {
bool canceled = script_hasdata(st,3) ? true : false;
struct bg_arena *arena = bg->name2arena((char*)script_getstr(st, 2));
-
+
if( arena ) {
bg->match_over(arena,canceled);
script_pushint(st, 0);
} else
script_pushint(st, 1);
-
+
return true;
}
BUILDIN(instance_mapname) {
- const char *map_name;
+ const char *map_name;
int m;
short instance_id = -1;
-
- map_name = script_getstr(st,2);
-
+
+ map_name = script_getstr(st,2);
+
if( script_hasdata(st,3) )
instance_id = script_getnum(st,3);
else
instance_id = st->instance_id;
-
+
// Check that instance mapname is a valid map
if( instance_id == -1 || (m = instance->mapname2imap(map_name,instance_id)) == -1 )
script_pushconststr(st, "");
else
script_pushconststr(st, map->list[m].name);
-
+
return true;
}
/* modify an instances' reload-spawn point */
@@ -17974,16 +17866,16 @@ BUILDIN(instance_set_respawn) {
short instance_id = -1;
short mid;
short x,y;
-
+
map_name = script_getstr(st,2);
x = script_getnum(st, 3);
y = script_getnum(st, 4);
-
+
if( script_hasdata(st, 5) )
instance_id = script_getnum(st, 5);
else
instance_id = st->instance_id;
-
+
if( instance_id == -1 || !instance->valid(instance_id) )
script_pushint(st, 0);
else if( (mid = map->mapname2mapid(map_name)) == -1 ) {
@@ -17991,7 +17883,7 @@ BUILDIN(instance_set_respawn) {
script_pushint(st, 0);
} else {
int i;
-
+
for(i = 0; i < instance->list[instance_id].num_map; i++) {
if( map->list[instance->list[instance_id].map[i]].m == mid ) {
instance->list[instance_id].respawn.map = map_id2index(mid);
@@ -18000,7 +17892,7 @@ BUILDIN(instance_set_respawn) {
break;
}
}
-
+
if( i != instance->list[instance_id].num_map )
script_pushint(st, 1);
else {
@@ -18008,8 +17900,8 @@ BUILDIN(instance_set_respawn) {
script_pushint(st, 0);
}
}
-
-
+
+
return true;
}
/**
@@ -18021,7 +17913,7 @@ BUILDIN(openshop) {
struct npc_data *nd;
struct map_session_data *sd;
const char *name = NULL;
-
+
if( script_hasdata(st, 2) ) {
name = script_getstr(st, 2);
if( !(nd = npc->name2id(name)) || nd->subtype != SCRIPT ) {
@@ -18039,7 +17931,7 @@ BUILDIN(openshop) {
ShowWarning("buildin_openshop: trying to open without any items!\n");
return false;
}
-
+
if( !npc->trader_open(sd,nd) )
script_pushint(st, 0);
else
@@ -18059,7 +17951,7 @@ BUILDIN(sellitem) {
int i = 0, id = script_getnum(st,2);
int value = 0;
int qty = 0;
-
+
if( !(nd = map->id2nd(st->oid)) ) {
ShowWarning("buildin_sellitem: trying to run without a proper NPC!\n");
return false;
@@ -18067,11 +17959,11 @@ BUILDIN(sellitem) {
ShowWarning("buildin_sellitem: unknown item id '%d'!\n",id);
return false;
}
-
+
value = script_hasdata(st,3) ? script_getnum(st, 3) : it->value_buy;
if( value == -1 )
value = it->value_buy;
-
+
if( !nd->u.scr.shop )
npc->trader_update(nd->src_id?nd->src_id:nd->bl.id);
else {/* no need to run this if its empty */
@@ -18080,19 +17972,19 @@ BUILDIN(sellitem) {
break;
}
}
-
+
if( nd->u.scr.shop->type == NST_MARKET ) {
if( !script_hasdata(st,4) || ( qty = script_getnum(st, 4) ) <= 0 ) {
ShowError("buildin_sellitem: invalid 'qty' for market-type shop!\n");
return false;
}
}
-
+
if( ( nd->u.scr.shop->type == NST_ZENY || nd->u.scr.shop->type == NST_MARKET ) && value*0.75 < it->value_sell*1.24 ) {
ShowWarning("buildin_sellitem: Item %s [%d] discounted buying price (%d->%d) is less than overcharged selling price (%d->%d) in NPC %s (%s)\n",
it->name, id, value, (int)(value*0.75), it->value_sell, (int)(it->value_sell*1.24), nd->exname, nd->path);
}
-
+
if( i != nd->u.scr.shop->items ) {
nd->u.scr.shop->item[i].value = value;
nd->u.scr.shop->item[i].qty = qty;
@@ -18103,7 +17995,7 @@ BUILDIN(sellitem) {
if( nd->u.scr.shop->item[i].nameid == 0 )
break;
}
-
+
if( i == nd->u.scr.shop->items ) {
if( nd->u.scr.shop->items == USHRT_MAX ) {
ShowWarning("buildin_sellitem: Can't add %s (%s/%s), shop list is full!\n", it->name, nd->exname, nd->path);
@@ -18112,12 +18004,12 @@ BUILDIN(sellitem) {
i = nd->u.scr.shop->items;
RECREATE(nd->u.scr.shop->item, struct npc_item_list, ++nd->u.scr.shop->items);
}
-
- nd->u.scr.shop->item[i].nameid = it->nameid;
- nd->u.scr.shop->item[i].value = value;
- nd->u.scr.shop->item[i].qty = qty;
+
+ nd->u.scr.shop->item[i].nameid = it->nameid;
+ nd->u.scr.shop->item[i].value = value;
+ nd->u.scr.shop->item[i].qty = qty;
}
-
+
return true;
}
/**
@@ -18130,44 +18022,44 @@ BUILDIN(sellitem) {
BUILDIN(stopselling) {
struct npc_data *nd;
int i, id = script_getnum(st,2);
-
+
if( !(nd = map->id2nd(st->oid)) || !nd->u.scr.shop ) {
ShowWarning("buildin_stopselling: trying to run without a proper NPC!\n");
return false;
}
-
+
for( i = 0; i < nd->u.scr.shop->items; i++ ) {
if( nd->u.scr.shop->item[i].nameid == id )
break;
}
-
+
if( i != nd->u.scr.shop->items ) {
int cursor;
-
+
if( nd->u.scr.shop->type == NST_MARKET )
npc->market_delfromsql(nd,i);
-
+
nd->u.scr.shop->item[i].nameid = 0;
nd->u.scr.shop->item[i].value = 0;
nd->u.scr.shop->item[i].qty = 0;
-
+
for( i = 0, cursor = 0; i < nd->u.scr.shop->items; i++ ) {
if( nd->u.scr.shop->item[i].nameid == 0 )
continue;
-
+
if( cursor != i ) {
nd->u.scr.shop->item[cursor].nameid = nd->u.scr.shop->item[i].nameid;
nd->u.scr.shop->item[cursor].value = nd->u.scr.shop->item[i].value;
nd->u.scr.shop->item[cursor].qty = nd->u.scr.shop->item[i].qty;
}
-
+
cursor++;
}
script_pushint(st, 1);
} else
script_pushint(st, 0);
-
+
return true;
}
/**
@@ -18180,15 +18072,15 @@ BUILDIN(setcurrency) {
int val1 = script_getnum(st,2),
val2 = script_hasdata(st, 3) ? script_getnum(st,3) : 0;
struct npc_data *nd;
-
+
if( !(nd = map->id2nd(st->oid)) ) {
ShowWarning("buildin_setcurrency: trying to run without a proper NPC!\n");
return false;
}
-
+
npc->trader_funds[0] = val1;
npc->trader_funds[1] = val2;
-
+
return true;
}
/**
@@ -18201,7 +18093,7 @@ BUILDIN(setcurrency) {
BUILDIN(tradertype) {
int type = script_getnum(st, 2);
struct npc_data *nd;
-
+
if( !(nd = map->id2nd(st->oid)) ) {
ShowWarning("buildin_tradertype: trying to run without a proper NPC!\n");
return false;
@@ -18209,7 +18101,7 @@ BUILDIN(tradertype) {
ShowWarning("buildin_tradertype: invalid type param %d!\n",type);
return false;
}
-
+
if( !nd->u.scr.shop )
npc->trader_update(nd->src_id?nd->src_id:nd->bl.id);
else {/* clear list */
@@ -18221,9 +18113,9 @@ BUILDIN(tradertype) {
}
npc->market_delfromsql(nd,USHRT_MAX);
}
-
+
nd->u.scr.shop->type = type;
-
+
return true;
}
/**
@@ -18233,14 +18125,14 @@ BUILDIN(tradertype) {
**/
BUILDIN(purchaseok) {
struct npc_data *nd;
-
+
if( !(nd = map->id2nd(st->oid)) || !nd->u.scr.shop ) {
ShowWarning("buildin_purchaseok: trying to run without a proper NPC!\n");
return false;
}
-
+
npc->trader_ok = true;
-
+
return true;
}
/**
@@ -18252,7 +18144,7 @@ BUILDIN(shopcount) {
struct npc_data *nd;
int id = script_getnum(st, 2);
unsigned short i;
-
+
if( !(nd = map->id2nd(st->oid)) ) {
ShowWarning("buildin_shopcount(%d): trying to run without a proper NPC!\n",id);
return false;
@@ -18271,11 +18163,11 @@ BUILDIN(shopcount) {
break;
}
}
-
+
/* didn't find it */
if( i == nd->u.scr.shop->items )
script_pushint(st, 0);
-
+
return true;
}
@@ -18537,7 +18429,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(sc_end,"i?"),
BUILDIN_DEF(getstatus, "i?"),
BUILDIN_DEF(getscrate,"ii?"),
- BUILDIN_DEF(debugmes,"s"),
+ BUILDIN_DEF(debugmes,"v"),
BUILDIN_DEF2(catchpet,"pet","i"),
BUILDIN_DEF2(birthpet,"bpet",""),
BUILDIN_DEF(resetlvl,"i"),
@@ -18551,8 +18443,8 @@ void script_parse_builtin(void) {
BUILDIN_DEF2(waitingroomkickall,"kickwaitingroomall","?"),
BUILDIN_DEF(enablewaitingroomevent,"?"),
BUILDIN_DEF(disablewaitingroomevent,"?"),
- BUILDIN_DEF2(enablewaitingroomevent,"enablearena",""), // Added by RoVeRT
- BUILDIN_DEF2(disablewaitingroomevent,"disablearena",""), // Added by RoVeRT
+ BUILDIN_DEF2(enablewaitingroomevent,"enablearena",""), // Added by RoVeRT
+ BUILDIN_DEF2(disablewaitingroomevent,"disablearena",""), // Added by RoVeRT
BUILDIN_DEF(getwaitingroomstate,"i?"),
BUILDIN_DEF(warpwaitingpc,"sii?"),
BUILDIN_DEF(attachrid,"i"),
@@ -18568,10 +18460,10 @@ void script_parse_builtin(void) {
BUILDIN_DEF(gvgoff,"s"),
BUILDIN_DEF(emotion,"i??"),
BUILDIN_DEF(maprespawnguildid,"sii"),
- BUILDIN_DEF(agitstart,""), // <Agit>
+ BUILDIN_DEF(agitstart,""), // <Agit>
BUILDIN_DEF(agitend,""),
BUILDIN_DEF(agitcheck,""), // <Agitcheck>
- BUILDIN_DEF(flagemblem,"i"), // Flag Emblem
+ BUILDIN_DEF(flagemblem,"i"), // Flag Emblem
BUILDIN_DEF(getcastlename,"s"),
BUILDIN_DEF(getcastledata,"si"),
BUILDIN_DEF(setcastledata,"sii"),
@@ -18600,10 +18492,10 @@ void script_parse_builtin(void) {
BUILDIN_DEF(playbgm,"s"),
BUILDIN_DEF(playbgmall,"s?????"),
BUILDIN_DEF(soundeffect,"si"),
- BUILDIN_DEF(soundeffectall,"si?????"), // SoundEffectAll [Codemaster]
- BUILDIN_DEF(strmobinfo,"ii"), // display mob data [Valaris]
- BUILDIN_DEF(guardian,"siisi??"), // summon guardians
- BUILDIN_DEF(guardianinfo,"sii"), // display guardian data [Valaris]
+ BUILDIN_DEF(soundeffectall,"si?????"), // SoundEffectAll [Codemaster]
+ BUILDIN_DEF(strmobinfo,"ii"), // display mob data [Valaris]
+ BUILDIN_DEF(guardian,"siisi??"), // summon guardians
+ BUILDIN_DEF(guardianinfo,"sii"), // display guardian data [Valaris]
BUILDIN_DEF(petskillbonus,"iiii"), // [Valaris]
BUILDIN_DEF(petrecovery,"ii"), // [Valaris]
BUILDIN_DEF(petloot,"i"), // [Valaris]
@@ -18616,7 +18508,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(specialeffect,"i??"), // npc skill effect [Valaris]
BUILDIN_DEF(specialeffect2,"i??"), // skill effect on players[Valaris]
BUILDIN_DEF(nude,""), // nude command [Valaris]
- BUILDIN_DEF(mapwarp,"ssii??"), // Added by RoVeRT
+ BUILDIN_DEF(mapwarp,"ssii??"), // Added by RoVeRT
BUILDIN_DEF(atcommand,"s"), // [MouseJstr]
BUILDIN_DEF2(atcommand,"charcommand","s"), // [MouseJstr]
BUILDIN_DEF(movenpc,"sii?"), // [MouseJstr]
@@ -18628,7 +18520,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(npcspeed,"i"), // [Valaris]
BUILDIN_DEF(npcwalkto,"ii"), // [Valaris]
BUILDIN_DEF(npcstop,""), // [Valaris]
- BUILDIN_DEF(getmapxy,"rrri?"), //by Lorky [Lupus]
+ BUILDIN_DEF(getmapxy,"rrri?"), //by Lorky [Lupus]
BUILDIN_DEF(checkoption1,"i"),
BUILDIN_DEF(checkoption2,"i"),
BUILDIN_DEF(guildgetexp,"i"),
@@ -18735,13 +18627,13 @@ void script_parse_builtin(void) {
BUILDIN_DEF(awake,"s"),
BUILDIN_DEF(getvariableofnpc,"rs"),
BUILDIN_DEF(warpportal,"iisii"),
- BUILDIN_DEF2(homunculus_evolution,"homevolution",""), //[orn]
+ BUILDIN_DEF2(homunculus_evolution,"homevolution",""), //[orn]
BUILDIN_DEF2(homunculus_mutate,"hommutate","?"),
BUILDIN_DEF2(homunculus_morphembryo,"morphembryo",""),
BUILDIN_DEF2(homunculus_checkcall,"checkhomcall",""),
- BUILDIN_DEF2(homunculus_shuffle,"homshuffle",""), //[Zephyrus]
- BUILDIN_DEF(eaclass,"?"), //[Skotlex]
- BUILDIN_DEF(roclass,"i?"), //[Skotlex]
+ BUILDIN_DEF2(homunculus_shuffle,"homshuffle",""), //[Zephyrus]
+ BUILDIN_DEF(eaclass,"?"), //[Skotlex]
+ BUILDIN_DEF(roclass,"i?"), //[Skotlex]
BUILDIN_DEF(checkvending,"?"),
BUILDIN_DEF(checkchatting,"?"),
BUILDIN_DEF(checkidle,"?"),
@@ -18784,7 +18676,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(bg_get_data,"ii"),
BUILDIN_DEF(bg_getareausers,"isiiii"),
BUILDIN_DEF(bg_updatescore,"sii"),
-
+
// Instancing
BUILDIN_DEF(instance_create,"si?"),
BUILDIN_DEF(instance_destroy,"?"),
@@ -18801,7 +18693,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(instance_check_party,"i???"),
BUILDIN_DEF(instance_mapname,"s?"),
BUILDIN_DEF(instance_set_respawn,"sii?"),
-
+
/**
* 3rd-related
**/
@@ -18832,14 +18724,14 @@ void script_parse_builtin(void) {
BUILDIN_DEF(bindatcmd, "ss???"),
BUILDIN_DEF(unbindatcmd, "s"),
BUILDIN_DEF(useatcmd, "s"),
-
+
/**
* Item bound [Xantara] [Akinari] [Mhalicot/Hercules]
**/
BUILDIN_DEF2(getitem,"getitembound","vii?"),
BUILDIN_DEF2(getitem2,"getitembound2","viiiiiiiii?"),
BUILDIN_DEF(countbound, "?"),
-
+
//Quest Log System [Inkfish]
BUILDIN_DEF(questinfo, "ii??"),
BUILDIN_DEF(setquest, "i"),
@@ -18848,7 +18740,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(checkquest, "i?"),
BUILDIN_DEF(changequest, "ii"),
BUILDIN_DEF(showevent, "i?"),
-
+
/**
* hQueue [Ind/Hercules]
**/
@@ -18862,20 +18754,20 @@ void script_parse_builtin(void) {
BUILDIN_DEF(qicheck,"i"),
BUILDIN_DEF(qiget,"i"),
BUILDIN_DEF(qiclear,"i"),
-
+
BUILDIN_DEF(packageitem,"?"),
-
+
BUILDIN_DEF(sit, "?"),
BUILDIN_DEF(stand, "?"),
BUILDIN_DEF(issit, "?"),
BUILDIN_DEF(montransform, "vii????"), // Monster Transform [malufett/Hercules]
-
+
/* New BG Commands [Hercules] */
BUILDIN_DEF(bg_create_team,"sii"),
BUILDIN_DEF(bg_join_team,"i?"),
BUILDIN_DEF(bg_match_over,"s?"),
-
+
/* New Shop Support */
BUILDIN_DEF(openshop,"?"),
BUILDIN_DEF(sellitem,"i??"),
@@ -18897,12 +18789,12 @@ void script_parse_builtin(void) {
void script_label_add(int key, int pos) {
int idx = script->label_count;
-
+
if( script->labels_size == script->label_count ) {
script->labels_size += 1024;
RECREATE(script->labels, struct script_label_entry, script->labels_size);
}
-
+
script->labels[idx].key = key;
script->labels[idx].pos = pos;
script->label_count++;
@@ -18913,21 +18805,21 @@ void script_defaults(void) {
unsigned int equip[SCRIPT_EQUIP_TABLE_SIZE] = {EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_GARMENT,EQP_SHOES,EQP_ACC_L,EQP_ACC_R,EQP_HEAD_MID,EQP_HEAD_LOW,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_GARMENT,EQP_SHADOW_ARMOR, EQP_SHADOW_WEAPON, EQP_SHADOW_SHIELD, EQP_SHADOW_SHOES, EQP_SHADOW_ACC_R, EQP_SHADOW_ACC_L};
script = &script_s;
-
+
script->st_db = NULL;
script->active_scripts = 0;
script->next_id = 0;
script->st_ers = NULL;
script->stack_ers = NULL;
-
+
script->hq = NULL;
script->hqi = NULL;
script->hqs = script->hqis = 0;
memset(&script->hqe, 0, sizeof(script->hqe));
-
+
script->buildin = NULL;
script->buildin_count = 0;
-
+
script->str_data = NULL;
script->str_data_size = 0;
script->str_num = LABEL_START;
@@ -18935,19 +18827,19 @@ void script_defaults(void) {
script->str_size = 0;
script->str_pos = 0;
memset(script->str_hash, 0, sizeof(script->str_hash));
-
+
script->word_buf = NULL;
script->word_size = 0;
-
+
script->current_item_id = 0;
-
+
script->labels = NULL;
script->label_count = 0;
script->labels_size = 0;
-
+
script->buf = NULL;
script->pos = 0, script->size = 0;
-
+
script->parse_options = 0;
script->buildin_set_ref = 0;
script->buildin_callsub_ref = 0;
@@ -18961,25 +18853,25 @@ void script_defaults(void) {
script->parser_current_src = NULL;
script->parser_current_file = NULL;
script->parser_current_line = 0;
-
+
memset(&script->syntax,0,sizeof(script->syntax));
-
+
script->parse_syntax_for_flag = 0;
-
+
memcpy(script->equip, &equip, sizeof(script->equip));
-
+
memset(&script->config, 0, sizeof(script->config));
-
+
script->autobonus_db = NULL;
script->userfunc_db = NULL;
-
+
script->potion_flag = script->potion_hp = script->potion_per_hp =
script->potion_sp = script->potion_per_sp = script->potion_target = 0;
-
+
script->init = do_init_script;
script->final = do_final_script;
script->reload = script_reload;
-
+
/* parse */
script->parse = parse_script;
script->add_builtin = script_add_builtin;
@@ -18988,7 +18880,7 @@ void script_defaults(void) {
script->error = script_error;
script->warning = script_warning;
script->parse_subexpr = script_parse_subexpr;
-
+
script->addScript = script_hp_add;
script->conv_num = conv_num;
script->conv_str = conv_str;
@@ -19003,7 +18895,7 @@ void script_defaults(void) {
script->set_constant = script_set_constant;
script->set_constant2 = script_set_constant2;
script->set_constant_force = script_set_constant_force;
- script->get_constant = script_get_constant;
+ script->get_constant = script_get_constant;
script->label_add = script_label_add;
script->run = run_script;
script->run_main = run_script_main;
@@ -19023,14 +18915,14 @@ void script_defaults(void) {
script->search_str = script_search_str;
script->setd_sub = setd_sub;
script->attach_state = script_attach_state;
-
+
script->queue = script_hqueue_get;
script->queue_add = script_hqueue_add;
script->queue_del = script_hqueue_del;
script->queue_remove = script_hqueue_remove;
script->queue_create = script_hqueue_create;
script->queue_clear = script_hqueue_clear;
-
+
script->parse_curly_close = parse_curly_close;
script->parse_syntax_close = parse_syntax_close;
script->parse_syntax_close_sub = parse_syntax_close_sub;
@@ -19101,7 +18993,7 @@ void script_defaults(void) {
script->cleanfloor_sub = script_cleanfloor_sub;
script->run_func = run_func;
script->getfuncname = script_getfuncname;
-
+
/* script_config base */
script->config.warn_func_mismatch_argtypes = 1;
script->config.warn_func_mismatch_paramnum = 1;
diff --git a/src/map/script.h b/src/map/script.h
index 8076ea02e..2f7499569 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -85,6 +85,8 @@ struct eri;
#define script_isstring(st,i) data_isstring(script_getdata((st),(i)))
#define script_isint(st,i) data_isint(script_getdata((st),(i)))
+#define script_isstringtype(st,i) data_isstring(script->get_val((st), script_getdata((st),(i))))
+#define script_isinttype(st,i) data_isint(script->get_val((st), script_getdata((st),(i))))
#define script_getnum(st,val) (script->conv_num((st), script_getdata((st),(val))))
#define script_getstr(st,val) (script->conv_str((st), script_getdata((st),(val))))
@@ -548,7 +550,7 @@ struct script_interface {
TBL_PC *(*rid2sd) (struct script_state *st);
void (*detach_rid) (struct script_state* st);
struct script_data* (*push_val)(struct script_stack* stack, enum c_op type, int val, struct DBMap** ref);
- void (*get_val) (struct script_state* st, struct script_data* data);
+ struct script_data *(*get_val) (struct script_state* st, struct script_data* data);
void* (*get_val2) (struct script_state* st, int uid, struct DBMap** ref);
struct script_data* (*push_str) (struct script_stack* stack, enum c_op type, char* str);
struct script_data* (*push_copy) (struct script_stack* stack, int pos);
diff --git a/src/map/skill.c b/src/map/skill.c
index 71e343db0..28937048e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -908,7 +908,6 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1
//Chance to cause blind status vs demon and undead element, but not against players
if(!dstsd && (battle->check_undead(tstatus->race,tstatus->def_ele) || tstatus->race == RC_DEMON))
sc_start(bl,SC_BLIND,100,skill_lv,skill->get_time2(skill_id,skill_lv));
- attack_type |= BF_WEAPON;
break;
case AM_ACIDTERROR:
@@ -2407,7 +2406,11 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
dmg.dmotion = clif->skill_damage(src,bl,tick,dmg.amotion,dmg.dmotion,damage,1,WL_CHAINLIGHTNING,-2,6);
break;
case LG_OVERBRAND_BRANDISH:
+ case LG_OVERBRAND:
+ dmg.amotion = status_get_amotion(src) * 2;
case LG_OVERBRAND_PLUSATK:
+ dmg.dmotion = clif->skill_damage(dsrc,bl,tick,status_get_amotion(src),dmg.dmotion,damage,dmg.div_,skill_id,-1,5);
+ break;
case EL_FIRE_BOMB:
case EL_FIRE_BOMB_ATK:
case EL_FIRE_WAVE:
@@ -2604,7 +2607,6 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
case MG_FIREWALL:
case PR_SANCTUARY:
case SC_TRIANGLESHOT:
- case LG_OVERBRAND:
case SR_KNUCKLEARROW:
case GN_WALLOFTHORN:
case EL_FIRE_MANTLE:
@@ -2626,15 +2628,9 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr
//blown-specific handling
switch( skill_id ) {
- case LG_OVERBRAND:
- if( skill->blown(dsrc,bl,dmg.blewcount,dir,0) ) {
- short dir_x, dir_y;
- dir_x = dirx[(dir+4)%8];
- dir_y = diry[(dir+4)%8];
- if( map->getcell(bl->m, bl->x+dir_x, bl->y+dir_y, CELL_CHKNOPASS) != 0 )
- skill->addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag );
- } else
- skill->addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag );
+ case LG_OVERBRAND_BRANDISH:
+ if( skill->blown(dsrc,bl,dmg.blewcount,dir,0) < dmg.blewcount )
+ skill->addtimerskill(src, tick + status_get_amotion(src), bl->id, 0, 0, LG_OVERBRAND_PLUSATK, skill_lv, BF_WEAPON, flag|SD_ANIMATION);
break;
case SR_KNUCKLEARROW:
if( skill->blown(dsrc,bl,dmg.blewcount,dir,0) && !(flag&4) ) {
@@ -3188,13 +3184,6 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
}
}
break;
- case LG_OVERBRAND_BRANDISH:
- case LG_OVERBRAND_PLUSATK:
- if( status->check_skilluse(src, target, skl->skill_id, 1) )
- skill->attack(BF_WEAPON, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag|SD_LEVEL);
- else
- clif->skill_damage(src, target, tick, status_get_amotion(src), status_get_dmotion(target), 0, 1, skl->skill_id, skl->skill_lv, skill->get_hit(skl->skill_id));
- break;
case SR_KNUCKLEARROW:
skill->attack(BF_WEAPON, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag|SD_LEVEL);
break;
@@ -3257,10 +3246,22 @@ int skill_timerskill(int tid, int64 tick, int id, intptr_t data) {
int dummy = 1, i = skill->get_unit_range(skl->skill_id,skl->skill_lv);
map->foreachinarea(skill->cell_overlap, src->m, skl->x-i, skl->y-i, skl->x+i, skl->y+i, BL_SKILL, skl->skill_id, &dummy, src);
}
- // FIXME: there's no 'break' here. If it was intended, please consider adding a comment (issue #160)
+ // fall through ...
case WL_EARTHSTRAIN:
skill->unitsetting(src,skl->skill_id,skl->skill_lv,skl->x,skl->y,(skl->type<<16)|skl->flag);
break;
+ case LG_OVERBRAND_BRANDISH:
+ {
+ short x2 = src->x, y2 = src->y, x = x2, y = y2;
+ switch( skl->type ){
+ case 0: case 1: case 7: x2 += 4; x -= 4; y2 += 4; break;
+ case 3: case 4: case 5: x2 += 4; x -= 4; y -= 4; break;
+ case 2: y2 += 4; y -= 4; x -= 4; break;
+ case 6: y2 += 4; y -= 4; x2 += 4; break;
+ }
+ map->foreachinarea(skill->area_sub, src->m, x, y, x2, y2, BL_CHAR, src, skl->skill_id, skl->skill_lv, tick, skl->flag|BCT_ENEMY|SD_ANIMATION|1,skill->castend_damage_id);
+ }
+ break;
}
}
} while (0);
@@ -3511,6 +3512,8 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case KO_JYUMONJIKIRI:
case KO_SETSUDAN:
case GC_DARKCROW:
+ case LG_OVERBRAND_BRANDISH:
+ case LG_OVERBRAND:
skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
break;
@@ -4334,16 +4337,6 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
skill->attack((flag&1)?BF_WEAPON:BF_MAGIC,src,src,bl,skill_id,skill_lv,tick,flag);
break;
- case LG_OVERBRAND:
- if( status->check_skilluse(src, bl, skill_id, 1) )
- skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag|SD_LEVEL);
- else
- clif->skill_damage(src, bl, tick, status_get_amotion(src), status_get_dmotion(bl), 0, 1, skill_id, skill_lv, skill->get_hit(skill_id));
- break;
-
- case LG_OVERBRAND_BRANDISH:
- skill->addtimerskill(src, tick + status_get_amotion(src)*8/10, bl->id, 0, 0, skill_id, skill_lv, BF_WEAPON, flag|SD_LEVEL);
- break;
case SR_DRAGONCOMBO:
skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
break;
@@ -6069,6 +6062,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
clif->skill_nodamage(src,bl,skill_id,( skill_id == LG_FORCEOFVANGUARD ) ? skill_lv : -1,failure);
else if( sd )
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
+ if ( skill_id == LG_FORCEOFVANGUARD )
+ break;
map->freeblock_unlock();
return 0;
}
@@ -10274,14 +10269,16 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case LG_OVERBRAND:
{
- int width;//according to data from irowiki it actually is a square
- int i;
- for( width = 0; width < 7; width++ )
- for( i = 0; i < 7; i++ )
- map->foreachincell(skill->area_sub, src->m, x-2+i, y-2+width, splash_target(src), src, LG_OVERBRAND_BRANDISH, skill_lv, tick, flag|BCT_ENEMY,skill->castend_damage_id);
- for( width = 0; width < 7; width++ )
- for( i = 0; i < 7; i++ )
- map->foreachincell(skill->area_sub, src->m, x-2+i, y-2+width, splash_target(src), src, skill_id, skill_lv, tick, flag|BCT_ENEMY,skill->castend_damage_id);
+ uint8 dir = map->calc_dir(src, x, y);
+ uint8 x2 = x = src->x, y2 = y = src->y;
+ switch( dir ){
+ case 0: case 1: case 7: x2++; x--; y2 += 7; break;
+ case 3: case 4: case 5: x2++; x--; y -= 7; break;
+ case 2: y2++; y--; x -= 7;break;
+ case 6: y2++; y--; x2 += 7;break;
+ }
+ map->foreachinarea(skill->area_sub, src->m, x, y, x2, y2, BL_CHAR, src, skill_id, skill_lv, tick, flag|BCT_ENEMY|SD_ANIMATION|1,skill->castend_damage_id);
+ skill->addtimerskill(src,timer->gettick() + status_get_amotion(src), 0, 0, 0, LG_OVERBRAND_BRANDISH, skill_lv, dir, flag);
}
break;
@@ -12950,13 +12947,6 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
return 0;
}
break;
- case LG_RAGEBURST:
- if( sd->spiritball == 0 ) {
- clif->skill_fail(sd,skill_id,USESKILL_FAIL_SKILLINTERVAL,0);
- return 0;
- }
- sd->spiritball_old = require.spiritball = sd->spiritball;
- break;
case LG_RAYOFGENESIS:
if( sc && sc->data[SC_INSPIRATION] )
return 1; // Don't check for partner.
diff --git a/src/map/status.c b/src/map/status.c
index 290882e05..1f7d81ccf 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1746,10 +1746,8 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
hide_flag &= ~OPTION_HIDE;
else {
switch ( skill_id ) {
- case LG_OVERBRAND:
- case LG_OVERBRAND_BRANDISH:
- case LG_OVERBRAND_PLUSATK:
- hide_flag &=~ OPTION_CLOAK|OPTION_CHASEWALK;
+ case MO_ABSORBSPIRITS: // it works when already casted and target suddenly hides.
+ hide_flag &= ~OPTION_HIDE;
break;
}
}
@@ -4832,6 +4830,8 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
def -= def * 5 * (10-sc->data[SC_CAMOUFLAGE]->val4) / 100;
if( sc && sc->data[SC_GENTLETOUCH_REVITALIZE] && sc->data[SC_GENTLETOUCH_REVITALIZE]->val4 )
def += 2 * sc->data[SC_GENTLETOUCH_REVITALIZE]->val4;
+ if( sc->data[SC_FORCEOFVANGUARD] )
+ def += def * 2 * sc->data[SC_FORCEOFVANGUARD]->val1 / 100;
return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX);
}
@@ -4882,8 +4882,6 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
def -= def * (sc->data[SC_FLING]->val2)/100;
if( sc->data[SC_ANALYZE] )
def -= def * ( 14 * sc->data[SC_ANALYZE]->val1 ) / 100;
- if( sc->data[SC_FORCEOFVANGUARD] )
- def += def * 2 * sc->data[SC_FORCEOFVANGUARD]->val1 / 100;
if(sc->data[SC_SATURDAY_NIGHT_FEVER])
def -= def * (10 + 10 * sc->data[SC_SATURDAY_NIGHT_FEVER]->val1) / 100;
if(sc->data[SC_EARTHDRIVE])
@@ -8406,11 +8404,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val4 = tick/10000;
tick_time = 10000; // [GodLesZ] tick time
break;
- case SC_FORCEOFVANGUARD: // This is not the official way to handle it but I think we should use it. [pakpil]
- val2 = 20 + 12 * (val1 - 1); // Chance
- val3 = 5 + (2 * val1); // Max rage counters
+ case SC_FORCEOFVANGUARD:
+ val2 = 8 + 12 * val1; // Chance
+ val3 = 5 + 2 * val1; // Max rage counters
tick = -1; //endless duration in the client
- tick_time = 6000; // [GodLesZ] tick time
break;
case SC_EXEEDBREAK:
val1 *= 150; // 150 * skill_lv
@@ -9265,6 +9262,7 @@ int status_change_clear(struct block_list* bl, int type) {
sc->opt2 = 0;
sc->opt3 = 0;
sc->bs_counter = 0;
+ sc->fv_counter = 0;
#ifndef RENEWAL
sc->sg_counter = 0;
#endif
@@ -10654,11 +10652,11 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
return 0;
}
break;
-
+
case SC_FORCEOFVANGUARD:
- if( !status->charge(bl,0,20) )
+ if( !status->charge(bl, 0, (24 - 4 * sce->val1)) )
break;
- sc_timer_next(6000 + tick, status->change_timer, bl->id, data);
+ sc_timer_next(10000 + tick, status->change_timer, bl->id, data);
return 0;
case SC_BANDING:
diff --git a/src/map/status.h b/src/map/status.h
index 1fd354c79..44cc3b0a1 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -1777,6 +1777,7 @@ struct status_change {
unsigned char sg_counter; //Storm gust counter (previous hits from storm gust)
#endif
unsigned char bs_counter; // Blood Sucker counter
+ unsigned char fv_counter; // Force of vanguard counter
struct status_change_entry *data[SC_MAX];
};
diff --git a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
index 4ae16ed88..804ec86e2 100644
--- a/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HPMHooksCore.inc
@@ -3365,6 +3365,8 @@ struct {
struct HPMHookPoint *HP_npc_market_tosql_post;
struct HPMHookPoint *HP_npc_market_delfromsql_pre;
struct HPMHookPoint *HP_npc_market_delfromsql_post;
+ struct HPMHookPoint *HP_npc_market_delfromsql_sub_pre;
+ struct HPMHookPoint *HP_npc_market_delfromsql_sub_post;
struct HPMHookPoint *HP_npc_secure_timeout_timer_pre;
struct HPMHookPoint *HP_npc_secure_timeout_timer_post;
struct HPMHookPoint *HP_party_init_pre;
@@ -8358,6 +8360,8 @@ struct {
int HP_npc_market_tosql_post;
int HP_npc_market_delfromsql_pre;
int HP_npc_market_delfromsql_post;
+ int HP_npc_market_delfromsql_sub_pre;
+ int HP_npc_market_delfromsql_sub_post;
int HP_npc_secure_timeout_timer_pre;
int HP_npc_secure_timeout_timer_post;
int HP_party_init_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
index c016ca418..8188f7c30 100644
--- a/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking.HookingPoints.inc
@@ -1709,6 +1709,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(npc->market_fromsql, HP_npc_market_fromsql) },
{ HP_POP(npc->market_tosql, HP_npc_market_tosql) },
{ HP_POP(npc->market_delfromsql, HP_npc_market_delfromsql) },
+ { HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) },
{ HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) },
/* party */
{ HP_POP(party->init, HP_party_init) },
diff --git a/src/plugins/HPMHooking/HPMHooking.Hooks.inc b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
index 72b212b9e..e5aa3bd4a 100644
--- a/src/plugins/HPMHooking/HPMHooking.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Hooks.inc
@@ -43314,6 +43314,31 @@ void HP_npc_market_delfromsql(struct npc_data *nd, unsigned short index) {
}
return;
}
+void HP_npc_market_delfromsql_sub(const char *npcname, unsigned short index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_market_delfromsql_sub_pre ) {
+ void (*preHookFunc) (const char *npcname, unsigned short *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_pre[hIndex].func;
+ preHookFunc(npcname, &index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc.market_delfromsql_sub(npcname, index);
+ }
+ if( HPMHooks.count.HP_npc_market_delfromsql_sub_post ) {
+ void (*postHookFunc) (const char *npcname, unsigned short *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_market_delfromsql_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_market_delfromsql_sub_post[hIndex].func;
+ postHookFunc(npcname, &index);
+ }
+ }
+ return;
+}
int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
int retVal___ = 0;
@@ -51956,30 +51981,31 @@ struct script_data* HP_script_push_val(struct script_stack *stack, enum c_op typ
}
return retVal___;
}
-void HP_script_get_val(struct script_state *st, struct script_data *data) {
+struct script_data* HP_script_get_val(struct script_state *st, struct script_data *data) {
int hIndex = 0;
+ struct script_data* retVal___ = NULL;
if( HPMHooks.count.HP_script_get_val_pre ) {
- void (*preHookFunc) (struct script_state *st, struct script_data *data);
+ struct script_data* (*preHookFunc) (struct script_state *st, struct script_data *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_script_get_val_pre[hIndex].func;
- preHookFunc(st, data);
+ retVal___ = preHookFunc(st, data);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
- return;
+ return retVal___;
}
}
{
- HPMHooks.source.script.get_val(st, data);
+ retVal___ = HPMHooks.source.script.get_val(st, data);
}
if( HPMHooks.count.HP_script_get_val_post ) {
- void (*postHookFunc) (struct script_state *st, struct script_data *data);
+ struct script_data* (*postHookFunc) (struct script_data* retVal___, struct script_state *st, struct script_data *data);
for(hIndex = 0; hIndex < HPMHooks.count.HP_script_get_val_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_script_get_val_post[hIndex].func;
- postHookFunc(st, data);
+ retVal___ = postHookFunc(retVal___, st, data);
}
}
- return;
+ return retVal___;
}
void* HP_script_get_val2(struct script_state *st, int uid, struct DBMap **ref) {
int hIndex = 0;