@$(touser) $(eval r=(a,b)=> Math.floor(Math.random()*(b-a+1))+a; p=r(1,100); o=r(0,10);if(p>10){o=r(11,94)}if(p>20){o=r(95,100)}if(p>95){o=r(100,95)} o;)

I want to add text to a field. Each % required (10% = Bad 11-94% = Good 95-100% =Awesome)
I newbie in read code please teach me Thx

this code is doing much more than uâ€™re asking, if i understand u correctlyâ€¦ but try thisâ€¦

`@$(touser) $(eval r=(a,b)=> Math.floor(Math.random()*(b-a+1))+a; p=r(1,100); o=`Bad`;if(p>10){o=`Good`};if(p>94){o=`Awesome`};o)`

1 Like

I want to show the % number as well and want the chance to be correct to be 95-100 high, but 10 has a lower chance but there is still a message. Example (Name) Good weather 98% Awesome.

lower chance to get 10 and under, ok, how about like thisâ€¦

```
@$(touser) $(eval r=(a,b)=> Math.floor(Math.random()*(b-a+1))+a; p=r(1,100); o=`${p}% Bad`;if(p>10){o=`${r(11,94)}% Good`};if(p>79){o=`${r(95,100)}% Awesome`};o)
```

where it has a 10% chance to get 10 and under, and a 20% chance to get 95 and up

1 Like

Thatâ€™s exactly I want Thank you So Much.

1 Like

system
Closed
June 3, 2024, 4:28am
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.