• 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? Change the look. To dismiss this notice, click the X --->

Discussion - ChatGPT my first look (1 Viewer)

Joined
Jul 24, 2019
RedCents
19,707¢
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.
 
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.
 
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!
 
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.
 
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()
 
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.
 
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:
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.
 
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.
 
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...
 
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.
 
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.
 
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.
 
being mostly code illiterate and only somewhat computer literate the concept of AI really scares me ... perhaps ive watched terminator too much
 
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.
 
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
 
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.
 
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.
 
Hopefully this post doesn't get taken down because of forwarding traffic to another site but I was playing around with the ChatGPT4 bot for free online and it seems to be very useful. It can help you write Lua/ PYTHON scripts as well as other language. Just ask it what you want it to write and play around with it if you are bored.


Sign up and it's free. I figured this would jumpstart and help get more scripters going.

After my experience with this I am pretty impressed to say the least.
 
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
 
Hopefully this post doesn't get taken down because of forwarding traffic to another site but I was playing around with the ChatGPT4 bot for free online and it seems to be very useful. It can help you write Lua/ PYTHON scripts as well as other language. Just ask it what you want it to write and play around with it if you are bored.


Sign up and it's free. I figured this would jumpstart and help get more scripters going.

After my experience with this I am pretty impressed to say the least.
Do you tell it what you want the Lua Script to do or just what to type?
 
Please test your scripts before posting. Language models sound very confident about the code they give you, but remember their job is to write something that sounds correct. Most scripts don't work at all, as none of these AI's have been trained or "fine tuned" on MacroQuest. And the little they may have scraped from the web in 2021 is far out of date.
 
It generates code based on ai models. Theres a fairly good chance that none of it works. Ask it a made up question and it'll give you a made up answer filled with bits and pieces of real parts. Might get good on algorithms but very bad on API calls. Completely not something you can depend on, but might have some interesting ideas.
 
It very often makes shit up and it is rarely fully correct about anything MQ related. Good tool, but it cannot write scripts on its own.
 
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.
 
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 )
 
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:
MQ2Reply feeding a chatgpt prompt to reply to a GM or other tell as if its a roleplay toon would be fun!
 
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.
 
Red,
This is a new site that was introduced on the Llama Index update couple days ago. You can sign up for free, and you can upload 5 documents to test.

View attachment 48457

  • I went down a recent rabbit hole. I work in a field that I believe can be 60-70% automated by ChatGPT.
  • I saw a similar program called "ChatPDF." From the 25 seconds I spent on the linked website, it appears to do virtually the same thing.
My question:
For those of you who are in the know RE: AI and how it works:
  • Do these plugins basically just keep the NLP of ChatGPT but Limit it's knowledge base to the provided article; or,
  • Does it retain all of it's function and knowledge, but overwhelmingly weigh the information within the document as it's source material?
I'm strongly considering taking time to grab all of the information my company has publicly facing and use it to train one of these here ChatPDF or DocGPT apps to streamline a large portion of what I do. But not sure if I want to pull that trigger or commit to the manual time it would take to crawl the online documentation.

I'm sure a much more intelligent person would be able to create a program that quickly scans and copies text and follows all the link trees - but that is FAR beyond my "hello world" understanding of code.
 
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

Meanwhile, in the AI brain (the equivalent of a teenager): 'Let's see if this human will notice me giving him the wrong answers for the lulz.'
 
Today I used it to extract values out of a JSON formatted file. Usually I would write a quick Regex to do that. But I just pasted the whole thing in there and asked it to give me all the values in a list.
Magic.
 
Today I used it to extract values out of a JSON formatted file. Usually I would write a quick Regex to do that. But I just pasted the whole thing in there and asked it to give me all the values in a list.
Magic.
And it didn't slip something weird in the middle of the list that makes you go 'Wait...where'd it pull that from?'
 
I'm a software engineer by trade and I've been using GPT models to write code for me for work. So I thought I would give it a try and see if it could write MQ2 scripts for me.
I wanted to write a basic hunter script. I tried chatGPT, Google Bard, and Bing.

Chat GPT simply refused to write any MQ2 code
1700234306290.png

Google Bard at least attempted, but it wrote the script in python and then gaslit me into thinking it was indeed correct.
1700234380606.png
1700234410738.png

Finally to my surprize, Bing actually wrote a pretty decent script.
1700234455804.png
1700234483492.png
 
Discussion - ChatGPT my first look

Users who are viewing this thread

Back
Top