Results 1 to 8 of 8

Thread: Neopets - Habi Application Flow

  1. #1

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m

    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 (you need an account to see links)

    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: (you need an account to see links) 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 07: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
    Joined
    Dec 2011
    Posts
    639
    Userbars
    8
    Thanks
    364
    Thanked
    446/256
    DL/UL
    39/0
    Mentioned
    203 times
    Time Online
    4d 13h 47m
    Avg. Time Online
    1m
    I was never able to get timeTravel or createVictim to do anything D:

  4. #3
    Potatoes's Avatar
    Joined
    Dec 2011
    Posts
    210
    Userbars
    2
    Thanks
    17
    Thanked
    19/18
    DL/UL
    37/0
    Mentioned
    14 times
    Time Online
    1d 16h 22m
    Avg. Time Online
    N/A
    Beautiful! I might re-edit it again

  5. #4
    Potatoes's Avatar
    Joined
    Dec 2011
    Posts
    210
    Userbars
    2
    Thanks
    17
    Thanked
    19/18
    DL/UL
    37/0
    Mentioned
    14 times
    Time Online
    1d 16h 22m
    Avg. Time Online
    N/A
    Self.itemcollection

  6. #5

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m
    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
    Joined
    Dec 2011
    Posts
    210
    Userbars
    2
    Thanks
    17
    Thanked
    19/18
    DL/UL
    37/0
    Mentioned
    14 times
    Time Online
    1d 16h 22m
    Avg. Time Online
    N/A
    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

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m
    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

    Joined
    Dec 2012
    Posts
    0
    Userbars
    0
    Thanks
    0
    Thanked
    3/3
    DL/UL
    16/0
    Mentioned
    Never
    Time Online
    2h 11m
    Avg. Time Online
    N/A
    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
  •