Git Product home page Git Product logo

easyplayfab's Introduction

Introduction

Steps:

  1. Import the package/files.
  2. Navigate to EasyPlayfab > Settings.
  3. Set your 'app id' and 'app secret' in the settings from your oculus dashboard.
  4. Press 'Validate Cloudscript' (assuming you've logged into your title).
  5. Once validation is complete, press 'Rule Tutorial' and follow the provided steps.

The package offers a range of features, including:

  • API spam prevention.
  • Modding detection (working, bypassable with harmonypatch).
  • Oculus user validation.
  • Secure API features (currency modification, IAP, item granting).
  • Most of the PlayFab API features, made easier.

LoginHandle Variables

LoginHandle.playfab_playerId

  • Returns the users PlayFab Id (string)

LoginHandle.oculus_username

  • Returns the users Oculus username (string)

LoginHandle.oculus_displayname

  • Returns the users Oculus displayname (string)

LoginHandle.oculus_userId

  • Returns the users Oculus userId (string)

LoginHandle.oculus_profileLink

  • Returns the users Oculus profile image link (string)

LoginHandle.isLoggedIn

  • Returns if the user is logged into playfab (bool)

LoginHandle.Spamming()

  • Use this when making a raw playfab api call (raw meaning something thats not in the EasyUsages because it does this automatically.)

EasyPlayfab.Friends

public static List<FriendInfo> friends

  • This property retrieves the current friend list for the local user.

public static void AddFriend(string targetPlayfabId)

  • Adds the PlayFab user, based on the targetPlayfabId, to the friend list of the local user.

Example:

EasyUsages.EasyPlayfab.Friends.AddFriend("TargetPlayerID");

public static void RemoveFriend(string targetPlayfabId)

  • Removes a specified user from the friend list of the local user.

Example:

EasyUsages.EasyPlayfab.Friends.RemoveFriend("TargetPlayerID");

public static void SetFriendTag(string targetPlayfabId, params string[] tags)

  • Updates the tag list for a specified user in the friend list of the local user.

Example:

EasyUsages.EasyPlayfab.Friends.SetFriendTag("TargetPlayerID", "tag1", "tag2");

EasyPlayfab.PlayerItemManagement

public static List<ItemInstance> ownedItems

  • This property retrieves the user's owned items.

public static void AddUserVirtualCurrency(int amount, string currencyCode, string playfabId = "")

  • Adds the user's virtual currency.

If PlayerID is null then it will effect the local player.

Example:

EasyUsages.EasyPlayfab.PlayerItemManagement.AddUserVirtualCurrency(100, "BN", "PlayerID");

public static void SubtractUserVirtualCurrency(int amount, string currencyCode, string playfabId = "")

  • Subtracts the user's virtual currency.

If PlayerID is null then it will effect the local player.

Example:

EasyUsages.EasyPlayfab.PlayerItemManagement.SubtractUserVirtualCurrency(50, "BN", "PlayerID");

public static void GrantItemToPlayer(string itemId, string catalogVer, string playfabId = "")

  • Grants a PlayFab item to the player.

If PlayerID is null then it will effect the local player.

Example:

EasyUsages.EasyPlayfab.PlayerItemManagement.GrantItemToPlayer("ItemID123", "CatalogVersion", "PlayerID");

EasyPlayfab.PlayerDataManagement

public static string playfab_username

  • This property gets or sets the user's PlayFab username.

public static List<ItemInstance> player_ownedItems

  • This property retrieves the user's owned PlayFab items.

public static Dictionary<string, UserDataRecord> UserData

  • This property retrieves the user's data.

public static void UpdateUserData(Dictionary<string, string> data, List<string> keysToRemove)

  • Updates the user's data.

Example:

Dictionary<string, string> data = new Dictionary<string, string>
{
    { "Key1", "Value1" },
    { "Key2", "Value2" }
};
List<string> keysToRemove = new List<string> { "KeyToRemove" };
EasyUsages.EasyPlayfab.PlayerDataManagement.UpdateUserData(data, keysToRemove);

EasyPlayfab.TitleDataManagement

public static List<CatalogItem> catalogItems

  • This property retrieves the title's catalog items.

public static Dictionary<string, string> TitleData

  • This property retrieves the title's data.

public static List<TitleNewsItem> titleNews

  • This property retrieves the title's news items.

EasyOculus.IAP

public static System.Action OnPurchase

  • This action is triggered when a purchase is completed. Use this to grant currency etc
void Start(){
    //subscribe to event
    EasyUsages.OculusUsages.IAP.OnPurchase += OnPurchase;
}

void OnPurchase(){
    //triggered when purchase was completed
}

public static void PurchaseSKU(string sku)

  • Purchase an Oculus SKU securely.

Example:

EasyUsages.EasyOculus.IAP.PurchaseSKU("YourSKU");

EasyAchievements

public static List<string> UnlockedAchievements

  • Retrieves the ID for each Achievement unlocked by the user.

public static void Achieve(string Identifier)

  • Unlocks an Achievement depending on the Identifer

Example:

EasyAchievements.Achieve("Identifier");

public static void AddCount(string Identifier, int count)

  • Adds a count to the achievement

Example:

EasyAchievements.AddCount("Identifier", 1);

public static void AddFields(string Identifier, string fields)

  • Adds a field to the achievement

Example:

EasyAchievements.AddFields("Identifier", "field");

Info

More will come in the future, join the Discord to get updates or get future packages

Credits

JokerJosh - Creating the package

Monosphere - Helped with protection against modding

Maximal - Testing the package and writing documentation

easyplayfab's People

Contributors

jokerjosh0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.