Skip to content

Instantly share code, notes, and snippets.

View Elmuti's full-sized avatar
🏠
Working from home

real name Elmuti

🏠
Working from home
  • Finland
View GitHub Profile
#####################################
# MaNGOS Configuration file #
#####################################
[MangosdConf]
ConfVersion=2010100901
###################################################################################################################
# CONNECTIONS AND DIRECTORIES
#
local RATING_CONVERSION_TABLE = {
CritRating = { [1] = 1.4, [60] = 14, [70] = 22.1};
HitRating = { [1] = 2, [60] = 10, [70] = 15.8};
HasteRating = { [1] = 2, [60] = 10, [70] = 15.8};
DodgeRating = { [1] = 2.2, [60] = 12, [70] = 18.9};
ParryRating = { [1] = 3, [60] = 20, [70] = 31.5};
BlockRating = { [1] = 0.5, [60] = 5, [70] = 7.9};
Resilience = { [1] = 3.5, [60] = 25, [70] = 39.4};
ArmorPen = { [1] = 0.75, [60] = 5.92, [70] = 13.99};
DefenseRating = { [1] = 0.75, [60] = 5.92, [70] = 13.99};
--[[
Typical macro structure:
/cmd [cond, cond:2, cond=abc] arg
^ can be viewed as:
/cmd [cond?, cond:2?, cond=abc?]? arg?
where '?' are optional. More below:
Rules:
1. A macro always has a cmd.
2. A macro can an optionally have any number of conditionals with either no value, or values set with : or =
3. An argument is optional.
--For this code to work, you need to have a compiled nodegraph in workspace named "Nodes".
--You must also have parts called "START" and "GOAL" in workspace which will be used to find
--the start and goal locations for the path. See the documentation inside the module for more information.
local pLib = require(workspace.PathfindingLibrary)
local nodeModel = workspace.Nodes
local masterTable = pLib.CollectNodes(nodeModel)
--[[
File: pathLib.lua
Author: Elmeri Ferm
Description: A useful A-Star based pathfinding library for ROBLOX
Usage:
1. First you need to use the "Place Nodes" -plugin to place some nodes around the map.
--Don't touch
local pathLib = {}
local master_node_table, mnt_index
--Touch
local ai_max_range = math.huge
local printAStarPerformance = true
local NormalIds = {
Enum.NormalId.Front;
/*
File: pathfinder.ts
Author: Elmeri Ferm
Description: A-Star based pathfinding library. (Converted to TS from Lua on 30.04.2022)
Usage:
const pathFinder = new PathFinder(Workspace.WaitForChild("Nodes"));
const start = pathFinder.getNearestNode(Workspace.WaitForChild("Start").Position)
const goal = pathFinder.getNearestNode(Workspace.WaitForChild("Goal").Position)
const path = pathFinder.findPath(start, goal)
/**
* An Object representing the connection between GraphNodes
*/
export class GraphConnection {
ID: number;
G: number;
constructor(id: number, g: number) {
this.ID = id; this.G = g;
}
pcall(function()
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
game:GetService("StarterGui"):SetCore("TopbarEnabled", false)
end)
game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
local plabel = game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("HUD"):WaitForChild("PingLabel")
local pingremote = game.ReplicatedStorage.Ping
local UseWeaponViewmodel = true
@Elmuti
Elmuti / frames.lua
Created June 15, 2021 17:56
lorti/frames.lua
--get the addon namespace
local addon, ns = ...
--get the config values
local cfg = ns.cfg
local dragFrameList = ns.dragFrameList
-- v:SetVertexColor(.35, .35, .35) GREY
-- v:SetVertexColor(.05, .05, .05) DARKEST
---------------------------------------