Jump to content
  • 0

Question

Posted

how to fix this warnings?

//===== eAthena Script ======================================= 
//= Stats Seller
//===== By: ================================================== 
//= DeadChild
//===== Current Version: ===================================== 
//= 1.0
//===== Compatible With: ===================================== 
//= Any eAthena Version 
//===== Description: ========================================= 
//= Stats Seller
//===== Additional Comments: =================================
//= Have fun with it ^^
//============================================================
prontera,166,201,0	script	STP/SKP Seller	86,{
set @price, 476000;
mes "[STP/SKP Seller]";
mes "Hi, I'm the STP/SKP Seller";
mes "It cost 476,000z each point";
mes "which one you wanna buy?";
next;
menu "Status Point",ST,"Skill Point",SK,"No thanks I'm fine",EXIT;
ST:
mes "[STP/SKP Seller]";
mes "What do you want to buy?";
next;
menu "Str",STR,"Agi",AGI,"Vit",VIT,"Int",INT,"Dex",DEX,"Luk",LUK;
SK:
mes "[STP/SKP Seller]";
mes "So how many?";
input @quantity;
next;
if (@quantity == 0) goto WT;
if (zeny < (@quantity * @price)) goto NZ;
mes "[STP/SKP Seller]";
mes "Done";
set zeny, zeny - (@quantity * @price);
set SkillPoint, SkillPoint + @quantity;
close;
STR:
mes "[STP/SKP Seller]";
mes "Hold on...";
next;
mes "[STP/SKP Seller]";
mes "So how many?";
input @quantity;
next;
if (@quantity == 0) goto WT;
if (@quantity > 999) goto TM;
if (zeny < (@quantity * @price)) goto NZ;
set zeny, zeny - (@quantity * @price);
statusup2 bStr,@quantity;
getmapxy(@mapname$,@mapx,@mapy,0,""+strcharinfo(0)+"");
mes "[STP/SKP Seller]";
mes "Done";
next;
warp ""+@mapname$+"",""+@mapx+"",""+@mapy+"";
close;
AGI:
mes "[STP/SKP Seller]";
mes "Hold on...";
next;
mes "[STP/SKP Seller]";
mes "So how many?";
input @quantity;
next;
if (@quantity == 0) goto WT;
if (@quantity > 999) goto TM;
if (zeny < (@quantity * @price)) goto NZ;
set zeny, zeny - (@quantity * @price);
statusup2 bAgi,@quantity;
getmapxy(@mapname$,@mapx,@mapy,0,""+strcharinfo(0)+"");
mes "[STP/SKP Seller]";
mes "Done";
next;
warp ""+@mapname$+"",""+@mapx+"",""+@mapy+"";
close;
VIT:
mes "[STP/SKP Seller]";
mes "Hold on...";
next;
mes "[STP/SKP Seller]";
mes "So how many?";
input @quantity;
next;
if (@quantity == 0) goto WT;
if (@quantity > 999) goto TM;
if (zeny < (@quantity * @price)) goto NZ;
set zeny, zeny - (@quantity * @price);
statusup2 bVit,@quantity;
getmapxy(@mapname$,@mapx,@mapy,0,""+strcharinfo(0)+"");
mes "[STP/SKP Seller]";
mes "Done";
next;
warp ""+@mapname$+"",""+@mapx+"",""+@mapy+"";
close;
INT:
mes "[STP/SKP Seller]";
mes "Hold on...";
next;
mes "[STP/SKP Seller]";
mes "So how many?";
input @quantity;
next;
if (@quantity == 0) goto WT;
if (@quantity > 999) goto TM;
if (zeny < (@quantity * @price)) goto NZ;
set zeny, zeny - (@quantity * @price);
statusup2 bInt,@quantity;
getmapxy(@mapname$,@mapx,@mapy,0,""+strcharinfo(0)+"");
mes "[STP/SKP Seller]";
mes "Done";
next;
warp ""+@mapname$+"",""+@mapx+"",""+@mapy+"";
close;
DEX:
mes "[STP/SKP Seller]";
mes "Hold on...";
next;
mes "[STP/SKP Seller]";
mes "So how many?";
input @quantity;
next;
if (@quantity == 0) goto WT;
if (@quantity > 999) goto TM;
if (zeny < (@quantity * @price)) goto NZ;
set zeny, zeny - (@quantity * @price);
statusup2 bDex,@quantity;
getmapxy(@mapname$,@mapx,@mapy,0,""+strcharinfo(0)+"");
mes "[STP/SKP Seller]";
mes "Done";
next;
warp ""+@mapname$+"",""+@mapx+"",""+@mapy+"";
close;
LUK:
mes "[STP/SKP Seller]";
mes "Hold on...";
next;
mes "[STP/SKP Seller]";
mes "So how many?";
input @quantity;
next;
if (@quantity == 0) goto WT;
if (@quantity > 999) goto TM;
if (zeny < (@quantity * @price)) goto NZ;
set zeny, zeny - (@quantity * @price);
statusup2 bLuk,@quantity;
getmapxy(@mapname$,@mapx,@mapy,0,""+strcharinfo(0)+"");
mes "[STP/SKP Seller]";
mes "Done";
next;
warp ""+@mapname$+"",""+@mapx+"",""+@mapy+"";
close;
WT:
mes "[STP/SKP Seller]";
mes "Please don't waste my time";
close;
TM:
mes "[STP/SKP Seller]";
mes "Sorry but you can only get 999 Status Point";
close;
NZ:
mes "[STP/SKP Seller]";
mes "Sorry but you do not have enough zeny.";
close;
EXIT:
mes "[STP/SKP Seller]";
mes "Okay then...";
close;
}

 

Untitled.png

2 answers to this question

Recommended Posts

  • 0
Posted (edited)
8 hours ago, skymia said:

""+@mapname$+"",""+@mapx+"",""+@mapy+""

Remove the ""+ and +"" in every line containing this part 

Edit: Well since I nearly got overhelm of the goto Labels, I optimized it a bit:
 

//===== eAthena Script ======================================= 
//= Stats Seller
//===== By: ================================================== 
//= DeadChild
//===== Current Version: ===================================== 
//= 1.0
//= 2.0 - Fixed an bug with warp and optimized it[llchrisll]
//===== Compatible With: ===================================== 
//= Any eAthena Version 
//===== Description: ========================================= 
//= Stats Seller
//===== Additional Comments: =================================
//= Have fun with it ^^
//============================================================
prontera,166,201,0	script	STP/SKP Seller	86,{

mes .n$;
mes "Hi, I'm the STP/SKP Seller";
mes "It cost "+.price+"z each point";
mes "which one you wanna buy?";
next;
switch(select("- Status Points:- Skill Point:- No thanks I'm fine")) {
	
	case 1:
	mes .n$;;
	mes "What do you want to buy?";
	next;
	set .@stat,select("Str:Agi:Vit:Int:Dex:Luk");
	mes .n$;
	mes "Hold on...";
	next;
	mes .n$;
	mes "So how many?";
	input .@quantity;
	next;
	mes .n$;
	if (.@quantity == 0) {
		mes "Please don't waste my time";
		close;
	}
	if (.@quantity > 999) {
		mes "Sorry but you can only get 999 Status Point";
		close;
	}
	if (zeny < (.@quantity*.price)) {
		mes "Sorry but you do not have enough zeny.";
		close;
	}
	set Zeny,Zeny - (.@quantity*.price);
	switch(.@stat) {
		case 1: statusup2 bStr,.@quantity; break;
		case 2: statusup2 bAgi,.@quantity; break;
		case 3: statusup2 bVit,.@quantity; break;
		case 4: statusup2 bInt,.@quantity; break;
		case 5: statusup2 bDex,.@quantity; break;
		case 6: statusup2 bLuk,.@quantity; break;
	}
	getmapxy(.@mapname$,.@mapx,.@mapy,0,strcharinfo(0));
	mes "Done";
	next;
	warp .@mapname$,.@mapx,.@mapy;
	close;
	
	case 2:
	mes .n$;
	mes "So how many?";
	input .@quantity;
	next;
	mes .n$;
	if (.@quantity == 0) {
		mes "Please don't waste my time";
		close;
	}
	if (zeny < (.@quantity*.price)) {
		mes "Sorry but you do not have enough zeny.";
		close;
	}
	mes "Done";
	set zeny, zeny - (.@quantity * .price);
	set SkillPoint,SkillPoint + .@quantity;
	break;
	
	case 3:
	mes .n$;
	mes "Okay then...";
	close;
}

OnInit:
set .n$,"["+strnpcinfo(0)+"]";
set .price,476000;
end;
}

 

Edited by llchrisll

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