Jump to content
Famous

Trush Bank NPC request

Recommended Posts

//===== 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 [email protected];

next;

set .CPoints,[email protected]*.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,[email protected];

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 [email protected];

next;

set .CPoints,[email protected]*.CP2TCG;

if(countitem(7227) < [email protected])

{

mes .NPCName$;

mes "Sorry, you don't have enough TCG of this transaction!";

close;

}

set #Cashpoints,#Cashpoints+.CPoints;

delitem 7227,[email protected];

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 [email protected];

next;

if(#Cashpoints < [email protected])

{

mes .NPCName$;

mes "Sorry, you don't have enough cash points for this transaction!";

close;

}

set .amount,.Zen2CP*[email protected];

set zeny,zeny+.amount;

set #Cashpoints,#[email protected];

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 [email protected];

next;

if(zeny < [email protected]+.Zen2CP)

{

mes .NPCName$;

mes "Sorry, you don't have enough Zeny of this transaction!";

close;

}

set zeny,[email protected]*.Zen2CP;

set #Cashpoints,#[email protected];

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 [email protected];

next;

if(countitem(7227) < [email protected])

{

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*[email protected];

set zeny,zeny+.camount;

delitem 7227,[email protected];

close;

case 2:

mes .NPCName$;

mes "How many TCG will you change?";

input [email protected];

next;

if(zeny < [email protected]+.convtZen)

{

mes .NPCName$;

mes "Sorry, you don't have enough Cash Points of this transaction!";

close;

}

set .camount,.Zen2TCG*[email protected];

set zeny,zeny-.camount;

getitem 7227,[email protected];

close;

}

}

How to make it like this

10 Cashpoints = 100m

1000 TCG = 1Cashpoints

100000000zeny = 1 TCG

1000TCG = 100m

Link to comment
Share on other sites

23136661.jpg

I got this error

Add a " after Cancel.

switch(select("Cashpoints to Zeny: TCG to Cashpoint:Zeny to TCG:TCG to Zeny: Cancel")) {

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.