Jump to content
  • 0

Headgear to Costume converter >> Costume to Headgear converter


rickzera

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  51
  • Reputation:   3
  • Joined:  08/01/12
  • Last Seen:  

block npc from talking to the player if you have any of these items in your inventory

// -------------------------------------------------------------------------------
//      Script Name : Headgear to Costume converter >> Costume to Headgear converter
// -------------------------------------------------------------------------------
// Description :
// - Allows a user to convert the equipped headgear (on Top, Mid or Low) into a
//   costume item. It will remove any card and refine of the Item.
// - Allows a user to restore the equipped costume headgear (on Top, Mid or Low)
     into its original form. It will not return any card or refine of the item.
// -------------------------------------------------------------------------------
-       script  Costume Clown   -1,{
        mes "[Clown]";
        mes "Here you can convert your headgears into a Costume Headgear or restore to its Original form.";
        switch(select("I want to convert.:I want to restore.:No thanks.")) {
        case 1:
                        next;
                        mes "Please, select what to convert.";
                        mes "Remember, cards and refine will be removed.";
                        next;
                                setarray .@Position$[1],"Top","Mid","Low";
                                setarray .@Position[1],     1,    9,   10;
                                set .@Menu$,"";
                        for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
                        {
                                if( getequipisequiped(.@Position[.@i]) )
                                set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
                                set .@Menu$, .@Menu$ + ":";
                        }
                        set .@Part, .@Position[ select(.@Menu$) ];
                        if( !getequipisequiped(.@Part) )
                        {
                                mes "[Clown]";
                                mes "Your not wearing anything there...";
                                close;
                        }
                        mes "[Clown]";
                        mes "You want to Costume your " + getitemname(getequipid(.@Part)) + "?";
                        next;
                        if( select("Yes, proceed:No, I am sorry.") == 2 )
                        {
                                mes "[Clown]";
                                mes "Need some time to think about it, huh?";
                                mes "Alright, I can understand.";
                                close;
                        }
			if(countitem(7227) >= 100) {

				delitem 7227, 100;
                        	costume .@Part; // Convert the Headgear
                        	mes "[Clown]";
                        	mes "Done, enjoy your costume headgear.";
                      		close;
			mes “[Clown]”;
			mes Im sorry but you only have “+countitem(7227)+”TCG Cards.”;
			mes You need at least 100 TCG cards to convert your headgear.";
			close;
			}
        case 2:	
                        next;
                        mes "Please, select what to restore.";
                        mes "Remember, I will only restore it back without refine and cards.";
                        next;
                                setarray .@Position$[1],"Top","Mid","Low";
                                setarray .@Position[1],     13,    12,   11;
                                set .@Menu$,"";
                        for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
                        {
                                if( getequipisequiped(.@Position[.@i]) )
                                set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
                                set .@Menu$, .@Menu$ + ":";
                        }
                        set .@Part, .@Position[ select(.@Menu$) ];
                        if( !getequipisequiped(.@Part) )
                        {
                                mes "[Clown]";
                                mes "Your not wearing anything there...";
                                close;
                        }
                        mes "[Clown]";
                        mes "You want to restore your " + getitemname(getequipid(.@Part)) + "?";
                        next;
                        if( select("Yes, proceed:No, I am sorry.") == 2 )
                        {
                                mes "[Clown]";
                                mes "Need some time to think about it, huh?";
                                mes "Alright, I can understand.";
                                close;
                        }
                        a = getequipid(.@Part);                
                        delitem a,1;
                        getitem a,1;
                       
                        mes "[Clown]";
                        mes "Done, enjoy your restored headgear.";
                        close;
        case 3:
                mes "[Clown]";
                mes "Very well. Return at once if you seek my services.";
                close;
        }
}
// --------------------------------------------------------------------------
// Use duplicates to put your npc on different cities
// --------------------------------------------------------------------------
prontera,155,181,4      duplicate(Costume Clown)        Costume Clown#1 715

 

i tried in a similar way as it is done in pvp no donate but i couldn't

// -------------------------------------------------------------------------------
//      Script Name : Headgear to Costume converter >> Costume to Headgear converter
// -------------------------------------------------------------------------------
// Description :
// - Allows a user to convert the equipped headgear (on Top, Mid or Low) into a
//   costume item. It will remove any card and refine of the Item.
// - Allows a user to restore the equipped costume headgear (on Top, Mid or Low)
     into its original form. It will not return any card or refine of the item.
// -------------------------------------------------------------------------------
-       script  Costume Clown   -1,{
      
setarray .@nocostume[0],1166,2527,1420,2115,1420,2133,1421,2133,1422,2133,1428,2115,1472,2677,1472,2711,1473,2677,1473,2711,1474,2527,1477,2700,1479,2700,1535,4361,1572,2716,2717,1573,2334,1573,2372,2717,1615,18539,1616,2515,1618,2509,1618,2535,1620,2509,1620,2535,1629,5045,1631,2129,1636,18539,1723,2718,1730,1752,1731,1754,1732,1756,1733,1755,1734,1753,1741,2748,2001,2677,2001,2711,2109,2717,2239,2114,2353,5122,2115,2353,5124,8077,2353,5124,2115,2353,8096,8077,2353,8096,2116,2355,2420,2521,5125,2121,2717,2239,2123,2701,2124,2702,2135,2426,2137,2353,5124,2269,5768,2270,5768,2278,18656,2281,18656,2286,18539,2312,2656,2313,2656,2337,2654,2339,2522,2339,2523,2353,2417,2516,2353,2418,2517,2353,5123,2353,5493,2354,2419,2520,5128,2357,2421,2524,5171,2358,5153,2359,2654,2369,2428,2533,5306,2371,2522,2371,2523,2374,2729,2375,2729,2376,2435,2538,2377,2435,2538,2378,2435,2538,2379,2436,2539,2380,2436,2539,2381,2436,2539,2382,2437,2540,2387,2440,2744,2387,2440,28431,2390,2749,2394,2444,2549,2399,2553,2408,2655,2424,2528,2425,2529,2425,2530,2425,2551,2433,2537,2434,2529,2434,2530,2434,2551,2441,2546,2518,2648,2649,5126,2519,2650,2651,5127,2527,13001,2607,2677,2607,2711,2607,2786,2608,2677,2608,2711,2608,2786,2620,2746,2620,2747,2626,2677,2626,2711,2626,2786,2678,2679,2679,2792,2720,2772,2721,2772,2722,2772,2723,2772,2724,2772,2725,2772,2726,2727,2733,2772,2777,2778,5479,2779,2780,5482,2779,2780,5577,4001,4197,4006,4266,4009,4179,4014,4306,4021,4211,4025,4222,4028,4296,4029,4183,4031,4161,4036,4186,4233,4281,4343,4039,4210,4230,4257,4348,4074,4162,4090,4212,4328,4106,4248,4127,4166,4153,4247,4273,4168,4169,4172,4210,4230,4257,4272,4178,4199,4234,4252,4297,4178,4234,4252,4297,4381,4185,4217,4280,4293,4312,4185,4293,4312,4332,4186,4206,4233,4281,4321,4191,4208,4258,4309,4325,4327,4193,4294,4208,4258,4325,4327,4382,4218,4269,4220,4246,4311,4319,4331,4229,4244,4299,4313,4237,4238,4268,4277,4311,4319,4331,4371,4323,4324,4435,4436,5040,5442,5068,5653,5074,5653,5086,18656,5176,18656,5206,5768,5358,5653,5359,5657,5401,5653,5470,5653,13034,13035,18507,18539,5007,18913,19038,19039;
for(set @i,0;@i < getarraysize(.@nocostume);set @i,@i+1){
if(countitem(.@nocostume[@i]) >= 1){close;}

        mes "[Clown]";
        mes "Here you can convert your headgears into a Costume Headgear or restore to its Original form.";
        switch(select("I want to convert.:I want to restore.:No thanks.")) {
        case 1:
                        next;
                        mes "Please, select what to convert.";
                        mes "Remember, cards and refine will be removed.";
                        next;
                                setarray .@Position$[1],"Top","Mid","Low";
                                setarray .@Position[1],     1,    9,   10;
                                set .@Menu$,"";
                        for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
                        {
                                if( getequipisequiped(.@Position[.@i]) )
                                set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
                                set .@Menu$, .@Menu$ + ":";
                        }
                        set .@Part, .@Position[ select(.@Menu$) ];
                        if( !getequipisequiped(.@Part) )
                        {
                                mes "[Clown]";
                                mes "Your not wearing anything there...";
                                close;
                        }
                        mes "[Clown]";
                        mes "You want to Costume your " + getitemname(getequipid(.@Part)) + "?";
                        next;
                        if( select("Yes, proceed:No, I am sorry.") == 2 )
                        {
                                mes "[Clown]";
                                mes "Need some time to think about it, huh?";
                                mes "Alright, I can understand.";
                                close;
                        }
			if(countitem(7227) >= 100) {

				delitem 7227, 100;
                        	costume .@Part; // Convert the Headgear
                        	mes "[Clown]";
                        	mes "Done, enjoy your costume headgear.";
                      		close;
			mes “[Clown]”;
			mes Im sorry but you only have “+countitem(7227)+”TCG Cards.”;
			mes You need at least 100 TCG cards to convert your headgear.";
			close;
			}
        case 2:	
                        next;
                        mes "Please, select what to restore.";
                        mes "Remember, I will only restore it back without refine and cards.";
                        next;
                                setarray .@Position$[1],"Top","Mid","Low";
                                setarray .@Position[1],     13,    12,   11;
                                set .@Menu$,"";
                        for( set .@i, 1; .@i < 5; set .@i, .@i + 1 )
                        {
                                if( getequipisequiped(.@Position[.@i]) )
                                set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
                                set .@Menu$, .@Menu$ + ":";
                        }
                        set .@Part, .@Position[ select(.@Menu$) ];
                        if( !getequipisequiped(.@Part) )
                        {
                                mes "[Clown]";
                                mes "Your not wearing anything there...";
                                close;
                        }
                        mes "[Clown]";
                        mes "You want to restore your " + getitemname(getequipid(.@Part)) + "?";
                        next;
                        if( select("Yes, proceed:No, I am sorry.") == 2 )
                        {
                                mes "[Clown]";
                                mes "Need some time to think about it, huh?";
                                mes "Alright, I can understand.";
                                close;
                        }
                        a = getequipid(.@Part);                
                        delitem a,1;
                        getitem a,1;
                       
                        mes "[Clown]";
                        mes "Done, enjoy your restored headgear.";
                        close;
        case 3:
                mes "[Clown]";
                mes "Very well. Return at once if you seek my services.";
                close;
        }
}
// --------------------------------------------------------------------------
// Use duplicates to put your npc on different cities
// --------------------------------------------------------------------------
prontera,155,181,4      duplicate(Costume Clown)        Costume Clown#1 715

 

Edited by rickyzinhx
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  70
  • Reputation:   0
  • Joined:  06/19/18
  • Last Seen:  

You will need an npc and also edit your source code for this

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  51
  • Reputation:   3
  • Joined:  08/01/12
  • Last Seen:  

can you help me create? i need this very urgently ?

Link to comment
Share on other sites

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.

×
×
  • Create New...