Jump to content
  • 0
Frost Diver

Input amount on vote npc

Question

Hello!

I need a little help. How can i make this script to have an input option. Example, i got 30 vote points. And when i talk to npc, i want to exchange only 15 vote points to vote token. So i need to input the amount of 15 to be exchange. The thing is, this script can only allow me to exchange 1 by 1 and it doesn't have an input option. Here's the script. 

Thank you guys ^^

votenpc.txt

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

try change

			mes "Proceed?";
			if(select("Yes:No")==1)
			{
				set [email protected],getPoints(getcharid(3));
				if([email protected]>[email protected])
				{
					next;
					mes .npcname$;			
					updatePoints(getcharid(3),[email protected]);
					getitem [email protected],[email protected];
					mes "Here you go!. Thank you for voting. Don't forget to vote again. :D";
				}
				else
					mes "Sorry, you do not have enough points for this item.";				
			}

into


			mes "Enter an Amount and proceed:";
			input [email protected], 1;
			if(select("Yes:No")==1)
			{
				set [email protected],getPoints(getcharid(3));
				if([email protected]>= ([email protected] * [email protected]))
				{
					next;
					mes .npcname$;			
					updatePoints(getcharid(3),([email protected] * [email protected]));
					getitem [email protected],([email protected] * [email protected]);
					mes "Here you go!. Thank you for voting. Don't forget to vote again. :D";
				}
				else
					mes "Sorry, you do not have enough "+([email protected] * [email protected])+" points for this item.";				
			}

 

Link to comment
Share on other sites

  • 0

up! still looking for help

On 8/29/2021 at 10:55 PM, Emistry said:

try change

			mes "Proceed?";
			if(select("Yes:No")==1)
			{
				set [email protected],getPoints(getcharid(3));
				if([email protected]>[email protected])
				{
					next;
					mes .npcname$;			
					updatePoints(getcharid(3),[email protected]);
					getitem [email protected],[email protected];
					mes "Here you go!. Thank you for voting. Don't forget to vote again. :D";
				}
				else
					mes "Sorry, you do not have enough points for this item.";				
			}

into


			mes "Enter an Amount and proceed:";
			input [email protected], 1;
			if(select("Yes:No")==1)
			{
				set [email protected],getPoints(getcharid(3));
				if([email protected]>= ([email protected] * [email protected]))
				{
					next;
					mes .npcname$;			
					updatePoints(getcharid(3),([email protected] * [email protected]));
					getitem [email protected],([email protected] * [email protected]);
					mes "Here you go!. Thank you for voting. Don't forget to vote again. :D";
				}
				else
					mes "Sorry, you do not have enough "+([email protected] * [email protected])+" points for this item.";				
			}

 

Great! Thabks alot man 👍

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

Important Information

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