Questions tagged [lua-scripting-library]

Lua Scripting Library, A Lua library used in World of Warcraft game scripting.

Lua Scripting Library, A Lua library used in World of Warcraft game scripting. It can change the text colors, it can read and write variables to a separate file and it even allows loading Lua scripts in game without having to reboot server.

22 questions
5
votes
3 answers

Date after number of days in lua scripting

I am new to lua scripting. I have a startDate ("03-05-2014" as "dd-mm-yyyy") and a span in days (2) Can anyone help me how to get the endDate based on the startDate and span?. Example startDate span endDate --------- ----…
Vijay
  • 71
  • 1
  • 2
  • 11
4
votes
5 answers

Implementing post / pre increment / decrement when translating to Lua

I'm writing a LSL to Lua translator, and I'm having all sorts of trouble implementing incrementing and decrementing operators. LSL has such things using the usual C like syntax (x++, x--, ++x, --x), but Lua does not. Just to avoid massive amounts…
David Seikel
  • 53
  • 1
  • 8
2
votes
0 answers

Lus script error - attempt to index a nil value (global 'os')

I am trying to fetch the UTC time as per below code in my Lua script. local tim = os.time() local currentUTC = os.date('!%Y-%m-%d-%H:%M:%S', tim) payload["UTC"] = currentUTC I am getting below error at the 1st…
Sekhar
  • 627
  • 4
  • 14
  • 34
1
vote
1 answer

Logitech Gaming Software LUA script not working on GHub

I’ve always used this LUA script on Logitech Gaming software by using a G502 mouse, I had to change my old mouse and I bought a new version “G502x” which is not recognized by LGS so I had to install GHub to make the mouse useful, but the script is…
1
vote
2 answers

Literal, variable string replacement in Lua

I wrote the following code: rpid = "Remote-Party-ID:;abc" local startRPID = string.find(rpid, "<") local endRPID = string.find(rpid, ">") local ANI = string.sub(rpid, startRPID, endRPID) local MRPID = "\"TEST\" "..ANI local finalRPID =…
1
vote
0 answers

How to Convert object to array of objects in luaScript-KrakenD

I have mentioned the code in which i have that query.I am requesting you to help me on the same lua or krakend config or Both. (Note Key is not exists) LuaScript local docDetails = responseData:get("DocDetails") …
1
vote
1 answer

how to generate random value in each time I run the lua script

I have written a lua script named "lua_rand_gen" which contains following code: function random_number_func() math.randomseed(os.time()) return (math.random(100000000,999999999)) end print (random_number_func()) when I run the lua_rand_gen…
Abhishek
  • 139
  • 2
  • 13
1
vote
1 answer

Assigning Lua Script to a Button - Logitech G500s

I have a small macro for my Logitech G500s - i'm using it in FPS games to reduce recoil. Please see script below: EnablePrimaryMouseButtonEvents(true) function OnEvent(event, arg) if event == "MOUSE_BUTTON_PRESSED" and arg == 1 then …
LukeJ
  • 179
  • 5
  • 19
0
votes
0 answers

Implement refresh token in APIsix and keycloak, validate token against realm, and verify tenant ID in JWT plugin against request-referrer value

I have tried this text reference but didn't work properly. I am expecting that if login is unsuccessful, put retry mechanism. If second time, same thing happens, show unauthorized error. And if backend returns 302 - redirect to login or logout page.…
0
votes
1 answer

Lua script for creating a folder according to artist metatag with mpv player on windows

I watn to make mpv player like itunes library which organizes media library according to the tags of the file. For start I want to make script for mpv player that creates a folder according to artist metatag. When i add this keybinding in input.conf…
0
votes
0 answers

HMI Delta Modbus RTU Hex Address (Master)

I'm using DOPSoft to create HMI Application Modbus Master RTU. When I'm using API link.read("{Modbus}5@RW-1") it work fines. But I want to my parameters is flexible for reading multiple slave device with other address, so I used: local addrLinkMem =…
GOD SERENA
  • 11
  • 1
  • 3
0
votes
1 answer

How to evaluate a tables in Lua?

Hi guys I could really use some help. I'm not a programmer I'm just started out Im trying to store every resulting calculated value of two tables and somehow store it into another table for later use. Close = {1,2,6,2,2,...8} --livedata with a…
0
votes
0 answers

Can u guys tell me how i take things from scripts and put them all together in lua?

Can you guys tell me how I take things from scripts and put them all together in Lua for a Roblox script I am trying to make it would also be helpful if you told me how I could reverse a loadstring into the raw script so I can copy some features…
0
votes
2 answers

Lua :- How to create a variable that can have mix data types and pass it as an argument

I have a requirement of passing data in arguments. Which can be 1) A Single String -> 'StringData' 2) Multiple Strings -> 'StringData0', 'StringData1', 'StringData2' 3) Single Numeric data -> 10 OR 30.22 4) Multiple Numeric data -> 10, 20, 30 OR…
sidd
  • 33
  • 5
0
votes
4 answers

Having 3 vectors, how to check that a straight line can be drawn through them

I get the positions of 5 enemies in the game in vectors. Depending on the distance I choose, the number of enemies can vary from 0 to 5. I need to know their vectors each time to check whether it is possible to draw a straight line through a certain…
Aloex
  • 3
  • 4
1
2