MyNoobScriptz Posted April 27, 2019 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 76 Reputation: 3 Joined: 05/01/15 Last Seen: Yesterday at 03:39 PM Share Posted April 27, 2019 hi rathena! i need npc to exchange +9item & 20item & 10item = item Ex this : +9Knife & 20Jellopy & 10Gold = Cotton shirt help me or guide me plz.. Quote Link to comment Share on other sites More sharing options...
0 KidoSang Posted April 28, 2019 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 24 Reputation: 3 Joined: 04/10/19 Last Seen: September 4, 2019 Share Posted April 28, 2019 (edited) On 4/27/2019 at 1:42 PM, rotloso said: hi rathena! i need npc to exchange +9item & 20item & 10item = item Ex this : +9Knife & 20Jellopy & 10Gold = Cotton shirt help me or guide me plz.. Fresh script that i just coded, you may try it. //===== rAthena Script ======================================= //= Exchange Shop //===== By: ================================================== //= KidoSang //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Simple Exchange Shop. //===== Additional Comments: ================================= //= 1.0 Initial script. //============================================================ prontera,156,182,4 script Exchange Shop 826,{ set .RefineItem,1201; //Refine item id set .RefineLevel,7; //Refine value setarray .OtherItem[0],909,20,969,10; //Adding other items for exchange set .Reward,512; //Reward mes "You need to give me"; .@checking = 0; if (!countitem2(.RefineItem,1,7,0,0,0,0,0)) { .@checking = 1; } mes "+"+.RefineLevel+" "+getitemname(.RefineItem)+" "+countitem2(.RefineItem,1,7,0,0,0,0,0)+"/1"; for(.@i=0; .@i < getarraysize(.OtherItem); set .@i,.@i+2){ if(countitem(.OtherItem[.@i]) < .OtherItem[.@i+1]){ .@checking = 1; } mes "~ "+.OtherItem[.@i+1]+" "+getitemname(.OtherItem[.@i])+" "+countitem(.OtherItem[.@i])+"/"+.OtherItem[.@i+1]; } mes "to exchange "+getitemname(.Reward); .@sel = select("Exchange Please!","No"); if(.@sel){ if(.@checking){ next; mes "Sorry you are missing some items"; }else{ next; mes "Done!"; delitem2(.RefineItem,1,1,7,0,0,0,0,0); for(.@i=0; .@i < getarraysize(.OtherItem); set .@i,.@i+2) delitem .OtherItem[.@i],.OtherItem[.@i+1]; getitem .Reward,1; } } end; } Edited April 28, 2019 by KidoSang Script have some issue so i change a new one Quote Link to comment Share on other sites More sharing options...
0 MyNoobScriptz Posted April 28, 2019 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 76 Reputation: 3 Joined: 05/01/15 Last Seen: Yesterday at 03:39 PM Author Share Posted April 28, 2019 2 hours ago, KidoSang said: Fresh script that i just coded, you may try it. //===== rAthena Script ======================================= //= Exchange Shop //===== By: ================================================== //= KidoSang //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Simple Exchange Shop. //===== Additional Comments: ================================= //= 1.0 Initial script. //============================================================ prontera,156,182,4 script Exchange Shop 826,{ set .RefineItem,1201; //Refine item id set .RefineLevel,7; //Refine value setarray .OtherItem[0],909,20,969,10; //Adding other items for exchange set .Reward,512; //Reward mes "You need to give me"; .@checking = 0; if (!countitem2(.RefineItem,1,7,0,0,0,0,0)) { .@checking = 1; } mes "+"+.RefineLevel+" "+getitemname(.RefineItem)+" "+countitem2(.RefineItem,1,7,0,0,0,0,0)+"/1"; for(.@i=0; .@i < getarraysize(.OtherItem); set .@i,.@i+2){ if(countitem(.OtherItem[.@i]) < .OtherItem[.@i+1]){ .@checking = 1; } mes "~ "+.OtherItem[.@i+1]+" "+getitemname(.OtherItem[.@i])+" "+countitem(.OtherItem[.@i])+"/"+.OtherItem[.@i+1]; } mes "to exchange "+getitemname(.Reward); .@sel = select("Exchange Please!","No"); if(.@sel){ if(.@checking){ next; mes "Sorry you are missing some items"; }else{ next; mes "Done!"; delitem2(.RefineItem,1,1,7,0,0,0,0,0); for(.@i=0; .@i < getarraysize(.OtherItem); set .@i,.@i+2) delitem .OtherItem[.@i],.OtherItem[.@i+1]; getitem .Reward,1; } } end; } Thx @KidoSang Quote Link to comment Share on other sites More sharing options...
Question
MyNoobScriptz
hi rathena! i need npc to exchange +9item & 20item & 10item = item
Ex this : +9Knife & 20Jellopy & 10Gold = Cotton shirt
help me or guide me plz..
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.