print("Lua Loaded: 19") local rapidLauncherAttributesArray = { ["provide on active"] = 1, ["damage bonus"] = 5, ["fire rate bonus"] = 0.5, --["mod max primary clip override"] = -1, breaks ammo ["faster reload rate"] = -0.9, ["fire input on hit"] = "popscript^$rapidLauncherHit^", ["grenade no spin"] = 1, ["paintkit_proto_def_index"] = 414, --rafmod has the values simplified significantly, in vanilla this is 5.80138e-43n ["set_item_texture_wear"] = 0, ["hidden primary max ammo bonus"] = 9, ["clp size penalty"] = 9, ["self dmg push force increased"] = 0, ["blast dmg to self increased"] = 0, ["ammo regen"] = 9, } local tideAttributes = { ["dmg taken from fire reduced"] = 1, ["dmg taken from blast reduced"] = 1, ["lose demo charge on damage when charging"] = 0, --this will be reimplemented in a damage pre callback ["fire input on hit"] = "popscript^$tideHit^", ["kill refills meter"] = 0, ["charge recharge rate increased"] = 0.6, --40% slower, 20 second cooldown ["charge impact damage increased"] = 30, --3000% more, 1.5k damage on a full distance charge ["cancel falling damage"] = 1, ["damage force reduction"] = 0 } local swordAttributes = { ["damage bonus"] = 12.3076923077, --1230.76923077% damage bonus, should be 800 damage give or take some rounding ["fire rate penalty"] = 1.5, --I don't know how slow bombastard swings, 50% seems like a good estimate ["fire input on hit"] = "popscript^$rapidLauncherHit^", ["kill refills meter"] = 0, ["dmg taken increased"] = 1, ["charge time increased"] = 0, ["is_a_sword"] = 0, --Removes draw speed penalty ["melee range multiplier"] = 1.5, --increases range back up to sword level, bvb has custom hitreg though, so this might not matter. ["paintkit_proto_def_index"] = 414, --rafmod has the values simplified significantly, in vanilla this is 5.80138e-43n ["set_item_texture_wear"] = 0, } local majorLauncherAttributesArray = { ["damage bonus"] = 0.83, ["fire rate bonus"] = 0.2, ["faster reload rate"] = -0.9, ["fire input on attack"] = "popscript^$majorLauncherAttack^", ["grenade no spin"] = 1, --["disable weapon switch"] = 1, --to stop you from using the crits with your sword ["clip size penalty"] = 3, --this is how the actual major bomber template does it, I will not ask questions ["self dmg push force increased"] = 0, ["blast dmg to self increased"] = 0, ["no_attack"] = 1, } --thank you royal local function removeCallbacks(player, callbacks) if not IsValid(player) then return end for _, callbackId in pairs(callbacks) do player:RemoveCallback(callbackId) end end function rapidLauncherHit(damage, activator, caller) print("Got here") if not caller then return end activator.m_flChargeMeter = activator.m_flChargeMeter + 5 if activator.m_flChargeMeter > 100 then activator.m_flChargeMeter = 100 end activator.m_flHypeMeter = activator.m_flHypeMeter + 0.35 if activator.m_flHypeMeter > 22 then activator.m_flHypeMeter = 22 end end function tideHit(damage, activator, caller) --A point teleport cooldown reduction would go here, but I don't know how that is tracked on bvb activator.m_flHypeMeter = activator.m_flHypeMeter + 3 if activator.m_flHypeMeter > 22 then activator.m_flHypeMeter = 22 end end function swordHit(damage, activator, caller) --A point teleport cooldown reduction would go here, but I don't know how that is tracked on bvb if caller:IsPlayer() == false then return end activator.m_flHypeMeter = activator.m_flHypeMeter + 1 if activator.m_flHypeMeter > 22 then activator.m_flHypeMeter = 22 end activator.m_flChargeMeter = activator.m_flChargeMeter + 15 if activator.m_flChargeMeter > 100 then activator.m_flChargeMeter = 100 end end function majorLauncherAttack(param, activator, caller) --A point teleport cooldown reduction would go here, but I don't know how that is tracked on bvb primary = activator:GetPlayerItemBySlot(0) if primary.m_iClip == 0 then activator:RemoveCond(34) primary:SetAttributeValue("disable weapon switch", 0) activator:GiveItem("UPGRADEABLE TF_WEAPON_GRENADELAUNCHER", rapidLauncherAttributesArray) activator.m_iAmmo[TF_AMMO_PRIMARY] = 99999 end end AddEventCallback("player_spawn", function(eventTable) local activator = ents.GetPlayerByUserId(eventTable.userid) if activator:IsRealPlayer() == false or activator.m_iClass ~= 4 then return end local callbacks = {} --Major launcher cooldown, hijacked netprop activator.m_fl_HypeMeter = 22 local activatorOriginalItems = activator:GetAllItems() for _, item in pairs(activatorOriginalItems) do activator:RemoveItem(item) end activator:SetAttributeValue("hidden maxhealth non buffed", 19825) --approximate calculation of 440 hu speed, even though it should be 450 activator:SetAttributeValue("move speed bonus", 1.3671) activator:SetCustomModelWithClassAnimations("models/bots/demo/bot_demo.mdl") activator:GiveItem("Platinum Pickelhaube") print("Gave hat") local activatorMask = activator:GiveItem("The Byte'd Beak") activatorMask:SetAttributeValue("item color rgb", 8208497) print("Gave and colored beak") activator:GiveItem("UPGRADEABLE TF_WEAPON_GRENADELAUNCHER", rapidLauncherAttributesArray) activator.m_iAmmo[TF_AMMO_PRIMARY] = 99999 activator:GiveItem("The Tide Turner", tideAttributes) activator:GiveItem("The Claidheamohmor", swordAttributes) print("Gave weapons") local check local terminated = false local majorLauncherNotActive = true local launcherCooldownTonePlayed = false local function terminate() if terminated then return end terminated = true timer.Stop(check) end check = timer.Create(0.015, function() if not IsValid(activator) or not activator:IsAlive() then terminate() return end --print("Running Loop") --print(activator.m_flHypeMeter) if activator.m_flHypeMeter < 22 and majorLauncherNotActive == true then activator.m_flHypeMeter = activator.m_flHypeMeter + 0.015 elseif launcherCooldownTonePlayed == false then activator:PlaySoundToSelf("items/spawn_item.wav") launcherCooldownTonePlayed = true end --special attack if activator.m_nButtons >= 33554432 and activator.m_flHypeMeter >= 22 and majorLauncherNotActive == true then majorLauncherNotActive = false activator.m_flHypeMeter = 0 launcherCooldownTonePlayed = false local bossLauncher = activator:GiveItem("TF_WEAPON_GRENADELAUNCHER", majorLauncherAttributesArray) activator.m_iAmmo[TF_AMMO_PRIMARY] = 0 timer.Simple(0.5, function() bossLauncher:SetAttributeValue("no_attack", 0) bossLauncher:SetAttributeValue("disable weapon switch", 1) activator:AddCond(34, 3) bossLauncher.m_iClip1 = 12 activator:WeaponSwitchSlot(0) end) timer.Simple(3.5, function() activator:GetPlayerItemBySlot(0):SetAttributeValue("disable weapon switch", 0) activator:RemoveCond(34) activator:GiveItem("UPGRADEABLE TF_WEAPON_GRENADELAUNCHER", rapidLauncherAttributesArray) activator.m_iAmmo[TF_AMMO_PRIMARY] = 99999 majorLauncherNotActive = true end) end end, 0) timer.Simple(0.01, function() callbacks.spawned = activator:AddCallback(ON_SPAWN, function() print("Purged due to being dead, but we didn't catch it before") removeCallbacks(activator, callbacks) end) end) callbacks.owie = activator:AddCallback(ON_DAMAGE_RECEIVED_PRE, function(_, damageInfo) -- just in case if not activator:IsAlive() then print("Purged due to being dead") removeCallbacks(activator, callbacks) return end if activator:InCond(5) then return end print("We are not invincible") local damage = damageInfo.Damage if damage == nil then return end print("We actually got hurt") if activator:InCond(17) == true then print("We were charging") --1000 damage prematurely ends charge activator.m_flChargeMeter = activator.m_flChargeMeter - (damage * 0.1) if activator.m_flChargeMeter <= 0 then activator:RemoveCond(17) activator.m_flChargeMeter = 0 end end end) end)