• Mystic Suggestions

    From Black Panther@1:317/3 to G00r00 on Mon Mar 29 12:43:00 2021
    Hi g00r00,

    I hope you and your family are doing well.

    I've got a couple of suggestions for additions to Mystic, particularly in the MPL end of things.

    1. Would be possible to add a function in MPL similar to the IsNumber function in FreePascal?

    For now, I have written a function that does something close to what I need. If I'm going to be taking user input and will need to Str2Int, I want to make sure it's an actual number. ;)

    Here is what I've put together. It's untested, so there may be issues with it.

    Function IsNumber(str:String):Boolean
    Var
    c : Byte
    a : Array[1..10] of Boolean
    Begin
    IsNumber:=True
    For c:=1 to Length(str) Do
    If Ord(str[c])<48 Or Ord(str[c])>58 Then
    a[c]:=False
    Else a[c]:=True
    For c:=1 to Length(str) Do
    If a[c]=False Then IsNumber:=False
    End

    2. Not sure about how possible this is, but could a text box, such as the vertical, horizontal, etc, be used to ask a user a question and have them type in a response? Such as:

    Enter your BBS Name
    [ ]

    And be able to save the response as a string?

    I've been having fun putting these in different places within Castle Rock, and think this would be a great addition.

    Thanks for all of your hard work and effort you put into Mystic. It is greatly appreciated!


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A47 2021/01/14 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (1:317/3)
  • From g00r00@1:129/215 to Black Panther on Mon Mar 29 19:33:34 2021
    I hope you and your family are doing well.

    Thanks!

    1. Would be possible to add a function in MPL similar to the IsNumber function i n FreePascal?

    function isNumber (s: string) : boolean;
    begin
    isNumber := str2int(s) > 0 or s = '0';
    end;

    2. Not sure about how possible this is, but could a text box, such as
    the vertic al, horizontal, etc, be used to ask a user a question and
    have them type in a re sponse? Such as:

    Enter your BBS Name
    [ ]

    And be able to save the response as a string?

    Yes you can use the box MCI code to drop a box and then use the input to get the input. Or display an ANSI to draw the box, whatever you'd like and the use input to get the input. Or you could use any of the box/input classes to draw form-like things using MPL. There are lots of ways to do it.

    There is an example of one way (although it might be overkill for what you just asked) in testinput.mps that comes with Mystic.

    --- Mystic BBS v1.12 A47 2021/02/12 (Windows/64)
    * Origin: Sector 7 | Mystic WHQ (1:129/215)
  • From Black Panther@1:317/3 to g00r00 on Mon Mar 29 18:19:52 2021
    On 29 Mar 2021, 07:33p, g00r00 said the following...

    function isNumber (s: string) : boolean;
    begin
    isNumber := str2int(s) > 0 or s = '0';
    end;

    Well, that's an easier way to do it... Nothing like over-thinking something. ;)

    Thank you.

    Yes you can use the box MCI code to drop a box and then use the input to get the input. Or display an ANSI to draw the box, whatever you'd like and the use input to get the input. Or you could use any of the
    box/input classes to draw form-like things using MPL. There are lots of ways to do it.

    Awesome. I'll have to do some playing around and see what I can come up with.

    There is an example of one way (although it might be overkill for what
    you just asked) in testinput.mps that comes with Mystic.

    That would have been WAY to simple, to look at example MPLs that come with Mystic. We need to work Harder, not Smarter! lol ;)

    Thank you again. Keep up the great work!


    ---

    Black Panther(RCS)
    aka Dan Richter
    Castle Rock BBS
    telnet://bbs.castlerockbbs.com
    http://www.castlerockbbs.com
    http://github.com/DRPanther
    The sparrows are flying again...

    --- Mystic BBS v1.12 A47 2021/01/14 (Linux/64)
    * Origin: Castle Rock BBS - bbs.castlerockbbs.com (1:317/3)