Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Mod = RegisterMod("betterkeybum", 1)
- local game = Game()
- function Mod:onInit(player)
- local player = Isaac.GetPlayer(0)
- if game:GetFrameCount() == 1 then
- -- spawn in if you want to
- -- Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_TRINKET, TrinketType.TRINKET_PAPER_CLIP, Vector(150, 250), Vector(0,0), player)
- -- Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_TRINKET, TrinketType.TRINKET_STORE_KEY, Vector(200, 250), Vector(0,0), player)
- -- Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, CollectibleType.COLLECTIBLE_SKELETON_KEY, Vector(350, 250), Vector(0,0), player)
- -- Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, CollectibleType.COLLECTIBLE_LATCH_KEY, Vector(400, 250), Vector(0,0), player)
- -- Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, CollectibleType.COLLECTIBLE_MOMS_KEY, Vector(250, 250), Vector(0,0), player)
- -- Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, CollectibleType.COLLECTIBLE_DADS_KEY, Vector(300, 250), Vector(0,0), player)
- Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_COLLECTIBLE, CollectibleType.COLLECTIBLE_DARK_BUM, Vector(275, 175), Vector(0,0), player)
- -- if Game():GetPlayer == Isaac
- -- Isaac.Spawn(EntityType.ENTITY_PICKUP, PickupVariant.PICKUP_TRINKET, TrinketType.TRINKET_PAPER_CLIP, Vector(150, 250), Vector(0,0), player)
- -- end
- end
- end
- Mod:AddCallback(ModCallbacks.MC_POST_PEFFECT_UPDATE, Mod.onInit)
- function Mod:onPickup(DaBum)
- local player = Isaac.GetPlayer(0) -- get the player
- local entities = Isaac.GetRoomEntities() -- all entities in the room
- if player:HasCollectible(CollectibleType.COLLECTIBLE_DARK_BUM) then
- for _, entity in pairs(entities) do
- if entity.Type == EntityType.ENTITY_FAMILIAR
- and entity.Variant == FamiliarVariant.DARK_BUM then
- if entity:GetSprite():IsPlaying("Spawn") then
- if entity:GetSprite():GetFrame() == 1 then
- for j = 1, #entities do
- local entitis = entities[j]
- if entitis.Type == EntityType.ENTITY_PICKUP
- and entitis.Variant == PickupVariant.PICKUP_HEART
- and entitis.SubType == HeartSubType.HEART_SOUL then
- -- if entitis:GetFrame() == 1
- if entitis.SpawnerType == EntityType.ENTITY_FAMILIAR
- and entitis.SpawnerVariant == FamiliarVariant.DARK_BUM then
- entitis:ToFamiliar():Morph(EntityType.ENTITY_FAMILIAR, FamiliarVariant.BLUE_SPIDER, 0, true)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- Mod:AddCallback(ModCallbacks.MC_FAMILIAR_UPDATE, Mod.onPickup, FamiliarVariant.DARK_BUM)
Advertisement
Add Comment
Please, Sign In to add comment