Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ragnoroker: Brand new server! Double EXP is enabled right now aswell as other events! - [link]
      August 18, 2019, 07:14:43 AM
    • ragnoroker: Brand new server! Double EXP is enabled right now aswell as other events! - [link]
      August 18, 2019, 07:14:35 AM
    • puppajohn: Come and join us today for amazing content !
      August 16, 2019, 10:26:16 PM
    • puppajohn:[link] come and join us now! you have donator on your server? no problem we restore your donator credits and symbol ! free M box on loggins
      August 16, 2019, 10:26:02 PM
    • PavSwag: autoscape,0rg kill REVS for chance of TWISTED BOW || EP GETS YOU OSRS GP TOKENS
      August 15, 2019, 05:13:07 PM
    • hodford: autoscape,0rg is actually fudgein lit as come check it out
      August 13, 2019, 02:59:58 AM
    • ragnoroker: Brand new server! Hosting Raids Event all day + More! - 20+ online, Join today [link]
      August 11, 2019, 07:45:49 AM
    • ragnoroker: Brand new server! Hosting Raids Event all day + More! - 20+ online, Join today [link]
      August 11, 2019, 07:45:46 AM
    • PavSwag: autoscape,0rg kill REVS for chance of TWISTED BOW
      August 08, 2019, 07:29:43 PM
    • ragnoroker:Brand new server! Endless Content - Mature Players/Staff - 20+ online, Join today [link]
      August 08, 2019, 11:05:53 AM
    • ragnoroker:Brand new server! Endless Content - Mature Players/Staff - 20+ online, Join today [link]
      August 08, 2019, 11:05:46 AM
    • asshole_rule: bernie sanders
      August 06, 2019, 07:54:02 PM
    • PavSwag: #AS 100M OSRS GP GIVEAWAY!! [link] 317 Oldschool RuneScape Private Server emulating core factors of the game with a strong economy and balance of experience to bossing and prestiging -Receive DONATOR Perks by maxing to 99s- Lumbridge remade - Login with a starter set of armour and items - PK District - Preloading sets - Activity points for training - All Skills Working, Skilling Island, Skilling Pets, Skilling Rewards - All Working Max Capes - 25+ Bosses with Pets - Superior Slayer Encounters - Player Owned Shops - Minigames, Construction, Sawmill, Warriors Guild, Pest Control, Barrows (with pets), Fight Caves, Inferno Caves, Chambers of Xeric, Custom Raids - NPC Drop Table, Kills Tracker, Points Tracker, Extra settings. - Doubled Xp & Points Weekends - Vote System - Vote4Donor - Competitive Highscores - Tons of Content - Join us today for bonus giveaways and free ultra mystery box upon login!   Official YouTube Media: [youtube]P5D0eXEmjA4[/youtube] Join NOW Ill personally give you Ultra Mystery Boxes (Twisted Bow??) Im the Developer :smiley: Heres the Discord:  [link] BTW 100m OSRS GP Giveaways WEEKLY!
      August 05, 2019, 01:05:53 PM
    • ragnoroker: Brand new server! Endless Content - Mature Players/Staff - 20+ online, Join today :) - [link]
      August 05, 2019, 12:48:52 PM
    • ragnoroker: Brand new server! Endless Content - Mature Players/Staff - 20+ online, Join today :) - [link]
      August 05, 2019, 12:48:47 PM
    • suelo: does the search not work on here?
      August 05, 2019, 02:12:08 AM
    • PavSwag: #AS 100M OSRS GP GIVEAWAY!! [link] 317 Oldschool RuneScape Private Server emulating core factors of the game with a strong economy and balance of experience to bossing and prestiging -Receive DONATOR Perks by maxing to 99s- Lumbridge remade - Login with a starter set of armour and items - PK District - Preloading sets - Activity points for training - All Skills Working, Skilling Island, Skilling Pets, Skilling Rewards - All Working Max Capes - 25+ Bosses with Pets - Superior Slayer Encounters - Player Owned Shops - Minigames, Construction, Sawmill, Warriors Guild, Pest Control, Barrows (with pets), Fight Caves, Inferno Caves, Chambers of Xeric, Custom Raids - NPC Drop Table, Kills Tracker, Points Tracker, Extra settings. - Doubled Xp & Points Weekends - Vote System - Vote4Donor - Competitive Highscores - Tons of Content - Join us today for bonus giveaways and free ultra mystery box upon login!   Official YouTube Media: [youtube]P5D0eXEmjA4[/youtube] Join NOW Ill personally give you Ultra Mystery Boxes (Twisted Bow??) Im the Developer :smiley: Heres the Discord:  [link] BTW 100m OSRS GP Giveaways WEEKLY!
      August 04, 2019, 11:48:39 PM
    • PavSwag: autoscape,0rg kill REVS for chance of TWISTED BOW?
      August 04, 2019, 11:21:52 PM
    • ragnoroker:Brand new server! - 20+ online, Many events tonight :) come join the fun. [link]!
      August 04, 2019, 12:39:24 PM
    • ragnoroker:Brand new server! - 20+ online, Many events tonight :) come join the fun. [link]!
      August 04, 2019, 12:39:18 PM

    Author Topic: API Reference Guide  (Read 2263 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