//===== rAthena Script =======================================//= Malangdo Costume Enchant//===== Changelogs: ==========================================//= 1.0 First version. [Slyx]//= 1.1 Enable overlapping enchant (need confirmation). [Slyx]//= 1.2 Optimized and add new costumes//============================================================
prontera,156,196,5 script AverDeDosh505,{
disable_items;
mes "[Aver De Dosh]";
mes "Hello and welcome to Costume Enchant Shop.";
mes "My name is Aver De Dosh and I am here to enchant your costume headgears.";
next;
mes "[Aver De Dosh]";
mes "Bring me the required enchant stones and the selected costume headgears so that I can complete the upgrade for you!";
next;switch(select ("Apply Ability","End Conversation")){case1:
mes "[Aver De Dosh]";
mes "What part of costume headgear do you want to strengthen?";
next;switch(select ("Costume Upper Headgear","Costume Middle Headgear","Costume Lower Headgear")){case1:.@equip_id= getequipid(EQI_COSTUME_HEAD_TOP);switch(.@equip_id){case19597:case19602:case19608:case19654:case19677:case19712:case19721:case19840:case19876:case19884:case19907:case19915:case20007:case20008:case20009:case20011:case20012:case20018:case20036:case20038:case20113:case20160:case20227:case20266:case20273:case20278:case20377:case20398:case20317:case20449:case20450:case20451:case20491:case20495:case20496:case20498:case20499:case31027:case31028:case31040:case31041:case31042:case31043:case31044:case31045:case31046:case31048:case31062:case31068:case31092:case31123:case31160:case31163:case31165:case31166:case31182:case31185:case31188:case31190:case31119:case31392:case31394:case31396:case31397:case31405:case31448:case31573:case31560:case31562:case31564:case31565:break;case-1:
mes "[Aver De Dosh]";
mes "Are you wearing the item?";
close;default:
mes "[Aver De Dosh]";
mes "This is not the right costume upper headgear.";
close;}.@equip_name$= getequipname(EQI_COSTUME_HEAD_TOP);
setarray .@card[0],
getequipcardid(EQI_COSTUME_HEAD_TOP,0),
getequipcardid(EQI_COSTUME_HEAD_TOP,1),
getequipcardid(EQI_COSTUME_HEAD_TOP,2),
getequipcardid(EQI_COSTUME_HEAD_TOP,3);
setarray .@stone[0],6636,//str +1 6637,//int +16638,//agi +16639,//dex +16640,//vit +16641,//luk +16716,//crit +16790,//largesize +1%6791,//medsize +1%6792,//smallsize +1%6943,//atk +1%6944,//matk +1%25000,//spdrain +1%25068;//aspd +1
setarray .@enchant[0],4700,//str +14710,//int +14730,//agi +14720,//dex +14740,//vit +14750,//luk +14926,//crit +14936,//largesize +1%4937,//medsize +1%4938,//smallsize +1%4882,//atk +1%4883,//matk +1%4993,//spdrain +1%4807;//aspd +1
setarray .@enchant_list$[0],"STR Stone","INT Stone","AGI Stone","DEX Stone","VIT Stone","LUK Stone","CRIT Stone","Big Stone","Medium Stone","Small Stone","ATK Stone","MATK Stone","SP Absorption Stone","ASPD Stone";
mes "[Aver De Dosh]";
mes "Wow~ This ^0000FF"+getitemname (.@equip_id)+"^000000 looks perfect on you!!!";
mes "What kind of stone do you want to use for the upgrade?";
next;for(.@a=0;.@a< getarraysize(.@enchant_list$);++.@a).@menu$+=.@enchant_list$[.@a]+" "+"("+ countitem(.@stone[.@a])+" "+"Left"+")"+":";.@type= select (.@menu$)-1;
mes "^FF0000[WARNING]^000000";
mes "------------------------";
mes "^FF0000I am going to implement the special effect of "+getitemname (.@stone[.@type])+" on your costume upper headgear.^000000";
mes "------------------------";
mes "^FF0000This upgrade has a success rate of 50%.^000000";
mes "------------------------";
mes "^FF0000The costume will not be destroyed upon failure but the enchant stone will be consumed.^000000";
mes "------------------------";
mes "^FF0000Any previous ability on this costume will be removed upon success.^000000";
mes "------------------------";
mes "^FF0000Are you sure about enchanting this costume?^000000";
next;if(select("Yes","No")==2)
close;if(countitem(.@stone[.@type])<1){
mes "[Aver De Dosh]";
mes "You do not have adequate quantity of ^0000FF"+getitemname (.@stone[.@type])+".^000000";
close;}//Need confirmation:Enchants can be overlapped?/* if (.@card[0] > 0) {
mes "[Aver De Dosh]";
mes "Your ^0000FF"+getitemname (.@equip_id)+"^000000 is already enchanted.";
close;
} */
delitem .@stone[.@type],1;if(rand (1,100)<50){
mes "[Aver De Dosh]";
mes "Oh No!!! I failed to enchant it!!";
mes "Better luck next time!!";
close;}else{
delequip EQI_COSTUME_HEAD_TOP;
getitem2 .@equip_id,1,1,0,0,.@enchant[.@type],.@card[1],.@card[2],.@card[3];
mes "[Aver De Dosh]";
mes "Wow....Elegance!!";
mes "This is perfect...Wow..";
close;}case2:.@equip_id= getequipid(EQI_COSTUME_HEAD_MID);switch(.@equip_id){case19603:case20005:case20010:case20145:case20146:case20147:case20149:case20314:case20318:case20430:case31047:case31120:case31122:case31146:case31167:case31168:case31183:case31184:case31186:case31187:case31391:case31398:case31399:case20246:case31449:case31463:case31561:case31563:case31574:break;case-1:
mes "[Aver De Dosh]";
mes "Are you wearing the item?";
close;default:
mes "[Aver De Dosh]";
mes "This is not the right costume middle headgear.";
close;}.@equip_name$= getequipname(EQI_COSTUME_HEAD_MID);
setarray .@card[0],
getequipcardid(EQI_COSTUME_HEAD_MID,0),
getequipcardid(EQI_COSTUME_HEAD_MID,1),
getequipcardid(EQI_COSTUME_HEAD_MID,2),
getequipcardid(EQI_COSTUME_HEAD_MID,3);
setarray .@stone[0],6945,//str +1 6946,//int +16947,//agi +16948,//dex +16949,//vit +16950,//luk +16642,//atk +1%6643,//matk +1%6717,//hp +506742,//recoverhp +10 10s6743,//maxhp +1%6744;//maxsp +1%
setarray .@enchant[0],4700,//str +14710,//int +14730,//agi +14720,//dex +14740,//vit +14750,//luk +14882,//atk +1%4883,//matk +1%4927,//hp +504931,//recoverhp +10 10s4861,//maxhp +1%4929;//maxsp +1%
setarray .@enchant_list$[0],"STR Stone","INT Stone","AGI Stone","DEX Stone","VIT Stone","LUK Stone","ATK Stone","MATK Stone","HP+50 Stone","Recovery Stone","HP+1% Stone","SP+1% Stone";
mes "[Aver De Dosh]";
mes "Wow~ This ^0000FF"+getitemname (.@equip_id)+"^000000 looks perfect on you!!!";
mes "What kind of stone do you want to use for the upgrade?";
next;for(.@a=0;.@a< getarraysize(.@enchant_list$);++.@a).@menu$+=.@enchant_list$[.@a]+" "+"("+ countitem(.@stone[.@a])+" "+"Left"+")"+":";.@type= select (.@menu$)-1;
mes "^FF0000[WARNING]^000000";
mes "------------------------";
mes "^FF0000I am going to implement the special effect of "+getitemname (.@stone[.@type])+" on your costume middle headgear.^000000";
mes "------------------------";
mes "^FF0000This upgrade has a success rate of 50%.^000000";
mes "------------------------";
mes "^FF0000The costume will not be destroyed upon failure but the enchant stone will be consumed.^000000";
mes "------------------------";
mes "^FF0000Any previous ability on this costume will be removed upon success.^000000";
mes "------------------------";
mes "^FF0000Are you sure about enchanting this costume?^000000";
next;if(select("Yes","No")==2)
close;if(countitem(.@stone[.@type])<1){
mes "[Aver De Dosh]";
mes "You do not have adequate quantity of ^0000FF"+getitemname (.@stone[.@type])+".^000000";
close;}//Need confirmation:Enchants can be overlapped?/* if (.@card[1] > 0) {
mes "[Aver De Dosh]";
mes "Your ^0000FF"+getitemname (.@equip_id)+"^000000 is already enchanted.";
close;
} */
delitem .@stone[.@type],1;if(rand (1,100)<50){
mes "[Aver De Dosh]";
mes "Oh No!!! I failed to enchant it!!";
mes "Better luck next time!!";
close;}else{
delequip EQI_COSTUME_HEAD_MID;
getitem2 .@equip_id,1,1,0,0,.@card[0],.@enchant[.@type],.@card[2],.@card[3];
mes "[Aver De Dosh]";
mes "Wow....Elegance!!";
mes "This is perfect...Wow..";
close;}case3:.@equip_id= getequipid(EQI_COSTUME_HEAD_LOW);switch(.@equip_id){/*case 5914:*/case19513:case19514:case19552:case19553:case19584:case19604:case19636:case19764:case19783:case19785:case19952:case20034:case20071:case20132:case20285:case20315:case20363:case20370:case20405:case20407:case20497:case31029:case31055:case31087:case31121:case31162:case31164:case31181:case31189:case31393:case31395:case31399:case31438:case31453:case31572:case31575:case31559:case31566:break;case-1:
mes "[Aver De Dosh]";
mes "Are you wearing the item?";
close;default:
mes "[Aver De Dosh]";
mes "This is not the right costume lower headgear.";
close;}.@equip_name$= getequipname(EQI_COSTUME_HEAD_LOW);
setarray .@card[0],
getequipcardid(EQI_COSTUME_HEAD_LOW,0),
getequipcardid(EQI_COSTUME_HEAD_LOW,1),
getequipcardid(EQI_COSTUME_HEAD_LOW,2),
getequipcardid(EQI_COSTUME_HEAD_LOW,3);
setarray .@stone[0],6644,//hit +1 6645,//flee +16718,//sp +106951;//hp +1%
setarray .@enchant[0],4884,//hit +14859,//flee +14928,//sp +104861;//hp +1%
setarray .@enchant_list$[0],"HIT Stone","FLEE Stone","SP+10 Stone","HP+1% Stone";
mes "[Aver De Dosh]";
mes "Wow~ This ^0000FF"+getitemname (.@equip_id)+"^000000 looks perfect on you!!!";
mes "What kind of stone do you want to use for the upgrade?";
next;for(.@a=0;.@a< getarraysize(.@enchant_list$);++.@a).@menu$+=.@enchant_list$[.@a]+" "+"("+ countitem(.@stone[.@a])+" "+"Left"+")"+":";.@type= select (.@menu$)-1;
mes "^FF0000[WARNING]^000000";
mes "------------------------";
mes "^FF0000I am going to implement the special effect of "+getitemname (.@stone[.@type])+" on your costume lower headgear.^000000";
mes "------------------------";
mes "^FF0000This upgrade has a success rate of 50%.^000000";
mes "------------------------";
mes "^FF0000The costume will not be destroyed upon failure but the enchant stone will be consumed.^000000";
mes "------------------------";
mes "^FF0000Any previous ability on this costume will be removed upon success.^000000";
mes "------------------------";
mes "^FF0000Are you sure about enchanting this costume?^000000";
next;if(select("Yes","No")==2)
close;if(countitem(.@stone[.@type])<1){
mes "[Aver De Dosh]";
mes "You do not have adequate quantity of ^0000FF"+getitemname (.@stone[.@type])+".^000000";
close;}//Need confirmation:Enchants can be overlapped?/* if (.@card[2] > 0) {
mes "[Aver De Dosh]";
mes "Your ^0000FF"+getitemname (.@equip_id)+"^000000 is already enchanted.";
close;
} */
delitem .@stone[.@type],1;if(rand (1,100)<50){
mes "[Aver De Dosh]";
mes "Oh No!!! I failed to enchant it!!";
mes "Better luck next time!!";
close;}else{
delequip EQI_COSTUME_HEAD_LOW;
getitem2 .@equip_id,1,1,0,0,.@card[0],.@card[1],.@enchant[.@type],.@card[3];
mes "[Aver De Dosh]";
mes "Wow....Elegance!!";
mes "This is perfect...Wow..";
close;}}case2:
mes "[Aver De Dosh]";
mes "Alright, come again when you have changed your mind.";
close;}}
mal_in01,20,107,2 script LaceLaZard614,{
disable_items;
mes "[Lace La Zard]";
mes "Welcome to Fashion Stone!!";
mes "My name is Lace La Zard who will make your 'Power Shoulder' dream come true.";
next;
mes "[Lace La Zard]";
mes "Bring your Costume Garment and Garment Stone, I will complete the perfect upgrade for you!";
mes "I found this formula while working on my own humble body upgrading.";
next;switch(select ("Apply Ability","End Conversation")){case1:.@equip_id= getequipid(EQI_COSTUME_GARMENT);switch(.@equip_id){case20500:case20502:case20504:case20507:case20509:case20510:case20511:case20512:case20516:case20600:case20727:case20730:case20737:case20746:case20761:case20762:case20763:case20764:break;case-1:
mes "[Lace La Zard]";
mes "Are you wearing the item?";
close;default:
mes "[Lace La Zard]";
mes "I am sorry. Please wear the proper costume garment.";
close;}.@equip_name$= getequipname(EQI_COSTUME_GARMENT);.@refine= getequiprefinerycnt(EQI_COSTUME_GARMENT);
setarray .@card[0],
getequipcardid(EQI_COSTUME_GARMENT,0),
getequipcardid(EQI_COSTUME_GARMENT,1),
getequipcardid(EQI_COSTUME_GARMENT,2),
getequipcardid(EQI_COSTUME_GARMENT,3);
setarray .@stone[0],6908,//aspd +16963,//hpdrain 1%6964;//spdrain 1%
setarray .@enchant[0],4807,//aspd +14992,//hpdrain 1%4993;//spdrain 1%
setarray .@enchant_list$[0],"ASPD Stone","HP Absorption Stone","SP Absorption Stone";
mes "[Lace La Zard]";
mes "Wow ^0000FF"+.@equip_name$+"!!!^000000. You got some sense there don't you?";
mes "Great!!! I'm fully ready for this upgrade.";
next;for(.@a=0;.@a< getarraysize(.@enchant_list$);++.@a).@menu$+=.@enchant_list$[.@a]+" "+"("+ countitem(.@stone[.@a])+" "+"Left"+")"+":";.@type= select (.@menu$)-1;
mes "^FF0000[WARNING]^000000";
mes "------------------------";
mes "^FF0000I am going to implement the special effect of "+getitemname (.@stone[.@type])+" on your costume garment.^000000";
mes "------------------------";
mes "^FF0000This upgrade has a success rate of 50%.^000000";
mes "------------------------";
mes "^FF0000The costume will not be destroyed upon failure but the enchant stone will be consumed.^000000";
mes "------------------------";
mes "^FF0000Any previous ability on this costume will be removed upon success.^000000";
mes "------------------------";
mes "^FF0000Are you sure about enchanting this costume?^000000";
next;if(select("Yes","No")==2)
close;if(countitem (.@stone[.@type])<1){
mes "[Lace La Zard]";
mes "You do not have adequate quantity of ^0000FF"+getitemname (.@stone[.@type])+".^000000";
close;}//Need confirmation:Enchants can be overlapped?/* if (.@card[0] > 1) {
mes "[Lace La Zard]";
mes "This costume garment already enchanted. I cannot upgrade it any further.";
close;
} */
delitem .@stone[.@type],1;if(rand (1,100)<50){
mes "[Lace La Zard]";
mes "Oh No!!! I failed to enchant it!!";
mes "Better luck next time!!";
close;}else{
delequip EQI_COSTUME_GARMENT;
getitem2 .@equip_id,1,1,.@refine,0,.@enchant[.@type],.@card[1],.@card[2],.@card[3];
mes "[Lace La Zard]";
mes "Beautiful!!!";
mes "Did I really made this by myself??!!";
close;}case2:
mes "[Lace La Zard]";
mes "Please come back when you are ready for this great offer!";
close;}}
Gostaria que ele pedisse o item id 7711 e viesse um encantamento randomico.
Galera estou com este script:
Gostaria que ele pedisse o item id 7711 e viesse um encantamento randomico.
Como aplico rand e set e set amount
Share this post
Link to post
Share on other sites