Skip to content

Conversation

@55Honey
Copy link

@55Honey 55Honey commented Jul 6, 2022

Adds a new method to gameobjects, which allows spawning loot at runtime in an empty container.
Co-authored by @r-o-b-o-t-o

Tested with:

##Copy of the Arena Chest with 0 loot
INSERT INTO `gameobject_template` (`entry`, `type`, `displayId`, `name`, `IconName`, `castBarCaption`, `unk1`, `size`, `Data0`, `Data1`, `Data2`, `Data3`, `Data4`, `Data5`, `Data6`, `Data7`, `Data8`, `Data9`, `Data10`, `Data11`, `Data12`, `Data13`, `Data14`, `Data15`, `Data16`, `Data17`, `Data18`, `Data19`, `Data20`, `Data21`, `Data22`, `Data23`, `AIName`, `ScriptName`, `VerifiedBuild`) VALUES ('510001', '3', '259', 'Treasure Chest', '', '', '', '1', '1599', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '', '0');
local function OnCommand( event, player, command, chatHandler )
    if command == 'test' and player then
        local go = player:SummonGameObject( 510001, player:GetX(), player:GetY(), player:GetZ(), player:GetO(), 30 )
        if go then
            go:AddLoot(13463,8,23054,1)          --8 Dreamfoil and 1 Gressil
        end
    end
end

RegisterPlayerEvent( 42, OnCommand, 0 )

@55Honey 55Honey requested review from Nyeriah and r-o-b-o-t-o July 6, 2022 12:34
@55Honey 55Honey merged commit 301ffc7 into master Jul 6, 2022
@r-o-b-o-t-o r-o-b-o-t-o deleted the AddLoot branch July 6, 2022 14:08
mostlynick3 pushed a commit to mostlynick3/mod-eluna that referenced this pull request Aug 5, 2025
mostlynick3 pushed a commit to mostlynick3/mod-eluna that referenced this pull request Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants