Advertisement
Guest User

Untitled

a guest
Oct 8th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.86 KB | None | 0 0
  1. // -------------------------------------------------------------------------------
  2. //  Script Name : Headgear to Costume converter >> Costume to Headgear converter
  3. // -------------------------------------------------------------------------------
  4. // Description :
  5. // - Allows a user to convert the equipped headgear (on Top, Mid or Low) into a
  6. //   costume item. It will remove any card and refine of the Item.
  7. // - Allows a user to restore the equipped costume headgear (on Top, Mid or Low)
  8. //     into its original form. It will not return any card or refine of the item.
  9. // -------------------------------------------------------------------------------
  10. -   script  Costume Clown   -1,{
  11.     mes "[Clown]";
  12.     mes "Here you can convert your headgears into a Costume Headgear or restore to its Original form.";
  13.     switch(select("I want to convert.:I want to restore.:No thanks.")) {
  14.     case 1:
  15.             next;
  16.             mes "Please, select what to convert.";
  17.             mes "Remember, cards and refine will be removed.";
  18.             next;
  19.                 setarray .@Position$[1],"Top","Mid","Low","Garment";
  20.                 setarray .@Position[1],     EQI_HEAD_TOP,    EQI_HEAD_MID,   EQI_HEAD_LOW, EQI_GARMENT;
  21.                 set .@Menu$,"";
  22.             for( set .@i, 1; .@i < 6; set .@i, .@i + 1 )
  23.             {
  24.                 if( getequipisequiped(.@Position[.@i]) )
  25.                 set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
  26.                 set .@Menu$, .@Menu$ + ":";
  27.             }
  28.             set .@Part, .@Position[ select(.@Menu$) ];
  29.             if( !getequipisequiped(.@Part) )
  30.             {
  31.                 mes "[Clown]";
  32.                 mes "You are not wearing anything there.";
  33.                 close;
  34.             }
  35.             mes "[Clown]";
  36.             mes "You want to Costume your " + getitemname(getequipid(.@Part)) + "?";
  37.             next;
  38.             if( select("Yes, proceed:No, I am sorry.") == 2 )
  39.             {
  40.                 mes "[Clown]";
  41.                 mes "Need some time to think about it, huh?";
  42.                 mes "Alright, I can understand.";
  43.                 close;
  44.             }
  45.             if( countitem(7227) >= 10 ) {
  46.                 delitem 7227,10; // remove 10 tcg cards
  47.                 costume .@Part; // Convert the Headgear
  48.                 mes "[Clown]";
  49.                 mes "Done, enjoy your costume headgear.";              
  50.             } else {
  51.                 mes "You need "+ getitemname(7227) +" 10x";
  52.             }
  53.             close;
  54.     case 2:
  55.             next;
  56.             mes "Please, select what to restore.";
  57.             mes "Remember, I will only restore it back without refine and cards.";
  58.             next;
  59.                 setarray .@Position$[1],"Top","Mid","Low", "Garment";
  60.                 setarray .@Position[1], EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW, EQI_COSTUME_GARMENT;
  61.                 set .@Menu$,"";
  62.             for( set .@i, 1; .@i < 6; set .@i, .@i + 1 )
  63.             {
  64.                 if( getequipisequiped(.@Position[.@i]) )
  65.                 set .@Menu$, .@Menu$ + .@Position$[.@i] + "-" + "[" + getequipname(.@Position[.@i]) + "]";
  66.                 set .@Menu$, .@Menu$ + ":";
  67.             }
  68.             set .@Part, .@Position[ select(.@Menu$) ];
  69.             if( !getequipisequiped(.@Part) )
  70.             {
  71.                 mes "[Clown]";
  72.                 mes "You are not wearing anything there.";
  73.                 close;
  74.             }
  75.             mes "[Clown]";
  76.             mes "You want to restore your " + getitemname(getequipid(.@Part)) + "?";
  77.             next;
  78.             if( select("Yes, proceed:No, I am sorry.") == 2 )
  79.             {
  80.                 mes "[Clown]";
  81.                 mes "Need some time to think about it, huh?";
  82.                 mes "Alright, I can understand.";
  83.                 close;
  84.             }
  85.             if( countitem(7227) >= 10 ) {
  86.                 .@a = getequipid(.@Part);          
  87.                 delitem .@a,1;
  88.                 getitem .@a,1;             
  89.                 delitem 7227,10; // remove 10 tcg cards
  90.                 costume .@Part; // Convert the Headgear
  91.                 mes "[Clown]";
  92.                 mes "Done, enjoy your restored headgear.";             
  93.             } else {
  94.                 mes "You need "+ getitemname(7227) +" 10x";
  95.             }
  96.             close;
  97.     case 3:
  98.         mes "[Clown]";
  99.         mes "Very well. Return at once if you seek my services.";
  100.         close;
  101.     }
  102. }
  103. // --------------------------------------------------------------------------
  104. // Use duplicates to put your npc on different cities
  105. // --------------------------------------------------------------------------
  106. prontera,155,181,4  duplicate(Costume Clown)    Costume Clown#1 715
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement