Skip to content

[HELP]MySql code

Featured Replies

Hello dudes. I need some help here.

 

Here is a code to add baium ring to baiums droplist

INSERT INTO droplist VALUES ('29020', '6658', '1', '1', '2', '1000000');

 

if i want to add to drop etc:  

+ 10 baium ring

or

+ 22 Draconic Bow

what i have to do??? or how can i do this?

 

I really need the help here. :/

 

Thanks!

Declare the next code in overrided doDie method from L2RaidbossInstance

 

 

 

 

if(killer instanceof L2PlayableInstance)

{

L2PcInstance player = ((L2PcInstance)killer);

   

int templateId = RB ID;

L2NpcTemplate template = NpcTable.getInstance().getTemplate(templateId);

 

if (template != null)

{

int itemId = ITEM ID;

L2ItemInstance item = player.getInventory().addItem("xAddytzu", itemId, 1, player, null);

item.setEnchantLevel(25);

}

}

 

  • Author

Declare the next code in overrided doDie method from L2RaidbossInstance

 

 

thank you very much. in java way yeah. is there a way in MySql? :(

  • Author

-- Table structure for table `weapon`

--

 

DROP TABLE IF EXISTS `weapon`;

CREATE TABLE `weapon` (

  `item_id` decimal(11,0) NOT NULL default '0',

  `name` varchar(70) default NULL,

  `bodypart` varchar(15) default NULL,

  `crystallizable` varchar(5) default NULL,

  `weight` decimal(4,0) default NULL,

  `soulshots` decimal(2,0) default NULL,

  `spiritshots` decimal(1,0) default NULL,

  `material` varchar(11) default NULL,

  `crystal_type` varchar(4) default NULL,

  `p_dam` decimal(5,0) default NULL,

  `rnd_dam` decimal(2,0) default NULL,

  `weaponType` varchar(8) default NULL,

  `critical` decimal(2,0) default NULL,

  `hit_modify` decimal(6,5) default NULL,

  `avoid_modify` decimal(2,0) default NULL,

  `shield_def` decimal(3,0) default NULL,

  `shield_def_rate` decimal(2,0) default NULL,

  `atk_speed` decimal(3,0) default NULL,

  `mp_consume` decimal(2,0) default NULL,

  `m_dam` decimal(3,0) default NULL,

  `duration` decimal(3,0) default NULL,

  `price` decimal(11,0) default NULL,

  `crystal_count` int(4) default NULL,

  `sellable` varchar(5) default NULL,

  `dropable` varchar(5) default NULL,

  `destroyable` varchar(5) default NULL,

  `tradeable` varchar(5) default NULL,

  `item_skill_id` decimal(11,0) NOT NULL default '0',

  `item_skill_lvl` decimal(11,0) NOT NULL default '0',

  `enchant4_skill_id` decimal(11,0) NOT NULL default '0',

  `enchant4_skill_lvl` decimal(11,0) NOT NULL default '0',

  `onCast_skill_id` decimal(11,0) NOT NULL default '0',

  `onCast_skill_lvl` decimal(11,0) NOT NULL default '0',

  `onCast_skill_chance` decimal(11,0) NOT NULL default '0',

  `onCrit_skill_id` decimal(11,0) NOT NULL default '0',

  `onCrit_skill_lvl` decimal(11,0) NOT NULL default '0',

  `onCrit_skill_chance` decimal(11,0) NOT NULL default '0',

  PRIMARY KEY  (`item_id`)

) TYPE=MyISAM;

 

--

-- Dumping data for table `weapon`

--

 

INSERT INTO `weapon` VALUES

('1','Short Sword','rhand','false','1600','1','1','steel','none','8','10','sword','8','0.00000','0','0','0','379','0','6','-1','768','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('2','Long Sword','rhand','false','1560','2','2','fine_steel','none','24','10','sword','8','0.00000','0','0','0','379','0','17','-1','136000','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('3','Broadsword','rhand','false','1590','1','1','steel','none','11','10','sword','8','0.00000','0','0','0','379','0','9','-1','12500','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('4','Club','rhand','false','1870','1','1','wood','none','8','20','blunt','4','4.00000','0','0','0','379','0','6','-1','768','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('5','Mace','rhand','false','1880','1','1','steel','none','11','20','blunt','4','4.00000','0','0','0','379','0','9','-1','12500','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('6','Apprentice\'s Wand','rhand','false','1350','1','1','steel','none','5','20','blunt','4','4.00000','0','0','0','379','0','7','-1','138','0','false','false','true','false','0','0','0','0','0','0','0','0','0','0'),

('7','Apprentice\'s Rod','rhand','false','1330','1','1','wood','none','6','20','blunt','4','4.00000','0','0','0','379','0','8','-1','768','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('8','Willow Staff','lrhand','false','1080','1','1','wood','none','11','20','bigblunt','4','4.00000','0','0','0','325','0','12','-1','12500','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('9','Cedar Staff','lrhand','false','1090','2','2','wood','none','16','20','bigblunt','4','4.00000','0','0','0','325','0','16','-1','54100','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('10','Dagger','rhand','false','1160','1','1','steel','none','5','5','dagger','12','-3.00000','0','0','0','433','0','5','-1','138','0','false','false','true','false','0','0','0','0','0','0','0','0','0','0'),

('11','Bone Dagger','rhand','false','1150','1','1','bone','none','7','5','dagger','12','-3.00000','0','0','0','433','0','6','-1','768','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('12','Knife','rhand','false','1140','1','1','bronze','none','10','5','dagger','12','-3.00000','0','0','0','433','0','9','-1','12500','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('13','Short Bow','lrhand','false','1950','1','1','wood','none','16','5','bow','12','-3.00000','0','0','0','293','1','6','-1','768','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('14','Bow','lrhand','false','1930','1','1','wood','none','23','5','bow','12','-3.00000','0','0','0','293','1','9','-1','12500','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('15','Short Spear','lrhand','false','2140','2','2','steel','none','24','10','pole','8','-3.00000','0','0','0','325','0','17','-1','136000','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('16','Long Spear','lrhand','false','2120','2','2','bronze','none','31','10','pole','8','-3.00000','0','0','0','325','0','21','-1','244000','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('18','Leather Shield','lhand','false','1430','0','0','leather','none','0','0','none','0','0.00000','-8','47','20','0','0','0','-1','39','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('19','Small Shield','lhand','false','1420','0','0','steel','none','0','0','none','0','0.00000','-8','56','20','0','0','0','-1','638','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('20','Buckler','lhand','false','1410','0','0','wood','none','0','0','none','0','0.00000','-8','67','20','0','0','0','-1','2780','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('66','Gladius','rhand','false','1570','2','2','steel','none','17','10','sword','8','0.00000','0','0','0','379','0','12','-1','54100','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('67','Orcish Sword','rhand','false','1570','2','2','steel','none','17','10','sword','8','0.00000','0','0','0','379','0','12','-1','54100','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('68','Falchion','rhand','false','1530','2','2','bronze','none','31','10','sword','8','0.00000','0','0','0','379','0','21','-1','244000','0','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('69','Bastard Sword','rhand','true','1510','2','2','fine_steel','d','51','10','sword','8','0.00000','0','0','0','379','0','32','-1','644000','1170','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('70','Claymore','lrhand','true','2090','3','3','fine_steel','d','112','10','bigsword','8','0.00000','0','0','0','325','0','54','-1','1800000','3272','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('71','Flamberge','lrhand','true','2010','2','2','bronze','c','130','10','bigsword','8','0.00000','0','0','0','325','0','61','-1','2290000','916','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('72','Stormbringer','rhand','true','1430','2','2','fine_steel','c','107','10','sword','8','0.00000','0','0','0','379','0','61','-1','2290000','916','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('73','Shamshir','rhand','true','1420','2','2','fine_steel','c','122','10','sword','8','0.00000','0','0','0','379','0','68','-1','2870000','1148','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('74','Katana','rhand','true','1420','2','2','fine_steel','c','122','10','sword','8','0.00000','0','0','0','379','0','68','-1','2870000','1148','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('75','Caliburs','rhand','true','1400','3','3','oriharukon','c','139','10','sword','8','0.00000','0','0','0','379','0','76','-1','4300000','1720','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('76','Sword of Delusion','rhand','true','1400','3','3','mithril','c','139','10','sword','8','0.00000','0','0','0','379','0','76','-1','4300000','1720','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('77','Tsurugi','rhand','true','1400','3','3','fine_steel','c','139','10','sword','8','0.00000','0','0','0','379','0','76','-1','4300000','1720','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('78','Great Sword','lrhand','true','1930','1','1','steel','b','213','10','bigsword','8','0.00000','0','0','0','325','0','91','-1','8680000','1157','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('79','Sword of Damascus','rhand','true','1350','1','1','damascus','b','194','10','sword','8','0.00000','0','0','0','379','0','99','-1','13100000','1746','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('80','Tallum Blade','rhand','true','1330','1','1','adamantaite','a','213','10','sword','8','0.00000','0','0','0','379','0','107','-1','18300000','1464','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('81','Dragon Slayer','lrhand','true','1840','1','1','bone','a','282','10','bigsword','8','0.00000','0','0','0','325','0','114','-1','27000000','2160','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('82','God\'s Blade','rhand','true','1300','1','1','adamantaite','s','257','10','sword','8','0.00000','0','0','0','379','0','124','-1','38000000','1900','false','false','true','false','0','0','0','0','0','0','0','0','0','0'),

('83','Sword of Magic','rhand','true','970','2','2','bronze','d','43','10','sword','8','0.00000','0','0','0','379','0','45','-1','716000','1301','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('84','Homunkulus\'s Sword','rhand','true','950','3','3','blood_steel','c','111','10','sword','8','0.00000','0','0','0','379','0','101','-1','4300000','1720','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('85','Phantom Sword','rhand','true','860','1','1','oriharukon','a','170','10','sword','8','0.00000','0','0','0','379','0','143','-1','18300000','1464','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

('86','Tomahawk','rhand','true','1780','2','2','bronze','d','51','20','blunt','4','4.00000','0','0','0','379','0','32','-1','644000','1170','true','true','true','true','0','0','0','0','0','0','0','0','0','0'),

 

can someone explain me what is the use of the 2 lines that are red?

You can put a skill on weapon, when is equiped you get the skill

 

 

    private L2Skill _enchant4Skill = null; // skill that activates when item is enchanted +4 (for duals)

sId = set.getInteger("enchant4_skill_id");

sLv = set.getInteger("enchant4_skill_lvl");

if(sId > 0 && sLv > 0)

_enchant4Skill = SkillTable.getInstance().getInfo(sId, sLv);

  • Author

You can put a skill on weapon, when is equiped you get the skill

 

 

    private L2Skill _enchant4Skill = null; // skill that activates when item is enchanted +4 (for duals)

sId = set.getInteger("enchant4_skill_id");

sLv = set.getInteger("enchant4_skill_lvl");

if(sId > 0 && sLv > 0)

_enchant4Skill = SkillTable.getInstance().getInfo(sId, sLv);

 

thats good... thanks! :p :p

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.