[TFC-Core] Custom PvP Event RELEASE | Dalaran Crater |

Originally posted by Nerc




Path: .../lua-scripts




DalaranCraterConfig.lua: Pastebin.com - Page Removed
DalaranCraterEventMgr.lua: Pastebin.com - Page Removed
DalaranCraterPvpEvent.lua: Pastebin.com - Page Removed
npc_1000000_dalaran_event_battlemaster.lua: Pastebin.com - Page Removed
npc_1000002_dalaran_event_battlemaster.lua: Pastebin.com - Page Removed
PvpEventCommands.lua: https://pastebin.com/jkNxiMDR




Path: .../extensions/Defines.ext




PHP Code:
-- Player events    PLAYER_EVENT_ON_CHARACTER_CREATE        =     1,        -- (eventplayer)    PLAYER_EVENT_ON_CHARACTER_DELETE        =     2,        -- (eventguid)    PLAYER_EVENT_ON_LOGIN                   =     3,        -- (eventplayer)    PLAYER_EVENT_ON_LOGOUT                  =     4,        -- (eventplayer)    PLAYER_EVENT_ON_SPELL_CAST              =     5,        -- (eventplayerspellskipCheck)    PLAYER_EVENT_ON_KILL_PLAYER             =     6,        -- (eventkillerkilled)    PLAYER_EVENT_ON_KILL_CREATURE           =     7,        -- (eventkillerkilled)    PLAYER_EVENT_ON_KILLED_BY_CREATURE      =     8,        -- (eventkillerkilled)    PLAYER_EVENT_ON_DUEL_REQUEST            =     9,        -- (eventtargetchallenger)    PLAYER_EVENT_ON_DUEL_START              =     10,       -- (eventplayer1player2)    PLAYER_EVENT_ON_DUEL_END                =     11,       -- (eventwinnerlosertype)    PLAYER_EVENT_ON_GIVE_XP                 =     12,       -- (eventplayeramountvictim) - Can return new XP amount    PLAYER_EVENT_ON_LEVEL_CHANGE            =     13,       -- (eventplayeroldLevel)    PLAYER_EVENT_ON_MONEY_CHANGE            =     14,       -- (eventplayeramount) - Can return new money amount    PLAYER_EVENT_ON_REPUTATION_CHANGE       =     15,       -- (eventplayerfactionIdstandingincremental) - Can return new standing    PLAYER_EVENT_ON_TALENTS_CHANGE          =     16,       -- (eventplayerpoints)    PLAYER_EVENT_ON_TALENTS_RESET           =     17,       -- (eventplayernoCost)    PLAYER_EVENT_ON_CHAT                    =     18,       -- (eventplayermsgTypelang) - Can return falsenewMessage    PLAYER_EVENT_ON_WHISPER                 =     19,       -- (eventplayermsgTypelangreceiver) - Can return falsenewMessage    PLAYER_EVENT_ON_GROUP_CHAT              =     20,       -- (eventplayermsgTypelanggroup) - Can return falsenewMessage    PLAYER_EVENT_ON_GUILD_CHAT              =     21,       -- (eventplayermsgTypelangguild) - Can return falsenewMessage    PLAYER_EVENT_ON_CHANNEL_CHAT            =     22,       -- (eventplayermsgTypelangchannel) - Can return falsenewMessage    PLAYER_EVENT_ON_EMOTE                   =     23,       -- (eventplayeremote) - Not triggered on any known emote    PLAYER_EVENT_ON_TEXT_EMOTE              =     24,       -- (eventplayertextEmoteemoteNumguid)    PLAYER_EVENT_ON_SAVE                    =     25,       -- (eventplayer)    PLAYER_EVENT_ON_BIND_TO_INSTANCE        =     26,       -- (eventplayerdifficultymapidpermanent)    PLAYER_EVENT_ON_UPDATE_ZONE             =     27,       -- (eventplayernewZonenewArea)    PLAYER_EVENT_ON_MAP_CHANGE              =     28,       -- (eventplayer)
    -- 
Custom    PLAYER_EVENT_ON_EQUIP                   =     29,       -- (eventplayeritembagslot)    PLAYER_EVENT_ON_FIRST_LOGIN             =     30,       -- (eventplayer)    PLAYER_EVENT_ON_CAN_USE_ITEM            =     31,       -- (eventplayeritemEntry) - Can return InventoryResult enum value    PLAYER_EVENT_ON_LOOT_ITEM               =     32,       -- (eventplayeritemcount)    PLAYER_EVENT_ON_ENTER_COMBAT            =     33,       -- (eventplayerenemy)    PLAYER_EVENT_ON_LEAVE_COMBAT            =     34,       -- (eventplayer)    PLAYER_EVENT_ON_REPOP                   =     35,       -- (eventplayer)    PLAYER_EVENT_ON_RESURRECT               =     36,       -- (eventplayer)    PLAYER_EVENT_ON_LOOT_MONEY              =     37,       -- (eventplayeramount)    PLAYER_EVENT_ON_QUEST_ABANDON           =     38,       -- (eventplayerquestId)    PLAYER_EVENT_ON_LEARN_TALENTS           =     39,       -- (eventplayertalentIdtalentRankspellid)    -- UNUSED                               =     40,       -- (eventplayer)    -- UNUSED                               =     41,       -- (eventplayer)    PLAYER_EVENT_ON_COMMAND                 =     42,       -- (eventplayercommand) - player is nil if command used from consoleCan return false 





Path: .../extensions/Globals.ext:


Deletions:


PHP Code:
function choice(table)    return table[math.random(1#table)];end 

Insetions:


PHP Code:
function kcontains(tthing)    for iv in pairs(t) do        if (== thingthen            return true;        end    end    return false;end
function contains(tthing)    for iv in pairs(t) do        if (== thingthen            return true;        end    end    return false;end
function count(t)    local count 0;    for iv in pairs(t) do        count count 1;    end    return count;end
function choice(t)    return t[math.random(1count(t))];end
function ichoice(t)    return t[math.random(1#t)];end
function table.forEach(taction)    for iv in pairs(t) do        action(vi);    endend 






Enjoy free The Forgotten Crusade scripts. Hope this brings some joy or use to whoever comes across it!




Originally posted by Nerc and All Credits to Nerc


› See More: [TFC-Core] Custom PvP Event RELEASE | Dalaran Crater |