ocelote Posted January 2, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 52 Reputation: 7 Joined: 01/02/12 Last Seen: July 3, 2015 Share Posted January 2, 2012 (edited) Hi all. I want to show you my version of Exchanger. Sorry for my English, and thx for Google Translate In the next version, I want to make an exchange Kafra Points to TCG Card, Cash Point's to Kafra Points and Kafra Point's to Cash point's. And I want to make a purchase TCG Card,Cash Point's, Kafra Points. If you have any suggestions/ wishes.write here. This npc can exchange Cash Points to TCG Card, TCG Card to Cash points, TCG Card to Kafra Points set .cash_tcg,1; 0 : Disable, 1 : enable ; Enable/Disable exchange Cash Point's to TCG Card. set .tcg_cash,1; //| 0 : Disable, 1 : enable ; Enable/Disable exchange TCG Card to Cash Point's. set .tcg_kafra,1; //| 0 : Disable, 1 : enable ; Enable/Disable exchange TCG Card to Kafra Point's. //by shushei//for all //1.0 versionmap,x,y,6 script name sprite,{//---------------------------------------------------------------------------------------------------//set @cost_trade,500; //| Cost for trade;------------------------------------////----------------------------------------------|----------------------------------------------------//set .@npc$, "^0000FF[NPC :: Trader]^000000"; //| Name of NPC;---------------------------------------////----------------------------------------Trades func:-----------------------------------------------//set .cash_tcg,1; //| 0 : Disable, 1 : enable ;--------------------------////----------------------------------------------|----------------------------------------------------//set .tcg_cash,1; //| 0 : Disable, 1 : enable ;--------------------------////----------------------------------------------|----------------------------------------------------//set .tcg_kafra,1; //| 0 : Disable, 1 : enable ;--------------------------////---------------------------------------------------------------------------------------------------// mes .@npc$; mes "What you want exchange"; next; switch(select("Exchange ^0000FF["+#CASHPOINTS+" CASH/"+#KAFRAPOINTS+" KAFRA/"+countitem(7227)+" TCG]^000000","Exit")){ case 1: mes .@npc$; mes "For exchange you need:"; mes "^ff0000•^000000 ^0000FF"+@cost_trade+" z.^000000"; next; if(zeny<@cost_trade){ mes .@npc$; mes "^ff0000»^000000 ^0000FFI need ^FF0000"+@cost_trade+" z.But you do not have this. ^000000"; close; } else { mes .@npc$; mes "Okay."; next; switch(select(" TCG›Cash point : TCG›Kafra point : Cash point›TCG")){ case 1: if(.tcg_cash){ callfunc "trade_tcgcash"; dispbottom "You exchange "+@tcg+" TCG Card.And now you have "+#CASHPOINTS+" Cash Points"; close; }else{ mes .@npc$; mes "Function is disabled"; close;} case 2: if(.tcg_kafra){ callfunc "trade_tcgkafra"; dispbottom "You exchange "+@tcg+" TCG Card.And now you have "+#KAFRAPOINTS+" Kafra Points"; close; }else{ mes .@npc$; mes "Function is disabled"; close; } case 3: if(.cash_tcg){ callfunc "trade_cashtcg"; dispbottom "Now you have "+countitem(7227)+" Tcg Card"; dispbottom "And "+#CASHPOINTS+" Cash Point's"; close; }else{ mes .@npc$; mes "Function is disabled."; close; } } } case 2: mes .@npc$; mes "Good Luck."; close; }} function script trade_tcgcash { mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "1 ^0000FFTCG Card^000000 = 10 ^FF0000Cash Point's^000000"; next; mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "enter the amount of exchange."; input @tcg; next; if(countitem(7227)<@tcg) { mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "^ff0000»^000000 ^0000FFI do not have a TCG Card^000000"; close;} delitem 7227,@tcg; set #CASHPOINTS,#CASHPOINTS+10*@tcg; return; } function script trade_tcgkafra { mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "1 ^0000FFTCG Card^000000 = 5 ^FF0000Kafra Point's^000000"; next; mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "enter the amount of exchange"; input @tcg; next; if(countitem(7227)<@tcg) { mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "^ff0000»^000000 ^0000FFI do not have a TCG Card^000000"; close;} delitem 7227,@tcg; set #KAFRAPOINTS,#KAFRAPOINTS+5*@tcg; return; } function script trade_cashtcg { mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "10 ^0000FFCash Point's^000000 = 1 ^FF0000TCG Card^000000"; next; mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "enter the amount TCG for exchange."; input @cash; next; if(#CASHPOINTS<@cash*10) { mes "^FF0000["+strcharinfo(0)+"]^000000"; mes "^ff0000»^000000 ^0000FFI do not have Cash Point's^000000"; close;} set #CASHPOINTS,#CASHPOINTS-@cash*10; getitem 7227,@cash; return; }[/CODebox] Edited January 2, 2012 by shushei Codebox'ed Quote Link to comment Share on other sites More sharing options...
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.