Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] local function LearnSpellsAndGiveItems(event, player)

[DiscordArchive] local function LearnSpellsAndGiveItems(event, player)

[DiscordArchive] local function LearnSpellsAndGiveItems(event, player)

rektbyfaith
Administrator
0
06-27-2023, 12:25 PM
#1
Archived author: Datoby • Posted: 2023-06-27T12:25:27.805000+00:00
Original source

local function LearnSpellsAndGiveItems(event, player)
-- Check for Horde characters
if player:IsHorde() then
-- Learn spells
player:LearnSpell(33388)
player:LearnSpell(33391)
player:LearnSpell(34090)

-- Add items to inventory
player:AddItem(25746, 1) -- ID: 25746, Quantity: 1
player:AddItem(25475, 1) -- ID: 25475, Quantity: 1
player:AddItem(25474, 1) -- ID: 25474, Quantity: 1
end
end

RegisterPlayerEvent(30, LearnSpellsAndGiveItems)

this is correct ?
rektbyfaith
06-27-2023, 12:25 PM #1

Archived author: Datoby • Posted: 2023-06-27T12:25:27.805000+00:00
Original source

local function LearnSpellsAndGiveItems(event, player)
-- Check for Horde characters
if player:IsHorde() then
-- Learn spells
player:LearnSpell(33388)
player:LearnSpell(33391)
player:LearnSpell(34090)

-- Add items to inventory
player:AddItem(25746, 1) -- ID: 25746, Quantity: 1
player:AddItem(25475, 1) -- ID: 25475, Quantity: 1
player:AddItem(25474, 1) -- ID: 25474, Quantity: 1
end
end

RegisterPlayerEvent(30, LearnSpellsAndGiveItems)

this is correct ?

rektbyfaith
Administrator
0
06-27-2023, 12:26 PM
#2
Archived author: Honey • Posted: 2023-06-27T12:26:51.890000+00:00
Original source

30 is OnFIrstLogin. Seems ok, but needs testing. If you run into problems, nil check the `player` and call an event which does it in 5 seconds.
rektbyfaith
06-27-2023, 12:26 PM #2

Archived author: Honey • Posted: 2023-06-27T12:26:51.890000+00:00
Original source

30 is OnFIrstLogin. Seems ok, but needs testing. If you run into problems, nil check the `player` and call an event which does it in 5 seconds.

rektbyfaith
Administrator
0
06-27-2023, 12:27 PM
#3
Archived author: Roboto • Posted: 2023-06-27T12:27:23.704000+00:00
Original source

yep
rektbyfaith
06-27-2023, 12:27 PM #3

Archived author: Roboto • Posted: 2023-06-27T12:27:23.704000+00:00
Original source

yep

rektbyfaith
Administrator
0
06-27-2023, 12:27 PM
#4
Archived author: Roboto • Posted: 2023-06-27T12:27:27.541000+00:00
Original source

rip alliance players
rektbyfaith
06-27-2023, 12:27 PM #4

Archived author: Roboto • Posted: 2023-06-27T12:27:27.541000+00:00
Original source

rip alliance players

rektbyfaith
Administrator
0
06-27-2023, 12:29 PM
#5
Archived author: Datoby • Posted: 2023-06-27T12:29:59.672000+00:00
Original source

yop its working thank you guys
rektbyfaith
06-27-2023, 12:29 PM #5

Archived author: Datoby • Posted: 2023-06-27T12:29:59.672000+00:00
Original source

yop its working thank you guys

rektbyfaith
Administrator
0
06-27-2023, 12:32 PM
#6
Archived author: Datoby • Posted: 2023-06-27T12:32:04.998000+00:00
Original source

and another fast Q exist any command to reload lua scripts or i need always restart server ?
rektbyfaith
06-27-2023, 12:32 PM #6

Archived author: Datoby • Posted: 2023-06-27T12:32:04.998000+00:00
Original source

and another fast Q exist any command to reload lua scripts or i need always restart server ?

rektbyfaith
Administrator
0
06-27-2023, 12:33 PM
#7
Archived author: Roboto • Posted: 2023-06-27T12:33:38.481000+00:00
Original source

`.reload eluna`
rektbyfaith
06-27-2023, 12:33 PM #7

Archived author: Roboto • Posted: 2023-06-27T12:33:38.481000+00:00
Original source

`.reload eluna`

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