diff options
-rw-r--r-- | db/re/item_db.conf | 56 | ||||
-rw-r--r-- | db/re/item_packages.conf | 82 | ||||
-rw-r--r-- | db/roulette_db.conf | 9 | ||||
-rw-r--r-- | doc/mob_db_mode_list.txt | 4 | ||||
-rw-r--r-- | sql-files/item_db_re.sql | 3 | ||||
-rw-r--r-- | src/map/mob.c | 26 | ||||
-rw-r--r-- | src/map/status.h | 1 |
7 files changed, 154 insertions, 27 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 1d786c04b..211fd5d63 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -82611,6 +82611,16 @@ item_db: ( Script: <" packageitem(); "> }, { + Id: 12609 + AegisName: "Old_Ore_Box" + Name: "Old Ore Box" + Type: 2 + Buy: 20 + Weight: 100 + Upper: 63 + Script: <" packageitem(); "> +}, +{ Id: 12612 AegisName: "Old_Coin_Pocket" Name: "Shabby Coin Bag" @@ -84761,6 +84771,30 @@ item_db: ( EquipLv: 100 }, { + Id: 12831 + AegisName: "Potion_Box" + Name: "Potion Box" + Type: 2 + Buy: 0 + Weight: 50 + Upper: 63 + Trade: { + nodrop: true + notrade: true + noselltonpc: true + nocart: true + nogstorage: true + nomail: true + noauction: true + } + Script: <" + getitem 545,100; + getitem 546,100; + getitem 547,100; + getitem 505,100; + "> +}, +{ Id: 12848 AegisName: "Falcon_Flute" Name: "Falcon Flute" @@ -118244,6 +118278,28 @@ item_db: ( "> }, { + Id: 22777 + AegisName: "Buff_Gift_Set" + Name: "Buff Gift Set" + Type: 2 + Buy: 20 + Weight: 100 + Trade: { + nodrop: true + notrade: true + nocart: true + nostorage: true + nogstorage: true + nomail: true + noauction: true + } + Script: <" + getitem 14534,5; + getitem 12215,5; + getitem 12216,5; + "> +}, +{ Id: 22837 AegisName: "Integer_Time" Name: "Integer Time" diff --git a/db/re/item_packages.conf b/db/re/item_packages.conf index 62e0c782b..e900ca23e 100644 --- a/db/re/item_packages.conf +++ b/db/re/item_packages.conf @@ -12223,6 +12223,88 @@ Fruit_Basket: { Rate: 40 } } +Old_Ore_Box: { + Iron_Ore: { + Random: 1 + Rate: 600 + } + Iron: { + Random: 1 + Rate: 380 + } + Yellow_Live: { + Random: 1 + Rate: 100 + } + Coal: { + Random: 1 + Rate: 80 + } + Wind_Of_Verdure: { + Random: 1 + Rate: 100 + } + Phracon: { + Random: 1 + Rate: 600 + } + Crystal_Blue: { + Random: 1 + Rate: 100 + } + Boody_Red: { + Random: 1 + Rate: 100 + } + Steel: { + Random: 1 + Rate: 50 + } + Emveretarcon: { + Random: 1 + Rate: 380 + } + Elunium_Stone: { + Random: 1 + Rate: 70 + } + Oridecon_Stone: { + Random: 1 + Rate: 80 + } + Great_Nature: { + Random: 1 + Rate: 40 + } + Rough_Wind: { + Random: 1 + Rate: 40 + } + Mistic_Frozen: { + Random: 1 + Rate: 40 + } + Flame_Heart: { + Random: 1 + Rate: 40 + } + Elunium: { + Random: 1 + Rate: 20 + } + Oridecon: { + Random: 1 + Rate: 20 + } + Gold: { + Random: 1 + Rate: 10 + } + Emperium: { + Random: 1 + Rate: 50 + } +} Old_Coin_Pocket: { Malang_Sp_Can: { Random: 1 diff --git a/db/roulette_db.conf b/db/roulette_db.conf index bcffe88f7..831ee9023 100644 --- a/db/roulette_db.conf +++ b/db/roulette_db.conf @@ -22,7 +22,7 @@ roulette: ( Poison_Bottle:1 Branch_Of_Dead_Tree:1 Fruit_Of_Mastela:1 - //ID12609:1 // 12609 not in db + Old_Ore_Box:1 E_Inc_Agi_10_Scroll:1 Elunium:1 Oridecon:1 @@ -51,14 +51,14 @@ roulette: ( Gold_Coin:1 Old_Card_Album:1 E_Small_Life_Potion:1 - //Gift_Buff_Set:1 // 22777 not in db + Buff_Gift_Set:1 Guarantee_Weapon_6Up:1 } level_5: { Gold_Coin:1 // Lose Magic_Card_Album:1 Comp_Battle_Manual:1 - //ID12831:1 // 12831 not in db // potion box ? + Potion_Box:1 Guarantee_Armor_6Up:1 } level_6: { @@ -73,4 +73,5 @@ roulette: ( Guarantee_Armor_8Up:1 } } -)
\ No newline at end of file +) + diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt index 17f25d9bc..08abf800d 100644 --- a/doc/mob_db_mode_list.txt +++ b/doc/mob_db_mode_list.txt @@ -26,7 +26,7 @@ MD_ANGRY | 0x0800 | 2048 MD_CHANGETARGET_MELEE | 0x1000 | 4096 MD_CHANGETARGET_CHASE | 0x2000 | 8192 MD_TARGETWEAK | 0x4000 | 16384 -MD_RANDOMTARGET | 0x8000 | 32768 +MD_RANDOMTARGET | 0x8000 | 32768 (not implemented) Explanation for modes: ------------------------------------------------------------------------------- @@ -75,7 +75,7 @@ Target Weak: Allows aggressive monsters to only be aggressive against For example, a monster of level 104 will not pick fights with a level 99. Random Target: Picks a new random target in range on each attack / skill. - + (not implemented) Aegis Mob Types: ------------------------------------------------------------------------------- diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index b2bd489fe..9d279ff38 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -5918,6 +5918,7 @@ REPLACE INTO `item_db_re` VALUES ('12605','Special_Box4','Special Box IV','11',' REPLACE INTO `item_db_re` VALUES ('12606','Special_Box5','Special Box V','11','100','50','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db_re` VALUES ('12607','Lolli_Pop_Box','Delicious Lollipop Box','11','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db_re` VALUES ('12608','Splendid_Box2','Splendid Box2','2','20','10','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); +REPLACE INTO `item_db_re` VALUES ('12609','Old_Ore_Box','Old Ore Box','2','20','10','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db_re` VALUES ('12612','Old_Coin_Pocket','Shabby Coin Bag','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db_re` VALUES ('12613','High_Coin_Pocket','Premium Coin Bag','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); REPLACE INTO `item_db_re` VALUES ('12614','Mid_Coin_Pocket','Normal Coin Bag','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','packageitem();','',''); @@ -6107,6 +6108,7 @@ REPLACE INTO `item_db_re` VALUES ('12813','Peony_Mommy','Peony Mamy','11','0','0 REPLACE INTO `item_db_re` VALUES ('12814','Slapping_Herb','Sadagui','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_SADAGUI,1;','',''); REPLACE INTO `item_db_re` VALUES ('12815','Yggdrasil_Dust','Sequoia Dust','11','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill ECL_SEQUOIADUST,1;','',''); REPLACE INTO `item_db_re` VALUES ('12818','High_Weapon_Box_','Advanced Weapons Box','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','100',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); +REPLACE INTO `item_db_re` VALUES ('12831','Potion_Box','Potion Box','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','getitem 545,100; getitem 546,100; getitem 547,100; getitem 505,100;','',''); REPLACE INTO `item_db_re` VALUES ('12848','Falcon_Flute','Falcon Flute','11','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','if(getskilllv(HT_FALCON)) { if(checkoption(Option_Wug)||checkoption(Option_Wugrider)) end; if(checkfalcon()==1) { setfalcon 0; } else { setfalcon 1; } }','',''); REPLACE INTO `item_db_re` VALUES ('12849','Combination_Kit','Union Kit','2','0','0','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db_re` VALUES ('12850','Heaven_Scroll','Heaven Scroll','11','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -8367,6 +8369,7 @@ REPLACE INTO `item_db_re` VALUES ('22514','Candy_Holder','Candy Holder','11','20 REPLACE INTO `item_db_re` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','2','1','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','60000','0',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA,1;','',''); REPLACE INTO `item_db_re` VALUES ('22669','HALLOWEEN_G_BOX','Halloween Box','2','0','0','20','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 22669,1;','',''); REPLACE INTO `item_db_re` VALUES ('22670','DARK_INVITATION','Invitation of Darkness','2','10','5','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','.@r = rand(1,3); if (.@r == 1) { specialeffect2 EF_DEVIL; warp \"niflheim\",193,186; } else if(.@r == 2) { heal -500,-1000; sc_start SC_STUN,3000,0; } else { specialeffect2 EF_DEVIL; warp \"niflheim\",347,255; }','',''); +REPLACE INTO `item_db_re` VALUES ('22777','Buff_Gift_Set','Buff Gift Set','2','20','10','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','getitem 14534,5; getitem 12215,5; getitem 12216,5;','',''); REPLACE INTO `item_db_re` VALUES ('22837','Integer_Time','Integer Time','2','0','0','0','0','0','0','0','0','4294967295','63','2','0','0','50',NULL,'0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','set TmpRouletteBronze,TmpRouletteBronze + 1;','',''); REPLACE INTO `item_db_re` VALUES ('22838','Something_Candy_Holder','Something Candy Holder','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 22838,1;','',''); REPLACE INTO `item_db_re` VALUES ('28200','End_Of_The_Horizon','End Of The Horizon','5','2700000','1350000','2400','410','0','0','9','1','1073741824','63','2','34','4','110',NULL,'1','21','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); diff --git a/src/map/mob.c b/src/map/mob.c index 2605b414f..e2cf765ee 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1616,17 +1616,6 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { { //Only attack if no more attack delay left if(tbl->type == BL_PC) mob->log_damage(md, tbl, 0); //Log interaction (counts as 'attacker' for the exp bonus) - - if( !(mode&MD_RANDOMTARGET) ) - unit->attack(&md->bl,tbl->id,1); - else { // Attack once and find a new random target - int search_size = (view_range < md->status.rhw.range) ? view_range : md->status.rhw.range; - unit->attack(&md->bl,tbl->id, 0); - if ((tbl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md), search_size))) { - md->target_id = tbl->id; - md->min_chase = md->db->range3; - } - } } return true; } @@ -3082,7 +3071,6 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { struct block_list *bl; struct mob_data *fmd = NULL; int i,j,n; - short skill_target; nullpo_ret(md); nullpo_ret(ms = md->db->skill); @@ -3181,12 +3169,10 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { if (!flag) continue; //Skill requisite failed to be fulfilled. - //Execute skill - skill_target = (md->db->status.mode&MD_RANDOMTARGET)? MST_RANDOM : ms[i].target; if (skill->get_casttype(ms[i].skill_id) == CAST_GROUND) {//Ground skill. short x, y; - switch (skill_target) { + switch (ms[i].target) { case MST_RANDOM: //Pick a random enemy within skill range. bl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md), skill->get_range2(&md->bl, ms[i].skill_id, ms[i].skill_lv)); @@ -3216,10 +3202,10 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { x = bl->x; y = bl->y; // Look for an area to cast the spell around... - if (skill_target >= MST_AROUND1 || skill_target >= MST_AROUND5) { - j = skill_target >= MST_AROUND1? - (skill_target-MST_AROUND1) +1: - (skill_target-MST_AROUND5) +1; + if (ms[i].target >= MST_AROUND1 || ms[i].target >= MST_AROUND5) { + j = ms[i].target >= MST_AROUND1? + (ms[i].target-MST_AROUND1) +1: + (ms[i].target-MST_AROUND5) +1; map->search_freecell(&md->bl, md->bl.m, &x, &y, j, j, 3); } md->skill_idx = i; @@ -3232,7 +3218,7 @@ int mobskill_use(struct mob_data *md, int64 tick, int event) { } } else { //Targeted skill - switch (skill_target) { + switch (ms[i].target) { case MST_RANDOM: //Pick a random enemy within skill range. bl = battle->get_enemy(&md->bl, DEFAULT_ENEMY_TYPE(md), skill->get_range2(&md->bl, ms[i].skill_id, ms[i].skill_lv)); diff --git a/src/map/status.h b/src/map/status.h index e96894e9f..aca26b1af 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1600,7 +1600,6 @@ enum e_mode MD_CHANGETARGET_MELEE = 0x1000, MD_CHANGETARGET_CHASE = 0x2000, MD_TARGETWEAK = 0x4000, - MD_RANDOMTARGET = 0x8000, MD_MASK = 0xFFFF, }; |