Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] maybe any have large repo of all possibles lua eluna?

[DiscordArchive] maybe any have large repo of all possibles lua eluna?

[DiscordArchive] maybe any have large repo of all possibles lua eluna?

rektbyfaith
Administrator
0
06-04-2019, 12:22 PM
#1
Archived author: SheoWorld • Posted: 2019-06-04T12:22:48.587000+00:00
Original source

maybe any have large repo of all possibles lua eluna?
rektbyfaith
06-04-2019, 12:22 PM #1

Archived author: SheoWorld • Posted: 2019-06-04T12:22:48.587000+00:00
Original source

maybe any have large repo of all possibles lua eluna?

rektbyfaith
Administrator
0
06-04-2019, 12:30 PM
#2
Archived author: Shard • Posted: 2019-06-04T12:30:52.531000+00:00
Original source

<@527160687680552961>
```lua
local NpcId = 2843
local MyNPC = {}

function MyNPC.Move(event, delay, pCall, creature)
creature:MoveTo(2, 2024.25, 6844.25, 171.42);
end

function MyNPC.MoveBack(event, delay, pCall, creature)
creature:MoveTo(3, 2018.91, 6854.47, 171.42);
end

function MyNPC.OnSpawn(event, creature) -- 5
creature:RegisterEvent(MyNPC.Move, 100, 1);
end

function MyNPC.OnWP(event, creature, type, id) -- 6
if(id == 2) then
creature:RegisterEvent(MyNPC.MoveBack, 100, 1);
else if (id == 3) then
creature:RegisterEvent(MyNPC.Move, 100, 1);
end
end


RegisterCreatureEvent(NpcId, 5, MyNPC.OnSpawn)
RegisterCreatureEvent(NpcId, 6, MyNPC.OnWP)
```
I would do something like this. I haven't tried it, but u can
rektbyfaith
06-04-2019, 12:30 PM #2

Archived author: Shard • Posted: 2019-06-04T12:30:52.531000+00:00
Original source

<@527160687680552961>
```lua
local NpcId = 2843
local MyNPC = {}

function MyNPC.Move(event, delay, pCall, creature)
creature:MoveTo(2, 2024.25, 6844.25, 171.42);
end

function MyNPC.MoveBack(event, delay, pCall, creature)
creature:MoveTo(3, 2018.91, 6854.47, 171.42);
end

function MyNPC.OnSpawn(event, creature) -- 5
creature:RegisterEvent(MyNPC.Move, 100, 1);
end

function MyNPC.OnWP(event, creature, type, id) -- 6
if(id == 2) then
creature:RegisterEvent(MyNPC.MoveBack, 100, 1);
else if (id == 3) then
creature:RegisterEvent(MyNPC.Move, 100, 1);
end
end


RegisterCreatureEvent(NpcId, 5, MyNPC.OnSpawn)
RegisterCreatureEvent(NpcId, 6, MyNPC.OnWP)
```
I would do something like this. I haven't tried it, but u can

rektbyfaith
Administrator
0
06-04-2019, 12:34 PM
#3
Archived author: SheoWorld • Posted: 2019-06-04T12:34:00.747000+00:00
Original source

Dude, you are best. Exactly what i am looking for. There is MyNPC.OnWP(event, creature, type, id) - id is wp id?
rektbyfaith
06-04-2019, 12:34 PM #3

Archived author: SheoWorld • Posted: 2019-06-04T12:34:00.747000+00:00
Original source

Dude, you are best. Exactly what i am looking for. There is MyNPC.OnWP(event, creature, type, id) - id is wp id?

rektbyfaith
Administrator
0
06-04-2019, 12:34 PM
#4
Archived author: Shard • Posted: 2019-06-04T12:34:11.371000+00:00
Original source

Yep
rektbyfaith
06-04-2019, 12:34 PM #4

Archived author: Shard • Posted: 2019-06-04T12:34:11.371000+00:00
Original source

Yep

rektbyfaith
Administrator
0
06-04-2019, 12:34 PM
#5
Archived author: Shard • Posted: 2019-06-04T12:34:28.493000+00:00
Original source

<@527160687680552961>
http://www.elunaengine.com/Unit/MoveTo.html
http://www.elunaengine.com/Global/Regist...Event.html
[Embed: Unit:MoveTo - Eluna]
API documentation for the Unit:MoveTo method in the Eluna engine.
http://www.elunaengine.com/Unit/MoveTo.html

[Embed: Global:RegisterCreatureEvent - Eluna]
API documentation for the Global:RegisterCreatureEvent method in the Eluna engine.
http://www.elunaengine.com/Global/Regist...Event.html
rektbyfaith
06-04-2019, 12:34 PM #5

Archived author: Shard • Posted: 2019-06-04T12:34:28.493000+00:00
Original source

<@527160687680552961>
http://www.elunaengine.com/Unit/MoveTo.html
http://www.elunaengine.com/Global/Regist...Event.html
[Embed: Unit:MoveTo - Eluna]
API documentation for the Unit:MoveTo method in the Eluna engine.
http://www.elunaengine.com/Unit/MoveTo.html

[Embed: Global:RegisterCreatureEvent - Eluna]
API documentation for the Global:RegisterCreatureEvent method in the Eluna engine.
http://www.elunaengine.com/Global/Regist...Event.html

rektbyfaith
Administrator
0
06-04-2019, 12:36 PM
#6
Archived author: SheoWorld • Posted: 2019-06-04T12:36:12.551000+00:00
Original source

Thanks, ill read all over it. And many is good for understood. But lua is very new for me, and eluna script references is not compiling in my head)
rektbyfaith
06-04-2019, 12:36 PM #6

Archived author: SheoWorld • Posted: 2019-06-04T12:36:12.551000+00:00
Original source

Thanks, ill read all over it. And many is good for understood. But lua is very new for me, and eluna script references is not compiling in my head)

rektbyfaith
Administrator
0
06-04-2019, 12:39 PM
#7
Archived author: Shard • Posted: 2019-06-04T12:39:07.570000+00:00
Original source

Don't worry, it's pretty easy to understand :p
rektbyfaith
06-04-2019, 12:39 PM #7

Archived author: Shard • Posted: 2019-06-04T12:39:07.570000+00:00
Original source

Don't worry, it's pretty easy to understand :p

rektbyfaith
Administrator
0
06-04-2019, 12:52 PM
#8
Archived author: SheoWorld • Posted: 2019-06-04T12:52:12.250000+00:00
Original source

<@273112219573551114> , sorry. just didn't see where is problem - 2019-06-04 14:54:15 ERROR: lua_scripts/test3.lua:26: 'end' expected (to close 'function' at line 16) near <eof>
rektbyfaith
06-04-2019, 12:52 PM #8

Archived author: SheoWorld • Posted: 2019-06-04T12:52:12.250000+00:00
Original source

<@273112219573551114> , sorry. just didn't see where is problem - 2019-06-04 14:54:15 ERROR: lua_scripts/test3.lua:26: 'end' expected (to close 'function' at line 16) near <eof>

rektbyfaith
Administrator
0
06-04-2019, 12:59 PM
#9
Archived author: SheoWorld • Posted: 2019-06-04T12:59:59.612000+00:00
Original source

ok, add a "end" , and it's run. thanx
rektbyfaith
06-04-2019, 12:59 PM #9

Archived author: SheoWorld • Posted: 2019-06-04T12:59:59.612000+00:00
Original source

ok, add a "end" , and it's run. thanx

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)