Jump to content
  • 0

stat seller NPC cost per stat points


AinsLord

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

Hi i just wanted to know how to make this like 5TCGS = 10Statpoints??

	set .@SellStatPOD, 30;		//Stat Points per 1 POD
	set .@SellStatTCG, 10;		//Stat Points per 1 TCG
	set .@PODid, 7179;			//POD item id
	set .@TCGid, 7227;			//TCG item id
	set .@MaxStat, 2000;		//Maximum Stat Points allowed to sell

	mes "Hi ^FF0000"+strcharinfo(0)+"^000000!";
	mes "Do you wish to buy Stat points?";
	mes "1 POD = "+.@SellStatPOD+" stat points";
	mes "5 TCG = "+.@SellStatTCG+" stat points"; // for this line
	mes "Maximum stat points can be purchase is "+.@MaxStat+".";
	switch(select(" ~ Yes, using PODs: ~ Yes, using TCGs: ~ No")) {
		case 1:
			mes "How many PODs do you wish to exchange for stat points?";
			input .@amount;
			if (countitem(.@PODid) < .@amount) {
				mes "Sorry, but don't have enough PODs in your inventory.";
				mes " Please come back when you have enough.";
				close;
			}
			else {
				set .@StatToBe, StatBought+(.@amount*.@SellStatPOD);
				if (.@MaxStat < .@StatToBe) {
					mes "Sorry, but you're about to reach the max stat points that can be bought.";
					mes "You have already purchase "+StatBought+" stat points.";
					close;
				}
				else {
					mes "Here you go!";
					mes "Please use your stat point wisely.";
					set StatusPoint, StatusPoint+(.@amount*.@SellStatPOD);
					set StatBought, StatBought+(.@amount*.@SellStatPOD);
					delitem .@PODid[.@StatBought],.@amount;
					close;
				}
			}
		case 2:
			mes "How many TCGs do you wish to exchange for stat points?";
			input .@amount;
			if (countitem(.@TCGid) < .@amount) {
				mes "Sorry, but don't have enough TCGs in your inventory.";
				mes " Please come back when you have enough.";
				close;
			}
			else {
				set .@StatToBe, StatBought+(.@amount*.@SellStatTCG);
				if (.@MaxStat < .@StatToBe) {
					mes "Sorry, but you're about to reach the max stat points that can be bought.";
					mes "You have already purchase "+StatBought+" stat points.";
					close;
				}
				else {
					mes "Here you go!";
					mes "Please use your stat point wisely.";
					set StatusPoint, StatusPoint+(.@amount*.@SellStatTCG);
					set StatBought, StatBought+(.@amount*.@SellStatTCG);
					delitem .@TCGid[.@StatBought],.@amount;
					close;
				}
			}
		case 3:
			mes "I understand, Please come back to me whenever you change your mind.";
			close;
	}
OnInit:
waitingroom " Stat Seller",0;
end;
}

thanks in advance ❤️

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

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

Guest
Answer this question...

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