Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- make sure you loaded the "extra_function.txt" before use this NPC.
- */
- - shop card_merge_shop -1,909:100
- prontera,155,175,5 script Card Recycle#card 563,{
- do{
- mes "Pick an option";
- mes " ";
- .@option = select( "merge "+.card_count+" card","information" );
- if( .@option == 1 ){
- if( Zeny < .zeny_cost ){
- mes "You need ^FF0000"+.zeny_cost+" zeny^000000 per merge.";
- close;
- }
- if( npcshopattach( .shop_npc_name$ ) ){
- deletearray @sold_nameid;
- mes "Put ^FF0000 "+.card_count+" x Different Card^000000 into the window.";
- callshop .shop_npc_name$,2;
- end;
- }
- }
- else{
- mes "You need to give ";
- mes " ^FF0000"+.card_count+" Monster Card + "+.zeny_cost+" Zeny^000000";
- mes "to get a New Card each time.";
- next;
- }
- }while( .@option == 2 );
- close;
- OnSellItem:
- .@sold_size = getarraysize( @sold_nameid );
- if( .@sold_size == .card_count ){
- mes "^0055FF[Card Checking]^000000";
- for( .@i = 0; .@i < .@sold_size; .@i++ ){
- if( compare( .forbidden_card$,"|"+@sold_nameid[.@i]+"|" ) ){
- mes " ~ "+getitemname( @sold_nameid[.@i] )+"^000000 cant be used.";
- close;
- }
- .@item_type[.@i] = getiteminfo( @sold_nameid[.@i],2 );
- .@not_valid = ( .@item_type[.@i] != IT_CARD || @sold_nameid[.@i] < .card_id_range[0] || @sold_nameid[.@i] > .card_id_range[1] );
- mes " ~ "+getitemname( @sold_nameid[.@i] )+"^000000 is "+( ( .@not_valid )?"^FF0000NOT":"a" )+" Card^000000.";
- if( .@not_valid ) .@failed++;
- }
- if( !.@failed ){
- mes " ";
- mes "Confirm to exchange these "+.card_count+" Cards into a NEW Card ??";
- next;
- if( select( "YES","No" ) == 1 ){
- Zeny -= .zeny_cost;
- for( .@i = 0; .@i < .@sold_size; .@i++ )
- delitem @sold_nameid[.@i],1;
- mes "Rolling a new card.....";
- for( .@i = 0; .@i < 25 ; .@i++ ){
- if( .@i == 20 )
- mes "^777777-- stopping --^000000";
- cutin card_illust( rand( .card_id_range[0],.card_id_range[1] ) ),4;
- sleep2 ( .@i * 25 + 100 );
- }
- do{
- .@new_card = rand( .card_id_range[0],.card_id_range[1] );
- }while( compare( .forbidden_card$,"|"+.@new_card+"|" ) );
- cutin card_illust( .@new_card ),4;
- mes " ";
- mes "Gained a New Card: ";
- mes " ~ ^0055FF"+getitemname( .@new_card )+"^000000";
- getitem .@new_card,1;
- }
- }
- }
- else{
- mes "Make sure you input ^FF0000 "+.card_count+" Different Card^000000.";
- }
- close2;
- cutin "",255;
- end;
- OnInit:
- // how many card requried to change to 1 New card
- .card_count = 2;
- // zeny required for this process.
- .zeny_cost = 10000;
- // list of card that cant be used to exchange/get.
- .forbidden_card$ = "|4142|4003|4069|";
- // current card id range.
- setarray .card_id_range,4001,4500;
- .shop_npc_name$ = "card_merge_shop";
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement