Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • PavSwag: BRAND NEW RSPS AUTOSCAPE,ORG FREE MBOX WHEN YOU GET 99 SKILL FOR DONATOR POINTS
      May 22, 2019, 01:52:56 PM
    • Duriall: Join the HYPE TRAIN! New Server - Varrock - Release is tomorrow. Join the discord and forums now for free items on release! [link]
      May 21, 2019, 04:47:56 PM
    • Riskdemon:[link] Varrock OSRS RSPS releasing May 22nd! Discord link provided!
      May 18, 2019, 11:43:14 PM
    • violence.:[link] Most addictive RSPS brand new just opend free m box to every new player
      May 18, 2019, 08:07:04 PM
    • LukrativeHD: Zenyte, the most anticipated RSPS of 2019! The server has been in development for over 2 years! Zenyte will be launching on June 7, 2019! Join our huge community on discord : [link]
      May 17, 2019, 11:18:39 AM
    • SnowRSPS: **Snow-PS | Custom & Improved RSPS | FREE $5 Scroll | Daily Giveaways, Updates & MORE!** **Site:** **<https://SnowRSPS.com><https://Snowscape.net>** **Discord:** [link] ```HTTP |FREE TO PLAY| -317 loading 602 graphics -GambleBots Fully Coded -Fullscreen -Prestige -AutoTrivia -AutoDonations -Custom ::NewHome -50+ Bosses -Unique Pets -Working Skills -Daily Giveaways -10+ Websites -(SnowPS.org|Snow317.com|& MANY MORE) -Staff Needed Always -Super Friendly Community -& We like to Update Weekly HOPE YOU COME N ENJOY! ``` **Facebook:**<https://facebook.com/snowrsps2012>
      May 16, 2019, 06:36:31 PM
    • PalidinoDH:[link]
      May 14, 2019, 10:53:37 PM
    • Coder Nick: ancientisle . com new OSRS server with heaps of content! raids etc!
      May 14, 2019, 04:19:55 AM
    • aXo: Are there any "vanilla" servers for the current OSRS style? Like, servers including tutorial island and all that, without much in the way of ridiculous customs and portals
      May 12, 2019, 05:28:13 PM
    • PavSwag: BRAND NEW RSPS AUTOSCAPE,ORG FREE MBOX WHEN YOU GET 99
      May 10, 2019, 03:28:22 PM
    • Blasta: Hey im available for staff positions want my discord? robzzd#1501
      May 08, 2019, 09:29:13 PM
    • Coder Nick: Brand new rsps ancientisle . com need players and staff!
      May 07, 2019, 09:42:54 PM
    • IceDynasty: LOG IN NOW FOR FREE DONOR! 4 GUYS ON LIMAS-SCAPE
      May 07, 2019, 06:53:08 PM
    • IceDynasty: [youtube]KJNP6Mpg09A[/youtube] CHECK NEW 614 RSPS
      May 07, 2019, 06:24:21 PM
    • Smokey_:[link]
      May 04, 2019, 08:37:40 PM
    • Smokey_: New toplists with unique incentive review system that requires no external libraries in an easy to use plug n play system
      May 04, 2019, 08:37:35 PM
    • dan v jad:[link]  Join us on Discord! [link]  Real OS Server - #178 Data
      May 04, 2019, 11:44:19 AM
    • PavSwag: Try out OSRS brand new server need STAFF autoscape,0RG
      May 04, 2019, 03:48:02 AM
    • Chassy13: this site is dead
      May 01, 2019, 04:50:57 PM
    • Shadowspkin: Cant believe this sites still alive. @Gerrjat email me at [link] if you want
      May 01, 2019, 10:15:22 AM

    Author Topic: API Reference Guide  (Read 2192 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    API Reference Guide
    « on: August 03, 2015, 07:21:20 PM »
    WIP as of 8/3/2015, methods listed are final.

    Java Modules

    - World

    Lua Modules

    World

    CreateObject(plane, x, y, type, config, orientation)
    UpdateObject(plane, x, y, type, config, orientation)

    Creates a new game object at the specified coordinate. Note that if an object already exists at the specified coordinates for the object group with the provided type then the object is updated. UpdateObject is an alias for CreateObject. Both methods are provided to give clarity to users and a distinction for intended purpose.

    Example:

    Code: Lua
    1. -- Spawns a tree at coordinates [0, 3222, 3222], using the type identity of a prop, facing north
    2. world:CreateObject(0,32223222, obj.prop, obj.tree, obj.north)
    3.  
    4. -- Equivalent code
    5. world:UpdateObject(0,32223222, obj.prop, obj.tree, obj.north)
    6.  

    Java Models

    Mobile

    InteractWith(object, distance, closure)
    InteractWith(object, closure)

    Interacts with an entity. The provided closure will be triggered when the following conditions are met:

    1). There is a line of sight between the mobile and the target.
    2). The distance between the mobile and the target is less or equal to the specified distance.

    If the mobile is interacting with another mobile entity the mobile will attempt to walk to the mobile to trigger the required conditions. This is done via appending a way point to the entities nearest adjacent position. If the mobile is interacting with an immobile entity, the mobile will make no attempt to walk to the immobile entity and the expected behavior is for a route to the immobile entity to either be predetermined, calculated, or provided from the client. If there are no pending way points or steps when the target is a game object, and the mobile entities interaction condition is not met the interaction is considered a failure and the mobile entity will stop attempting to interact with the immobile entity.

    Examples:

    Code: Lua
    1. local player = SomeMoreCodeHere()
    2. local object = SomeCodeHere()
    3. player:InteractWith(object,function(player) player:Print('I am adjacent to the object!')end)
    4.  
    « Last Edit: August 10, 2015, 04:50:15 AM by sini »
    Runescape Gambling

    OfflineCres

    • Member
    • ****
    • Posts: 1,392
    • Thanks: +0/-0
      • View Profile
    Re: API Reference Guide
    « Reply #1 on: August 04, 2015, 06:18:19 AM »
    Will things such as ground items, npcs, etc all be handled through the World module? And is this some sort of RuneScript placeholder?
    And I can find myself alone with just my thoughts
    As time crumbles away

    Avenged Sevenfold - Darkness Sourrounding
    Runescape Gambling

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: API Reference Guide
    « Reply #2 on: August 10, 2015, 04:49:47 AM »
    Updated to include information about InteractWith(...)
    Runescape Gambling

    OfflineSupaz

    • Member
    • **
    • Posts: 59
    • Thanks: +0/-0
      • View Profile
      • Rune-Server.ee
    Re: API Reference Guide
    « Reply #3 on: August 12, 2015, 03:57:50 AM »
    You'll need a TON more information that's VERY specific to enable the novice level programmers to even start to comprehend the systems you use. Other than that, Like I said in IRC Lemme know when I can start writing content scripts!! You're taking forever :(
    This forum sucks now.

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: API Reference Guide
    « Reply #4 on: August 12, 2015, 01:54:55 PM »
    I would appreciate half-decent documentation in the codebase. Almost all of your documentation throughout is half-assed, either document of don't.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: API Reference Guide
    « Reply #5 on: August 12, 2015, 03:17:20 PM »
    Cause I rushed much of it?

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: API Reference Guide
    « Reply #6 on: August 12, 2015, 03:19:37 PM »
    Cause I rushed much of it?

    Didn't mean to sound dick-ish, but it is just really annoying to see stuff like this:

    Code: [Select]
        /**
         *
         * @param alloc
         * @param outgoingPackets
         * @param message
         */

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: API Reference Guide
    « Reply #7 on: August 12, 2015, 03:25:02 PM »
    The amount of time wasted writing comments for everything is massive especially in large projects such as this. Which is why I stated, in my posts, that its slated for AFTER when I finish the core features.

    OfflineRyley

    • Member
    • ****
    • *
    • Posts: 7,315
    • Thanks: +0/-0
      • View Profile
    Re: API Reference Guide
    « Reply #8 on: August 12, 2015, 04:25:11 PM »
    The amount of time wasted writing comments for everything is massive especially in large projects such as this. Which is why I stated, in my posts, that its slated for AFTER when I finish the core features.

    Missed that, my apologizes.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Re: API Reference Guide
    « Reply #9 on: August 12, 2015, 04:41:48 PM »
    nw. :)

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal