Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] What changed?

[DiscordArchive] What changed?

[DiscordArchive] What changed?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
08-03-2022, 02:35 PM
#1
Archived author: Revision • Posted: 2022-08-03T14:35:47.507000+00:00
Original source

What changed?
rektbyfaith
08-03-2022, 02:35 PM #1

Archived author: Revision • Posted: 2022-08-03T14:35:47.507000+00:00
Original source

What changed?

rektbyfaith
Administrator
0
08-03-2022, 02:35 PM
#2
Archived author: buggedout • Posted: 2022-08-03T14:35:48.045000+00:00
Original source

now i can finally dissect that code and hopefully learn something ^^
rektbyfaith
08-03-2022, 02:35 PM #2

Archived author: buggedout • Posted: 2022-08-03T14:35:48.045000+00:00
Original source

now i can finally dissect that code and hopefully learn something ^^

rektbyfaith
Administrator
0
08-03-2022, 02:36 PM
#3
Archived author: buggedout • Posted: 2022-08-03T14:36:32.948000+00:00
Original source

I reverted to original script, fixing intid and addring prints....thats when i said no dice
rektbyfaith
08-03-2022, 02:36 PM #3

Archived author: buggedout • Posted: 2022-08-03T14:36:32.948000+00:00
Original source

I reverted to original script, fixing intid and addring prints....thats when i said no dice

rektbyfaith
Administrator
0
08-03-2022, 02:36 PM
#4
Archived author: buggedout • Posted: 2022-08-03T14:36:51.832000+00:00
Original source

then i dropped in your snipped (with elseif) and voila, item added!
rektbyfaith
08-03-2022, 02:36 PM #4

Archived author: buggedout • Posted: 2022-08-03T14:36:51.832000+00:00
Original source

then i dropped in your snipped (with elseif) and voila, item added!

rektbyfaith
Administrator
0
08-03-2022, 02:37 PM
#5
Archived author: Revision • Posted: 2022-08-03T14:37:18.214000+00:00
Original source

Was multiple OnGossipSelects the issue then?
rektbyfaith
08-03-2022, 02:37 PM #5

Archived author: Revision • Posted: 2022-08-03T14:37:18.214000+00:00
Original source

Was multiple OnGossipSelects the issue then?

rektbyfaith
Administrator
0
08-03-2022, 02:38 PM
#6
Archived author: Foe • Posted: 2022-08-03T14:38:34.443000+00:00
Original source

```Lua
--Item that designates that character is a hardcore character.
local hardCoreItem = 90000
--NPC id
local hcNPC = 90000
--This is how long the character is locked for - default is 32 years.
local banTimer = 999999999

--on death function - checks if player has token and bans character if it does.
local function PlayerDeath(event, killer, killed)
if(killed:HasItem(hardCoreItem, 1)) then
print(killed:GetName() .. " was killed by " .. killer:GetName())
SendWorldMessage(killed:GetName() .. " was killed by " .. killer:GetName())
Ban(1, killed:GetName(), banTimer)
end
end

--First Gossip Screen for NPC
local function OnFirstTalk(event, player, unit)
player:GossipMenuAddItem(0, "Looking for a challenge??? Click here to try hardcore mode!", 0, 1, true, "Just making sure that you want to turn on hardcore mode?? This will lock the character after death and you will no longer be able to play the character!!!")
player:GossipSendMenu(1, unit)
end

--Selection for NPC gossip
local function OnSelect(event, player, unit, sender, intid, code)
if (intid == 1) then
player:AddItem(hardCoreItem, 1)
end
end

RegisterCreatureGossipEvent(hcNPC, 1, OnFirstTalk)
RegisterCreatureGossipEvent(hcNPC, 2, OnSelect)
RegisterPlayerEvent(8, PlayerDeath)
```
rektbyfaith
08-03-2022, 02:38 PM #6

Archived author: Foe • Posted: 2022-08-03T14:38:34.443000+00:00
Original source

```Lua
--Item that designates that character is a hardcore character.
local hardCoreItem = 90000
--NPC id
local hcNPC = 90000
--This is how long the character is locked for - default is 32 years.
local banTimer = 999999999

--on death function - checks if player has token and bans character if it does.
local function PlayerDeath(event, killer, killed)
if(killed:HasItem(hardCoreItem, 1)) then
print(killed:GetName() .. " was killed by " .. killer:GetName())
SendWorldMessage(killed:GetName() .. " was killed by " .. killer:GetName())
Ban(1, killed:GetName(), banTimer)
end
end

--First Gossip Screen for NPC
local function OnFirstTalk(event, player, unit)
player:GossipMenuAddItem(0, "Looking for a challenge??? Click here to try hardcore mode!", 0, 1, true, "Just making sure that you want to turn on hardcore mode?? This will lock the character after death and you will no longer be able to play the character!!!")
player:GossipSendMenu(1, unit)
end

--Selection for NPC gossip
local function OnSelect(event, player, unit, sender, intid, code)
if (intid == 1) then
player:AddItem(hardCoreItem, 1)
end
end

RegisterCreatureGossipEvent(hcNPC, 1, OnFirstTalk)
RegisterCreatureGossipEvent(hcNPC, 2, OnSelect)
RegisterPlayerEvent(8, PlayerDeath)
```

rektbyfaith
Administrator
0
08-03-2022, 02:38 PM
#7
Archived author: Foe • Posted: 2022-08-03T14:38:37.618000+00:00
Original source

There you go
rektbyfaith
08-03-2022, 02:38 PM #7

Archived author: Foe • Posted: 2022-08-03T14:38:37.618000+00:00
Original source

There you go

rektbyfaith
Administrator
0
08-03-2022, 02:39 PM
#8
Archived author: buggedout • Posted: 2022-08-03T14:39:49.930000+00:00
Original source

I guess, the right event was never triggered with IF, but with your cleaner code and elseif it works like a charm
rektbyfaith
08-03-2022, 02:39 PM #8

Archived author: buggedout • Posted: 2022-08-03T14:39:49.930000+00:00
Original source

I guess, the right event was never triggered with IF, but with your cleaner code and elseif it works like a charm

rektbyfaith
Administrator
0
08-03-2022, 02:40 PM
#9
Archived author: Foe • Posted: 2022-08-03T14:40:16.236000+00:00
Original source

Try what I posted above, that gives you a nice popup instead of submenus
rektbyfaith
08-03-2022, 02:40 PM #9

Archived author: Foe • Posted: 2022-08-03T14:40:16.236000+00:00
Original source

Try what I posted above, that gives you a nice popup instead of submenus

rektbyfaith
Administrator
0
08-03-2022, 02:40 PM
#10
Archived author: buggedout • Posted: 2022-08-03T14:40:50.898000+00:00
Original source

il give it a go too, more options is never a bad thing
rektbyfaith
08-03-2022, 02:40 PM #10

Archived author: buggedout • Posted: 2022-08-03T14:40:50.898000+00:00
Original source

il give it a go too, more options is never a bad thing

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