Jump to content

Question

Posted (edited)

how can i change my script

Gold To Cash Points

-	script	sample	-,{

mes "I can exchange your gold to credits.";
next;
mes "How many would you like to exchange?";
menu "1000 gold",gold_1k,"2000 gold",gold_2k,"5000 gold",gold_5k,"10,000 gold",gold_10k,"30,000 gold",gold_30k,"None",end1;

end1:
next;
mes "See you again.";
close;

gold_1k:
if (countitem(969) < 1000) goto end2;
next;
mes "Here you go.";
getitem 29999,100;
delitem 969,1000;
mes "Thank you. Come again.";
close;

gold_2k:
if (countitem(969) < 2000) goto end2;
next;
mes "Here you go.";
getitem 29999,200;
delitem 969,2000;
mes "Thank you. Come again.";
close;

gold_5k:
if (countitem(969) < 5000) goto end2;
next;
mes "Here you go.";
getitem 29999,500;
delitem 969,5000;
mes "Thank you. Come again.";
close;

gold_10k:
if (countitem(969) < 10000) goto end2;
next;
mes "Here you go.";
getitem 29999,1000;
delitem 969,10000;
mes "Thank you. Come again.";
close;

gold_30k:
if (countitem(969) < 30000) goto end2;
next;
mes "Here you go.";
getitem 29999,3000;
delitem 969,30000;
mes "Thank you. Come again.";
close;

end2:
next;
mes "Sorry, you don't have enough gold for this transaction.";
close;
Edited by Help-Help

2 answers to this question

Recommended Posts

Posted

 

how can i change my script

Gold To Cash Points

 

But one problem, 1 Gold = 20 Weight, no one will be able to raise a lot of gold, 1000,5000,100000...

 

 

- script sample -,{

 
mes "I can exchange your gold to credits.";
next;
mes "How many would you like to exchange?";
menu "1000 gold",gold_1k,"2000 gold",gold_2k,"5000 gold",gold_5k,"10,000 gold",gold_10k,"30,000 gold",gold_30k,"None",end1;
 
end1:
next;
mes "See you again.";
close;
 
gold_1k:
if (countitem(969) < 1000) goto end2;
next;
mes "Here you go.";
delitem 969,1000;
atcommand "@cash 1000";
mes "Thank you. Come again.";
close;
 
gold_2k:
if (countitem(969) < 2000) goto end2;
next;
mes "Here you go.";
delitem 969,2000;
atcommand "@cash 2000";
mes "Thank you. Come again.";
close;
 
gold_5k:
if (countitem(969) < 5000) goto end2;
next;
mes "Here you go.";
delitem 969,5000;
atcommand "@cash 5000";
mes "Thank you. Come again.";
close;
 
gold_10k:
if (countitem(969) < 10000) goto end2;
next;
mes "Here you go.";
delitem 969,10000;
atcommand "@cash 10000";
mes "Thank you. Come again.";
close;
 
gold_30k:
if (countitem(969) < 30000) goto end2;
next;
mes "Here you go.";
delitem 969,30000;
atcommand "@cash 30000";
mes "Thank you. Come again.";
close;
 
end2:
next;
mes "Sorry, you don't have enough gold for this transaction.";
close;
}
Posted

Try mine :P

prontera,99,99,5	script	Gold Exchanger	100,{
	mes "I can exchange your gold to cash point.";
	next;
	mes "How many would you like to exchange?";
	switch(select("1000 Gold:2000 Gold:5000 Gold:10,000 Gold:30,000 Gold:None")){
		case 1:
			if (countitem(969) < 1000){
				next;
				mes "Sorry, you don't have enough gold for this transaction.";
				close;
			}
			next;
			mes "Here you go.";
			delitem 969,1000;
			set #CASHPOINTS, #CASHPOINTS + 1000;
			dispbottom "Gained 1000 cash points. Total: "+#CASHPOINTS+" cash points";
			mes "Thank you. Come again.";
			close;
		 
		case 2:
			if (countitem(969) < 2000){
				next;
				mes "Sorry, you don't have enough gold for this transaction.";
				close;
			}
			next;
			mes "Here you go.";
			delitem 969,2000;
			set #CASHPOINTS, #CASHPOINTS + 2000;
			dispbottom "Gained 2000 cash points. Total: "+#CASHPOINTS+" cash points";
			mes "Thank you. Come again.";
			close;
		 
		case 3:
			if (countitem(969) < 5000){
				next;
				mes "Sorry, you don't have enough gold for this transaction.";
				close;
			}
			next;
			mes "Here you go.";
			delitem 969,5000;
			set #CASHPOINTS, #CASHPOINTS + 5000;
			dispbottom "Gained 5000 cash points. Total: "+#CASHPOINTS+" cash points";
			mes "Thank you. Come again.";
			close;
		 
		case 4:
			if (countitem(969) < 10000){
				next;
				mes "Sorry, you don't have enough gold for this transaction.";
				close;
			}
			next;
			mes "Here you go.";
			delitem 969,10000;
			set #CASHPOINTS, #CASHPOINTS + 10000;
			dispbottom "Gained 10000 cash points. Total: "+#CASHPOINTS+" cash points";
			mes "Thank you. Come again.";
			close;
		 
		case 5:
			if (countitem(969) < 30000){
				next;
				mes "Sorry, you don't have enough gold for this transaction.";
				close;
			};
			next;
			mes "Here you go.";
			delitem 969,30000;
			set #CASHPOINTS, #CASHPOINTS + 30000;
			dispbottom "Gained 30000 cash points. Total: "+#CASHPOINTS+" cash points";
			mes "Thank you. Come again.";
			close;
		
		case 6:
			next;
			mes "See you again.";
			close;
	}
}

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