Famous Posted August 21, 2012 Group: Members Topic Count: 145 Topics Per Day: 0.03 Content Count: 455 Reputation: 3 Joined: 06/19/12 Last Seen: February 26, 2018 Share Posted August 21, 2012 //===== eAthena Script =======================================//= TCGCashManager //===== By: ================================================== //= nostafu //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= eAthena SVN //= 3CeAM //===== Description: ========================================= //= Converts between Zeny, Cash Point, and TCG //===== Additional Comments: ================================= //= 1.0 Initial Release //===== Credits: ============================================= //= nostafu //============================================================ prontera,244,61,4 script Trust Bank 790,{ set .NPCName$,"[Marvin]"; // NPC Name set .CP2TCG,1000; // Convertion of Cash Points to TCG (Default:100) set .Zen2CP,10000000; // Convertion of Zeny to Cash Points (Default:10000000) set .Zen2TCG,1000000000; // Convertion of Zeny to Cash POints (Default:1000000000) mes .NPCName$; mes "Hello, what can I do for you today?"; mes "Convertion Rate:"; mes "^FF0000"+.CP2TCG+"^000000 Cash Points = 1000 TCG"; mes "^FF0000"+.Zen2CP+"^000000 Zeny = 1000 Cash Point"; mes "^FF0000"+.Zen2TCG+"^000000 Zeny = 1000 TCG"; next; menu "Cash - TCG",CTCG,"Cash - Zeny",CZeny,"TCG - Zeny",TZeny,"View Cash Points",-; mes ".NPCName$"; mes "You currently have ^ff0000"+#Cashpoints+"^000000 Cash Points in your account"; close; CTCG: mes .NPCName$; mes "What kind of convertion would you like to make?"; next; switch(select("Cash -> TCG:TCG -> Cash")) { case 1: mes .NPCName$; mes "How may TCG(s) do you want to exchange?"; input .@num; next; set .CPoints,.@num*.CP2TCG; if(#CASHPOINTS < .CPoints) { mes .NPCName$; mes "Sorry, you don't have enough cash points for this transaction!"; close; } set #CASHPOINTS,#CASHPOINTS-.CPoints; getitem 7227,.@num; mes .NPCName$; mes "You currently have ^ff0000"+#Cashpoints+"^000000 Cash Points in your account"; close; case 2: mes .NPCName$; mes "How many TCG(s) will you change?"; input .@num; next; set .CPoints,.@num*.CP2TCG; if(countitem(7227) < .@num) { mes .NPCName$; mes "Sorry, you don't have enough TCG of this transaction!"; close; } set #Cashpoints,#Cashpoints+.CPoints; delitem 7227,.@num; mes .NPCName$; mes "You currently have ^ff0000"+#Cashpoints+"^000000 Cash Points in your account"; close; } CZeny: mes .NPCName$; mes "What kind of convertion would you like to do?"; next; switch(select("Cash -> Zeny:Zeny -> Cash")) { case 1: mes .NPCName$; mes "How may Cash Points do you want to exchange?"; input .@num; next; if(#Cashpoints < .@num) { mes .NPCName$; mes "Sorry, you don't have enough cash points for this transaction!"; close; } set .amount,.Zen2CP*.@num; set zeny,zeny+.amount; set #Cashpoints,#Cashpoints-.@num; mes .NPCName$; mes "You currently have ^ff0000"+#Cashpoints+"^000000 Cash Points in your account"; close; case 2: mes .NPCName$; mes "How many Cash Points will you change?"; input .@num; next; if(zeny < .@num+.Zen2CP) { mes .NPCName$; mes "Sorry, you don't have enough Zeny of this transaction!"; close; } set zeny,zeny-.@num*.Zen2CP; set #Cashpoints,#Cashpoints+.@num; mes .NPCName$; mes "You currently have ^ff0000"+#Cashpoints+"^000000 Cash Points in your account"; close; } TZeny: mes .NPCName$; mes "What kind of convertion would you like to do?"; next; switch(select("TCG -> Zeny:Zeny -> TCG")) { case 1: mes .NPCName$; mes "How may TCG do you want to exchange?"; input .@num; next; if(countitem(7227) < .@num) { mes .NPCName$; mes "Sorry, you don't have enough TCG for this transaction!"; close; } if(zeny !=0) { mes .NPCName$; mes "Make sure you didn't bring any zeny! You might end up dropping them everywhere!"; close; } set .camount,.Zen2TCG*.@num; set zeny,zeny+.camount; delitem 7227,.@num; close; case 2: mes .NPCName$; mes "How many TCG will you change?"; input .@num; next; if(zeny < .@num+.convtZen) { mes .NPCName$; mes "Sorry, you don't have enough Cash Points of this transaction!"; close; } set .camount,.Zen2TCG*.@num; set zeny,zeny-.camount; getitem 7227,.@num; close; } } How to make it like this 10 Cashpoints = 100m 1000 TCG = 1Cashpoints 100000000zeny = 1 TCG 1000TCG = 100m Quote Link to comment Share on other sites More sharing options...
Nipsino Posted August 21, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 218 Reputation: 16 Joined: 01/24/12 Last Seen: May 24, 2015 Share Posted August 21, 2012 You can try this. ;o conversion.txt Quote Link to comment Share on other sites More sharing options...
Famous Posted August 21, 2012 Group: Members Topic Count: 145 Topics Per Day: 0.03 Content Count: 455 Reputation: 3 Joined: 06/19/12 Last Seen: February 26, 2018 Author Share Posted August 21, 2012 I got this error Quote Link to comment Share on other sites More sharing options...
Nipsino Posted August 21, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 218 Reputation: 16 Joined: 01/24/12 Last Seen: May 24, 2015 Share Posted August 21, 2012 I got this error Add a " after Cancel. switch(select("Cashpoints to Zeny: TCG to Cashpoint:Zeny to TCG:TCG to Zeny: Cancel")) { 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.