--LinkLuaModifier("modifier_shapeshift_speed_lua", "/modifiers/modifier_shapeshift_speed_lua.lua", LUA_MODIFIER_MOTION_NONE)
function Donaters:EnitGameMode()
GameRules:SendCustomMessage("donaters work",0,0)
end
function Donaters:OnNPCSpawned(data)
local npc = EntIndexToHScript(data.entindex)
if npc:IsRealHero() and npc.bFirstSpawned == nil then
npc.bFirstSpawned = true
local playerID = npc:GetPlayerID()
local steamID = PlayerResource:GetSteamAccountID(playerID)
local current_hero = npc:GetUnitName()
print( "Steam Community ID: " .. tostring( steamID ) )
print( "Current Hero: " .. tostring( current_hero ) )
-- npc:AddNewModifier( npc, nil, "modifier_admin", {duration = -1})
--Premium
local premium =
{
290640546,
163998590,
254502295,
130168657,
136356113,
170590037,
184963641
}
for _,premium_modifier in pairs(premium) do
if steamID == premium_modifier then
npc:AddNewModifier( npc, nil, "modifier_admin", {duration = -1})
local sEffect = "particles/premium/premium_effect.vpcf"
self.particle = ParticleManager:CreateParticle(sEffect, PATTACH_ABSORIGIN_FOLLOW, npc)
local chancePet = RandomInt(1,5)
if chancePet == 1 then
local Pet = CreateUnitByName("unit_premium_pet", npc:GetAbsOrigin() + RandomVector(RandomFloat(0,100)), true, npc, nil, npc:GetTeamNumber())
Pet:SetOwner(npc)
elseif chancePet == 2 then
local Pet = CreateUnitByName("unit_premium_pet2", npc:GetAbsOrigin() + RandomVector(RandomFloat(0,100)), true, npc, nil, npc:GetTeamNumber())
Pet:SetOwner(npc)
elseif chancePet == 3 then
local Pet = CreateUnitByName("unit_premium_pet3", npc:GetAbsOrigin() + RandomVector(RandomFloat(0,100)), true, npc, nil, npc:GetTeamNumber())
Pet:SetOwner(npc)
elseif chancePet == 4 then
local Pet = CreateUnitByName("unit_premium_pet4", npc:GetAbsOrigin() + RandomVector(RandomFloat(0,100)), true, npc, nil, npc:GetTeamNumber())
Pet:SetOwner(npc)
elseif chancePet == 5 then
local Pet = CreateUnitByName("unit_premium_pet5", npc:GetAbsOrigin() + RandomVector(RandomFloat(0,100)), true, npc, nil, npc:GetTeamNumber())
Pet:SetOwner(npc)
end
end
end
--Special Pet for Donaters
if steamID == 141034428 then
local Pet = CreateUnitByName("unit_premium_pet5", npc:GetAbsOrigin() + RandomVector(RandomFloat(0,100)), true, npc, nil, npc:GetTeamNumber())
Pet:SetOwner(npc)
end
if steamID == 184963641 then
-- local Pet = CreateUnitByName("unit_premium_pet5", npc:GetAbsOrigin() + RandomVector(RandomFloat(0,100)), true, npc, nil, npc:GetTeamNumber())
-- Pet:SetOwner(npc)
npc:AddItemByName("item_rapier")
npc:AddItemByName("item_courier")
end
end
end