Skip to content

EraFNOrg/EraScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

EraScript Documentation

Please keep in mind EraScript is currently in Beta.

FAQ

How to use EraScript?

Open %LOCALAPPDATA%, make a directory called "ProjectEra" and put your code in a file named execute.js, when in-game, open the console (using ~) and type cheatscript execute to execute the code.

What language does EraScript use?

JavaScript running on the Duktape engine.

Functions

  • UObject* findObject("Object", false)
    Finds an UObject by name. The second argument decides whether the name has to be exact
    • Usage:
      var object = findObject("BlueprintGeneratedClass HuskPawn");
      var object = findObject("BlueprintGeneratedClass HuskPawn.HuskPawn_C", true);
  • String getObjectName(Object)
    Returns the name of an object
    • Usage:
      var object = findObject("FortWeaponRangedItemDefinition WID_Sniper_Crossbow_Athena_R_Ore_T03");
      console.log(getObjectName(object));
      // FortWeaponRangedItemDefinition WID_Sniper_Crossbow_Athena_R_Ore_T03.WID_Sniper_Crossbow_Athena_R_Ore_T03
  • FVector getLocation(Actor)
    Returns the location of an Actor
    • Usage:
      console.log(getLocation(getLocalPlayer()));
      // {X:-124119.125,Y:-116151.125,Z:3917.18408203125}
  • spawnActor(Object, FVector)
    Spawns an Actor
    • Usage:
      var object = findObject("BlueprintGeneratedClass HuskPawn");
      spawnActor(object, new FVector(0, 0, 0));
  • destroyActor(Actor)
    Destroys an Actor
    • Usage:
      var object = findObject("BlueprintGeneratedClass HuskPawn");
      var husk = spawnActor(object, new FVector(0, 0, 0));
      
      messageBox("Press OK to destroy the husk.");
      destroyActor(husk);
  • Array<UObject*> findActorsOfClass(Object)
    UObject* findActorsOfClass(Object, 0)
    Finds all/one Actor of a class
    • Usage:
      var object = findObject("BlueprintGeneratedClass HuskPawn");
      spawnActor(object, new FVector(0, 0, 0));
      
      console.log(findActorsOfClass(object));
  • executeConsoleCommand("command")
    Executes a console command
    • Usage:
      executeConsoleCommand("demospeed 2");
  • teleport(Actor, FVector)
    Teleports an Actor
    • Usage:
      teleport(getLocalPlayer(), new FVector(0, 0, 0));
  • messageBox("Message")
    Shows a message box
    • Usage:
      messageBox("Hello, World!")
  • playSound(Sound, FVector, Volume, Pitch)
    Plays a sound
    • Usage:
      var sound = findObject("SoundCue airstrike_incoming_place_Cue");
      
      playSound(sound, getLocation(getLocalPlayer()), 1 ,1);
  • spawnPickup(Object, FVector, 1)
  • grantAbility(Object)
  • addToInventory(Object, 1)
  • bool isInVehicle()
  • UObject* getVehicle()
  • setScaleActor(Actor, FVector)
  • UObject* getLocalPlayer()

Classes

  • FVector

    new FVector(0, 0, 0)
  • FRotator

    new FRotator(0, 0, 0)
  • TArray

    Only used in the global variables. Only reading the TArrays is allowed currently

    • T TArray.get(1)
      Array<T> TArray.get()
      Returns the TArray item at the index or all of the items if no arguments are passed.
    • TArray.length
      Returns the length of the TArray

Global Variables

  • TArray ammoItemCount
  • TArray<UObject*> ammoItemDefs
  • TArray consumablesItemCount
  • TArray<UObject*> consumablesItemDefs
  • TArray resourceItemCount
  • TArray<UObject*> resourceItemDefs
  • TArray trapsItemCount
  • TArray<UObject*> trapsItemDefs
  • TArray weaponItemCount
  • TArray<UObject*> weaponItemDefs
  • TArray resourceItemCount
  • TArray<UObject*> resourceItemDefs
  • String fortniteVersion

About

Documentation for EraScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published