Results 1 to 10 of 10

Thread: Pascal Questions

  1. #1
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default Pascal Questions

    Over time I've come up with a list of questions for programming in Pascal and SRL in general.
    1) How do I add an apostraphe in a string? I assume it's as simple as an introductory escape character or quotation mark string declaration or something like that, but I don't know and it seems like s simple enough starter question
    2) Is there some API for commonly used functions for us scripters?
    3) Is there some listing on how to grab any sort of object metadata on Runescape items outside of their current GE price, or would we need a custom server/website of our own to hold this information so we could grab it all later?
    4) Back to simpler questions... When a script is multiplayer, is it running the players asynchronously, or synchronously? and if it is synchronous typically, does Pascal (pr SRL) allow for any sort of async activity?
    5) Finally, if the answer to 4 is a no to asynchronous possibilities currently, would the language theoretically allow for our own additions to make our own asynchornous improvements so advanced developers could use them for a variety of things, like multiple players working at once (possibly even together) or simpler things like looking up GE prices while continuing to run a script as normal?

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    SRL uses pascalscript, interpreter of pascal.

    writeln apostrophe's by,
    Simba Code:
    writeln('hi it''s me');

    docs.villavu.com

    It's usually along the lines of grabbing your own data off a reliable server/website for said data.

    in simba 1.00 I believe its suppose to support multiple smart's in one simba process (you have to have multiple scripts, you can't run the same script synchronously in the same simba process).

    e:
    pascalscript doesn't multithread, lape (what is being moved towards instead of pascalscript) is being developed here. But the nice thing about villavu is that you can view all source code simba.
    Last edited by Le Jingle; 12-04-2012 at 02:38 AM.

  3. #3
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by nivek1989 View Post
    Over time I've come up with a list of questions for programming in Pascal and SRL in general.
    1) How do I add an apostraphe in a string?
    There are multiple ways:
    Simba Code:
    S := 'String''s';
    S := 'String'#39's';
    S := 'String' + #39 + 's';
    S := 'String' + Chr(39) + 's';
    Quote Originally Posted by nivek1989 View Post
    2) Is there some API for commonly used functions for us scripters?
    See the Simba documentation. A library which is in common use by most of the members here is the SRL Resource Library (SRL)

    Quote Originally Posted by nivek1989 View Post
    3) Is there some listing on how to grab any sort of object metadata on Runescape items outside of their current GE price, or would we need a custom server/website of our own to hold this information so we could grab it all later?
    WYSIWYG with Simba, unfortunately. However, there is work on some middleware development on OpenGL hooking.


    Quote Originally Posted by nivek1989 View Post
    4) Back to simpler questions... When a script is multiplayer, is it running the players asynchronously, or synchronously? and if it is synchronous typically, does Pascal (pr SRL) allow for any sort of async activity?
    Synchronously. And not really, no (unless you base your script on low priority Windows timers; which is kind of asynchronous [not really]).

    Quote Originally Posted by nivek1989 View Post
    5) Finally, if the answer to 4 is a no to asynchronous possibilities currently, would the language theoretically allow for our own additions to make our own asynchornous improvements so advanced developers could use them for a variety of things, like multiple players working at once (possibly even together) or simpler things like looking up GE prices while continuing to run a script as normal?
    PascalScript (the pascal interpreter that Simba uses) is fairly limited. You could potentially create an external library (e.g. DLL) and either statically or dynamically link with it, which you could then utilise that language's parallel features (although, that'd essentially be a separate program).
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  4. #4
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    Go Daniel, you are on top of this! Hey Nivek, if you really need help in the basics of the basics, check the TuT in my signature. Though it hasn't been updated in around a month, there are sequels and the information stays the same.
    ~Rez

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  5. #5
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Thank you for the prompt responses guys!

    So no single reliable server for all that metadata that could be fairly valuable? Would it be reasonable (definitely seems possible so long as we can perform HTTP requests, which knowing we can access GE prices makes me think we can), for someone to create a series of new functions to access item metadata via some existing site like runescape.wikia.com? Or perhaps even simpler have it somehow integrated here into Villavu?

    As for creating the external dll that is then linked to in order to add possible asynchronous functionality: Would that be possible as a creation to improve upon SIMBA as a whole in a future release? I have what I would like to think of as a fairly broad knowledge of C++ and would be more than willing to work on that with someone else. I could theoretically do it on my own, but since I'm not too knowledgeable on the Pascal, side it could take a while.

    And thanks for the offer Rezozo, but I think I have most of the Pascal basics down, I just had the couple questions I hadn't seen mentioned elsewhere to throw into the deeper questions like I'm digging into now.

  6. #6
    Join Date
    Dec 2011
    Location
    Nj
    Posts
    2,341
    Mentioned
    1 Post(s)
    Quoted
    18 Post(s)

    Default

    Understood. Well, you know I am always here to help. But ask others like Daniel first
    ~Rez

    For the basics of the basics of pascal, try my TuT. ||Photoshop Editing ||MapleResourceDung Script || Book a flight! BuySellTrip

  7. #7
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    I'd suggest ask questions as often you need to, PM is great here, or even join the irc (lot of smartness in irc channel).

    As for item data, it would prove useful, imo, but I'd stay away from hard coding anything..and try to organize it.

    Cheers
    Lj

  8. #8
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Quote Originally Posted by nivek1989 View Post
    So no single reliable server for all that metadata that could be fairly valuable? Would it be reasonable (definitely seems possible so long as we can perform HTTP requests, which knowing we can access GE prices makes me think we can), for someone to create a series of new functions to access item metadata via some existing site like runescape.wikia.com? Or perhaps even simpler have it somehow integrated here into Villavu?
    Very possible. Simba supports both HTTP-POST and (obviously) HTTP-GET messages.
    Quote Originally Posted by nivek1989 View Post
    As for creating the external dll that is then linked to in order to add possible asynchronous functionality: Would that be possible as a creation to improve upon SIMBA as a whole in a future release?
    No, I wouldn't think so. I meant specifically for your script (i.e. you have your library, you export a method, call that method in Simba. That method then does all macro stuff [hence why I referred to it as pretty much a separate program]).

    I don't think PascalScript or La-pe support RTTI, so you can't really use that to export threading/async functionality. You could try to use pointers in La-pe and get your DLL to introduce asychronous calls that way, but I haven't really explored that area.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  9. #9
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Just gonna jump in here =)

    I like to see these questions!

    nivek, you should come hang out on IRC.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  10. #10
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

    Default

    Hard-coding is for losers

    As for the IRC, I don't see Rizon.net to connect to... Have the settings changed since that post was written in 2008?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •