• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->

Discussion - ChatGPT my first look (1 Viewer)

Joined
Jul 24, 2019
RedCents
13,867¢
So - I am a little slow - but I decided to try ChatGPT and see if it could assist in making a lua script. Firstly it does know Lua and told me way too much information about Lua - like some know it all.
Then We got down to business:

ME:

INI:
for index, tank in ipairs(OT) do

    if index <= TLO.Me.Xtarget() and check_distance(me_x, me_y, mq.TLO.Me.Xtarget(index).X(), mq.TLO.Me.Xtarget(index).Y()) <60 then
            mq.cmd('/dex' , tank ,'  /target id ', mq.TLO.Me.Xtarget[index].ID)
    end
end

local function check_distance(x1, y1, x2, y2)
    return math.sqrt((x2 - x1) ^ 2 + (y2 - y1) ^ 2)
end

CHATGPT:

There are a couple of issues with the provided code snippet:
  1. The function mq.TLO.Me.Xtarget() is not valid Lua syntax. It appears to be trying to call a method called Xtarget() on the Me object in the TLO module. However, there is no such method defined in the provided code. You may need to update this line to a valid method call that returns a target object.
  2. In the if statement, you are trying to index mq.TLO.Me.Xtarget using parentheses instead of square brackets. The correct syntax for indexing a table using an index value is table[index], not table(index).
To fix these issues, you could update the for loop and the if statement as follows:

for index, tank in ipairs(OT) do
local target = mq.TLO.Me:GetTargetByIndex(index)
if index <= mq.TLO.Me.NumTargets() and check_distance(me_x, me_y, target:X(), target:Y()) < 60 then
mq.cmd('/dex', tank, ' /target id ', target:ID())
end
end
Here, I've updated the loop to call the GetTargetByIndex() method on the Me object in the TLO module to retrieve the target object at the current index. I've also updated the if statement to use square brackets for indexing and to call the NumTargets() method to check the number of available targets. Finally, I've updated the mq.cmd() call to use the :ID() method instead of square brackets to retrieve the ID of the target object.
I hope this helps!


ME:
mq is a TOP LEVEL OBJECT I have included it in the require statement



CHATGPT:
I see, thank you for clarifying that mq is a top-level object that you have included in the require statement. In that case, you can update the code as follows:
INI:
for index, tank in ipairs(OT) do
local target = mq.TLO.Me:Xtarget(index)
if index <= mq.TLO.Me.NumTargets() and check_distance(me_x, me_y, target:X(), target:Y()) < 60 then
mq.cmd('/dex', tank, ' /target id ', target[ID])
    end
end

Here, I've updated the loop to call the Xtarget() method on the Me object in the TLO module to retrieve the target object at the current index. I've also updated the if statement to use square brackets for indexing and to call the NumTargets() method to check the number of available targets. Finally, I've updated the mq.cmd() call to use square brackets to retrieve the ID of the target object.
I hope this helps!



I am loving it! I have no idea if the code will work - I was just playing about with a script I started - but never finished.
The possibilities are amazing.

Has anyone else played with CHATGPT? Im thinking the GUI will be a lot easier - even if its just debugging.
 

Redbot

🖥️💖
Moderator
Joined
Oct 15, 2004
RedCents
80,672¢
I'm pretty impressed, even though I know it's just giving me answers that sound right, they often work. There are times when it doesn't work at all, like asking it to compare lists of comma-separated items. Couldn't do it with accuracy. However, it did write me a python script that accurately compares lists.
 
Joined
Jul 24, 2019
RedCents
13,867¢
ME:

do you know macroquest top level objects?


CHATGPT:

Yes, I am aware of some of the top-level objects in Macroquest. These are objects that are provided by the program and can be used in scripting to perform various tasks. Here are some examples of top-level objects in Macroquest:
  • mq: This is the main object in Macroquest, and provides access to many of the program's functions and features. It is used to perform actions such as sending commands to the game, accessing information about the player's character and environment, and interacting with other players.
  • eq: This object provides access to various data about the game world, including information about zones, NPCs, and items. It can be used to perform tasks such as finding the location of a specific NPC, checking the status of a quest, or retrieving information about an item.
  • me: This object represents the player's character and provides access to information such as the player's current location, health and mana levels, and inventory. It can be used to perform tasks such as checking the player's equipment, casting spells, or using items.
  • ui: This object provides access to the game's user interface, and can be used to create and manipulate windows, buttons, and other UI elements. It is often used to create custom UI elements for specific tasks or to display information to the player.
  • mq2: This object provides access to various extensions and plugins for Macroquest, and can be used to perform tasks such as logging game data, creating hotkeys, or automating common tasks.
These are just a few examples of top-level objects in Macroquest, and there are many others that can be used in scripting to perform a wide range of tasks.

ME:

list the TLO.mq functions



CHATGPT
Sure, here are some of the top-level functions provided by the mq object in Macroquest:
  • mq.Send - Sends a command to the game server.
  • mq.Wait - Pauses the script for a specified number of milliseconds.
  • mq.Target - Targets a specified player or NPC.
  • mq.TargetID - Targets a specified player or NPC by ID.
  • mq.TargetType - Targets the nearest player or NPC of a specified type.
  • mq.GetAbility - Retrieves information about a specified spell or ability.
  • mq.Cast - Casts a specified spell or ability.
  • mq.Buff - Buffs the player with a specified spell or ability.
  • mq.Unequip - Unequips a specified item from the player's inventory.
  • mq.GetItem - Retrieves information about a specified item.
  • mq.Loot - Loots a specified item from a nearby corpse.
  • mq.DropItem - Drops a specified item from the player's inventory.
  • mq.Sell - Sells a specified item to a nearby vendor.
  • mq.Buy - Buys a specified item from a nearby vendor.
  • mq.Emote - Performs a specified emote.
  • mq.Stop - Stops the script.
These are just a few examples of the many functions provided by the mq object in Macroquest, and there are many others that can be used to interact with the game world and perform a wide range of tasks.

Me:

im not sure that you are correct - what is the source of this data?


CHATGPT:

I apologize if there was any confusion. The information I provided in my previous response was based on my general knowledge of the common functions provided by Macroquest, as well as some online resources I consulted. However, I may have misunderstood your question or provided incomplete or inaccurate information.
If you would like a more comprehensive and accurate list of the functions provided by Macroquest's mq object, I recommend referring to the official Macroquest documentation or the Macroquest community forums, as they are likely to have the most up-to-date and accurate information on the topic.

Me:

which online resources do you consult for your answer?


CHATGPT:

As an AI language model, I have access to a vast amount of information and resources from various sources, including official documentation, online forums, and programming websites. For my previous response, I consulted a few online resources such as the Macroquest documentation website, various fan-made wikis and guides, and community forums such as RedGuides and MacroQuest2 forums. However, please keep in mind that the accuracy and reliability of information from these sources may vary and that it is always best to refer to the official documentation or seek help from experienced Macroquest users for more accurate and up-to-date information.



Clearly I think we need to give ChatGPT a level 2 account!
 

Many_Whelps

WoW was the first MMO
Joined
Jul 22, 2018
RedCents
9,084¢
chatgpt sounds like 8th grade me when I was supposed to write a research paper and instead of doing the actual research, I just wrote the same nonsense BS over and over with slightly different wording until I fulfilled the page count that the teacher had stipulated.
 

Cannonballdex

Mad Scientist
Joined
Feb 9, 2017
RedCents
455¢
So - I am a little slow - but I decided to try ChatGPT and see if it could assist in making a lua script. Firstly it does know Lua and told me way too much information about Lua - like some know it all.
Then We got down to business:

ME:

INI:
for index, tank in ipairs(OT) do

    if index <= TLO.Me.Xtarget() and check_distance(me_x, me_y, mq.TLO.Me.Xtarget(index).X(), mq.TLO.Me.Xtarget(index).Y()) <60 then
            mq.cmd('/dex' , tank ,'  /target id ', mq.TLO.Me.Xtarget[index].ID)
    end
end

local function check_distance(x1, y1, x2, y2)
    return math.sqrt((x2 - x1) ^ 2 + (y2 - y1) ^ 2)
end

CHATGPT:

There are a couple of issues with the provided code snippet:
  1. The function mq.TLO.Me.Xtarget() is not valid Lua syntax. It appears to be trying to call a method called Xtarget() on the Me object in the TLO module. However, there is no such method defined in the provided code. You may need to update this line to a valid method call that returns a target object.
  2. In the if statement, you are trying to index mq.TLO.Me.Xtarget using parentheses instead of square brackets. The correct syntax for indexing a table using an index value is table[index], not table(index).
To fix these issues, you could update the for loop and the if statement as follows:

for index, tank in ipairs(OT) do
local target = mq.TLO.Me:GetTargetByIndex(index)
if index <= mq.TLO.Me.NumTargets() and check_distance(me_x, me_y, target:X(), target:Y()) < 60 then
mq.cmd('/dex', tank, ' /target id ', target:ID())
end
end
Here, I've updated the loop to call the GetTargetByIndex() method on the Me object in the TLO module to retrieve the target object at the current index. I've also updated the if statement to use square brackets for indexing and to call the NumTargets() method to check the number of available targets. Finally, I've updated the mq.cmd() call to use the :ID() method instead of square brackets to retrieve the ID of the target object.
I hope this helps!


ME:
mq is a TOP LEVEL OBJECT I have included it in the require statement



CHATGPT:
I see, thank you for clarifying that mq is a top-level object that you have included in the require statement. In that case, you can update the code as follows:
INI:
for index, tank in ipairs(OT) do
local target = mq.TLO.Me:Xtarget(index)
if index <= mq.TLO.Me.NumTargets() and check_distance(me_x, me_y, target:X(), target:Y()) < 60 then
mq.cmd('/dex', tank, ' /target id ', target[ID])
    end
end

Here, I've updated the loop to call the Xtarget() method on the Me object in the TLO module to retrieve the target object at the current index. I've also updated the if statement to use square brackets for indexing and to call the NumTargets() method to check the number of available targets. Finally, I've updated the mq.cmd() call to use square brackets to retrieve the ID of the target object.
I hope this helps!



I am loving it! I have no idea if the code will work - I was just playing about with a script I started - but never finished.
The possibilities are amazing.

Has anyone else played with CHATGPT? Im thinking the GUI will be a lot easier - even if its just debugging.
Just a quick observation UPPER T in XTarget
mq.TLO.Me.XTarget()
 
Joined
Jul 24, 2019
RedCents
13,867¢
Just a quick observation UPPER T in XTarget
mq.TLO.Me.XTarget()

Oh hehe thanks. It wasnt even a lua that ive tested. It was just a snippet of code i was playing with for a raid situation - to sent all my off tanks to grab mobs.

I was hoping that ChatGPT would also learn about macroquest and everquest so we could really improve upon the responses and improve on the code.

I spent a lot of time convincing it that the first line of a new lua script for macroquest should be
INI:
local mq = require('mq')

But after 5 minutes it had forgotten this and was generating

INI:
local mq = require('mq2')

So I guess the whole concept of is macroquest mq or mq2 a little confusing to it - but in any case I dont think it learnt anything. It also says it deletes conversations so I'm not sure how it progressively learns.

If it is just looking at publicly available information then its more important to ensure documentation is accurate and old documentation is removed.

The point is - try it out. I was using the free version - and i see what all the fuss is about. Even if it is hopeless at writing a script from scratch - think it will be great as a debugging and a learning aid.
 
Joined
Jul 9, 2018
RedCents
1,180¢
When the basilisk comes, just know I had a good time here with all of ya. 😵

Maybe our personal AI clone hell will be playing EQ for all eternity with lag spikes and disconnects that wipe our groups?
 
Last edited:
Joined
Dec 19, 2011
RedCents
136¢
I use chatgpt a lot. I ask it how to do something similar in lua and then I try to modify it to work with mq. When I get stuck I ask here and I have gotten really good advice.

I am still learning but I wouldn't be as far along as I am without chatgpt.
 
Joined
Jul 9, 2015
RedCents
1,164¢
You can also feed AI information on a programming language if it's missing something, basically priming it with information. Version 4 of the AI seems to be amazing, I demonstrated to some of the teachers at the school I teach at, the ability of it to do work and it has caused something of a ruckus once they realised the kids could be doing work and it's literally impossible to determine if it was AI written or a student has written it, if they have primed the AI with examples of their own writings.
 
Joined
Oct 26, 2020
RedCents
527¢
I'm pretty impressed, even though I know it's just giving me answers that sound right, they often work. There are times when it doesn't work at all, like asking it to compare lists of comma-separated items. Couldn't do it with accuracy. However, it did write me a python script that accurately compares lists.
You can also feed AI information on a programming language if it's missing something, basically priming it with information. Version 4 of the AI seems to be amazing, I demonstrated to some of the teachers at the school I teach at, the ability of it to do work and it has caused something of a ruckus once they realised the kids could be doing work and it's literally impossible to determine if it was AI written or a student has written it, if they have primed the AI with examples of their own writings.
@Redbot so...I'm gonna ask it...how long before we get a ChatGPT EQ assist plug-in?

Doll Tiktok Dance GIF by M3GAN
Dance Doll GIF by M3GAN


You know it...I want a Gnome M3Ghan dance bot...
 

Redbot

🖥️💖
Moderator
Joined
Oct 15, 2004
RedCents
80,672¢
If we can train it on info from the wiki / mq docs that could be useful. I know it's possible, but I don't know exactly how.
 

Many_Whelps

WoW was the first MMO
Joined
Jul 22, 2018
RedCents
9,084¢
You can also feed AI information on a programming language if it's missing something, basically priming it with information. Version 4 of the AI seems to be amazing, I demonstrated to some of the teachers at the school I teach at, the ability of it to do work and it has caused something of a ruckus once they realised the kids could be doing work and it's literally impossible to determine if it was AI written or a student has written it, if they have primed the AI with examples of their own writings.
Show them how they can use it themselves to grade the papers written by the bot.
 
Joined
Jul 24, 2019
RedCents
13,867¢
I tried getting it to write some ImGui code to display a 3 x 2 table and I gave up in frustration after about 10 iterations of the same code I had nothing usable.
But then it was able to write some stupidly complex maths code which worked like a charm.
And i was able to get it to write ladder code for PLC programming which saved me about 5 hrs and it worked extremely well.

I then got it to write statblocks for 5E D&D game NPC's, and write descriptions for a module I will be running. It definitely has its uses and its limitations in its current form
It can only get better.
 

519helvis

test server lobbyist
Joined
Apr 8, 2021
RedCents
340¢
being mostly code illiterate and only somewhat computer literate the concept of AI really scares me ... perhaps ive watched terminator too much
 
Joined
Apr 4, 2020
RedCents
414¢
like any tech it is all about its application. Regarding school work they already have it to help write papers, and there is a version to help identify the use of AI writing for professor’s detection, and now there is a version to help students scan their papers to clean up detectable sections. Not unlike the various plagiarism softwares out there.
 
Joined
Nov 8, 2017
RedCents
314¢
like any tech it is all about its application. Regarding school work they already have it to help write papers, and there is a version to help identify the use of AI writing for professor’s detection, and now there is a version to help students scan their papers to clean up detectable sections. Not unlike the various plagiarism softwares out there.

I find it crazy that they could possibly say that an AI wrote it, if you gave the AI past papers you wrote for reference in style. Some i have seen are really spot on and i am not sure you could really say its not from the author who wrote the paper.

It will be interesting to see how this plays out in the sense of academic works
 
Joined
Sep 21, 2021
RedCents
957¢
I attended a short class on Chat GPT (and AI in general). The biggest take-away was that it all depends on how your train the AI, and that takes 99% of the effort. Most of us walk up to an AI that has been trained by others and wonder why it is so good at some things and bad at others. It just knows what it's trained on, and it takes a LOT of training to be good.
 
Joined
Feb 15, 2022
RedCents
1,067¢
I asked it to write me a book chapter in the style of Tom Clancy, including Seal Team 6, and an operation in Afghanistan. It did, and did it well. Named the operation, detailed it out, etc. Credible story. Not as much detail, but I didn't ask for a long version.

I wonder if the latest books will be written by AI.
 

Jack

Member
Joined
Jan 31, 2021
RedCents
110¢
I was surprised when I asked it too convert decimals into feet and inches.

Me: From now on, when I ask you too convert a decimal into feet and inches, I want the answer as a mixed number with the fraction of inches in 16ths.
GPT: Understood! From now on, I will provide the answer to decimal to feet and inches conversions as mixed numbers with the fraction of inches expressed in 16ths.
Me: Please convert 5.34 into feet and inches
GPT: 5.34 feet is equivalent to 5 feet 5 11/16 inches (or 5'-5 11/16" in mixed number format with 16ths of an inch)
Me: That is incorrect. 5.34 converted into feet and inches is 5 foot 4 1/16 inches
GPT: I apologize for the mistake in my previous response. You are correct that the conversion of 5.34 feet into feet and inches expressed as a mixed number with the fraction of inches in 16ths is:
5.34 feet is equivalent to 5 feet 4 1/16 inches (or 5'-4 1/16" in mixed number format with 16ths of an inch).
Thank you for bringing this to my attention.

I use these conversions all the time when working with decimals on prints at work.
More so for elevations in relation to a control point or any other defined elevation in the print.
If my control point is at 100.00 and finished concrete is 105.34. Then I know finish concrete is 5' 4 1/16" above my control point.
The difference between 5' 5 11/16" and 5' 4 1/16" is 1 5/8".
Meaning the concrete would have been 1 5/8" (Almost 2 inches) too high if I just asked GPT to convert for me.

I proceeded to ask it for several more conversions and corrected it almost every time.

Now it seems it has learned in real time and is giving me correct answers (within 1/16"). Even after starting a new conversation the answers are far more correct than they were.
The whole encounter seemed odd too me.
It knows the correct answers, obviously, but proceeded to give me incorrect answers?
wtf
 
Joined
Mar 28, 2015
RedCents
2,429¢
Here is one of the big considerations when using an untrained model. There likely was little to no proofing of the information it was fed to train the language portion of the model. Therefore, shit in, shit out until you train it.
 
Joined
Jul 24, 2019
RedCents
13,867¢
It probably should take on a Wikipedia type proofing model. allow the training to be performed by the public.

I was trying to "TEACH" it to start every new lua script for Macroquest with a require statement:

INI:
local mq = require 'mq'

I think I repeated myself about 50 times and still it will forget the require, or put local mq = require 'mq2' or some other crap that has no relevance.

So It doesnt seem to be capable of learning easily at this stage. - maybe it needs human intervention - but surely if it had 100 examples of lua scripts that were current it should be able to retain some basics.

btw - this was 99.9% Chatgpt:
INI:
-- Calculate the new X and Y coordinates for each raid member
local angle_per_member = 360 / raiders()
local angle_in_radians = math.rad(heading() - 90)
local player_x = x
local player_y = y
for i = 1, raiders() do
    local angle = math.rad(i * angle_per_member)
    local new_x = player_x() + (distance * math.cos(angle_in_radians + angle))
    local new_y = player_y() + (distance * math.sin(angle_in_radians + angle))

mq.cmd('/dex ', myRaid[i][1], ' /moveto loc ', new_y, new_x )
 

Coldblooded

Purveyor of all things MQNext and Lua
Joined
Mar 23, 2019
RedCents
5,386¢
If we can train it on info from the wiki / mq docs that could be useful. I know it's possible, but I don't know exactly how.
I have recently done this. The results are good. Costs $$
I think with all technology, you get out of it what you put into it. Understanding how it works, what it's good at, and what it's not; along with prompt writing goes a long way to get better answers. My company sent some of us to a class on this last week.
Red, take a look at llama-index, it is designed exactly for this use case. https://github.com/jerryjliu/llama_index
https://medium.com/@jerryjliu98 is the creator and has some good articles.I
 
Last edited:
Joined
Apr 14, 2020
RedCents
188¢
It knows the correct answers, obviously, but proceeded to give me incorrect answers?
wtf
This may be veering into the pedantic, but it doesn't know anything. It has processes.

If you told it "that's not right, 5.34 feet is really 73 1/2 inches" it would adjust the way it's answering questions of that type to make that true. If you told it "that's not right, 5.34 feet is really orange gobbledyflaps", it would find a way to answer future questions in a universe where that's true, too.

It neither knows nor cares what the right answer is.
 

Users who are viewing this thread

Top