Results 1 to 8 of 8

Thread: Neopets - Habi Application Flow

  1. #1
    Banned
    Join Date
    Jun 2012
    Gender
    Location
    90 90
    Age
    31
    Posts
    1,714
    Thanks
    876
    Thanked 2,877 Times in 1,139 Posts


    Downloads
    44
    Uploads
    1
    Mentioned
    562 Post(s)
    Time Online
    118 d 6 h 45 m
    Avg. Time Online
    1 h 30 m
    Rep Power
    0
    Gamer IDs

    Gamertag: DarkByt3 PSN ID: raredaredevil

    Neopets - Habi Application Flow

    AMFPHP

    AMFPHP is a free open-source PHP implementation of the Action MessageFormat(AMF). AMF allows for binary serialization of Action Script (AS2, AS3) native types and objects to be sent to server side services. AMFPHP is challenged with implementing the entire AMF protocol to be an alternative to Flex Data Services (AMF3) and Flsh Remoting (AMF0). AMFPHP allows thin client applications built in languages such as Flash, Flex and AIR to communicate directly with PHP class objects on the server. For more information about AMFPHP please visit http://amfphp.sourceforge.net/

    XML-RPC
    It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.

    Habitarium Service

    AnalyticsService.php

    This service provides reports of Player levels, Time to reach levels, Raids by date, Helps by date, Total sales and Sales from period.

    Before we get the above reports, it checks for the login.

    Then It loads analytics.controller.class.php file from controller folder and calls appropriate methods to get the report.

    CMSService.php

    This service does below actions

    itemBag

    Returns the items related to given Player ID.

    sceneItems

    Gives the SceneItems of given Player ID.

    resetPlayer

    This action resets the player from given Player ID.

    numberOfCharacters

    Returns all the scene items for given Asset type as Character and Player ID.

    numberOfStructures

    Returns all the scene items for given Asset type as Structure and Player ID.

    playerRaidsInitiated

    Results the Raids Initiated by given Player ID.

    playerRaidsReceived

    Results the Raids received by given Player ID.
    EventService.php

    This service does below actions

    update

    Used to get all new events for the game

    simulate

    Used to update the state to the current time and get information about what has changed
    PestService.php

    This service does below actions

    updateSceneAfterPestAttack

    Update the scene according to client data after pest attack.
    PlayerService.php

    This service does below actions

    deactivate

    Used to deactivate a currently registered user.

    reset

    Used to remove the current registered user.

    playerInfo

    Used to retrieve the current player's information.

    setTutorialProgress

    Store the tutorial progress of the player. Negative number means the tutorial is over

    setInfoBubbles

    Set the bit field used to store which info bubbles the user has seen
    RaidService.php

    This service does below actions

    raidFriend

    Raid a friend with selected soldiers. Result will be true or false

    createVictim

    Creates a user with the username $neoUsername and setsup his habitarium. If the user already exists he will be reset.
    SceneService.php

    This service does below actions.

    setupHabitarium

    Setup scene with habitarium type.

    sceneItems

    All items in player's scene.

    moveItem

    Move an item to a new location on the map.

    makeTenant

    Move character into structure

    hatchEgg

    Hatch an egg that is ready

    discardEgg

    Discard an egg. Egg must be fully grown to be discarded.

    harvestEgg

    Harvest an egg that is ready

    applyStructureBooster

    Apply a structure booster to a structure. Booster will be removed on success and structure object returned

    applyInk

    Apply an inkbottle to a structure or an inkdropper to a p3.

    StoreService.php


    This service does below actions.

    storeItems

    Get all Store Items for the active user

    buyItem

    Buy an item with assetId and add it to the player's item bag

    TileService.php

    This service does below action.

    tilesForPlayer

    All tiles in players scene

    UpgradeService.php

    This service is used to access upgrades. It does below actions.

    playerUpgrades

    Finds all upgrades the player has bought.

    availableUpgrades

    Finds all upgrades available to the player.

    nextUpgradeFor

    Find the next upgrade for a SceneItem.

    buyUpgrade

    Buy the upgrade and apply it to target.


    How to troubleshoot the Habitarium Services

    Below are the steps which using for troubleshoot the Services.


    We have Service browser here: http://ncmall.neopets.com/amfphp/browser/ this is useful to troubleshoot the application.
    In browser it will show the configure popup which ask for Gateway.php path details.
    Once you provide the path of gateway.php, It will get the services available inside amfphp/services folder.
    When you select the service, it will display the methods having inside the service.
    Then select the method and click the call button, which communicate with appropriate controller class, gives the response and displays in debug result window.

    Edit , removed alot of techy data if you want to know the full techy details pm me , it was a bit bloated for new programmers though.
    Last edited by DarkByte; 03-26-2013 at 08:29 AM.

  2. The Following 7 Users Say Thank You to DarkByte For This Useful Post:

    BEDDOEDv (08-19-2014),I_royalty_I (03-31-2013),Potatoes (03-26-2013),raji (03-04-2014),Reemer (03-26-2013),Thunder (03-26-2013),txtsd (03-21-2014)

  3. #2
    Reemer's Avatar
    Join Date
    Dec 2011
    Gender
    Location
    Iowa
    Age
    25
    Posts
    625
    Thanks
    348
    Thanked 414 Times in 242 Posts


    Downloads
    30
    Uploads
    9
    Mentioned
    200 Post(s)
    Time Online
    2 d 17 h 46 m
    Avg. Time Online
    2 m
    Rep Power
    7
    I was never able to get timeTravel or createVictim to do anything D:

  4. #3
    Potatoes's Avatar
    Join Date
    Dec 2011
    Posts
    211
    Thanks
    17
    Thanked 19 Times in 18 Posts


    Downloads
    37
    Uploads
    0
    Mentioned
    14 Post(s)
    Time Online
    1 d 16 h 22 m
    Avg. Time Online
    1 m
    Rep Power
    6
    Beautiful! I might re-edit it again

  5. #4
    Potatoes's Avatar
    Join Date
    Dec 2011
    Posts
    211
    Thanks
    17
    Thanked 19 Times in 18 Posts


    Downloads
    37
    Uploads
    0
    Mentioned
    14 Post(s)
    Time Online
    1 d 16 h 22 m
    Avg. Time Online
    1 m
    Rep Power
    6
    Self.itemcollection

  6. #5
    Banned
    Join Date
    Jun 2012
    Gender
    Location
    90 90
    Age
    31
    Posts
    1,714
    Thanks
    876
    Thanked 2,877 Times in 1,139 Posts


    Downloads
    44
    Uploads
    1
    Mentioned
    562 Post(s)
    Time Online
    118 d 6 h 45 m
    Avg. Time Online
    1 h 30 m
    Rep Power
    0
    Gamer IDs

    Gamertag: DarkByt3 PSN ID: raredaredevil
    Quote Originally Posted by Potatoes View Post
    Self.itemcollection
    That is not from the gateway as such , playerservice.update() returns a copy of every tile in the map , I just get that and stick it into self.itemcollection in my bots so I dont have to call playerservice.update() a bunch of times (just once per tick) whenever I want a copy of the players map which would slow the bot down .

  7. #6
    Potatoes's Avatar
    Join Date
    Dec 2011
    Posts
    211
    Thanks
    17
    Thanked 19 Times in 18 Posts


    Downloads
    37
    Uploads
    0
    Mentioned
    14 Post(s)
    Time Online
    1 d 16 h 22 m
    Avg. Time Online
    1 m
    Rep Power
    6
    As of now the main problem I'm facing is trying to understand amfphp. Seems like it's a class above me

    The other coding are relatively easy to understand

  8. #7
    Banned
    Join Date
    Jun 2012
    Gender
    Location
    90 90
    Age
    31
    Posts
    1,714
    Thanks
    876
    Thanked 2,877 Times in 1,139 Posts


    Downloads
    44
    Uploads
    1
    Mentioned
    562 Post(s)
    Time Online
    118 d 6 h 45 m
    Avg. Time Online
    1 h 30 m
    Rep Power
    0
    Gamer IDs

    Gamertag: DarkByt3 PSN ID: raredaredevil
    Im making a amfphp wrapper for vb.net right now if people prefer to use that. There is not one publicly even for legit coders so will release it on my personal site.

  9. #8

    Join Date
    Dec 2012
    Gender
    Posts
    0
    Thanks
    0
    Thanked 3 Times in 3 Posts


    Downloads
    16
    Uploads
    0
    Mentioned
    0 Post(s)
    Time Online
    2 h 11 m
    Avg. Time Online
    N/A
    Rep Power
    0
    THANK YOU

Posting Permissions

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