Jump to content
  • 0

100 Cashpoints to 10 pods


Question

Posted

can i request an npc that exchange 100 cashpoints to 10 donations pods/TCG card, i dont want the normal way like settting a cashshop and selling the pods on it. i just kinda want it to be unique =D thx in advanced

11 answers to this question

Recommended Posts

  • 1
Posted
prontera,155,155,4    script    Converter    83,{
   .@name$ ="[^FF0000Converter^000000]";

   mes .@name$;
   mes "Hello, 10 cashpoints is equals to 1 TCG.";
   mes "What would you like to do?";
   next;

   switch( select("Cash to TCG","TCG to Cash") ) {
       case 1:
           mes .@name$;
           mes "How many TCG(s) do you want?";
           input .@num;
           next;

           if( .@num <= 0 || #CASHPOINTS < .@num * 10 ) {
               mes .@name$;
               mes "Sorry, you don't have enough cashpoints!";
               close;
           }
           mes .@name$;
           mes "This will cost ^FF0000" +(.@num * 10)+ " cashpoints^000000.";
           next;

           if( select("Proceed:Nevermind") -1 ) {
               mes .@name$;
               mes "Goodbye!";
               close;
           }
           set #CASHPOINTS, #CASHPOINTS - .@num * 10;
           dispbottom "Lost: " +(.@num * 10)+ " cashpoints. Total: " +#CASHPOINTS+" cashpoints.";
           getitem 7227, .@num;
           break;

       case 2:
           mes .@name$;
           mes "How many TCG(s) will you give?";
           input .@num;
           next;

           if( .@num <= 0 || countitem(7227) < .@num ) {
               mes .@name$;
               mes "Sorry, you don't have enough TCG!";
               close;
           }
           mes .@name$;
           mes "I can give you ^FF0000" +(.@num * 10)+ " cashpoints^000000 for this.";
           next;

           if( select("Proceed:Nevermind") -1 ) {
               mes .@name$;
               mes "Goodbye!";
               close;
           }
           set #CASHPOINTS, #CASHPOINTS + .@num * 10;
           dispbottom "Gained: " +(.@num * 10)+ " cashpoints. Total: " +#CASHPOINTS+" cashpoints.";
           delitem 7227,.@num;
   }
   close;
}

  • Upvote 1
Posted

replace

mes "What would you like to do?

to

mes "What would you like to do?";

And

mes "Sorry, you don't have enough cashpoints!

to

mes "Sorry, you don't have enough cashpoints!";

Posted

prontera,155,155,4	script	Converter	83,{
.@name$ ="[^FF0000Converter^000000]";

mes .@name$;
mes "Hello, 10 cashpoints is equals to 1 TCG.";
mes "What would you like to do?";
next;

switch( select("Cash to TCG","TCG to Cash") ) {
	case 1:
		mes .@name$;
		mes "How many TCG(s) do you want?";
		input .@num;
		next;

		if( .@num <= 0 || #CASHPOINTS < .@num * 10 ) {
			mes .@name$;
			mes "Sorry, you don't have enough cashpoints!";
			close;
		}
		mes .@name$;
		mes "This will cost ^FF0000" +(.@num * 10)+ " cashpoints^000000.";
		next;

		if( select("Proceed:Nevermind") -1 ) {
			mes .@name$;
			mes "Goodbye!";
			close;
		}
		set #CASHPOINTS, #CASHPOINTS - .@num * 10;
		dispbottom "Lost: " +(.@num * 10)+ " cashpoints. Total: " +#CASHPOINTS+" cashpoints.";
		getitem 7227, .@num;
		break;

	case 2:
		mes .@name$;
		mes "How many TCG(s) will you give?";
		input .@num;
		next;

		if( .@num <= 0 || countitem(7227) < .@num ) {
			mes .@name$;
			mes "Sorry, you don't have enough TCG!";
			close;
		}
		mes .@name$;
		mes "I can give you ^FF0000" +(.@num * 10)+ " cashpoints^000000 for this.";
		next;

		if( select("Proceed:Nevermind") -1 ) {
			mes .@name$;
			mes "Goodbye!";
			close;
		}
		set #CASHPOINTS, #CASHPOINTS + .@num * 10;
		dispbottom "Gained: " +(.@num * 10)+ " cashpoints. Total: " +#CASHPOINTS+" cashpoints.";
		delitem 7227,.@num;
}
close;
}

thanks. problem fix :)

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...