Jump to content
  • 0

Gold room check weight


xxx69

Question


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  12/01/13
  • Last Seen:  

Help me with my script. When a player farmed a lot of gold points, he can't trade it with gold because he will be overweight. can someone please fix my script with a limit of golds to farm inside gold room and he will be warned that he may not carry all those golds when exchanging it.

goldroom.txt

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

a more practical method should be asking the player to trade how many golds he want

change the exchange: label into like this

exchange:
	mes "[Gold Room Warperer]";
	mes "Hmm...let me see";
	mes "You have " +gold+ ".";
	if (gold == 0) goto nogold; 
	mes "how many you want to retrieve ?";
	next;
	input .@tmp, 1, gold;
	if (checkweight(969,.@tmp) == 0) goto L_OverWeight;
	getitem 969, .@tmp;
	set gold, gold - .@tmp;
	emotion e_gg;
	end;
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

Add after : 

dispbottom "-|You got: " +@gain+ " gold| - |Total: " +gold+ " gold|- ";

This : 

if ( ( gold % 20 ) == 0 ) 
    dispbottom "[Warning]: You may not carry all those golds when exchanging it";
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  12/01/13
  • Last Seen:  

if ( ( gold % 20 ) == 0 )

Can you explain how this works? thanks for your help

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   241
  • Joined:  09/05/12
  • Last Seen:  

If the gold he gain is divisible by 20 then the dispbottom command will be triggered.

 

20 | 40 | 60 | 80 | 100 ....

 

but i think my approach is not good since u are using rand() command.

 

Change that to :

if ( gold > 20 ) 
     dispbottom "[Warning]: You may not carry all those golds when exchanging it";
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
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...