Jump to content
  • 0
Sign in to follow this  
koji42

Pods - Cashpoints Convertion.

Question

Hi I got this script from my friend. Its current set to 1:1 ratio for converting PoDs to Cashpoints and vice versa.

Could you help to make it 20 Cash Points = 1 PoDs and 1 PoDs = 20 Cash points.

 

prontera,163,169,5	script	Donation Manager	871,{		//,677	set .@coinid,7179;	mes "[^0000FFDonation Manager^000000]";	mes "Hi ^ff8800"+strcharinfo(0)+"^000000,";	mes "Donation Item(s) are in the Cash Shop";	mes "~ PODS into Cash Points";	mes "Cash Points: [^ff0000"+#CASHPOINTS+"^000000]";		switch(select("^ff0000>^000000 Cancel:^0000ff>^000000 Exchange to Cash Points:^0000ff>^000000 Exchange to PODS")) {		case 1: break;		case 2:			next;			mes "[^0000FFDonation Manager^000000]";			mes "Please input the amount of Proof of Donations you want to exchange.";			mes "Note: Put ^0000ff0^000000 to exit.";						L_inpcoin:				input @hcoins;				set @hhcoins,@hcoins;				if(@hhcoins == 0) {					break;				}								if(countitem(.@coinid) < @hhcoins) {					mes "* ^ff0000Please input a valid amount^000000";					mes "(Put ^0000ff0^000000 to exit).";					goto L_inpcoin;				}				next;						delitem .@coinid,@hhcoins;			set #CASHPOINTS,#CASHPOINTS+@hhcoins;			mes "[^0000FFDonation Manager^000000]";			mes "You've exchanged (^ff0000"+@hhcoins+"^000000) "+getitemname(.@coinid)+"(s). Total Cash Points: [^0000ff"+#CASHPOINTS+"^000000]";			dispbottom "[Cash Trader] You've exchanged ("+@hhcoins+") "+getitemname(.@coinid)+"(s). Total Cash Points: ["+#CASHPOINTS+"]";			break;				case 3:		next;		mes "[^0000FFDonation Manager^000000]";		mes "Please input the amount of cash that you want to exchange.";		mes "Note: Put ^0000ff0^000000 to exit.";			L_inpcash:			input @hcash;			set @hhcash,@hcash;			if(@hhcash == 0) {				break;			}						if(#CASHPOINTS < @hhcash) {				mes "* ^ff0000Please input a valid amount^000000";				mes "(Put ^0000ff0^000000 to exit).";				goto L_inpcash;			}				//I know they weight 0 but just in case you change its weight		if (!checkweight(.@coinid,@hhcash)) {			mes "* ^ff0000You're overweight please store some items.^000000";			dispbottom "[Cash Trader] You're overweight please store some items.";			break;		}		next;				set #CASHPOINTS,#CASHPOINTS - @hhcash;		getitem .@coinid,@hhcash;				mes "[^0000FFDonation Manager^000000]";		mes "You've exchanged (^ff0000"+@hhcash+"^000000) Cash Points to "+getitemname(.@coinid)+"(s). Total Cash Points: [^0000ff"+#CASHPOINTS+"^000000]";		dispbottom "[Cash Trader] You've exchanged ("+@hhcash+") Cash Points to "+getitemname(.@coinid)+"(s). Total Cash Points: ["+#CASHPOINTS+"]";		break;	}		close;}
Edited by koji42
Codeboxed.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Sure thing; you can adjust the rate by editing the value for the .rate variable in the configuration.

 

	/*-----------------------------------------------------	Configuration	-----------------------------------------------------*/	OnInit:		.npc_name$ = "[^0000FFDonation Manager^000000]";		.rate = 20;		// Exchange rate (1 Cash Point * rate = total PoDs)		.pod_id = 7179;	// Proof of Donation item ID		.pod_name$ = getitemname(.pod_id) +"(s)";	// Proof of Donation item name		.points_name$ = "Cash Point(s)";			// Points name		.points_var$ = "#CASHPOINTS";				// Points variable

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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