Jump to content
  • 0

gold room exchange input how many gold


Question

Posted (edited)

how to put input how many gold to exchange   like u farm 30k ,  u will put 20k  when u talk to npc 

exchange:
    mes "[Gold Room Warperer]";
    mes "Hmm...let me see";
    mes "You have " +gold+ ".";
    if (gold == 0) goto nogold; 
    mes "Ok get this.";
    next;
        if (checkweight(969,gold) == 0) goto L_OverWeight;
    getitem 969, gold;x
    set gold, 0;
    emotion e_gg;
    end;


 

Edited by Emistry
fix

4 answers to this question

Recommended Posts

  • 0
Posted
        if (checkweight(969,gold) == 0) goto L_OverWeight;
    getitem 969, gold;x
    set gold, 0;

change to

input .@amount, 0, gold;
if (!.@amount) close;
if (checkweight(969,.@amount) == 0) goto L_OverWeight;
gold -= .@amount;
getitem 969, .@amount;

 

  • Love 1
  • 0
Posted (edited)
exchange:
	if (gold == 0) goto nogold;
	mes "[ Gold Room Warperer ]";
	mes "Hmm...let me see";
	mes "You have " +gold+ ".";
	mes " ";
	mes "How many you want exchange ?";
	next;
	switch(select("Make as many as I can.:I want to choose an amount.:Cancel")) {
		case 1:
			if (checkweight(969,gold) == 0) goto L_OverWeight;
			getitem 969, gold;
			set gold, 0;
			emotion e_gg;
			break;
		case 2:
			mes "[ Gold Room Warperer ]";
			mes "You have " +gold+ ".";
			mes "If you don't want any, just enter '0'.";
			mes "With Points you have, you can make at least "+gold+" golds.";
			next;
			input .@amount;
			if (.@amount <= 0) {
				mes "[ Gold Room Warperer ]";
				mes "Make up your mind, will you?!";
				close;
			}
			if (.@amount > gold) {
				mes "[ Gold Room Warperer ]";
				mes "Are you deaf? I said less than "+gold+"!";
				close;
			}
			next;
			if (checkweight(969,gold) == 0) goto L_OverWeight;
			set gold,gold - (.@amount);
			getitem 969,.@amount;
          	 	emotion e_gg;
			break;
		case 3:
			mes "[ Gold Room Warperer ]";
			mes "Byee !!";
			close;
	}
	end;

# Not tested

Edited by mR L
  • 0
Posted
On 3/9/2022 at 1:39 PM, Emistry said:
        if (checkweight(969,gold) == 0) goto L_OverWeight;
    getitem 969, gold;x
    set gold, 0;

change to

input .@amount, 0, gold;
if (!.@amount) close;
if (checkweight(969,.@amount) == 0) goto L_OverWeight;
gold -= .@amount;
getitem 969, .@amount;

 

Thx @EmistryI've learned new arguments to the input script command that I doesn't know ?

 

Rynbef~

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