Jump to content
  • 0

How to make script checking if 256+ stats


eJay

Question


  • Group:  Members
  • Topic Count:  80
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   76
  • Joined:  03/22/12
  • Last Seen:  

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

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  


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

}

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  80
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   76
  • Joined:  03/22/12
  • Last Seen:  

- 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
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


- script Sample -1,{

OnPCLoginEvent:

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

if( readparam(.@i) > 255 )

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

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  80
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   76
  • Joined:  03/22/12
  • Last Seen:  

Thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  05/31/13
  • Last Seen:  

-	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
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


OnPCLoginEvent:

if( !getgmlevel() )

  • Upvote 2
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...