Jump to content
  • 0

Help on this stats seller script


Question

Posted

i'm having problem on statusup2 script

 

no error on script but when i check my stats nothing happens


 
Phantasia,162,134,4    script    Stats Seller    893,{
 
    set .@n$,"^008800[ Stats Seller ]^000000";
    set .@price,10000; // 10k per 1 stats
 
    mes .@n$;
    mes "Please Choose!";
    menu "bStr",-,"bAgi",-,"bVit",-,"bInt",-,"bDex",-,"bLuk",-;
    next;
    input .@statpoint;
    if(.@statpoint == 0 || .@statpoint >= 701){
        mes .@n$;
        mes "I can't process that amount of stats!";
        close;
        }
    if(Zeny >= .@statpoint * .@price){
    mes .@n$;
    mes "Done!";
    set Zeny,Zeny - .@statpoint * .@price;
    statusup2 @menu,.@statpoint;
    close;
    }
    mes .@n$;
    mes "Seem's You don't have enough Zeny!";
    close;
}

1 answer to this question

Recommended Posts

Posted

Tested and working , dont worry about "if(.@statpoint == 0 || .@statpoint >= 701){" , because rAthena 17000++ will check maximum statpoint using "statusup2" , you can test it

 

Phantasia,162,134,4	script	Stats Seller	893,{

	set .@n$,"^008800[ Stats Seller ]^000000";
	set .@price,10000; // 10k per 1 stats

	mes .@n$;
	mes "Please Choose!";
	next;
	switch(select("Str:Agi:Vit:Int:Dex:Luk")) {
		case 1:
			input .@statpoint;
			if (Zeny >= .@statpoint * .@price) {
			set Zeny,Zeny - .@statpoint * .@price;
			statusup2 bStr,.@statpoint;
			break;
			}
			mes .@n$;
			mes "Seem's You don't have enough Zeny!";
			close;

		case 2:
			input .@statpoint;
			if (Zeny >= .@statpoint * .@price) {
			set Zeny,Zeny - .@statpoint * .@price;
			statusup2 bAgi,.@statpoint;
			break;
			}
			mes .@n$;
			mes "Seem's You don't have enough Zeny!";
			close;

		case 3:
			input .@statpoint;
			if (Zeny >= .@statpoint * .@price) {
			set Zeny,Zeny - .@statpoint * .@price;
			statusup2 bVit,.@statpoint;
			break;
			}
			mes .@n$;
			mes "Seem's You don't have enough Zeny!";
			close;

		case 4:
			input .@statpoint;
			if (Zeny >= .@statpoint * .@price) {
			set Zeny,Zeny - .@statpoint * .@price;
			statusup2 bInt,.@statpoint;
			break;
			}
			mes .@n$;
			mes "Seem's You don't have enough Zeny!";
			close;

		case 5:
			input .@statpoint;
			if (Zeny >= .@statpoint * .@price) {
			set Zeny,Zeny - .@statpoint * .@price;
			statusup2 bDex,.@statpoint;
			break;
			}
			mes .@n$;
			mes "Seem's You don't have enough Zeny!";
			close;

		case 6:
			input .@statpoint;
			if (Zeny >= .@statpoint * .@price) {
			set Zeny,Zeny - .@statpoint * .@price;
			statusup2 bLuk,.@statpoint;
			break;
			}
			mes .@n$;
			mes "Seem's You don't have enough Zeny!";
			close;
		}
		mes .@n$;
		mes "Done!";
		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...