From 9692bc034537693d331148ae8bd15153265c6cf0 Mon Sep 17 00:00:00 2001 From: malufett Date: Wed, 16 Oct 2013 03:11:25 +0800 Subject: Fixed Bug#7374 -Hercules now fully support Monster Transformation. Signed-off-by: malufett --- db/const.txt | 6 ++++++ db/item_delay.txt | 7 +++++++ db/re/item_db.txt | 14 +++++++------- db/sc_config.txt | 5 +++++ 4 files changed, 25 insertions(+), 7 deletions(-) (limited to 'db') diff --git a/db/const.txt b/db/const.txt index 23a28c088..af3dedbc5 100644 --- a/db/const.txt +++ b/db/const.txt @@ -1236,6 +1236,12 @@ SC_OFFERTORIUM 559 SC_FRIGG_SONG 560 SC_MONSTER_TRANSFORM 563 SC_ANGEL_PROTECT 564 +SC_ILLUSIONDOPING 565 +SC_MTF_ASPD 566 +SC_MTF_RANGEATK 567 +SC_MTF_MATK 568 +SC_MTF_MLEATKED 569 +SC_MTF_CRIDAMAGE 570 e_gasp 0 e_what 1 diff --git a/db/item_delay.txt b/db/item_delay.txt index c5bf0da7d..8905edb11 100644 --- a/db/item_delay.txt +++ b/db/item_delay.txt @@ -35,3 +35,10 @@ 12732,1000 // Runstone_Pertz,Wyrd Rune 22540,60000 // Runstone_Luxanima,Lux Anima Rune +12658, 10000 // Transformation Scroll(Deviruchi) +12659, 10000 // Transformation Scroll(Raydric) +12660, 10000 // Transformation Scroll(Mavka) +12661, 10000 // Transformation Scroll(Marduk) +12662, 10000 // Transformation Scroll(Banshee) +12663, 10000 // Transformation Scroll(Poring) +12664, 10000 // Transformation Scroll(Golem) \ No newline at end of file diff --git a/db/re/item_db.txt b/db/re/item_db.txt index 7385672d9..d686f8677 100644 --- a/db/re/item_db.txt +++ b/db/re/item_db.txt @@ -5975,13 +5975,13 @@ 12655,Brain_Powder,Brain Powder,11,2000,,100,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} 12656,Magical_Powder,Magical Powder,11,3000,,200,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} 12657,Madness_Powder,Madness Powder,11,4000,,300,,,,,0xFFFFFFFF,63,2,,,,,,{},{},{} -12658,Trans_Scroll_Devi,Transformation Scroll(Deviruchi),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1109,0,0,0; },{},{} -12659,Trans_Scroll_Ray_Arch,Transformation Scroll(Raydric),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1276,0,0,0; },{},{} -12660,Trans_Scroll_Mavka,Transformation Scroll(Mavka),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1884,0,0,0; },{},{} -12661,Trans_Scroll_Marduk,Transformation Scroll(Marduk),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1140,0,0,0; },{},{} -12662,Trans_Scroll_Banshee,Transformation Scroll(Banshee),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1867,0,0,0; },{},{} -12663,Trans_Scroll_Poring,Transformation Scroll(Poring),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1002,0,0,0; },{},{} -12664,Trans_Scroll_Golem,Transformation Scroll(Golem),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ sc_start4 SC_MONSTER_TRANSFORM,1200000,1040,0,0,0; },{},{} +12658,Trans_Scroll_Devi,Transformation Scroll(Deviruchi),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ montransform "Deviruchi",1200000,SC_MTF_ASPD; },{},{} +12659,Trans_Scroll_Ray_Arch,Transformation Scroll(Raydric),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ montransform "Raydric Archer",1200000,SC_MTF_RANGEATK; },{},{} +12660,Trans_Scroll_Mavka,Transformation Scroll(Mavka),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ montransform "Mavka",1200000,SC_MTF_RANGEATK; },{},{} +12661,Trans_Scroll_Marduk,Transformation Scroll(Marduk),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ montransform "Marduk",1200000,SC_MTF_MATK; },{},{} +12662,Trans_Scroll_Banshee,Transformation Scroll(Banshee),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ montransform "Banshee",1200000,SC_MTF_MATK; },{},{} +12663,Trans_Scroll_Poring,Transformation Scroll(Poring),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ montransform "Poring",1200000,SC_MTF_CRIDAMAGE; },{},{} +12664,Trans_Scroll_Golem,Transformation Scroll(Golem),2,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ montransform "Golem",1200000,SC_MTF_MLEATKED; },{},{} // // ID,AegisName,Name,Type,Buy,Sell,Weight,ATK,DEF,Range,Slots,Job,Upper,Gender,Loc,wLV,eLV,Refineable,View,{ Script },{ OnEquip_Script },{ OnUnequip_Script } diff --git a/db/sc_config.txt b/db/sc_config.txt index a9715dfbf..1adfec6ca 100644 --- a/db/sc_config.txt +++ b/db/sc_config.txt @@ -378,6 +378,11 @@ SC_LIGHT_OF_REGENE, 1 //SC_ALL_RIDING_REUSE_LIMIT, 1 //SC_HANDICAPSTATE_DEEP_SLEEP, 80 SC_MONSTER_TRANSFORM, 12 +SC_MTF_ASPD, 12 +SC_MTF_RANGEATK, 12 +SC_MTF_MATK, 12 +SC_MTF_MLEATKED,12 +SC_MTF_CRIDAMAGE, 12 SC_FULL_THROTTLE, 18 SC_REBOUND, 18 -- cgit v1.2.3-70-g09d2 From f943c061b5c29bf906830c8ff9e9114f00a88951 Mon Sep 17 00:00:00 2001 From: malufett Date: Wed, 16 Oct 2013 21:01:07 +0800 Subject: Fixed Bug#7770 -split 'item_delay.txt'. Follow up @ 9692bc034537693d331148ae8bd15153265c6cf0 -implement PACKET_ZC_SHOWSCRIPT. Special thanks to Kyeme and super awesome Yommy. Signed-off-by: malufett --- db/item_delay.txt | 44 -------------------------------------------- db/pre-re/item_db.txt | 1 - db/pre-re/item_delay.txt | 34 ++++++++++++++++++++++++++++++++++ db/re/item_delay.txt | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/map/clif.c | 23 +++++++++++++++++++++++ src/map/clif.h | 1 + src/map/itemdb.c | 2 +- src/map/script.c | 2 +- 8 files changed, 104 insertions(+), 47 deletions(-) delete mode 100644 db/item_delay.txt create mode 100644 db/pre-re/item_delay.txt create mode 100644 db/re/item_delay.txt (limited to 'db') diff --git a/db/item_delay.txt b/db/item_delay.txt deleted file mode 100644 index 8905edb11..000000000 --- a/db/item_delay.txt +++ /dev/null @@ -1,44 +0,0 @@ -// Item Delay Database -// There is a max concurrent number of entries modifiable in src/map/itemdb.h as MAX_ITEMDELAYS -// -// Structure: -// Item ID,Delay in Milliseconds - -//12202,60000 //Str_Dish10_ -//12203,60000 //Agi_Dish10_ -//12204,60000 //Int_Dish10_ -//12205,60000 //Dex_Dish10_ -//12206,60000 //Luk_Dish10_ -//12207,60000 //Vit_Dish10_ -12208,60000 //Battle_Manual -12210,60000 //Bubble_Gum -14538,300000 //Glass_Of_Illusion -14586,180000 //Spark_Candy -607,5000 // Yggdrasil_Berry -608,3000 // Yggdrasil_Seed - -// Bifrost Items -11522,1000 // Red_Raffle_Sap -11523,2000 // Yellow_Raffle_Sap -11524,3000 // White_Raffle_Sap -11525,5000 // Mora_Hip_Tea - -12622,3000 // Reins_Of_Mount - -//12580,0 // Vending_Search_Scroll -//12581,0 // Vending_Search_Scroll2 -//12591,0 // Vending_Search_Scroll3 - -12725,120000 // Runstone_Nosiege,Nauthiz Rune -12726,30000 // Runstone_Rhydo,Raido Rune -12727,60000 // Runstone_Verkana,Berkana Rune -12732,1000 // Runstone_Pertz,Wyrd Rune -22540,60000 // Runstone_Luxanima,Lux Anima Rune - -12658, 10000 // Transformation Scroll(Deviruchi) -12659, 10000 // Transformation Scroll(Raydric) -12660, 10000 // Transformation Scroll(Mavka) -12661, 10000 // Transformation Scroll(Marduk) -12662, 10000 // Transformation Scroll(Banshee) -12663, 10000 // Transformation Scroll(Poring) -12664, 10000 // Transformation Scroll(Golem) \ No newline at end of file diff --git a/db/pre-re/item_db.txt b/db/pre-re/item_db.txt index a293a951c..09e70de5d 100644 --- a/db/pre-re/item_db.txt +++ b/db/pre-re/item_db.txt @@ -5128,7 +5128,6 @@ 12580,Vending_Search_Scroll,Universal Catalog Silver,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ searchstores 10,0; },{},{} 12581,Vending_Search_Scroll2,Universal Catalog Gold,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ searchstores 10,1; },{},{} 12591,Uni_Catalog_Bz,Universal Catalog Bronze,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ searchstores 10,1; },{},{} -12622,Boarding_Halter,Halter Lead,11,20,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setmounting(); },{},{} 12701,Old_Blue_Box_F,Old Blue Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} 12702,Old_Bleu_Box,Old Navy Box,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12702,1; getrandgroupitem 12702,1; },{},{} 12703,Holy_Egg_2,Holy Egg,11,0,,50,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{} diff --git a/db/pre-re/item_delay.txt b/db/pre-re/item_delay.txt new file mode 100644 index 000000000..3e24f9d31 --- /dev/null +++ b/db/pre-re/item_delay.txt @@ -0,0 +1,34 @@ +// Item Delay Database +// There is a max concurrent number of entries modifiable in src/map/itemdb.h as MAX_ITEMDELAYS +// +// Structure: +// Item ID,Delay in Milliseconds + +//12202,60000 //Str_Dish10_ +//12203,60000 //Agi_Dish10_ +//12204,60000 //Int_Dish10_ +//12205,60000 //Dex_Dish10_ +//12206,60000 //Luk_Dish10_ +//12207,60000 //Vit_Dish10_ +12208,60000 //Battle_Manual +12210,60000 //Bubble_Gum +14538,300000 //Glass_Of_Illusion +14586,180000 //Spark_Candy +607,5000 // Yggdrasil_Berry +608,3000 // Yggdrasil_Seed + +// Bifrost Items +11522,1000 // Red_Raffle_Sap +11523,2000 // Yellow_Raffle_Sap +11524,3000 // White_Raffle_Sap +11525,5000 // Mora_Hip_Tea + +//12580,0 // Vending_Search_Scroll +//12581,0 // Vending_Search_Scroll2 +//12591,0 // Vending_Search_Scroll3 + +12725,120000 // Runstone_Nosiege,Nauthiz Rune +12726,30000 // Runstone_Rhydo,Raido Rune +12727,60000 // Runstone_Verkana,Berkana Rune +12732,1000 // Runstone_Pertz,Wyrd Rune +22540,60000 // Runstone_Luxanima,Lux Anima Rune diff --git a/db/re/item_delay.txt b/db/re/item_delay.txt new file mode 100644 index 000000000..8905edb11 --- /dev/null +++ b/db/re/item_delay.txt @@ -0,0 +1,44 @@ +// Item Delay Database +// There is a max concurrent number of entries modifiable in src/map/itemdb.h as MAX_ITEMDELAYS +// +// Structure: +// Item ID,Delay in Milliseconds + +//12202,60000 //Str_Dish10_ +//12203,60000 //Agi_Dish10_ +//12204,60000 //Int_Dish10_ +//12205,60000 //Dex_Dish10_ +//12206,60000 //Luk_Dish10_ +//12207,60000 //Vit_Dish10_ +12208,60000 //Battle_Manual +12210,60000 //Bubble_Gum +14538,300000 //Glass_Of_Illusion +14586,180000 //Spark_Candy +607,5000 // Yggdrasil_Berry +608,3000 // Yggdrasil_Seed + +// Bifrost Items +11522,1000 // Red_Raffle_Sap +11523,2000 // Yellow_Raffle_Sap +11524,3000 // White_Raffle_Sap +11525,5000 // Mora_Hip_Tea + +12622,3000 // Reins_Of_Mount + +//12580,0 // Vending_Search_Scroll +//12581,0 // Vending_Search_Scroll2 +//12591,0 // Vending_Search_Scroll3 + +12725,120000 // Runstone_Nosiege,Nauthiz Rune +12726,30000 // Runstone_Rhydo,Raido Rune +12727,60000 // Runstone_Verkana,Berkana Rune +12732,1000 // Runstone_Pertz,Wyrd Rune +22540,60000 // Runstone_Luxanima,Lux Anima Rune + +12658, 10000 // Transformation Scroll(Deviruchi) +12659, 10000 // Transformation Scroll(Raydric) +12660, 10000 // Transformation Scroll(Mavka) +12661, 10000 // Transformation Scroll(Marduk) +12662, 10000 // Transformation Scroll(Banshee) +12663, 10000 // Transformation Scroll(Poring) +12664, 10000 // Transformation Scroll(Golem) \ No newline at end of file diff --git a/src/map/clif.c b/src/map/clif.c index 81dbc28ec..060509807 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17541,6 +17541,28 @@ void clif_partytickack(struct map_session_data* sd, bool flag) { WFIFOSET(sd->fd, packet_len(0x2c9)); } +void clif_ShowScript(struct block_list* bl, const char* message) { + char buf[256]; + int len; + nullpo_retv(bl); + + if(!message) + return; + + len = strlen(message)+1; + + if( len > sizeof(buf)-8 ) { + ShowWarning("clif_ShowScript: Truncating too long message '%s' (len=%d).\n", message, len); + len = sizeof(buf)-8; + } + + WBUFW(buf,0)=0x8b3; + WBUFW(buf,2)=len+8; + WBUFL(buf,4)=bl->id; + safestrncpy((char *) WBUFP(buf,8),message,len); + clif->send((unsigned char *) buf,WBUFW(buf,2),bl,ALL_CLIENT); +} + void clif_status_change_end(struct block_list *bl, int tid, enum send_target target, int type) { struct packet_status_change_end p; @@ -18395,6 +18417,7 @@ void clif_defaults(void) { clif->wisexin = clif_wisexin; clif->wisall = clif_wisall; clif->PMIgnoreList = clif_PMIgnoreList; + clif->ShowScript = clif_ShowScript; /* trade handling */ clif->traderequest = clif_traderequest; clif->tradestart = clif_tradestart; diff --git a/src/map/clif.h b/src/map/clif.h index 2baca2aaf..6d0fc0fc1 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -759,6 +759,7 @@ struct clif_interface { void (*wisexin) (struct map_session_data *sd,int type,int flag); void (*wisall) (struct map_session_data *sd,int type,int flag); void (*PMIgnoreList) (struct map_session_data* sd); + void (*ShowScript) (struct block_list* bl, const char* message); /* trade handling */ void (*traderequest) (struct map_session_data* sd, const char* name); void (*tradestart) (struct map_session_data* sd, uint8 type); diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 09eec557d..5c698b3c9 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1946,7 +1946,7 @@ void itemdb_read(void) { sv->readdb(map->db_path, "item_avail.txt", ',', 2, 2, -1, itemdb->read_itemavail); sv->readdb(map->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, itemdb->read_itemtrade); - sv->readdb(map->db_path, "item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay); + sv->readdb(map->db_path, DBPATH"item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay); sv->readdb(map->db_path, "item_stack.txt", ',', 3, 3, -1, itemdb->read_stack); sv->readdb(map->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, itemdb->read_buyingstore); sv->readdb(map->db_path, "item_nouse.txt", ',', 3, 3, -1, itemdb->read_nouse); diff --git a/src/map/script.c b/src/map/script.c index 612ca8688..4f7823e95 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -17005,7 +17005,7 @@ BUILDIN(montransform) { } sprintf(msg, msg_txt(1485), monster->name); // Traaaansformation-!! %s form!! - clif->disp_overhead(&sd->bl, msg); + clif->ShowScript(&sd->bl, msg); status_change_end(bl, SC_MONSTER_TRANSFORM, INVALID_TIMER); // Clear previous sc_start2(bl, SC_MONSTER_TRANSFORM, 100, mob_id, type, tick); sc_start4(bl, type, 100, val1, val2, val3, val4, tick); -- cgit v1.2.3-70-g09d2