Skip to content

Commit

Permalink
update new random
Browse files Browse the repository at this point in the history
  • Loading branch information
trickstarcandina committed May 26, 2022
1 parent 602c1e5 commit 40c7425
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions public/random2.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{/*Code by TrickStar
Trigger type : Command. Example: random
ex: <prefix>random
*/}}
{{$a := 0}}
{{$b := 0}}
{{$c := 0}}
{{$length := len .Args}}
{{if eq $length 2}}
{{$b = toInt64 (index .Args 1)}}
{{else}}
{{$a = toInt64 (index .Args 1)}}
{{$b = toInt64 (index .Args 2)}}
{{end}}

{{if eq $a $b}}
Các giá trị không hợp lệ!
{{else}}
{{if or (gt $a 10000000000) (gt $b 10000000000) }}
Số nhập vào **Không được lớn hơn 10000000000**!
{{else}}
{{if gt ($b) ($a)}}
{{$c = randInt $a $b}}
{{end}}
{{if gt ($a) ($b)}}
{{$c = randInt $b $a}}
{{end}}
{{end}}
{{end}}
**{{.User}}**, con số may mắn của bạn là {{$c}}

0 comments on commit 40c7425

Please sign in to comment.