I created an exchanger for my Fishing System. Basically I want to exchange the fishes for receipts. Here's the script I made.
- script fishvendor -1,{
mes "[Fish Vendor]";
mes "Hi there, if you went fishing, I can buy your rare catch!";
next;
mes "[Fish Vendor]";
mes "If you caught a Shark, Whale, or Octopus, I can give you 10 Fish Market Receipt for each of them";
next;
mes "Here's the list of the fishes I want to buy";switch(select("10x Eel:10x Tuna:10x Squid:10x Carp:5x Marlin:5x Starfish:5x Giant Squid:5x Crab:5x Snapper:5x Piranha:5x Salmon:5x Mackerel:5x Crucian Carp:1x Whale:1x Octopus:1x Shark")){case1:// eel
next;if(countitem(32189)<10){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Eels with you"; close;}
delitem 32189,10;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case2://tuna
next;if(countitem(32195)<10){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Tuna with you"; close;}
delitem 32195,10;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case3://squid
next;if(countitem(32191)<10){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Squid with you"; close;}
delitem 32191,10;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case4://carp
next;if(countitem(32190)<10){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Carp with you"; close;}
delitem 32190,10;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case5://marlin
next;if(countitem(32180)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Marlin with you"; close;}
delitem 32180,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case6://starfish
next;if(countitem(32181)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Starfish with you"; close;}
delitem 32181,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case7://giant squid
next;if(countitem(32182)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Giant Squid with you"; close;}
delitem 32182,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case8://crab
next;if(countitem(32183)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Crab with you"; close;}
delitem 32183,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case9://snapper
next;if(countitem(32186)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Snapper with you"; close;}
delitem 32186,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case10://piranha
next;if(countitem(32187)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Piranha with you"; close;}
delitem 32187,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case11://Salmon
next;if(countitem(32188)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Salmon with you"; close;}
delitem 32188,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case12://Mackerel
next;if(countitem(32192)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Mackerel with you"; close;}
delitem 32192,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case13://Crucian Carp
next;if(countitem(32193)<5){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Crucian Carp with you"; close;}
delitem 32193,5;
getitem 32196,1;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case14://Whale
next;if(countitem(32184)<1){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Whale with you"; close;}
delitem 32184,1;
getitem 32196,10;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case15://Octopus
next;if(countitem(32185)<1){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Octopus with you"; close;}
delitem 32185,1;
getitem 32196,10;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;case16://Shark
next;if(countitem(32194)<1){ mes "[Fish Vendor]"; mes "Sorry but you don't have enough Shark with you"; close;}
delitem 32194,1;
getitem 32196,10;
mes "[Fish Vendor]";
mes "Thanks! Here's your Fish Market Receipt!";
close;}}
jawaii,219,117,0 duplicate(fishvendor)FishVendor#dup1 49
Item ID 32196 is the receipt. Everything exchanges for 1 receipt except for the last 3 which is Shark, Whale and Octopus which exchanges to 10 receipts. Can anyone optimize it so that everytime I want to add a new fish to exchange, I won't go over editing a lot of lines. maybe an array or something?
Question
Fily
Hello,
I created an exchanger for my Fishing System. Basically I want to exchange the fishes for receipts. Here's the script I made.
Item ID 32196 is the receipt. Everything exchanges for 1 receipt except for the last 3 which is Shark, Whale and Octopus which exchanges to 10 receipts. Can anyone optimize it so that everytime I want to add a new fish to exchange, I won't go over editing a lot of lines. maybe an array or something?
Thanks guys.
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.