Jump to content
  • 0

HELP PLS?


Question

Posted

this script enchants randomly an upper headgear, where in this script is to be changed when I want it to enchant mid headgears and lower headgears, help please thanks

mellina,82,40,4	script	Master Artisan	520,{

	mes .npc$;
	mes "Hi, and wellcome! the name's ^0000FFIraciz^000000, the Master Artisan.";
	mes "In my whole life, I have spent a lot of time studying how to enhance the powers of the Top Gears.";
	next;
	mes .npc$;
	mes "and my skill allow me to upgrade the hat with a mysterious ^32cd32+1 Stat^000000 to any equipped upper gear.";
	
	next;
	mes .npc$;
	mes "If you wish my service, with non failure guarantees.";
	mes "you need to give me something in exchange:";
	mes "^cc00cc"+.price+" "+((.price-1)?getitemname(.item)+"s":getitemname(.item))+"^000000."; 
	next;
	if(!countitem(.item)){ 
	mes .npc$; 
	mes "Hey, you?! Don't even have ^cc00cc"+getitemname(.item)+"s^000000 in your inventory."; 
	close;
	}
	
	if(select("^FF9900Enchant Upper Gear^000000:^FF0000No Thanks^000000")&2){ 
	mes .npc$; 
	mes "I understand, nevermind!.";
	close;
	}

	if(countitem(.item)<.price) { 
	mes .npc$; 
	mes "I'm so sorry, you don't have enough ^cc00cc"+getitemname(.item)+"s^000000 to pay in order to enchant your Upper Gear.";
	mes "Come back when you have the exactly amount I require.";
	close;
	}
	
	mes .npc$;
	mes "This may be your best choice ever.";
	next;
	specialeffect 96;
	progressbar "ffff00",2;
	if(getequipid(1)+1) {
		delitem .item,.price;
		set .@id, getequipid(1);
		set .@ref, getequiprefinerycnt(1);
		set .@card1, getequipcardid(1,0);
		set .@card2, getequipcardid(1,1);
		set .@card3, getequipcardid(1,2);
		set .@card4, getequipcardid(1,3);
		delitem2 .@id, 1, 1, .@ref, 0, .@card1, .@card2, .@card3, .@card4;
		getitem2 .@id, 1, 1, .@ref, 0, .@card1, .@card2, .@card3,
			callfunc("F_RandMes", 6,
				4700, 4710,	4720, 4730, 4740, 4750);
		equip .@id;
		specialeffect2 154;
		mes .npc$;
		mes "Congratz, the enchant has been succesfully applied!.";
		close;
	}
	
	mes .npc$;
	mes "eh eh ehhh! Wait a second";
	mes "Are you nutz? I can't insert an enchant inside your bare head with my hammer!.";
	mes "You nedd to have an Upper Gear equiped, in order to enchant it.";
	close;

	// Item required and amount
    OnInit:
        set .npc$, "^660066Iraciz^000000";
        set .price, 150;
        set .item, 7539;
}

1 answer to this question

Recommended Posts

Posted

Try this..

mellina,82,40,4    script    Master Artisan    520,{

    mes .npc$;
    mes "Hi, and wellcome! the name's ^0000FFIraciz^000000, the Master Artisan.";
    mes "In my whole life, I have spent a lot of time studying how to enhance the powers of the Top Gears.";
    next;
    mes .npc$;
    mes "and my skill allow me to upgrade the hat with a mysterious ^32cd32+1 Stat^000000 to any equipped upper gear.";
    
    next;
    mes .npc$;
    mes "If you wish my service, with non failure guarantees.";
    mes "you need to give me something in exchange:";
    mes "^cc00cc"+.price+" "+((.price-1)?getitemname(.item)+"s":getitemname(.item))+"^000000.";
    next;
    if(!countitem(.item)){
    mes .npc$;
    mes "Hey, you?! Don't even have ^cc00cc"+getitemname(.item)+"s^000000 in your inventory.";
    close;
    }
    
    if(select("^FF9900Enchant Upper Gear^000000:^FF0000No Thanks^000000")&2){
    mes .npc$;
    mes "I understand, nevermind!.";
    close;
    }

    if(countitem(.item)<.price) {
    mes .npc$;
    mes "I'm so sorry, you don't have enough ^cc00cc"+getitemname(.item)+"s^000000 to pay in order to enchant your Upper Gear.";
    mes "Come back when you have the exactly amount I require.";
    close;
    }
    
    mes .npc$;
    mes "This may be your best choice ever.";
    next;
    specialeffect 96;
    progressbar "ffff00",2;
    if(getequipid(9)+1) { // Change this to 10 if you want for lower.
        delitem .item,.price;
        set .@id, getequipid(9); // Also change this into 10 for lower.
        set .@ref, getequiprefinerycnt(1);
        set .@card1, getequipcardid(1,0);
        set .@card2, getequipcardid(1,1);
        set .@card3, getequipcardid(1,2);
        set .@card4, getequipcardid(1,3);
        delitem2 .@id, 1, 1, .@ref, 0, .@card1, .@card2, .@card3, .@card4;
        getitem2 .@id, 1, 1, .@ref, 0, .@card1, .@card2, .@card3,
            callfunc("F_RandMes", 6,
                4700, 4710,    4720, 4730, 4740, 4750);
        equip .@id;
        specialeffect2 154;
        mes .npc$;
        mes "Congratz, the enchant has been succesfully applied!.";
        close;
    }
    
    mes .npc$;
    mes "eh eh ehhh! Wait a second";
    mes "Are you nutz? I can't insert an enchant inside your bare head with my hammer!.";
    mes "You nedd to have an Upper Gear equiped, in order to enchant it.";
    close;

    // Item required and amount
OnInit:
set .npc$, "^660066Iraciz^000000";
set .price, 150;
set .item, 7539;
}

Let me know how it works! :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...