'Params: Server, Channel, Sender, Msg dim Name dim Number dim Holder Dim List if StrUtils.Contains(Msg, "plus initiative roll:") = True Then rem parse the name and number from Msg 'Name Name = StrUtils.NParam(2,Msg) Name = StrUtils.DeleteRight(Name, StrUtils.ParamCount(Name), 2) 'Number Number = StrUtils.NParam(StrUtils.ParamCount(Msg),Msg) if number = "0" or number = "1" or number = "2" or number = "3" or number = "4" or number = "5" or number = "6" or number = "7" or number = "8" or number = "9" then number = "0" & number 'Format the info Holder = Number & Name 'Arrange the order Dim Max Max = 0 Dim Current Current = 1 Do Max = strutils.ParamCount(variables.GetVariant(List)) if strUtils.leftStr(Holder,2) > strutils.LeftStr(strutils.NParam(Current,Variables.GetVariant(List)), 2) Then Variables.SetVariant List, strutils.Insert(Variables.GetVariant(List),Holder & " ",Current) end if Current = Current + 1 Loop until Current > Max if strUtils.Contains(Variables.GetVariant(List), Holder) = False then Variables.SetVariant List, Variables.GetVariant(List) & " " & Holder end if 'Display the info Variables.SetVariant initorder, Variables.GetVariant(List) Channel.Command "say 4[5The Initiative order is:7 (" & Variables.GetVariant(InitOrder) & " )4]" end if