Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Did you add the comments around or were those also the AI's doing?

[DiscordArchive] Did you add the comments around or were those also the AI's doing?

[DiscordArchive] Did you add the comments around or were those also the AI's doing?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
12-18-2022, 04:17 PM
#1
Archived author: Bench • Posted: 2022-12-18T16:17:44.663000+00:00
Original source

Did you add the comments around or were those also the AI's doing?
rektbyfaith
12-18-2022, 04:17 PM #1

Archived author: Bench • Posted: 2022-12-18T16:17:44.663000+00:00
Original source

Did you add the comments around or were those also the AI's doing?

rektbyfaith
Administrator
0
12-18-2022, 04:17 PM
#2
Archived author: Bench • Posted: 2022-12-18T16:17:58.975000+00:00
Original source

Aside from obviously the comment at the top
rektbyfaith
12-18-2022, 04:17 PM #2

Archived author: Bench • Posted: 2022-12-18T16:17:58.975000+00:00
Original source

Aside from obviously the comment at the top

rektbyfaith
Administrator
0
12-18-2022, 04:18 PM
#3
Archived author: Foe • Posted: 2022-12-18T16:18:56.284000+00:00
Original source

Everything in the script was entirely the AI, but it took *many* revisions to get to that point. It did a lot of weird "beginner" errors before it started grinding at the intermediate level I'd say. There were many times I had to point out obvious bugs and logical errors
rektbyfaith
12-18-2022, 04:18 PM #3

Archived author: Foe • Posted: 2022-12-18T16:18:56.284000+00:00
Original source

Everything in the script was entirely the AI, but it took *many* revisions to get to that point. It did a lot of weird "beginner" errors before it started grinding at the intermediate level I'd say. There were many times I had to point out obvious bugs and logical errors

rektbyfaith
Administrator
0
12-18-2022, 04:20 PM
#4
Archived author: Foe • Posted: 2022-12-18T16:20:11.352000+00:00
Original source

The below was the very first version it generated when I asked it to create a teleporter using gossip:

```Lua
-- This script allows a creature to teleport a player to a specified location
-- when the player selects the appropriate gossip option.

-- First, we'll define the creature's gossip options and their corresponding
-- functions.
local GOSSIP_OPTIONS = {
{
text = "Teleport to Ironforge",
func = function(player, creature)
player:Teleport(0, -4918.15, -976.792, 501.535)
end,
},
{
text = "Teleport to Stormwind",
func = function(player, creature)
player:Teleport(0, -8913.23, 554.633, 93.7944)
end,
},
{
text = "Teleport to Darnassus",
func = function(player, creature)
player:Teleport(1, 9949.52, 2284.17, 1341.35)
end,
},
}

-- Next, we'll define the creature's OnGossip function, which is called
-- when the player talks to the creature and selects one of the gossip options.
function OnGossip(event, player, creature)
-- Add the gossip options to the player's gossip menu.
for _, option in ipairs(GOSSIP_OPTIONS) do
player:GossipMenuAddItem(0, option.text, 0, option.func)
end

-- Send the gossip menu to the player.
player:GossipSendMenu(0, creature)
end

-- Finally, we'll register the OnGossip function to be called when the player
-- talks to the creature.
RegisterCreatureGossipEvent(creatureId, 1, OnGossip)```
rektbyfaith
12-18-2022, 04:20 PM #4

Archived author: Foe • Posted: 2022-12-18T16:20:11.352000+00:00
Original source

The below was the very first version it generated when I asked it to create a teleporter using gossip:

```Lua
-- This script allows a creature to teleport a player to a specified location
-- when the player selects the appropriate gossip option.

-- First, we'll define the creature's gossip options and their corresponding
-- functions.
local GOSSIP_OPTIONS = {
{
text = "Teleport to Ironforge",
func = function(player, creature)
player:Teleport(0, -4918.15, -976.792, 501.535)
end,
},
{
text = "Teleport to Stormwind",
func = function(player, creature)
player:Teleport(0, -8913.23, 554.633, 93.7944)
end,
},
{
text = "Teleport to Darnassus",
func = function(player, creature)
player:Teleport(1, 9949.52, 2284.17, 1341.35)
end,
},
}

-- Next, we'll define the creature's OnGossip function, which is called
-- when the player talks to the creature and selects one of the gossip options.
function OnGossip(event, player, creature)
-- Add the gossip options to the player's gossip menu.
for _, option in ipairs(GOSSIP_OPTIONS) do
player:GossipMenuAddItem(0, option.text, 0, option.func)
end

-- Send the gossip menu to the player.
player:GossipSendMenu(0, creature)
end

-- Finally, we'll register the OnGossip function to be called when the player
-- talks to the creature.
RegisterCreatureGossipEvent(creatureId, 1, OnGossip)```

rektbyfaith
Administrator
0
12-18-2022, 04:21 PM
#5
Archived author: Foe • Posted: 2022-12-18T16:21:32.871000+00:00
Original source

I had to point out issues like it didn't have an OnGossipSelect function, that it tried to pass a function in the intid field of GossipMenuAddItem etc
rektbyfaith
12-18-2022, 04:21 PM #5

Archived author: Foe • Posted: 2022-12-18T16:21:32.871000+00:00
Original source

I had to point out issues like it didn't have an OnGossipSelect function, that it tried to pass a function in the intid field of GossipMenuAddItem etc

rektbyfaith
Administrator
0
12-18-2022, 04:22 PM
#6
Archived author: Foe • Posted: 2022-12-18T16:22:28.621000+00:00
Original source

Once it was a functional script, I started requesting more features, like faction checks, level checks etc. Once we got to the paging feature, it took maaany revisions to get it to refactor the script to a functional place
rektbyfaith
12-18-2022, 04:22 PM #6

Archived author: Foe • Posted: 2022-12-18T16:22:28.621000+00:00
Original source

Once it was a functional script, I started requesting more features, like faction checks, level checks etc. Once we got to the paging feature, it took maaany revisions to get it to refactor the script to a functional place

rektbyfaith
Administrator
0
12-18-2022, 04:23 PM
#7
Archived author: Foe • Posted: 2022-12-18T16:23:02.780000+00:00
Original source

Even then, the paging isn't great in the final version, but I don't think I'd be able to get the AI to make it better
rektbyfaith
12-18-2022, 04:23 PM #7

Archived author: Foe • Posted: 2022-12-18T16:23:02.780000+00:00
Original source

Even then, the paging isn't great in the final version, but I don't think I'd be able to get the AI to make it better

rektbyfaith
Administrator
0
12-18-2022, 04:23 PM
#8
Archived author: Foe • Posted: 2022-12-18T16:23:32.481000+00:00
Original source

It's functional, but it has a lot of "what if" issues
rektbyfaith
12-18-2022, 04:23 PM #8

Archived author: Foe • Posted: 2022-12-18T16:23:32.481000+00:00
Original source

It's functional, but it has a lot of "what if" issues

rektbyfaith
Administrator
0
12-18-2022, 04:29 PM
#9
Archived author: Foe • Posted: 2022-12-18T16:29:34.694000+00:00
Original source

I really do like how it added the next and back buttons though, it was clever use of the gossip table size to ensure it doesn't accidentally trigger an actual teleport option
rektbyfaith
12-18-2022, 04:29 PM #9

Archived author: Foe • Posted: 2022-12-18T16:29:34.694000+00:00
Original source

I really do like how it added the next and back buttons though, it was clever use of the gossip table size to ensure it doesn't accidentally trigger an actual teleport option

rektbyfaith
Administrator
0
12-18-2022, 06:01 PM
#10
Archived author: Honey • Posted: 2022-12-18T18:01:08.932000+00:00
Original source

That's a very interesting approach to write code
rektbyfaith
12-18-2022, 06:01 PM #10

Archived author: Honey • Posted: 2022-12-18T18:01:08.932000+00:00
Original source

That's a very interesting approach to write code

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)