Forráskód Böngészése

Implemented script commands 'addmonsterdrop' and 'delmonsterdrop' (cool)
-> Added documentation
Updated script command 'sc_start' to allow for more variables and options - Fixes bugreport:7664
-> Item databases and some scripts updated
Cleanup of script commands 'countitem' and 'countitem2'
Rework of @ 'reload' commands - Now offers @reload dbname
-> @reload packetdb now available
Restricted bonuses 'SPRecovRate' and 'HPRecovRate' to short range melee only - Fixes bugreport:2916
Increase AGI no longer makes characters stand - Fixes bugeport:7657
Small warning fix for 'below array bounds' in skill.c
Added short timeout to make_connection (lighta) - Fixes bugreport:7670
Some visual fixes for equipment and items (lighta)
Rework of script command 'checkweight' (lighta)
Some channel system cleanup (lighta)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17326 54d463be-8e91-2dee-dedb-b68131a5f0ec

akinari1087 12 éve
szülő
commit
b770bb52e7

+ 5 - 0
conf/help.txt

@@ -302,3 +302,8 @@ reloadscript: "Reload all scripts."
 gat: "For debugging (you inspect around gat)"
 send: "For debugging (packet variety)"
 nuke: "Params: <char name>\n" "Blow somebody up, including those surrounding them."
+reload: "Params: <db type>\n" "Reloads a database.\n"
+	"   itemdb                mobdb          skilldb\n"
+	"   atcommand       battleconf     statusdb\n"
+	"   pcdb                    motd             script\n"
+	"   questdb              msgconf       packetdb\n"

+ 3 - 0
conf/msg_conf/map_msg.conf

@@ -1497,5 +1497,8 @@
 1475: ---- My Channels ----
 1476: You have not joined any channels.
 
+//Reload packet database
+1477: Packet database has been reloaded.
+
 //Custom translations
 //import: conf/msg_conf/import/map_msg_eng_conf.txt

+ 4 - 3
db/packet_db.txt

@@ -1803,10 +1803,10 @@ packet_ver: 33
 //2013-03-20Ragexe (Judas)
 packet_ver: 34
 0x01FD,15,repairitem,2
-0x086D,26,friendslistadd,2
+0x086D,26,partyinvite2,2
 0x0897,5,changedir,2:4
 0x0947,36,storagepassword,0
-0x086F,26,partyinvite2,2
+0x086F,26,friendslistadd,2
 0x0888,19,wanttoconnection,2:6:10:14:18
 0x088E,7,actionrequest,2:6
 0x089B,10,useskilltoid,2:4:6
@@ -1815,6 +1815,7 @@ packet_ver: 34
 0x093F,5,hommenu,2:4
 0x0933,6,takeitem,2
 0x0438,6,dropitem,2:4
+0x85d,18,bookingregreq,2:4
 0x08AC,8,movetokafra,2:4
 0x0874,8,movefromkafra,2:4
 0x0959,10,useskilltopos,2:4:6:8
@@ -1844,7 +1845,6 @@ packet_ver: 34
 0x915,-1 // notify_standentry
 0x978,6,reqworldinfo,2
 0x979,50 //ackworldinfo
-0x99a,9 // take_off_equipv5
 0x991,-1 //inv itemlist normal
 0x992,-1 //inv itemlist equip
 0x993,-1 //cart itemlist normal
@@ -1854,6 +1854,7 @@ packet_ver: 34
 0x997,-1 //ZC_EQUIPWIN_MICROSCOPE_V5
 0x998,8,equipitem,2:4
 0x999,11 // cz_wear_equipv5
+0x99a,9 // take_off_equipv5
 
 
 // New cashshop

+ 17 - 17
db/pre-re/item_db.txt

@@ -38,7 +38,7 @@
 533,Grape_Juice,Grape Juice,0,250,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal 0,rand(15,25); },{},{}
 534,Carrot_Juice,Carrot Juice,0,20,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(27,33),0; },{},{}
 535,Pumpkin,Pumpkin,0,15,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal 19,0; },{},{}
-536,Ice_Cream,Ice Cream,0,150,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; if(rand(1000)<250) sc_start SC_Freeze,10000,0; },{},{}
+536,Ice_Cream,Ice Cream,0,150,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; sc_start SC_Freeze,10000,0,2500,0; },{},{}
 537,Pet_Food,Pet Food,0,1000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,90),0; },{},{}
 538,Well_Baked_Cookie,Well-baked Cookie,0,1000,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(160,200),0; },{},{}
 539,Piece_Of_Cake,Piece of Cake,0,3000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(270,330),0; },{},{}
@@ -51,12 +51,12 @@
 546,Yellow_Slim_Potion,Condensed Yellow Potion,0,600,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(175,235),0; },{},{}
 547,White_Slim_Potion,Condensed White Potion,0,1650,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(325,405),0; },{},{}
 548,Cheese,Cheese,0,2800,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal 0,rand(10,15); },{},{}
-549,Nice_Sweet_Potato,Yam,0,180,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,100),0; if(rand(1000)<150) sc_start SC_Stun,3000,0; },{},{}
+549,Nice_Sweet_Potato,Yam,0,180,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,100),0; sc_start SC_Stun,3000,0,1500,0; },{},{}
 550,Popped_Rice,Rice Cake,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(10,15),0; },{},{}
 551,Shusi,Sushi,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,60),0; },{},{}
 552,KETUPAT,Ketupat,0,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(70,90),rand(20,30); },{},{}
 553,Bun,Bao,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(35,70),0; },{},{}
-554,Mojji,Mochi,0,400,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; sc_start SC_Stun,3000,0; if(rand(1000)<150) sc_start SC_Blind,2000,0; },{},{}
+554,Mojji,Mochi,0,400,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; sc_start SC_Stun,3000,0; sc_start SC_Blind,2000,0,1500,0; },{},{}
 555,Rice_Cake,Traditional Rice Cake,0,100,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; },{},{}
 556,Long_Rice_Cake,Rice Cake Stick,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(20,25),0; },{},{}
 557,Hash_Rice_Cake,Neatly Sliced Rice Cake,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(25,30),0; },{},{}
@@ -172,7 +172,7 @@
 676,Silver_Coin_Moneybag,Bag of Silver Coins,3,50000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 677,White_Gold_Coin,Platinum Coin,3,2000,,40,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class==Job_Assassin_Cross) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else percentheal -100,-100; },{},{}
-679,Gold_Pill,Pilule,2,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
+679,Gold_Pill,Pilule,2,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0; },{},{}
 680,Magical_Carnation,Magic Carnation,0,0,,1000,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,20; },{},{}
 681,Memory_Of_Wedding,Sweet Memory of Marriage,2,50000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if(getpartnerid()) sc_start SC_WEDDING,600000,0; },{},{}
 682,Realgar_Wine,Distilled Fighting Spirit,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ATKPOTION,60000,30; },{},{}
@@ -4571,14 +4571,14 @@
 12024,Red_Pouch_Of_Surprise,Red Pouch,2,50,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-4,1,""; },{},{}
 12025,Egg_Boy,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_EggBoy),1; },{},{}
 12026,Egg_Girl,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_EggGirl),1; },{},{}
-12027,Giggling_Box,Giggling Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 9,0; if(rand(1000)<300) sc_start SC_Curse,30000,0; },{},{}
+12027,Giggling_Box,Giggling Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 9,0; sc_start SC_Curse,30000,0,3000,0; },{},{}
 12028,Box_Of_Thunder,Box of Thunder,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SpeedUp0,20000,0; },{},{}
 12029,Gloomy_Box,Box of Gloom,11,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "AC_CONCENTRATION",1; },{},{}
 12030,Box_Of_Grudge,Box of Resentment,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ATKPOTION,60000,20; },{},{}
 12031,Sleepy_Box,Box of Drowsiness,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MATKPOTION,60000,20; },{},{}
 12032,Box_Of_Storm,Box of Storms,11,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "ITEM_ENCHANTARMS",2; },{},{}
 12033,Box_Of_Sunlight,Box of Sunlight,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Intravision,30000,0; },{},{}
-12034,Painting_Box,Box of Panting,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,9; if(rand(1000)<300) sc_start SC_Silence,30000,0; },{},{}
+12034,Painting_Box,Box of Panting,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,9; sc_start SC_Silence,30000,0,3000,0; },{},{}
 12035,Lotto_Box01,Lotto Box 01,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7361,7370),1; },{},{}
 12036,Lotto_Box02,Lotto Box 02,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7371,7380),1; },{},{}
 12037,Lotto_Box03,Lotto Box 03,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7381,7390),1; },{},{}
@@ -4679,7 +4679,7 @@
 12132,Red_Bag,Santa's Bag,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Xmas,600000,0; },{},{}
 12133,Ice_Cream_,McDonald's Ice Cone,0,0,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ if(gettime(5)!=MDiceCone) { set MDiceCone,gettime(5); percentheal 50,50; } },{},{}
 12134,Red_Envelope,Red Envelope,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ set Zeny,Zeny+rand(1000,10000); },{},{}
-12135,Green_Ale,Green Ale,2,20,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,50; if(rand(100)>=90)sc_start SC_Confusion,10000,0; },{},{}
+12135,Green_Ale,Green Ale,2,20,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,50; sc_start SC_Confusion,10000,0,1000,0; },{},{}
 12136,Women's_Bundle,Women's Bundle,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem callfunc("F_RandMes",4,558,529,2668,7518),1; },{},{}
 12137,1st_Stage_Prize,First Stage Prize,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 12138,2nd_Stage_Prize,Second Stage Prize,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
@@ -4780,8 +4780,8 @@
 12235,Strawberry_Choco,Chocolate Strawberry,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,5; skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,240000,10; },{},{}
 12236,Choco_Tart,Chocolate Tart,11,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 5,0; itemskill "AL_ANGELUS",5; },{},{}
 12237,Choco_Lump,Junky Chocolate,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,5; sc_start SC_Poison,18000,0; sc_start SC_Bleeding,18000,0; },{},{}
-12238,New_Year_Rice_Cake_1,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
-12239,New_Year_Rice_Cake_2,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
+12238,New_Year_Rice_Cake_1,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0; },{},{}
+12239,New_Year_Rice_Cake_2,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0; },{},{}
 12240,Old_Yellow_Box,Old Yellow Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_YellowBox),1; },{},{}
 12241,M_Center_Potion,Mercenary Concentration Potion,2,800,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ASPDPOTION0,1800000,0; },{},{}
 12242,M_Awakening_Potion,Mercenary Awakening Potion,2,1500,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ASPDPOTION1,1800000,0; },{},{}
@@ -5140,14 +5140,14 @@
 12715,Black_Treasure_Box,Black Treasure Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 12716,Indian_Rice_Cake,Indian Rice Cake,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 // Guillotine Cross Poisons
-12717,Poison_Paralysis,Paralyze,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_PARALYSE,300000,0; },{},{}
-12718,Poison_Leech,Leech End,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_LEECHESEND,300000,0; },{},{}
-12719,Poison_Oblivion,Oblivion Curse,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_OBLIVIONCURSE,300000,0; },{},{}
-12720,Poison_Disheart,Disheart,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_DEATHHURT,300000,0; },{},{}
-12721,Poison_Numb,Toxin,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_TOXIN,300000,0; },{},{}
-12722,Poison_Fever,Pyrexia,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_PYREXIA,300000,0; },{},{}
-12723,Poison_Laughing,Magic Mushroom,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_MAGICMUSHROOM,300000,0; },{},{}
-12724,Poison_Fatigue,Venom Bleed,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_VENOMBLEED,15000,0; },{},{}
+12717,Poison_Paralysis,Paralyze,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_PARALYSE,300000,0,10,0; },{},{}
+12718,Poison_Leech,Leech End,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_LEECHESEND,300000,0,10,0; },{},{}
+12719,Poison_Oblivion,Oblivion Curse,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_OBLIVIONCURSE,300000,0,10,0; },{},{}
+12720,Poison_Disheart,Disheart,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DEATHHURT,300000,0,10,0; },{},{}
+12721,Poison_Numb,Toxin,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_TOXIN,300000,0,10,0; },{},{}
+12722,Poison_Fever,Pyrexia,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_PYREXIA,300000,0,10,0; },{},{}
+12723,Poison_Laughing,Magic Mushroom,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MAGICMUSHROOM,300000,0,10,0; },{},{}
+12724,Poison_Fatigue,Venom Bleed,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_VENOMBLEED,15000,0,10,0; },{},{}
 
 // Rune Knight's Rune Stones
 12725,Runstone_Nosiege,Nauthiz Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_REFRESH",1; },{},{}

+ 17 - 17
db/re/item_db.txt

@@ -41,7 +41,7 @@
 533,Grape_Juice,Grape Juice,0,250,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal 0,rand(15,25); },{},{}
 534,Carrot_Juice,Carrot Juice,0,20,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(27,33),0; },{},{}
 535,Pumpkin,Pumpkin,0,15,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal 19,0; },{},{}
-536,Ice_Cream,Ice Cream,0,150,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; if(rand(1000)<250) sc_start SC_Freeze,10000,0; },{},{}
+536,Ice_Cream,Ice Cream,0,150,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; sc_start SC_Freeze,10000,0,2500,0; },{},{}
 537,Pet_Food,Pet Food,0,1000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,90),0; },{},{}
 538,Well_Baked_Cookie,Well-baked Cookie,0,1000,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(160,200),0; },{},{}
 539,Piece_Of_Cake,Piece of Cake,0,3000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(270,330),0; },{},{}
@@ -54,12 +54,12 @@
 546,Yellow_Slim_Potion,Condensed Yellow Potion,0,600,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(175,235),0; },{},{}
 547,White_Slim_Potion,Condensed White Potion,0,1650,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(325,405),0; },{},{}
 548,Cheese,Cheese,0,2800,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal 0,rand(10,15); },{},{}
-549,Nice_Sweet_Potato,Yam,0,180,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,100),0; if(rand(1000)<150) sc_start SC_Stun,3000,0; },{},{}
+549,Nice_Sweet_Potato,Yam,0,180,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,100),0; sc_start SC_Stun,3000,0,1500,0; },{},{}
 550,Popped_Rice,Rice Cake,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(10,15),0; },{},{}
 551,Shusi,Sushi,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(50,60),0; },{},{}
 552,KETUPAT,Ketupat,0,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(70,90),rand(20,30); },{},{}
 553,Bun,Bao,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(35,70),0; },{},{}
-554,Mojji,Mochi,0,400,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; sc_start SC_Stun,3000,0; if(rand(1000)<150) sc_start SC_Blind,2000,0; },{},{}
+554,Mojji,Mochi,0,400,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; sc_start SC_Stun,3000,0; sc_start SC_Blind,2000,0,1500,0; },{},{}
 555,Rice_Cake,Traditional Rice Cake,0,100,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(105,145),0; },{},{}
 556,Long_Rice_Cake,Rice Cake Stick,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(20,25),0; },{},{}
 557,Hash_Rice_Cake,Neatly Sliced Rice Cake,0,10,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(25,30),0; },{},{}
@@ -178,7 +178,7 @@
 676,Silver_Coin_Moneybag,Bag of Silver Coins,3,50000,,400,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 677,White_Gold_Coin,Platinum Coin,3,2000,,40,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 678,Poison_Bottle,Poison Bottle,2,5000,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(Class == Job_Assassin_Cross || Class == Job_Guillotine_Cross || Class == Job_Guillotine_Cross_T) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,9; } else percentheal -100,-100; },{},{}
-679,Gold_Pill,Pilule,2,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
+679,Gold_Pill,Pilule,2,5000,,300,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0; },{},{}
 680,Magical_Carnation,Magic Carnation,0,0,,1000,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,20; },{},{}
 681,Memory_Of_Wedding,Sweet Memory of Marriage,2,50000,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ if (getpartnerid()) sc_start SC_WEDDING,600000,0; },{},{}
 682,Realgar_Wine,Distilled Fighting Spirit,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ATKPOTION,60000,30; },{},{}
@@ -5159,14 +5159,14 @@
 12024,Red_Pouch_Of_Surprise,Red Pouch,2,50,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ monster "this",-1,-1,"--ja--",-4,1,""; },{},{}
 12025,Egg_Boy,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_EggBoy),1; },{},{}
 12026,Egg_Girl,Dano Festival Egg,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_EggGirl),1; },{},{}
-12027,Giggling_Box,Giggling Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 9,0; if(rand(1000)<300) sc_start SC_Curse,30000,0; },{},{}
+12027,Giggling_Box,Giggling Box,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 9,0; sc_start SC_Curse,30000,0,3000,0; },{},{}
 12028,Box_Of_Thunder,Box of Thunder,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_SpeedUp0,20000,0; },{},{}
 12029,Gloomy_Box,Box of Gloom,11,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "AC_CONCENTRATION",1; },{},{}
 12030,Box_Of_Grudge,Box of Resentment,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_ATKPOTION,60000,20; },{},{}
 12031,Sleepy_Box,Box of Drowsiness,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MATKPOTION,60000,20; },{},{}
 12032,Box_Of_Storm,Box of Storms,11,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "ITEM_ENCHANTARMS",2; },{},{}
 12033,Box_Of_Sunlight,Box of Sunlight,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Intravision,30000,0; },{},{}
-12034,Painting_Box,Box of Panting,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,9; if(rand(1000)<300) sc_start SC_Silence,30000,0; },{},{}
+12034,Painting_Box,Box of Panting,2,1000,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,9; sc_start SC_Silence,30000,0,3000,0; },{},{}
 12035,Lotto_Box01,Lotto Box 01,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7361,7370),1; },{},{}
 12036,Lotto_Box02,Lotto Box 02,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7371,7380),1; },{},{}
 12037,Lotto_Box03,Lotto Box 03,2,0,,20,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem rand(7381,7390),1; },{},{}
@@ -5267,7 +5267,7 @@
 12132,Red_Bag,Santa's Bag,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_Xmas,600000,0; },{},{}
 12133,Ice_Cream_,McDonald's Ice Cone,0,0,,80,,,,,0xFFFFFFFF,7,2,,,,,,{ if(gettime(5)!=MDiceCone) { set MDiceCone,gettime(5); percentheal 50,50; } },{},{}
 12134,Red_Envelope,Red Envelope,2,1,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ set Zeny,Zeny+rand(1000,10000); },{},{}
-12135,Green_Ale,Green Ale,2,20,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,50; if(rand(100)>=90)sc_start SC_Confusion,10000,0; },{},{}
+12135,Green_Ale,Green Ale,2,20,,30,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 50,50; sc_start SC_Confusion,10000,0,1000,0; },{},{}
 12136,Women's_Bundle,Women's Bundle,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ getitem callfunc("F_RandMes",4,558,529,2668,7518),1; },{},{}
 12137,1st_Stage_Prize,First Stage Prize,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 12138,2nd_Stage_Prize,Second Stage Prize,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
@@ -5368,8 +5368,8 @@
 12235,Strawberry_Choco,Chocolate Strawberry,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,5; skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,240000,10; },{},{}
 12236,Choco_Tart,Chocolate Tart,11,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 5,0; itemskill "AL_ANGELUS",5; },{},{}
 12237,Choco_Lump,Junky Chocolate,2,0,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 0,5; sc_start SC_Poison,18000,0; sc_start SC_Bleeding,18000,0; },{},{}
-12238,New_Year_Rice_Cake_1,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
-12239,New_Year_Rice_Cake_2,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0; },{},{}
+12238,New_Year_Rice_Cake_1,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0; },{},{}
+12239,New_Year_Rice_Cake_2,New Year Rice Cake,2,20,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0; },{},{}
 12240,Old_Yellow_Box,Old Yellow Box,2,20,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem(IG_YellowBox),1; },{},{}
 12241,M_Center_Potion,Mercenary Concentration Potion,2,800,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ASPDPOTION0,1800000,0; },{},{}
 12242,M_Awakening_Potion,Mercenary Awakening Potion,2,1500,,150,,,,,0xFFFFFFFF,7,2,,,,,,{ mercenary_sc_start SC_ASPDPOTION1,1800000,0; },{},{}
@@ -5776,14 +5776,14 @@
 12715,Black_Treasure_Box,Black Treasure Box,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 12716,Indian_Rice_Cake,Indian Rice Cake,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
 // Guillotine Cross Poisons
-12717,Poison_Paralysis,Paralyze,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_PARALYSE,300000,0; },{},{}
-12718,Poison_Leech,Leech End,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_LEECHESEND,300000,0; },{},{}
-12719,Poison_Oblivion,Oblivion Curse,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_OBLIVIONCURSE,300000,0; },{},{}
-12720,Poison_Disheart,Disheart,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_DEATHHURT,300000,0; },{},{}
-12721,Poison_Numb,Toxin,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_TOXIN,300000,0; },{},{}
-12722,Poison_Fever,Pyrexia,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_PYREXIA,300000,0; },{},{}
-12723,Poison_Laughing,Magic Mushroom,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_MAGICMUSHROOM,300000,0; },{},{}
-12724,Poison_Fatigue,Venom Bleed,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ if(rand(10000)<10) sc_start SC_VENOMBLEED,15000,0; },{},{}
+12717,Poison_Paralysis,Paralyze,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_PARALYSE,300000,0,10,2; },{},{}
+12718,Poison_Leech,Leech End,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_LEECHESEND,300000,0,10,2; },{},{}
+12719,Poison_Oblivion,Oblivion Curse,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_OBLIVIONCURSE,300000,0,10,2; },{},{}
+12720,Poison_Disheart,Disheart,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_DEATHHURT,300000,0,10,2; },{},{}
+12721,Poison_Numb,Toxin,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_TOXIN,300000,0,10,2; },{},{}
+12722,Poison_Fever,Pyrexia,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_PYREXIA,300000,0,10,2; },{},{}
+12723,Poison_Laughing,Magic Mushroom,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_MAGICMUSHROOM,300000,0,10,2; },{},{}
+12724,Poison_Fatigue,Venom Bleed,0,2,,100,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_VENOMBLEED,15000,0,10,2; },{},{}
 
 // Rune Knight's Rune Stones
 12725,Runstone_Nosiege,Nauthiz Rune,11,100,,100,,,,,0xFFFFFFFF,8,2,,,,,,{ itemskill "RK_REFRESH",1; },{},{}

+ 24 - 3
doc/script_commands.txt

@@ -4846,9 +4846,9 @@ Used in reset NPC's (duh!)
 
 ---------------------------------------
 
-*sc_start 	<effect type>,<ticks>,<extra argument>{,<GID>};
-*sc_start2 	<effect type>,<ticks>,<extra argument>,<percent chance>{,<GID>};
-*sc_start4	<effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<GID>};
+*sc_start 	<effect type>,<ticks>,<value 1>{,<rate>,<flag>,<GID>};
+*sc_start2 	<effect type>,<ticks>,<value 1>,<value 2>{,<rate>,<flag>,<GID>};
+*sc_start4	<effect type>,<ticks>,<value 1>,<value 2>,<value 3>,<value 4>{,<rate>,<flag>,<GID>};
 *sc_end 	<effect type>{,<GID>};
 
 These command bestow a status effect on the invoking character. This command is 
@@ -5431,6 +5431,27 @@ summon "--ja--",-1;
 
 ---------------------------------------
 
+*addmonsterdrop <monster id/name>,<item id>,<rate>;
+*delmonsterdrop <monster id/name>,<item id>;
+
+These commands will allow adding and deleting monster drops temporarily.
+They will accept monster name or ID.  Returns 1 on successful drop addition/deletion.
+
+When <item_id> specified is already on in the monster drop list, that item drop rate
+will be updated with the given <rate>.
+
+Examples:
+	//Adds Honey at an 80% drop rate to mob Owl Baron
+	addmonsterdrop 1295,518,8000;
+
+	//Deletes Executioner's Mitten from mob Rybio
+	delmonsterdrop 1201,7017;
+
+Any item added or deleted from a monster with these commands will be reset when
+the mobdb is reloaded or server is shut down.
+
+---------------------------------------
+
 *disablenpc "<NPC object name>";
 *enablenpc "<NPC object name>";
 

+ 1 - 1
npc/quests/okolnir.txt

@@ -1277,7 +1277,7 @@ OnDisable:
 
 OnTouch:
 	set .@sub$,callfunc("F_Okolnir");
-	sc_start2 SC_Stone,300000,0,10000;
+	sc_start SC_Stone,300000,0,10000;
 	switch (getd("$@gqse_"+.@sub$+"_gd")) {
 		Case 0: setarray .@n$, "103","153","1","Piamette : One white bird has dropped with its wing pierced by an arrow."; break;
 		Case 1: setarray .@n$, "102","135","2","Piamette : One bird is caught in a snare, and dropped into a lake."; break;

+ 2 - 2
npc/quests/quests_nameless.txt

@@ -1746,7 +1746,7 @@ nameless_in,15,60,0	script	#Aru_Trigger	-1,1,1,{
 OnTouch:
 	if (aru_monas == 18) {
 		disablenpc "aru_warp";
-		sc_start2 SC_Blind,600000,0,10000;
+		sc_start SC_Blind,600000,0,10000;
 		mes "^3355FFThe pressure on your";
 		mes "stomach and the blood";
 		mes "rushing to your head tells";
@@ -10077,7 +10077,7 @@ moc_fild18,108,116,0	script	#treasure	844,{
 				getitem 7725,1; //Unlucky_Emerald
 				getitem 604,1; //Branch_Of_Dead_Tree
 				getitem 1157,1; //Two_Hand_Sword
-				sc_start2 SC_Curse,10000,0,10000;
+				sc_start SC_Curse,10000,0,10000;
 				next;
 				mes "[" + strcharinfo(0) + "]";
 				mes "N-no! What's going on?";

+ 17 - 17
sql-files/item_db.sql

@@ -69,7 +69,7 @@ REPLACE INTO `item_db` VALUES (532,'Banana_Juice','Banana Juice',0,20,NULL,40,NU
 REPLACE INTO `item_db` VALUES (533,'Grape_Juice','Grape Juice',0,250,NULL,40,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(15,25);',NULL,NULL);
 REPLACE INTO `item_db` VALUES (534,'Carrot_Juice','Carrot Juice',0,20,NULL,40,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(27,33),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (535,'Pumpkin','Pumpkin',0,15,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal 19,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (536,'Ice_Cream','Ice Cream',0,150,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0; if(rand(1000)<250) sc_start SC_Freeze,10000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (536,'Ice_Cream','Ice Cream',0,150,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0; sc_start SC_Freeze,10000,0,2500,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (537,'Pet_Food','Pet Food',0,1000,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,90),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (538,'Well_Baked_Cookie','Well-baked Cookie',0,1000,NULL,30,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(160,200),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (539,'Piece_Of_Cake','Piece of Cake',0,3000,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(270,330),0;',NULL,NULL);
@@ -82,12 +82,12 @@ REPLACE INTO `item_db` VALUES (545,'Red_Slim_Potion','Condensed Red Potion',0,15
 REPLACE INTO `item_db` VALUES (546,'Yellow_Slim_Potion','Condensed Yellow Potion',0,600,NULL,30,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(175,235),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (547,'White_Slim_Potion','Condensed White Potion',0,1650,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(325,405),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (548,'Cheese','Cheese',0,2800,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(10,15);',NULL,NULL);
-REPLACE INTO `item_db` VALUES (549,'Nice_Sweet_Potato','Yam',0,180,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,100),0; if(rand(1000)<150) sc_start SC_Stun,3000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (549,'Nice_Sweet_Potato','Yam',0,180,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,100),0; sc_start SC_Stun,3000,0,1500,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (550,'Popped_Rice','Rice Cake',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(10,15),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (551,'Shusi','Sushi',0,1,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,60),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (552,'KETUPAT','Ketupat',0,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(70,90),rand(20,30);',NULL,NULL);
 REPLACE INTO `item_db` VALUES (553,'Bun','Bao',0,1,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(35,70),0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (554,'Mojji','Mochi',0,400,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0; sc_start SC_Stun,3000,0; if(rand(1000)<150) sc_start SC_Blind,2000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (554,'Mojji','Mochi',0,400,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0; sc_start SC_Stun,3000,0; sc_start SC_Blind,2000,0,1500,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (555,'Rice_Cake','Traditional Rice Cake',0,100,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (556,'Long_Rice_Cake','Rice Cake Stick',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(20,25),0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (557,'Hash_Rice_Cake','Neatly Sliced Rice Cake',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(25,30),0;',NULL,NULL);
@@ -203,7 +203,7 @@ REPLACE INTO `item_db` VALUES (675,'Silver_Coin','Silver Coin',3,5000,NULL,40,NU
 REPLACE INTO `item_db` VALUES (676,'Silver_Coin_Moneybag','Bag of Silver Coins',3,50000,NULL,400,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db` VALUES (677,'White_Gold_Coin','Platinum Coin',3,2000,NULL,40,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db` VALUES (678,'Poison_Bottle','Poison Bottle',2,5000,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(Class==Job_Assassin_Cross) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,0; } else percentheal -100,-100;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (679,'Gold_Pill','Pilule',2,5000,NULL,300,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (679,'Gold_Pill','Pilule',2,5000,NULL,300,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (680,'Magical_Carnation','Magic Carnation',0,NULL,NULL,1000,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,20;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (681,'Memory_Of_Wedding','Sweet Memory of Marriage',2,50000,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(getpartnerid()) sc_start SC_WEDDING,600000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (682,'Realgar_Wine','Distilled Fighting Spirit',2,NULL,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ATKPOTION,60000,30;',NULL,NULL);
@@ -4602,14 +4602,14 @@ REPLACE INTO `item_db` VALUES (12023,'Giftbox_China','Wrapped Box',2,1000,NULL,2
 REPLACE INTO `item_db` VALUES (12024,'Red_Pouch_Of_Surprise','Red Pouch',2,50,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'monster "this",-1,-1,"--ja--",-4,1,"";',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12025,'Egg_Boy','Dano Festival Egg',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getrandgroupitem(IG_EggBoy),1;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12026,'Egg_Girl','Dano Festival Egg',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getrandgroupitem(IG_EggGirl),1;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12027,'Giggling_Box','Giggling Box',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 9,0; if(rand(1000)<300) sc_start SC_Curse,30000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12027,'Giggling_Box','Giggling Box',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 9,0; sc_start SC_Curse,30000,0,3000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12028,'Box_Of_Thunder','Box of Thunder',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_SpeedUp0,20000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12029,'Gloomy_Box','Box of Gloom',11,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "AC_CONCENTRATION",1;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12030,'Box_Of_Grudge','Box of Resentment',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ATKPOTION,60000,20;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12031,'Sleepy_Box','Box of Drowsiness',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_MATKPOTION,60000,20;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12032,'Box_Of_Storm','Box of Storms',11,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "ITEM_ENCHANTARMS",2;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12033,'Box_Of_Sunlight','Box of Sunlight',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_Intravision,30000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12034,'Painting_Box','Box of Panting',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,9; if(rand(1000)<300) sc_start SC_Silence,30000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12034,'Painting_Box','Box of Panting',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,9; sc_start SC_Silence,30000,0,3000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12035,'Lotto_Box01','Lotto Box 01',2,NULL,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem rand(7361,7370),1;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12036,'Lotto_Box02','Lotto Box 02',2,NULL,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem rand(7371,7380),1;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12037,'Lotto_Box03','Lotto Box 03',2,NULL,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem rand(7381,7390),1;',NULL,NULL);
@@ -4710,7 +4710,7 @@ REPLACE INTO `item_db` VALUES (12131,'Lucky_Potion','Lucky Potion',0,2,NULL,100,
 REPLACE INTO `item_db` VALUES (12132,'Red_Bag','Santa\'s Bag',2,NULL,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_Xmas,600000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12133,'Ice_Cream_','McDonald\'s Ice Cone',0,NULL,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(gettime(5)!=MDiceCone) { set MDiceCone,gettime(5); percentheal 50,50; }',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12134,'Red_Envelope','Red Envelope',2,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set Zeny,Zeny+rand(1000,10000);',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12135,'Green_Ale','Green Ale',2,20,NULL,30,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 50,50; if(rand(100)>=90)sc_start SC_Confusion,10000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12135,'Green_Ale','Green Ale',2,20,NULL,30,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 50,50; sc_start SC_Confusion,10000,0,1000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12136,'Women\'s_Bundle','Women\'s Bundle',2,NULL,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem callfunc("F_RandMes",4,558,529,2668,7518),1;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12137,'1st_Stage_Prize','First Stage Prize',2,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db` VALUES (12138,'2nd_Stage_Prize','Second Stage Prize',2,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -4811,8 +4811,8 @@ REPLACE INTO `item_db` VALUES (12234,'Cacao99','Fierce Cacao 99%',0,20,NULL,100,
 REPLACE INTO `item_db` VALUES (12235,'Strawberry_Choco','Chocolate Strawberry',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,5; skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,240000,10;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12236,'Choco_Tart','Chocolate Tart',11,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 5,0; itemskill "AL_ANGELUS",5;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12237,'Choco_Lump','Junky Chocolate',2,NULL,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,5; sc_start SC_Poison,18000,0; sc_start SC_Bleeding,18000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12238,'New_Year_Rice_Cake_1','New Year Rice Cake',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12239,'New_Year_Rice_Cake_2','New Year Rice Cake',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12238,'New_Year_Rice_Cake_1','New Year Rice Cake',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12239,'New_Year_Rice_Cake_2','New Year Rice Cake',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12240,'Old_Yellow_Box','Old Yellow Box',2,20,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getrandgroupitem(IG_YellowBox),1;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12241,'M_Center_Potion','Mercenary Concentration Potion',2,800,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'mercenary_sc_start SC_ASPDPOTION0,1800000,0;',NULL,NULL);
 REPLACE INTO `item_db` VALUES (12242,'M_Awakening_Potion','Mercenary Awakening Potion',2,1500,NULL,150,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'mercenary_sc_start SC_ASPDPOTION1,1800000,0;',NULL,NULL);
@@ -5171,14 +5171,14 @@ REPLACE INTO `item_db` VALUES (12714,'Easter_Scroll','Easter Scroll',2,1,NULL,10
 REPLACE INTO `item_db` VALUES (12715,'Black_Treasure_Box','Black Treasure Box',2,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db` VALUES (12716,'Indian_Rice_Cake','Indian Rice Cake',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 # Guillotine Cross Poisons
-REPLACE INTO `item_db` VALUES (12717,'Poison_Paralysis','Paralyze',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_PARALYSE,300000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12718,'Poison_Leech','Leech End',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_LEECHESEND,300000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12719,'Poison_Oblivion','Oblivion Curse',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_OBLIVIONCURSE,300000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12720,'Poison_Disheart','Disheart',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_DEATHHURT,300000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12721,'Poison_Numb','Toxin',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_TOXIN,300000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12722,'Poison_Fever','Pyrexia',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_PYREXIA,300000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12723,'Poison_Laughing','Magic Mushroom',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_MAGICMUSHROOM,300000,0;',NULL,NULL);
-REPLACE INTO `item_db` VALUES (12724,'Poison_Fatigue','Venom Bleed',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_VENOMBLEED,15000,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12717,'Poison_Paralysis','Paralyze',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_PARALYSE,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12718,'Poison_Leech','Leech End',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_LEECHESEND,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12719,'Poison_Oblivion','Oblivion Curse',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_OBLIVIONCURSE,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12720,'Poison_Disheart','Disheart',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEATHHURT,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12721,'Poison_Numb','Toxin',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_TOXIN,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12722,'Poison_Fever','Pyrexia',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_PYREXIA,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12723,'Poison_Laughing','Magic Mushroom',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_MAGICMUSHROOM,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db` VALUES (12724,'Poison_Fatigue','Venom Bleed',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_VENOMBLEED,15000,0,10,0;',NULL,NULL);
 
 # Rune Knight's Rune Stones
 REPLACE INTO `item_db` VALUES (12725,'Runstone_Nosiege','Nauthiz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_REFRESH",1;',NULL,NULL);

+ 17 - 17
sql-files/item_db_re.sql

@@ -72,7 +72,7 @@ REPLACE INTO `item_db_re` VALUES (532,'Banana_Juice','Banana Juice',0,20,NULL,40
 REPLACE INTO `item_db_re` VALUES (533,'Grape_Juice','Grape Juice',0,250,NULL,40,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(15,25);',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (534,'Carrot_Juice','Carrot Juice',0,20,NULL,40,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(27,33),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (535,'Pumpkin','Pumpkin',0,15,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal 19,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (536,'Ice_Cream','Ice Cream',0,150,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0; if(rand(1000)<250) sc_start SC_Freeze,10000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (536,'Ice_Cream','Ice Cream',0,150,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0; sc_start SC_Freeze,10000,0,2500,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (537,'Pet_Food','Pet Food',0,1000,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,90),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (538,'Well_Baked_Cookie','Well-baked Cookie',0,1000,NULL,30,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(160,200),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (539,'Piece_Of_Cake','Piece of Cake',0,3000,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(270,330),0;',NULL,NULL);
@@ -85,12 +85,12 @@ REPLACE INTO `item_db_re` VALUES (545,'Red_Slim_Potion','Condensed Red Potion',0
 REPLACE INTO `item_db_re` VALUES (546,'Yellow_Slim_Potion','Condensed Yellow Potion',0,600,NULL,30,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(175,235),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (547,'White_Slim_Potion','Condensed White Potion',0,1650,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(325,405),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (548,'Cheese','Cheese',0,2800,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal 0,rand(10,15);',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (549,'Nice_Sweet_Potato','Yam',0,180,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,100),0; if(rand(1000)<150) sc_start SC_Stun,3000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (549,'Nice_Sweet_Potato','Yam',0,180,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,100),0; sc_start SC_Stun,3000,0,1500,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (550,'Popped_Rice','Rice Cake',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(10,15),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (551,'Shusi','Sushi',0,1,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(50,60),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (552,'KETUPAT','Ketupat',0,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(70,90),rand(20,30);',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (553,'Bun','Bao',0,1,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(35,70),0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (554,'Mojji','Mochi',0,400,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0; sc_start SC_Stun,3000,0; if(rand(1000)<150) sc_start SC_Blind,2000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (554,'Mojji','Mochi',0,400,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0; sc_start SC_Stun,3000,0; sc_start SC_Blind,2000,0,1500,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (555,'Rice_Cake','Traditional Rice Cake',0,100,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(105,145),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (556,'Long_Rice_Cake','Rice Cake Stick',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(20,25),0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (557,'Hash_Rice_Cake','Neatly Sliced Rice Cake',0,10,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemheal rand(25,30),0;',NULL,NULL);
@@ -209,7 +209,7 @@ REPLACE INTO `item_db_re` VALUES (675,'Silver_Coin','Silver Coin',3,5000,NULL,40
 REPLACE INTO `item_db_re` VALUES (676,'Silver_Coin_Moneybag','Bag of Silver Coins',3,50000,NULL,400,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (677,'White_Gold_Coin','Platinum Coin',3,2000,NULL,40,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (678,'Poison_Bottle','Poison Bottle',2,5000,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(Class == Job_Assassin_Cross || Class == Job_Guillotine_Cross || Class == Job_Guillotine_Cross_T) { sc_start SC_DPoison,60000,0; sc_start SC_ASPDPOTION3,60000,9; } else percentheal -100,-100;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (679,'Gold_Pill','Pilule',2,5000,NULL,300,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (679,'Gold_Pill','Pilule',2,5000,NULL,300,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DPoison,10000,0,1000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (680,'Magical_Carnation','Magic Carnation',0,NULL,NULL,1000,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,20;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (681,'Memory_Of_Wedding','Sweet Memory of Marriage',2,50000,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if (getpartnerid()) sc_start SC_WEDDING,600000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (682,'Realgar_Wine','Distilled Fighting Spirit',2,NULL,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ATKPOTION,60000,30;',NULL,NULL);
@@ -5190,14 +5190,14 @@ REPLACE INTO `item_db_re` VALUES (12023,'Giftbox_China','Wrapped Box',2,1000,NUL
 REPLACE INTO `item_db_re` VALUES (12024,'Red_Pouch_Of_Surprise','Red Pouch',2,50,NULL,50,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'monster "this",-1,-1,"--ja--",-4,1,"";',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12025,'Egg_Boy','Dano Festival Egg',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getrandgroupitem(IG_EggBoy),1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12026,'Egg_Girl','Dano Festival Egg',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getrandgroupitem(IG_EggGirl),1;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12027,'Giggling_Box','Giggling Box',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 9,0; if(rand(1000)<300) sc_start SC_Curse,30000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12027,'Giggling_Box','Giggling Box',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 9,0; sc_start SC_Curse,30000,0,3000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12028,'Box_Of_Thunder','Box of Thunder',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_SpeedUp0,20000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12029,'Gloomy_Box','Box of Gloom',11,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "AC_CONCENTRATION",1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12030,'Box_Of_Grudge','Box of Resentment',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_ATKPOTION,60000,20;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12031,'Sleepy_Box','Box of Drowsiness',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_MATKPOTION,60000,20;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12032,'Box_Of_Storm','Box of Storms',11,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'itemskill "ITEM_ENCHANTARMS",2;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12033,'Box_Of_Sunlight','Box of Sunlight',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_Intravision,30000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12034,'Painting_Box','Box of Panting',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,9; if(rand(1000)<300) sc_start SC_Silence,30000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12034,'Painting_Box','Box of Panting',2,1000,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,9; sc_start SC_Silence,30000,0,3000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12035,'Lotto_Box01','Lotto Box 01',2,NULL,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem rand(7361,7370),1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12036,'Lotto_Box02','Lotto Box 02',2,NULL,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem rand(7371,7380),1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12037,'Lotto_Box03','Lotto Box 03',2,NULL,NULL,20,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem rand(7381,7390),1;',NULL,NULL);
@@ -5298,7 +5298,7 @@ REPLACE INTO `item_db_re` VALUES (12131,'Lucky_Potion','Lucky Potion',0,2,NULL,1
 REPLACE INTO `item_db_re` VALUES (12132,'Red_Bag','Santa\'s Bag',2,NULL,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_Xmas,600000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12133,'Ice_Cream_','McDonald\'s Ice Cone',0,NULL,NULL,80,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(gettime(5)!=MDiceCone) { set MDiceCone,gettime(5); percentheal 50,50; }',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12134,'Red_Envelope','Red Envelope',2,1,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'set Zeny,Zeny+rand(1000,10000);',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12135,'Green_Ale','Green Ale',2,20,NULL,30,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 50,50; if(rand(100)>=90)sc_start SC_Confusion,10000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12135,'Green_Ale','Green Ale',2,20,NULL,30,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 50,50; sc_start SC_Confusion,10000,0,1000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12136,'Women\'s_Bundle','Women\'s Bundle',2,NULL,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getitem callfunc("F_RandMes",4,558,529,2668,7518),1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12137,'1st_Stage_Prize','First Stage Prize',2,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12138,'2nd_Stage_Prize','Second Stage Prize',2,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -5399,8 +5399,8 @@ REPLACE INTO `item_db_re` VALUES (12234,'Cacao99','Fierce Cacao 99%',0,20,NULL,1
 REPLACE INTO `item_db_re` VALUES (12235,'Strawberry_Choco','Chocolate Strawberry',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,5; skilleffect "AL_BLESSING",0; sc_start SC_BLESSING,240000,10;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12236,'Choco_Tart','Chocolate Tart',11,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 5,0; itemskill "AL_ANGELUS",5;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12237,'Choco_Lump','Junky Chocolate',2,NULL,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'percentheal 0,5; sc_start SC_Poison,18000,0; sc_start SC_Bleeding,18000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12238,'New_Year_Rice_Cake_1','New Year Rice Cake',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12239,'New_Year_Rice_Cake_2','New Year Rice Cake',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(1000)<100) sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12238,'New_Year_Rice_Cake_1','New Year Rice Cake',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0,1000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12239,'New_Year_Rice_Cake_2','New Year Rice Cake',2,20,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DPoison,10000,0; sc_start SC_Poison,50000,0,1000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12240,'Old_Yellow_Box','Old Yellow Box',2,20,NULL,200,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'getrandgroupitem(IG_YellowBox),1;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12241,'M_Center_Potion','Mercenary Concentration Potion',2,800,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'mercenary_sc_start SC_ASPDPOTION0,1800000,0;',NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12242,'M_Awakening_Potion','Mercenary Awakening Potion',2,1500,NULL,150,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'mercenary_sc_start SC_ASPDPOTION1,1800000,0;',NULL,NULL);
@@ -5808,14 +5808,14 @@ REPLACE INTO `item_db_re` VALUES (12714,'Easter_Scroll','Easter Scroll',2,1,NULL
 REPLACE INTO `item_db_re` VALUES (12715,'Black_Treasure_Box','Black Treasure Box',2,NULL,NULL,0,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 REPLACE INTO `item_db_re` VALUES (12716,'Indian_Rice_Cake','Indian Rice Cake',2,NULL,NULL,10,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
 # Guillotine Cross Poisons
-REPLACE INTO `item_db_re` VALUES (12717,'Poison_Paralysis','Paralyze',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_PARALYSE,300000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12718,'Poison_Leech','Leech End',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_LEECHESEND,300000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12719,'Poison_Oblivion','Oblivion Curse',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_OBLIVIONCURSE,300000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12720,'Poison_Disheart','Disheart',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_DEATHHURT,300000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12721,'Poison_Numb','Toxin',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_TOXIN,300000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12722,'Poison_Fever','Pyrexia',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_PYREXIA,300000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12723,'Poison_Laughing','Magic Mushroom',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_MAGICMUSHROOM,300000,0;',NULL,NULL);
-REPLACE INTO `item_db_re` VALUES (12724,'Poison_Fatigue','Venom Bleed',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'if(rand(10000)<10) sc_start SC_VENOMBLEED,15000,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12717,'Poison_Paralysis','Paralyze',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_PARALYSE,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12718,'Poison_Leech','Leech End',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_LEECHESEND,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12719,'Poison_Oblivion','Oblivion Curse',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_OBLIVIONCURSE,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12720,'Poison_Disheart','Disheart',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_DEATHHURT,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12721,'Poison_Numb','Toxin',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_TOXIN,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12722,'Poison_Fever','Pyrexia',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_PYREXIA,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12723,'Poison_Laughing','Magic Mushroom',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_MAGICMUSHROOM,300000,0,10,0;',NULL,NULL);
+REPLACE INTO `item_db_re` VALUES (12724,'Poison_Fatigue','Venom Bleed',0,2,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,7,2,NULL,NULL,NULL,NULL,NULL,'sc_start SC_VENOMBLEED,15000,0,10,0;',NULL,NULL);
 
 # Rune Knight's Rune Stones
 REPLACE INTO `item_db_re` VALUES (12725,'Runstone_Nosiege','Nauthiz Rune',11,100,NULL,100,NULL,NULL,NULL,NULL,0xFFFFFFFF,8,2,NULL,NULL,NULL,NULL,NULL,'itemskill "RK_REFRESH",1;',NULL,NULL);

+ 0 - 6
src/char/char.c

@@ -3437,17 +3437,11 @@ int parse_frommap(int fd)
 				}
 
 				session[sfd]->flag.server = 1;/* to ensure we won't drop our own packet */
-
 				WFIFOHEAD(sfd, RFIFOW(fd,2) );
-
 				memcpy((char*)WFIFOP(sfd,0), (char*)RFIFOP(fd, 0), RFIFOW(fd,2));
-
 				WFIFOSET(sfd, RFIFOW(fd,2) );
-
 				flush_fifo(sfd);
-
 				do_close(sfd);
-
 				RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */
 		}
 		break;

+ 10 - 0
src/common/socket.c

@@ -281,7 +281,12 @@ void set_nonblocking(int fd, unsigned long yes)
 
 void setsocketopts(int fd)
 {
+	struct timeval timeout;
 	int yes = 1; // reuse fix
+
+	timeout.tv_sec = 10;
+	timeout.tv_usec = 0;
+
 #if !defined(WIN32)
 	// set SO_REAUSEADDR to true, unix only. on windows this option causes
 	// the previous owner of the socket to give up, which is not desirable
@@ -292,6 +297,11 @@ void setsocketopts(int fd)
 #endif
 #endif
 
+	if (setsockopt (fd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout,sizeof(timeout)) < 0)
+		ShowError("setsockopt failed\n");
+	if (setsockopt (fd, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout,sizeof(timeout)) < 0)
+		ShowError("setsockopt failed\n");
+
 	// Set the socket into no-delay mode; otherwise packets get delayed for up to 200ms, likely creating server-side lag.
 	// The RO protocol is mainly single-packet request/response, plus the FIFO model already does packet grouping anyway.
 	sSetsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&yes, sizeof(yes));

+ 130 - 176
src/map/atcommand.c

@@ -3577,173 +3577,137 @@ ACMD_FUNC(partyrecall)
 /*==========================================
  *
  *------------------------------------------*/
-ACMD_FUNC(reloaditemdb)
+void atcommand_doload();
+ACMD_FUNC(reload)
 {
-	nullpo_retr(-1, sd);
-	itemdb_reload();
-	clif_displaymessage(fd, msg_txt(sd,97)); // Item database has been reloaded.
-
-	return 0;
-}
 
-/*==========================================
- *
- *------------------------------------------*/
-ACMD_FUNC(reloadmobdb)
-{
 	nullpo_retr(-1, sd);
-	mob_reload();
-	read_petdb();
-	merc_reload();
-	read_mercenarydb();
-	read_mercenary_skilldb();
-	reload_elementaldb();
-	clif_displaymessage(fd, msg_txt(sd,98)); // Monster database has been reloaded.
-
-	return 0;
-}
-
-/*==========================================
- *
- *------------------------------------------*/
-ACMD_FUNC(reloadskilldb)
-{
-	nullpo_retr(-1, sd);
-	skill_reload();
-	merc_skill_reload();
-	reload_elemental_skilldb();
-	read_mercenary_skilldb();
-	clif_displaymessage(fd, msg_txt(sd,99)); // Skill database has been reloaded.
-
-	return 0;
-}
 
-/*==========================================
- * @reloadatcommand - reloads atcommand_athena.conf groups.conf
- *------------------------------------------*/
-void atcommand_doload();
-ACMD_FUNC(reloadatcommand) {
-	config_t run_test;
-
-	if (conf_read_file(&run_test, "conf/groups.conf")) {
-		clif_displaymessage(fd, msg_txt(sd,1036)); // Error reading groups.conf, reload failed.
-		return -1;
-	}
-
-	config_destroy(&run_test);
+	if ((strlen(command) < 8 ) && (!message || !*message)) {
+		const char* text;
 
-	if (conf_read_file(&run_test, ATCOMMAND_CONF_FILENAME)) {
-		clif_displaymessage(fd, msg_txt(sd,1037)); // Error reading atcommand_athena.conf, reload failed.
+		text = atcommand_help_string( command );
+		if(text)
+			clif_displaymessage( fd, text );
 		return -1;
 	}
 
-	config_destroy(&run_test);
-
-	atcommand_doload();
-	pc_groups_reload();
-	clif_displaymessage(fd, msg_txt(sd,254));
-	return 0;
-}
-/*==========================================
- * @reloadbattleconf - reloads battle_athena.conf
- *------------------------------------------*/
-ACMD_FUNC(reloadbattleconf)
-{
-	struct Battle_Config prev_config;
-	memcpy(&prev_config, &battle_config, sizeof(prev_config));
-
-	battle_config_read(BATTLE_CONF_FILENAME);
-
-	if( prev_config.item_rate_mvp          != battle_config.item_rate_mvp
-	||  prev_config.item_rate_common       != battle_config.item_rate_common
-	||  prev_config.item_rate_common_boss  != battle_config.item_rate_common_boss
-	||  prev_config.item_rate_card         != battle_config.item_rate_card
-	||  prev_config.item_rate_card_boss    != battle_config.item_rate_card_boss
-	||  prev_config.item_rate_equip        != battle_config.item_rate_equip
-	||  prev_config.item_rate_equip_boss   != battle_config.item_rate_equip_boss
-	||  prev_config.item_rate_heal         != battle_config.item_rate_heal
-	||  prev_config.item_rate_heal_boss    != battle_config.item_rate_heal_boss
-	||  prev_config.item_rate_use          != battle_config.item_rate_use
-	||  prev_config.item_rate_use_boss     != battle_config.item_rate_use_boss
-	||  prev_config.item_rate_treasure     != battle_config.item_rate_treasure
-	||  prev_config.item_rate_adddrop      != battle_config.item_rate_adddrop
-	||  prev_config.logarithmic_drops      != battle_config.logarithmic_drops
-	||  prev_config.item_drop_common_min   != battle_config.item_drop_common_min
-	||  prev_config.item_drop_common_max   != battle_config.item_drop_common_max
-	||  prev_config.item_drop_card_min     != battle_config.item_drop_card_min
-	||  prev_config.item_drop_card_max     != battle_config.item_drop_card_max
-	||  prev_config.item_drop_equip_min    != battle_config.item_drop_equip_min
-	||  prev_config.item_drop_equip_max    != battle_config.item_drop_equip_max
-	||  prev_config.item_drop_mvp_min      != battle_config.item_drop_mvp_min
-	||  prev_config.item_drop_mvp_max      != battle_config.item_drop_mvp_max
-	||  prev_config.item_drop_heal_min     != battle_config.item_drop_heal_min
-	||  prev_config.item_drop_heal_max     != battle_config.item_drop_heal_max
-	||  prev_config.item_drop_use_min      != battle_config.item_drop_use_min
-	||  prev_config.item_drop_use_max      != battle_config.item_drop_use_max
-	||  prev_config.item_drop_treasure_min != battle_config.item_drop_treasure_min
-	||  prev_config.item_drop_treasure_max != battle_config.item_drop_treasure_max
-	||  prev_config.base_exp_rate          != battle_config.base_exp_rate
-	||  prev_config.job_exp_rate           != battle_config.job_exp_rate
-	)
-  	{	// Exp or Drop rates changed.
-		mob_reload(); //Needed as well so rate changes take effect.
-		chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common);
-	}
-	clif_displaymessage(fd, msg_txt(sd,255));
-	return 0;
-}
-/*==========================================
- * @reloadstatusdb - reloads job_db1.txt job_db2.txt job_db2-2.txt refine_db.txt size_fix.txt
- *------------------------------------------*/
-ACMD_FUNC(reloadstatusdb)
-{
-	status_readdb();
-	clif_displaymessage(fd, msg_txt(sd,256));
-	return 0;
-}
-/*==========================================
- * @reloadpcdb - reloads exp.txt skill_tree.txt attr_fix.txt statpoint.txt
- *------------------------------------------*/
-ACMD_FUNC(reloadpcdb)
-{
-	pc_readdb();
-	clif_displaymessage(fd, msg_txt(sd,257));
-	return 0;
-}
+	if (strstr(command, "itemdb") || strncmp(message, "itemdb", 4) == 0) {
+		itemdb_reload();
+		clif_displaymessage(fd, msg_txt(sd,97)); // Item database has been reloaded.
+	} else if (strstr(command, "mobdb") || strncmp(message, "mobdb", 3) == 0) {
+		mob_reload();
+		read_petdb();
+		merc_reload();
+		read_mercenarydb();
+		read_mercenary_skilldb();
+		reload_elementaldb();
+		clif_displaymessage(fd, msg_txt(sd,98)); // Monster database has been reloaded.
+	} else if (strstr(command, "skilldb") || strncmp(message, "skilldb", 4) == 0) {
+		skill_reload();
+		merc_skill_reload();
+		reload_elemental_skilldb();
+		read_mercenary_skilldb();
+		clif_displaymessage(fd, msg_txt(sd,99)); // Skill database has been reloaded.
+	} else if (strstr(command, "atcommand") || strncmp(message, "atcommand", 4) == 0) {
+		config_t run_test;
+
+		if (conf_read_file(&run_test, "conf/groups.conf")) {
+			clif_displaymessage(fd, msg_txt(sd,1036)); // Error reading groups.conf, reload failed.
+			return -1;
+		}
 
-/*==========================================
- * @reloadmotd - reloads motd.txt
- *------------------------------------------*/
-ACMD_FUNC(reloadmotd)
-{
-	pc_read_motd();
-	clif_displaymessage(fd, msg_txt(sd,268));
-	return 0;
-}
+		config_destroy(&run_test);
 
-/*==========================================
- * @reloadscript - reloads all scripts (npcs, warps, mob spawns, ...)
- *------------------------------------------*/
-ACMD_FUNC(reloadscript)
-{
-	struct s_mapiterator* iter;
-	struct map_session_data* pl_sd;
+		if (conf_read_file(&run_test, ATCOMMAND_CONF_FILENAME)) {
+			clif_displaymessage(fd, msg_txt(sd,1037)); // Error reading atcommand_athena.conf, reload failed.
+			return -1;
+		}
 
-	nullpo_retr(-1, sd);
-	//atcommand_broadcast( fd, sd, "@broadcast", "Server is reloading scripts..." );
-	//atcommand_broadcast( fd, sd, "@broadcast", "You will feel a bit of lag at this point !" );
+		config_destroy(&run_test);
+
+		atcommand_doload();
+		pc_groups_reload();
+		clif_displaymessage(fd, msg_txt(sd,254));
+	} else if (strstr(command, "battleconf") || strncmp(message, "battleconf", 3) == 0) {
+		struct Battle_Config prev_config;
+		memcpy(&prev_config, &battle_config, sizeof(prev_config));
+
+		battle_config_read(BATTLE_CONF_FILENAME);
+
+		if( prev_config.item_rate_mvp          != battle_config.item_rate_mvp
+		||  prev_config.item_rate_common       != battle_config.item_rate_common
+		||  prev_config.item_rate_common_boss  != battle_config.item_rate_common_boss
+		||  prev_config.item_rate_card         != battle_config.item_rate_card
+		||  prev_config.item_rate_card_boss    != battle_config.item_rate_card_boss
+		||  prev_config.item_rate_equip        != battle_config.item_rate_equip
+		||  prev_config.item_rate_equip_boss   != battle_config.item_rate_equip_boss
+		||  prev_config.item_rate_heal         != battle_config.item_rate_heal
+		||  prev_config.item_rate_heal_boss    != battle_config.item_rate_heal_boss
+		||  prev_config.item_rate_use          != battle_config.item_rate_use
+		||  prev_config.item_rate_use_boss     != battle_config.item_rate_use_boss
+		||  prev_config.item_rate_treasure     != battle_config.item_rate_treasure
+		||  prev_config.item_rate_adddrop      != battle_config.item_rate_adddrop
+		||  prev_config.logarithmic_drops      != battle_config.logarithmic_drops
+		||  prev_config.item_drop_common_min   != battle_config.item_drop_common_min
+		||  prev_config.item_drop_common_max   != battle_config.item_drop_common_max
+		||  prev_config.item_drop_card_min     != battle_config.item_drop_card_min
+		||  prev_config.item_drop_card_max     != battle_config.item_drop_card_max
+		||  prev_config.item_drop_equip_min    != battle_config.item_drop_equip_min
+		||  prev_config.item_drop_equip_max    != battle_config.item_drop_equip_max
+		||  prev_config.item_drop_mvp_min      != battle_config.item_drop_mvp_min
+		||  prev_config.item_drop_mvp_max      != battle_config.item_drop_mvp_max
+		||  prev_config.item_drop_heal_min     != battle_config.item_drop_heal_min
+		||  prev_config.item_drop_heal_max     != battle_config.item_drop_heal_max
+		||  prev_config.item_drop_use_min      != battle_config.item_drop_use_min
+		||  prev_config.item_drop_use_max      != battle_config.item_drop_use_max
+		||  prev_config.item_drop_treasure_min != battle_config.item_drop_treasure_min
+		||  prev_config.item_drop_treasure_max != battle_config.item_drop_treasure_max
+		||  prev_config.base_exp_rate          != battle_config.base_exp_rate
+		||  prev_config.job_exp_rate           != battle_config.job_exp_rate
+		)
+	  	{	// Exp or Drop rates changed.
+			mob_reload(); //Needed as well so rate changes take effect.
+			chrif_ragsrvinfo(battle_config.base_exp_rate, battle_config.job_exp_rate, battle_config.item_rate_common);
+		}
+		clif_displaymessage(fd, msg_txt(sd,255));
+	} else if (strstr(command, "statusdb") || strncmp(message, "statusdb", 3) == 0) {
+		status_readdb();
+		clif_displaymessage(fd, msg_txt(sd,256));
+	} else if (strstr(command, "pcdb") || strncmp(message, "pcdb", 2) == 0) {
+		pc_readdb();
+		clif_displaymessage(fd, msg_txt(sd,257));
+	} else if (strstr(command, "motd") || strncmp(message, "motd", 4) == 0) {
+		pc_read_motd();
+		clif_displaymessage(fd, msg_txt(sd,268));
+	} else if (strstr(command, "script") || strncmp(message, "script", 3) == 0) {
+		struct s_mapiterator* iter;
+		struct map_session_data* pl_sd;
+		//atcommand_broadcast( fd, sd, "@broadcast", "Server is reloading scripts..." );
+		//atcommand_broadcast( fd, sd, "@broadcast", "You will feel a bit of lag at this point !" );
 
-	iter = mapit_getallusers();
-	for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
-		pc_close_npc(pl_sd,2);
-	mapit_free(iter);
+		iter = mapit_getallusers();
+		for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
+			pc_close_npc(pl_sd,2);
+		mapit_free(iter);
 
-	flush_fifos();
-	map_reloadnpc(true); // reload config files seeking for npcs
-	script_reload();
-	npc_reload();
+		flush_fifos();
+		map_reloadnpc(true); // reload config files seeking for npcs
+		script_reload();
+		npc_reload();
 
-	clif_displaymessage(fd, msg_txt(sd,100)); // Scripts have been reloaded.
+		clif_displaymessage(fd, msg_txt(sd,100)); // Scripts have been reloaded.
+	} else if (strstr(command, "msgconf") || strncmp(message, "msgconf", 3) == 0) {
+		map_msg_reload();
+		clif_displaymessage(fd, msg_txt(sd,463)); // Message configuration has been reloaded.
+	} else if (strstr(command, "questdb") || strncmp(message, "questdb", 3) == 0) {
+		do_reload_quest();
+		clif_displaymessage(fd, msg_txt(sd,1377)); // Quest database has been reloaded.
+	} else if (strstr(command, "packetdb") || strncmp(message, "packetdb", 4) == 0) {
+		packetdb_readdb();
+		clif_displaymessage(fd, msg_txt(sd,1477)); // Packet database has been reloaded.
+	}
+		
 
 	return 0;
 }
@@ -8652,11 +8616,6 @@ ACMD_FUNC(set) {
 
 	return 0;
 }
-ACMD_FUNC(reloadquestdb) {
-	do_reload_quest();
-	clif_displaymessage(fd, msg_txt(sd,1377)); // Quest database has been reloaded.
-	return 0;
-}
 ACMD_FUNC(addperm) {
 	int perm_size = ARRAYLENGTH(pc_g_permission_name);
 	bool add = (strcmpi(command+1, "addperm") == 0) ? true : false;
@@ -8982,13 +8941,6 @@ ACMD_FUNC(langtype)
 	return -1;
 }
 
-ACMD_FUNC(reloadmsgconf)
-{
-	map_msg_reload();
-	clif_displaymessage(fd, msg_txt(sd,463)); // Message configuration has been reloaded.
-	return 0;
-}
-
 /**
  * Fills the reference of available commands in atcommand DBMap
  **/
@@ -9088,15 +9040,19 @@ void atcommand_basecommands(void) {
 		ACMD_DEF(broadcast), // + /b and /nb
 		ACMD_DEF(localbroadcast), // + /lb and /nlb
 		ACMD_DEF(recallall),
-		ACMD_DEF(reloaditemdb),
-		ACMD_DEF(reloadmobdb),
-		ACMD_DEF(reloadskilldb),
-		ACMD_DEF(reloadscript),
-		ACMD_DEF(reloadatcommand),
-		ACMD_DEF(reloadbattleconf),
-		ACMD_DEF(reloadstatusdb),
-		ACMD_DEF(reloadpcdb),
-		ACMD_DEF(reloadmotd),
+		ACMD_DEF(reload),
+		ACMD_DEF2("reloaditemdb", reload),
+		ACMD_DEF2("reloadmobdb", reload),
+		ACMD_DEF2("reloadskilldb", reload),
+		ACMD_DEF2("reloadscript", reload),
+		ACMD_DEF2("reloadatcommand", reload),
+		ACMD_DEF2("reloadbattleconf", reload),
+		ACMD_DEF2("reloadstatusdb", reload),
+		ACMD_DEF2("reloadpcdb", reload),
+		ACMD_DEF2("reloadmotd", reload),
+		ACMD_DEF2("reloadquestdb", reload),
+		ACMD_DEF2("reloadmsgconf", reload),
+		ACMD_DEF2("reloadpacketdb", reload),
 		ACMD_DEF(mapinfo),
 		ACMD_DEF(dye),
 		ACMD_DEF2("hairstyle", hair_style),
@@ -9239,7 +9195,6 @@ void atcommand_basecommands(void) {
 		ACMD_DEF(font),
 		ACMD_DEF(accinfo),
 		ACMD_DEF(set),
-		ACMD_DEF(reloadquestdb),
 		ACMD_DEF(undisguiseguild),
 		ACMD_DEF(disguiseguild),
 		ACMD_DEF(sizeall),
@@ -9253,7 +9208,6 @@ void atcommand_basecommands(void) {
 		ACMD_DEF(channel),
 		ACMD_DEF(fontcolor),
 		ACMD_DEF(langtype),
-		ACMD_DEF(reloadmsgconf)
 	};
 	AtCommandInfo* atcommand;
 	int i;

+ 1 - 1
src/map/channel.c

@@ -1026,7 +1026,7 @@ void channel_read_config(void) {
 		const char *map_chname, *ally_chname,*map_color, *ally_color;
 		int ally_enabled = 0, local_enabled = 0;
 		int local_autojoin = 0, ally_autojoin = 0;
-		int allow_user_channel_creation = 0, allow_user_color_override = 0;
+		int allow_user_channel_creation = 0;
 
 		if( !config_setting_lookup_string(settings, "map_local_channel_name", &map_chname) )
 			map_chname = "map";

+ 0 - 2
src/map/channel.h

@@ -34,7 +34,6 @@ struct {
 	unsigned char map_chcolor, ally_chcolor; //msg color for map, ally
 	bool map_enable, ally_enable, user_chenable; //map, ally, users channels enable ?
 	bool map_autojoin, ally_autojoin;	//do user auto join in mapchange, guildjoin ?
-	bool color_override;		//can user override set channel color?
 	char map_chname[CHAN_NAME_LENGTH], ally_chname[CHAN_NAME_LENGTH]; //channel name for map and ally
 	bool closing;			//server is closing
 } Channel_Config;
@@ -73,7 +72,6 @@ struct Channel* channel_name2channel(char *chname, struct map_session_data *sd,
 int channel_haspc(struct Channel *channel,struct map_session_data *sd);
 int channel_haspcbanned(struct Channel *channel,struct map_session_data *sd);
 int channel_pc_haschan(struct map_session_data *sd, struct Channel *channel);
-int channel_colormes(struct map_session_data *__restrict sd, uint32 channel_color, const char *__restrict msg);
 int channel_display_list(struct map_session_data *sd, char *option);
 
 int channel_pccreate(struct map_session_data *sd, char *chname, char *pass);

+ 3 - 4
src/map/clif.c

@@ -2246,7 +2246,7 @@ void clif_item_sub_v5(unsigned char *buf, int n, int idx, struct item *i, struct
 	char normal = (equip < 0);
 
 	WBUFW(buf,n)=idx; //index
-	WBUFW(buf,n+2)= i->nameid;
+	WBUFW(buf,n+2)= (id->view_id > 0)?id->view_id:i->nameid;
 	WBUFB(buf,n+4)=itemtype(id->type);
 
 	if(!normal){ //equip 31B
@@ -2256,7 +2256,7 @@ void clif_item_sub_v5(unsigned char *buf, int n, int idx, struct item *i, struct
 		clif_addcards(WBUFP(buf, n+14), i); //EQUIPSLOTINFO 8B
 		WBUFL(buf,n+22) = i->expire_time;
 		WBUFW(buf,n+26)= 0; //bindOnEquipType
-		WBUFW(buf,n+28)= (id->view_id > 0)?id->view_id:0;
+		WBUFW(buf,n+28)= (id->equip&EQP_VISIBLE)?id->look:0;
 		//V5_ITEM_flag
 		WBUFB(buf,n+30)=i->identify; //0x1 IsIdentified
 		WBUFB(buf,n+30)|=(i->attribute)?0x2:0; //0x2 IsDamaged
@@ -16554,7 +16554,7 @@ static int clif_parse(int fd)
 /*==========================================
  * Reads packet_db.txt and setups its array reference
  *------------------------------------------*/
-static int packetdb_readdb(void)
+void packetdb_readdb(void)
 {
 	FILE *fp;
 	char line[1024];
@@ -17157,7 +17157,6 @@ static int packetdb_readdb(void)
 	}
 	ShowStatus("Done reading packet database from '"CL_WHITE"%s"CL_RESET"'.\n","packet_db.txt");
 	ShowStatus("Using default packet version: "CL_WHITE"%d"CL_RESET".\n", clif_config.packet_db_ver);
-	return 0;
 }
 
 /*==========================================

+ 1 - 0
src/map/clif.h

@@ -330,6 +330,7 @@ void clif_setport(uint16 port);
 uint32 clif_getip(void);
 uint32 clif_refresh_ip(void);
 uint16 clif_getport(void);
+void packetdb_readdb(void);
 
 void clif_authok(struct map_session_data *sd);
 void clif_authrefuse(int fd, uint8 error_code);

+ 300 - 331
src/map/script.c

@@ -623,6 +623,18 @@ static void script_reportfunc(struct script_state* st)
 	}
 }
 
+// Returns name of currently running function 
+static char* script_getfuncname(struct script_state *st)
+{
+	int i;
+	char* name = "";
+	for( i = 0; i < st->stack->sp; ++i ) {
+		struct script_data* data = &st->stack->stack_data[i];
+		if(data->type == C_NAME && str_data[data->u.num].type == C_FUNC)
+			name = reference_getname(data);
+	}
+	return name;
+}
 
 /*==========================================
  * Output error message
@@ -6035,7 +6047,11 @@ BUILDIN_FUNC(viewpoint)
 }
 
 /*==========================================
- *
+ * countitem(nameID)
+ *	returns number of items in inventory
+ *==========================================
+ * countitem2(nameID,Identified,Refine,Attribute,Card0,Card1,Card2,Card3)	[Lupus]
+ *	returns number of items that meet the conditions
  *------------------------------------------*/
 BUILDIN_FUNC(countitem)
 {
@@ -6053,90 +6069,90 @@ BUILDIN_FUNC(countitem)
 	data = script_getdata(st,2);
 	get_val(st, data);  // convert into value in case of a variable
 
-	if( data_isstring(data) )
-	{// item name
+	if( data_isstring(data) ) // item name
 		id = itemdb_searchname(conv_str(st, data));
-	}
-	else
-	{// item id
+	else // item id
 		id = itemdb_exists(conv_num(st, data));
-	}
 
-	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 1;
 	}
 
-	nameid = id->nameid;
-
-	for(i = 0; i < MAX_INVENTORY; i++)
-		if(sd->status.inventory[i].nameid == nameid)
+	if(script_lastdata(st) == 2) { // For countitem() function
+		nameid = id->nameid;
+		for(i = 0; i < MAX_INVENTORY; i++)
+			if(sd->status.inventory[i].nameid == nameid)
+				count += sd->status.inventory[i].amount;
+	} else { // For countitem2() function
+		struct item tmp_it;
+		int iden, ref, attr, c1, c2, c3, c4;
+		tmp_it.nameid = id->nameid;
+		tmp_it.identify = script_getnum(st, 3);
+		tmp_it.refine = script_getnum(st, 4);
+		tmp_it.attribute = script_getnum(st, 5);
+		tmp_it.card[0] = (short) script_getnum(st, 6);
+		tmp_it.card[1] = (short) script_getnum(st, 7);
+		tmp_it.card[2] = (short) script_getnum(st, 8);
+		tmp_it.card[3] = (short) script_getnum(st, 9);
+
+		for (i = 0; i < MAX_INVENTORY; i++)
+			if ((&sd->status.inventory[i] != NULL)
+				&& sd->status.inventory[i].amount > 0
+				&& compare_item(&sd->status.inventory[i], &tmp_it)
+			)
 			count += sd->status.inventory[i].amount;
+	}
 
 	script_pushint(st,count);
 	return 0;
 }
 
-/*==========================================
- * countitem2(nameID,Identified,Refine,Attribute,Card0,Card1,Card2,Card3)	[Lupus]
- *	returns number of items that meet the conditions
- *------------------------------------------*/
-BUILDIN_FUNC(countitem2)
+int checkweight_sub(TBL_PC *sd,int nbargs,int *eitemid,int *eamount)
 {
-	int nameid, iden, ref, attr, c1, c2, c3, c4;
-	int count = 0;
-	int i;
 	struct item_data* id = NULL;
-	struct script_data* data;
+	int nameid,amount;
+	uint16 amount2=0,slots,weight=0,i;
 
-	TBL_PC* sd = script_rid2sd(st);
-	if (!sd) {
-		script_pushint(st,0);
-		return 0;
-	}
-
-	data = script_getdata(st,2);
-	get_val(st, data);  // convert into value in case of a variable
-
-	if( data_isstring(data) )
-	{// item name
-		id = itemdb_searchname(conv_str(st, data));
-	}
-	else
-	{// item id
-		id = itemdb_exists(conv_num(st, data));
-	}
+	slots = pc_inventoryblank(sd); //nb of empty slot
 
-	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 1;
-	}
+	for(i=0; i<nbargs; i++) {
+		if(!eitemid[i])
+			continue;
+		id = itemdb_exists(eitemid[i]);
+		if( id == NULL ) {
+			ShowError("buildin_checkweight: Invalid item '%d'.\n", eitemid[i]);
+			return 0;
+		}
+		nameid = id->nameid;
 
-	nameid = id->nameid;
-	iden = script_getnum(st,3);
-	ref  = script_getnum(st,4);
-	attr = script_getnum(st,5);
-	c1 = (short)script_getnum(st,6);
-	c2 = (short)script_getnum(st,7);
-	c3 = (short)script_getnum(st,8);
-	c4 = (short)script_getnum(st,9);
+		amount = eamount[i];
+		if( amount < 1 ) {
+			ShowError("buildin_checkweight: Invalid amount '%d'.\n", eamount[i]);
+			return 0;
+		}
 
-	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 &&
-			sd->status.inventory[i].identify == iden && sd->status.inventory[i].refine == ref &&
-			sd->status.inventory[i].attribute == attr && sd->status.inventory[i].card[0] == c1 &&
-			sd->status.inventory[i].card[1] == c2 && sd->status.inventory[i].card[2] == c3 &&
-			sd->status.inventory[i].card[3] == c4
-		)
-			count += sd->status.inventory[i].amount;
+		weight += (id->weight)*amount; //total weight for all chk
+		if( weight + sd->weight > sd->max_weight ) // too heavy
+			return 0;
 
-	script_pushint(st,count);
-	return 0;
+		switch( pc_checkadditem(sd, nameid, amount) ) {
+			case CHKADDITEM_EXIST: // item is already in inventory, but there is still space for the requested amount
+				break;
+			case CHKADDITEM_NEW:
+				if( itemdb_isstackable(nameid) )
+					amount2++; // stackable
+				else
+					amount2 += amount; // non-stackable
+				if( slots < amount2)
+					return 0;
+				break;
+			case CHKADDITEM_OVERAMOUNT:
+				return 0;
+		}
+	}
+	return 1;
 }
 
 /*==========================================
@@ -6148,182 +6164,104 @@ BUILDIN_FUNC(countitem2)
  *------------------------------------------*/
 BUILDIN_FUNC(checkweight)
 {
-	int nameid, amount, slots, amount2=0;
-	unsigned int weight=0, i, nbargs;
-	struct item_data* id = NULL;
 	struct map_session_data* sd;
 	struct script_data* data;
+	struct item_data* id = NULL;
+	int nameid[128], amount[128];
+	uint16 nbargs,i,j=0;
 
-	if( ( sd = script_rid2sd(st) ) == NULL ){
+	if( ( sd = script_rid2sd(st) ) == NULL )
 		return 0;
-	}
+
 	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 1;
+	if(nbargs%2) {
+		ShowError("buildin_checkweight: Invalid nb of args should be a multiple of 2.\n");
+		script_pushint(st,0);
+		return 1;
 	}
-	slots = pc_inventoryblank(sd); //nb of empty slot
 
-	for(i=2; i<nbargs; i=i+2){
-	    data = script_getdata(st,i);
-	    get_val(st, data);  // convert into value in case of a variable
-	    if( data_isstring(data) ){// item name
-		    id = itemdb_searchname(conv_str(st, data));
-	    } else {// item id
-		    id = itemdb_exists(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 1;
-	    }
-	    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 1;
-	    }
-
-	    weight += itemdb_weight(nameid)*amount; //total weight for all chk
-	    if( weight + sd->weight > sd->max_weight )
-	    {// too heavy
-		    script_pushint(st,0);
-		    return 0;
-	    }
-
-	    switch( pc_checkadditem(sd, nameid, amount) )
-	    {
-		    case CHKADDITEM_EXIST:
-			    // item is already in inventory, but there is still space for the requested amount
-			    break;
-		    case CHKADDITEM_NEW:
-			    if( itemdb_isstackable(nameid) ) {// stackable
-				    amount2++;
-				    if( slots < amount2 ) {
-					    script_pushint(st,0);
-					    return 0;
-				    }
-			    }
-			    else {// non-stackable
-				    amount2 += amount;
-				    if( slots < amount2){
-					    script_pushint(st,0);
-					    return 0;
-				    }
-			    }
-			    break;
-		    case CHKADDITEM_OVERAMOUNT:
-			    script_pushint(st,0);
-			    return 0;
-	    }
+	for(i=2; i<nbargs; i=i+2) {
+		data = script_getdata(st,i);
+		get_val(st, data);  // convert into value in case of a variable
+		if( data_isstring(data) ) // item name
+			id = itemdb_searchname(conv_str(st, data));
+		else // item id
+			id = itemdb_exists(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 1;
+		}
+		nameid[j] = id->nameid;
+		amount[j] = script_getnum(st,i+1);
+		j++;
 	}
-	script_pushint(st,1);
+
+	script_pushint(st,checkweight_sub(sd,(nbargs-2)/2,nameid,amount));
 	return 0;
 }
 
 BUILDIN_FUNC(checkweight2)
 {
-        //variable sub checkweight
-        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;
-        const char* name_it;
-        const char* name_nb;
-        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(1,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");
-                script_pushint(st,0);
-                return 1;// not a variable
-        }
-        id_it = reference_getid(data_it);
-        id_nb = reference_getid(data_nb);
-        idx_it = reference_getindex(data_it);
-        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 1;// not supported
-        }
-        if(is_string_variable(name_it) || is_string_variable(name_nb)){
-                ShowError("script:checkweight2: illegal type, need int\n");
-                script_pushint(st,0);
-                return 1;// not supported
-        }
-        nb_it = getarraysize(st, id_it, idx_it, 0, reference_getref(data_it));
-        nb_nb = getarraysize(st, id_nb, idx_nb, 0, reference_getref(data_nb));
-        if(nb_it != nb_nb){
-                ShowError("Size mistmatch: nb_it=%d, nb_nb=%d\n",nb_it,nb_nb);
-		fail = 1;
-        }
+	//variable sub checkweight
+	int nameid[128], amount[128], i;
 
-        slots = pc_inventoryblank(sd);
-        for(i=0; i<nb_it; i++){
-            nameid = (int32)__64BPRTSIZE(get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it)));
-	    script_removetop(st, -1, 0);
-	    amount = (int32)__64BPRTSIZE(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 ){
-                ShowError("buildin_checkweight2: Invalid amount '%d'.\n", amount);
-                fail = 1;
-		continue;
-            }
-	    weight += itemdb_weight(nameid)*amount;
-	    if( weight + sd->weight > sd->max_weight ){
-		fail = 1;
-		continue;
-	    }
-	    switch( pc_checkadditem(sd, nameid, amount) ) {
-		    case CHKADDITEM_EXIST:
-			// item is already in inventory, but there is still space for the requested amount
-			    break;
-		    case CHKADDITEM_NEW:
-			    if( itemdb_isstackable(nameid) ){// stackable
-				    amount2++;
-				    if( slots < amount2 )
-					    fail = 1;
-			    }
-			    else {// non-stackable
-				    amount2 += amount;
-				    if( slots < amount2 ){
-					    fail = 1;
-				    }
-			    }
-			    break;
-		    case CHKADDITEM_OVERAMOUNT:
-			    fail = 1;
-	    } //end switch
+	//variable for array parsing
+	struct script_data* data_it;
+	struct script_data* data_nb;
+	const char* name_it;
+	const char* name_nb;
+	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(1,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");
+		script_pushint(st,0);
+		return 1;// not a variable
+	}
+
+	id_it = reference_getid(data_it);
+	id_nb = reference_getid(data_nb);
+	idx_it = reference_getindex(data_it);
+	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 1;// not supported
+	}
+	if(is_string_variable(name_it) || is_string_variable(name_nb)) {
+		ShowError("script:checkweight2: illegal type, need int\n");
+		script_pushint(st,0);
+		return 1;// not supported
+	}
+	nb_it = getarraysize(st, id_it, idx_it, 0, reference_getref(data_it));
+	nb_nb = getarraysize(st, id_nb, idx_nb, 0, reference_getref(data_nb));
+	if(nb_it != nb_nb) {
+		ShowError("Size mistmatch: nb_it=%d, nb_nb=%d\n",nb_it,nb_nb);
+		script_pushint(st,0);
+		return 1;
+	}
+
+	for(i=0; i<nb_it; i++) {
+		nameid[i] = (int32)__64BPRTSIZE(get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it)));
+		script_removetop(st, -1, 0);
+		amount[i] = (int32)__64BPRTSIZE(get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb)));
+		script_removetop(st, -1, 0);
 	} //end loop DO NOT break it prematurly we need to depop all stack
 
-        fail?script_pushint(st,0):script_pushint(st,1);
-        return 0;
+	script_pushint(st,checkweight_sub(sd,nb_it,nameid,amount)); //push result of sub to script
+
+	return 0;
 }
 
 /*==========================================
@@ -9888,123 +9826,79 @@ BUILDIN_FUNC(hideonnpc)
 	return 0;
 }
 
-/// Starts a status effect on the target unit or on the attached player.
-///
-/// sc_start <effect_id>,<duration>,<val1>{,<unit_id>};
+/* Starts a status effect on the target unit or on the attached player.
+ *
+ * sc_start  <effect_id>,<duration>,<val1>{,<rate>,<flag>,{<unit_id>}};
+ * sc_start2 <effect_id>,<duration>,<val1>,<val2>{,<rate,<flag>,{<unit_id>}};
+ * sc_start4 <effect_id>,<duration>,<val1>,<val2>,<val3>,<val4>{,<rate,<flag>,{<unit_id>}};
+ * <flag>
+ * 	&1: Cannot be avoided (it has to start)
+ * 	&2: Tick should not be reduced (by vit, luk, lv, etc)
+ * 	&4: sc_data loaded, no value has to be altered.
+ * 	&8: rate should not be reduced
+ */
 BUILDIN_FUNC(sc_start)
 {
 	TBL_NPC * nd = map_id2nd(st->oid);
 	struct block_list* bl;
 	enum sc_type type;
-	int tick,isitem;
-	int val1;
+	int tick, val1, val2, val3, rate, flag, isitem;
 	int val4 = 0;
+	char start_type;
+	const char* command = script_getfuncname(st);
+	
+	if(strstr(command, "4"))
+		start_type = 4;
+	else if(strstr(command, "2"))
+		start_type = 2;
+	else
+		start_type = 1;
 
 	type = (sc_type)script_getnum(st,2);
 	tick = script_getnum(st,3);
 	val1 = script_getnum(st,4);
-	if( script_hasdata(st,5) )
-		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( potion_flag == 1 && potion_target )
-	{	//skill.c set the flags before running the script, this must be a potion-pitched effect.
-		bl = map_id2bl(potion_target);
-		tick /= 2;// Thrown potions only last half.
-		val4 = 1;// Mark that this was a thrown sc_effect
-	}
 
-	//solving if script from npc or item
-	isitem = (nd && nd->bl.id == fake_nd->bl.id)?true:false;
-	if( bl )
-		status_change_start(isitem?bl:NULL, bl, type, 10000, val1, 0, 0, val4, tick, 2);
-
-	return 0;
-}
-
-/// Starts a status effect on the target unit or on the attached player.
-///
-/// sc_start2 <effect_id>,<duration>,<val1>,<percent chance>{,<unit_id>};
-BUILDIN_FUNC(sc_start2)
-{
-	struct block_list* bl;
-	enum sc_type type;
-	int tick;
-	int val1;
-	int val4 = 0;
-	int rate;
+	rate = script_hasdata(st,4+start_type)?min(script_getnum(st,4+start_type),10000):10000;
+	flag = script_hasdata(st,5+start_type)?script_getnum(st,5+start_type):2;
 
-	type = (sc_type)script_getnum(st,2);
-	tick = script_getnum(st,3);
-	val1 = script_getnum(st,4);
-	rate = script_getnum(st,5);
-	if( script_hasdata(st,6) )
-		bl = map_id2bl(script_getnum(st,6));
+	if(script_hasdata(st,(6+start_type)))
+		bl = map_id2bl(script_getnum(st,(6+start_type)));
 	else
 		bl = map_id2bl(st->rid);
 
-	if( tick == 0 && val1 > 0 && type > SC_NONE && type < SC_MAX && status_sc2skill(type) != 0 )
+	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( potion_flag == 1 && potion_target )
-	{	//skill.c set the flags before running the script, this must be a potion-pitched effect.
+	if(potion_flag == 1 && potion_target) { //skill.c set the flags before running the script, this is a potion-pitched effect.
 		bl = map_id2bl(potion_target);
 		tick /= 2;// Thrown potions only last half.
 		val4 = 1;// Mark that this was a thrown sc_effect
 	}
 
-	if( bl )
-		status_change_start(NULL, bl, type, rate, val1, 0, 0, val4, tick, 2);
-
-	return 0;
-}
-
-/// Starts a status effect on the target unit or on the attached player.
-///
-/// sc_start4 <effect_id>,<duration>,<val1>,<val2>,<val3>,<val4>{,<unit_id>};
-BUILDIN_FUNC(sc_start4)
-{
-	struct block_list* bl;
-	enum sc_type type;
-	int tick;
-	int val1;
-	int val2;
-	int val3;
-	int val4;
-
-	type = (sc_type)script_getnum(st,2);
-	tick = script_getnum(st,3);
-	val1 = script_getnum(st,4);
-	val2 = script_getnum(st,5);
-	val3 = script_getnum(st,6);
-	val4 = script_getnum(st,7);
-	if( script_hasdata(st,8) )
-		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);
-	}
+	//solving if script from npc or item
+	isitem = (nd && nd->bl.id == fake_nd->bl.id || rate != 2)?true:false;
 
-	if( potion_flag == 1 && potion_target )
-	{	//skill.c set the flags before running the script, this must be a potion-pitched effect.
-		bl = map_id2bl(potion_target);
-		tick /= 2;// Thrown potions only last half.
+	switch(start_type) {
+		case 1:
+			if(bl)
+				status_change_start(isitem?bl:NULL, bl, type, rate, val1, 0, 0, val4, tick, flag);
+			break;
+		case 2:
+			val2 = script_getnum(st,5);
+			if(bl)
+				status_change_start(isitem?bl:NULL, bl, type, rate, val1, val2, 0, val4, tick, flag);
+			break;
+		case 4:
+			val2 = script_getnum(st,5);
+			val3 = script_getnum(st,6);
+			val4 = script_getnum(st,7);
+			if(bl)
+				status_change_start(isitem?bl:NULL, bl, type, rate, val1, val2, val3, val4, tick, flag);
+			break;
 	}
 
-	if( bl )
-		status_change_start(NULL, bl, type, 10000, val1, val2, val3, val4, tick, 2);
-
 	return 0;
 }
 
@@ -15154,32 +15048,105 @@ BUILDIN_FUNC(setitemscript)
 	return 0;
 }
 
-/* Work In Progress [Lupus]
+/*=======================================================
+ * Add or Update a mob drop temporarily [Akinari] 
+ * Original Idea By: [Lupus]
+ *
+ * addmonsterdrop <mob_id or name>,<item_id>,<rate>;
+ *
+ * If given an item the mob already drops, the rate
+ * is updated to the new rate.  Rate cannot exceed 10000
+ * Returns 1 if succeeded (added/updated a mob drop)
+ *-------------------------------------------------------*/
 BUILDIN_FUNC(addmonsterdrop)
 {
-	int class_,item_id,chance;
-	class_=script_getnum(st,2);
+	struct mob_db *mob;
+	int item_id,rate,i,c = 0;
+
+	if(script_isstring(st,2))
+		mob = mob_db(mobdb_searchname(script_getstr(st,2)));
+	else
+		mob = mob_db(script_getnum(st,2));
+
 	item_id=script_getnum(st,3);
-	chance=script_getnum(st,4);
-	if(class_>1000 && item_id>500 && chance>0) {
-		script_pushint(st,1);
+	rate=script_getnum(st,4);
+
+	if(!itemdb_exists(item_id)){
+		ShowError("addmonsterdrop: Nonexistant item %d requested.\n", item_id );
+		return 1;
+	}
+
+	if(mob) { //We got a valid monster, check for available drop slot
+		for(i = 0; i < MAX_MOB_DROP; i++) {
+			if(mob->dropitem[i].nameid) { 
+				if(mob->dropitem[i].nameid == item_id) { //If it equals item_id we update that drop
+					c = i;
+					break;
+				}
+				continue;
+			}
+			if(!c) //Accept first available slot only
+				c = i;
+		}
+		if(c) { //Fill in the slot with the item and rate
+			mob->dropitem[c].nameid = item_id;
+			mob->dropitem[c].p = (rate > 10000)?10000:rate;
+			script_pushint(st,1);
+		} else //No place to put the new drop
+			script_pushint(st,0);
 	} else {
-		script_pushint(st,0);
+		ShowWarning("addmonsterdrop: bad mob id given %d\n",script_getnum(st,2));
+		return 1;
 	}
+
+	return 0;
+
 }
 
+/*=======================================================
+ * Delete a mob drop temporarily [Akinari] 
+ * Original Idea By: [Lupus]
+ *
+ * delmonsterdrop <mob_id or name>,<item_id>;
+ *
+ * Returns 1 if succeeded (deleted a mob drop)
+ *-------------------------------------------------------*/
 BUILDIN_FUNC(delmonsterdrop)
 {
-	int class_,item_id;
-	class_=script_getnum(st,2);
+	struct mob_db *mob;
+	int item_id,i;
+
+	if(script_isstring(st,2))
+		mob = mob_db(mobdb_searchname(script_getstr(st,2)));
+	else
+		mob = mob_db(script_getnum(st,2));
+
 	item_id=script_getnum(st,3);
-	if(class_>1000 && item_id>500) {
-		script_pushint(st,1);
-	} else {
+
+	if(!itemdb_exists(item_id)){
+		ShowError("delmonsterdrop: Nonexistant item %d requested.\n", item_id );
+		return 1;
+	}
+
+	if(mob) { //We got a valid monster, check for item drop on monster
+		for(i = 0; i < MAX_MOB_DROP; i++) {
+			if(mob->dropitem[i].nameid == item_id) { 
+				mob->dropitem[i].nameid = 0;
+				mob->dropitem[i].p = 0;
+				script_pushint(st,1);
+				return 0;
+			}
+		}
+		//No drop on that monster
 		script_pushint(st,0);
+	} else {
+		ShowWarning("delmonsterdrop: bad mob id given %d\n",script_getnum(st,2));
+		return 1;
 	}
+
+	return 0;
 }
-*/
+
 
 /*==========================================
  * Returns some values of a monster [Lupus]
@@ -17774,7 +17741,7 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(percentheal,"ii"),
 	BUILDIN_DEF(rand,"i?"),
 	BUILDIN_DEF(countitem,"v"),
-	BUILDIN_DEF(countitem2,"viiiiiii"),
+	BUILDIN_DEF2(countitem,"countitem2","viiiiiii"),
 	BUILDIN_DEF(checkweight,"vi*"),
 	BUILDIN_DEF(checkweight2,"rr"),
 	BUILDIN_DEF(readparam,"i?"),
@@ -17874,9 +17841,9 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(disablenpc,"s"),
 	BUILDIN_DEF(hideoffnpc,"s"),
 	BUILDIN_DEF(hideonnpc,"s"),
-	BUILDIN_DEF(sc_start,"iii?"),
-	BUILDIN_DEF(sc_start2,"iiii?"),
-	BUILDIN_DEF(sc_start4,"iiiiii?"),
+	BUILDIN_DEF(sc_start,"iii???"),
+	BUILDIN_DEF2(sc_start,"sc_start2","iiii???"),
+	BUILDIN_DEF2(sc_start,"sc_start4","iiiiii???"),
 	BUILDIN_DEF(sc_end,"i?"),
 	BUILDIN_DEF(getstatus, "i?"),
 	BUILDIN_DEF(getscrate,"ii?"),
@@ -18049,6 +18016,8 @@ struct script_function buildin_func[] = {
 	BUILDIN_DEF(disguise,"i"), //disguise player. Lupus
 	BUILDIN_DEF(undisguise,""), //undisguise player. Lupus
 	BUILDIN_DEF(getmonsterinfo,"ii"), //Lupus
+	BUILDIN_DEF(addmonsterdrop,"vii"), //Akinari [Lupus]
+	BUILDIN_DEF(delmonsterdrop,"vi"), //Akinari [Lupus]
 	BUILDIN_DEF(axtoi,"s"),
 	BUILDIN_DEF(query_sql,"s*"),
 	BUILDIN_DEF(query_logsql,"s*"),

+ 2 - 2
src/map/skill.c

@@ -1840,7 +1840,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
 
 	if( sd && status_isdead(bl) ) {
 		int sp = 0, hp = 0;
-		if( attack_type&BF_WEAPON ) {
+		if( attack_type&(BF_WEAPON|BF_SHORT) == (BF_WEAPON|BF_SHORT) ) {
 			sp += sd->bonus.sp_gain_value;
 			sp += sd->sp_gain_race[status_get_race(bl)];
 			sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS];
@@ -9632,7 +9632,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
 		}
 	}
 
-	ud->skill_id = ud->skill_lv = ud->skilltarget = 0;
+	ud->skill_id = ud->skilltarget = 0;
 	if( !sd || sd->skillitem != ud->skill_id || skill_get_delay(ud->skill_id,ud->skill_lv) )
 		ud->canact_tick = tick;
 	//You can't place a skill failed packet here because it would be

+ 1 - 7
src/map/status.c

@@ -1336,8 +1336,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
 
 	if(flag&4) //Delete from memory. (also invokes map removal code)
 		unit_free(target,CLR_DEAD);
-	else
-	if(flag&2) //remove from map
+	else if(flag&2) //remove from map
 		unit_remove_map(target,CLR_DEAD);
 	else { //Some death states that would normally be handled by unit_remove_map
 		unit_stop_attack(target);
@@ -6729,11 +6728,6 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
 			return 0;
 
 	case SC_INCREASEAGI:
-		 if(sd && pc_issit(sd)){
-			pc_setstand(sd);
-			skill_sit(sd,0);
-		 }
-
 	case SC_CONCENTRATE:
 	case SC_SPEARQUICKEN:
 	case SC_TRUESIGHT:

+ 2 - 0
src/map/storage.h

@@ -38,4 +38,6 @@ int storage_guild_storage_quit(struct map_session_data *sd,int flag);
 int storage_guild_storagesave(int account_id, int guild_id, int flag);
 int storage_guild_storagesaved(int guild_id); //Ack from char server that guild store was saved.
 
+int compare_item(struct item *a, struct item *b);
+
 #endif /* _STORAGE_H_ */