Jump to content
  • 0

How to make script checking if 256+ stats


Question

Posted

How to check if the player has exceeded the maximum stats 255

So that if the one of their stats 256+ will popup their name as dispbottom

6 answers to this question

Recommended Posts

Posted


- script Sample -1,{

OnPCLoginEvent:

for( set .@i,13; .@i <=18; set .@i,.@i + 1 )

if( readparam(.@i) > 255 )

set .@OverStat,.@OverStat + 1;

if( .@OverStat >= 6 ){

dispbottom "You have 256 stat.";

end;

}

}

Posted (edited)
- script Sample -1,{
OnPCLoginEvent:
for( set .@i,13; .@i <=18; set .@i,.@i + 1 )
if( readparam(.@i) > 255 )
  set .@OverStat,.@OverStat + 1;
if( .@OverStat >= 6 ){
dispbottom "You have 256 stat.";
end;
}
}

 

I mean if one of their stats is 256+ like 500 stats on str or 300 in agi

then will go back to 255

Edited by Kim
Posted


- script Sample -1,{

OnPCLoginEvent:

for( set .@i,13; .@i <=18; set .@i,.@i + 1 )

if( readparam(.@i) > 255 )

statusup2 .@i,( 255 - readparam(.@i) );

}

Posted (edited)
-	script	Sample	-1,{
OnPCLoginEvent:
	for( set .@i,13; .@i <=18; set .@i,.@i + 1 )
	if( readparam(.@i) > 255 )
		statusup2 .@i,( 255 - readparam(.@i) );
}

 

Nice Script . 

But can you please add a part in which it skips GM characters

Edited by lawbreaker

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