Jump to content
  • 0

Castle Drop Exchanger


Question

Posted

Hello can anyone make me a npc script which trades any castle drop to another castle drop. for example, billow can be trade to ripple or even vice versa. when exchanging castle drops i want the script to be payed (zeny) before the process of exchanging. And also can anyone make me a hokage collector, which trades hokage hat to hokage sunglasses or even vice versa, Thank you to whoever will make me one. !! :)) More power rAthena!

3 answers to this question

Recommended Posts

  • 1
Posted (edited)

this script can only be written using advance scripting techniques

prontera,155,186,5    script    kjdhfksjfhs    100,{
   mes "require "+ .req_zeny +" zeny";
   next;
   if ( zeny < .req_zeny ) {
       mes "you don't have enough zeny";
       close;
   }
   getinventorylist;
   for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
       if ( compare( .itemidcompare$, ":"+ @inventorylist_id[.@i] +":" ) ) {
           .@menu$ = .@menu$ + getitemname( @inventorylist_id[.@i] ) +":";
           .@select[ .@c ] = @inventorylist_id[.@i];
           .@c++;
       }
   }
   if ( .@c == 0 ) {
       mes "you don't have require headgear in your inventory";
       close;
   }
   .@pickid = .@select[ select( .@menu$ ) -1 ];
   mes "picked : "+ getitemname( .@pickid );
   next;
   .@menu$ = getitemname( .itemid );
   for ( .@i = 1; .@i < .itemidsize; .@i++ )
       .@menu$ = .@menu$ +":"+ getitemname( .itemid[.@i] );
   .@buyid = .itemid[ select( .@menu$ ) -1 ];
   mes "are you sure you want to spend "+ .req_zeny +" zeny";
   mes "trade "+ getitemname( .@pickid ) +" into "+ getitemname( .@buyid ) +"?";
   next;
   if ( select ( "Yes", "No" ) == 2 ) close;
   if ( countitem( .@pickid ) == 0 || zeny < .req_zeny ) {
       mes "don't cheat by sending mail away !";
       close;
   }
   delitem .@pickid, 1;
   getitem .@buyid, 1;
   zeny = zeny - .req_zeny;
   mes "traded successfully";
   close;
OnInit:
   .req_zeny = 10000; // zeny requirement
   setarray .itemid, 5001, 5002, 5003, 5004, 5005, 5006; // put all your headgear in this list

   set .itemidsize, getarraysize( .itemid );
   set .itemidcompare$, ":"+ .itemid[0];
   for ( .@i = 1; .@i < .itemidsize; .@i++ )
       .itemidcompare$ = .itemidcompare$ +":"+ .itemid[.@i] +":";
   end;
}

EDIT: search key word = item exchanger

Edited by AnnieRuru
  • Upvote 1
Posted

They can't sell. They can exchange their castle drops to another castle drops. but before the exchange process. the npc must be payed (zeny)

For example : i have billow here. Then i want to exchange it to ripple. I can use the npc and exchange my billow to ripple but i must pay for example 50 million zeny for it to be exchanged. Sorry for my bad english

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...