Raised This Month: $32 Target: $400
 8% 

[L4D2]RandomWitch/LMC_RandomWitch +12 Models(Updated 01/03/2017)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Plugin ID:
5021
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Adds 50% Chance between the 2 witch models/ LMC_Adds 12more models
    Old 01-26-2016 , 06:22   [L4D2]RandomWitch/LMC_RandomWitch +12 Models(Updated 01/03/2017)
    Reply With Quote #1

    Hey Not really sure why no one has done this before but well i'm doing it

    I did infact get the Real Witch_Bride to spawn but when ever you startle her she forces a panic event


    but well model is good enough it comes with the music too.

    PHP Code:
    "RandomWitch"PLUGIN_VERSION"Version of RandomWitch"

    "RW_Enable"
    "1""Should We Enable Random Witch" 
    Anybug?

    ///////////////////////////////////////////////////////////////////////////////////////////////////////


    PHP Code:
    // This file was auto-generated by SourceMod (v1.9.0.6056)
    // ConVars for plugin "LMC_RandomWitch.smx"


    // Should We Enable Random Witch
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    lmc_randomwitch "1"

    // Chance out of 100 to have a overlay model, (0, 100)
    // -
    // Default: "25"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    lmc_randomwitchchance "25" 
    LMC_RandomWitch release
    Note you can use both of these plugins together.

    Requirement:
    Lux's Model Changer
    Module required:LMCCore
    Optional For ragdoll deaths:
    LMCEDeathHandler
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    Attached Files
    File Type: sp Get Plugin or Get Source (RandomWitch.sp - 3377 views - 1.7 KB)
    File Type: sp Get Plugin or Get Source (LMC_RandomWitch.sp - 2477 views - 4.6 KB)
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D

    Last edited by Lux; 05-08-2020 at 16:59. Reason: update
    Lux is offline
    Sev
    Veteran Member
    Join Date: May 2010
    Old 01-28-2016 , 09:13   Re: [L4D2]RandomWitch
    Reply With Quote #2

    Neat idea.

    I'd be interested in the idea being expanded upon with the witch randomly walking or sitting at will. Perhaps even the witch getting up and follow survivors if they get too close.

    Last edited by Sev; 01-28-2016 at 09:13.
    Sev is offline
    kochiurun119
    BANNED
    Join Date: Sep 2014
    Location: GB
    Old 01-29-2016 , 05:49   Re: [L4D2]RandomWitch
    Reply With Quote #3

    Can you make plugin for tank(Model tank l4d and model tank l4d2) for l4d2? L4d2 have 2 model tank too!
    kochiurun119 is offline
    Send a message via ICQ to kochiurun119 Send a message via AIM to kochiurun119 Send a message via Yahoo to kochiurun119 Send a message via Skype™ to kochiurun119
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 01-29-2016 , 08:22   Re: [L4D2]RandomWitch
    Reply With Quote #4

    Quote:
    Originally Posted by Sev View Post
    Neat idea.

    I'd be interested in the idea being expanded upon with the witch randomly walking or sitting at will. Perhaps even the witch getting up and follow survivors if they get too close.
    I'm Kinda not sure what you mean, like the witch does that anyway you can change the time of day to force her to sit or walk on anymap

    tank_spawn

    also does anyone know if the tank_spawn event is fired more than once if the tank gets passed?
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D

    Last edited by Lux; 01-29-2016 at 08:23.
    Lux is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 03-01-2017 , 01:00   Re: [L4D2]RandomWitch
    Reply With Quote #5

    LMC_RandomWitch release
    Note you can use both of these plugins together.

    You don't nee the include to compile, but it's there if you want to make something

    Besure to checkout L4D2ModelChanger
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    hoanganh81097
    Senior Member
    Join Date: Apr 2016
    Old 08-12-2018 , 21:24   Re: [L4D2]RandomWitch/LMC_RandomWitch +12 Models(Updated 01/03/2017)
    Reply With Quote #6

    if i add more custom model witch, do i have a IsModelPrecached ?
    hoanganh81097 is offline
    Spirit_12
    Veteran Member
    Join Date: Dec 2012
    Location: Toronto, CA
    Old 08-12-2018 , 23:38   Re: [L4D2]RandomWitch/LMC_RandomWitch +12 Models(Updated 01/03/2017)
    Reply With Quote #7

    What sort of panic event does it start? Can it not be blocked? If it is SpawnITMob function, which is used for Boomer horde and Car alarms then I can block it. Run the following plugin and check the messages, alter the cvars to see, if they block the event.

    PHP Code:

    #pragma semicolon 1
    #pragma newdecls required

    #include <sourcemod>
    #include <sdktools>
    #include <dhooks>

    #define GAMEDATA            "left4downtown.l4d2"
    #define PLUGIN_VERSION         "1.0"

    ConVar cvar_mob_count;
    ConVar cvar_mobit_count;

    public 
    Plugin myinfo =
    {
        
    name "Spawn mob and Spawn IT mob",
        
    author "$atanic $pirit",
        
    description "Adds a hook for mob spawns",
        
    version PLUGIN_VERSION,
        
    url ""
    }

    public 
    void OnPluginStart()
    {
        
    CreateConVar("mob_spawn_version"PLUGIN_VERSION""FCVAR_NOTIFY|FCVAR_DONTRECORD);
        
    cvar_mob_count        =    CreateConVar"count_mob""0",        "Mob count to spawn!");
        
    cvar_mobit_count    =    CreateConVar"count_mobit""0",    "MobIT count to spawn!");

        
    Handle hGamedata LoadGameConfigFile(GAMEDATA);
        if( 
    hGamedata == null 
            
    SetFailState("Failed to load \"%s.txt\" gamedata."GAMEDATA);
            
        
    // ====================================================================================================
        // Detour    -    ZombieManager::SpawnMob
        // ====================================================================================================
        
        
    Handle hDetour_SpawnMob DHookCreateDetour(Address_NullCallConv_THISCALLReturnType_VoidThisPointer_Ignore);
        if( !
    hDetour_SpawnMob )
            
    SetFailState("Failed to setup detour for hDetour_SpawnMob");
        
        
    // Load the address of the function from gamedata file.
        
    if (!DHookSetFromConf(hDetour_SpawnMobhGamedataSDKConf_Signature"Zombiemanager_SpawnMob"))
            
    SetFailState("Failed to find \"ZombieManager::SpawnMob\" signature.");

        
    // Add all parameters.
        
    DHookAddParam(hDetour_SpawnMobHookParamType_Int);


        
    // Add a pre hook on the function.
        
    if (!DHookEnableDetour(hDetour_SpawnMobfalseDetour_OnSpawnMob))
            
    SetFailState("Failed to detour OnSpawnMob.");
            
        
    // And a post hook.
        
    if (!DHookEnableDetour(hDetour_SpawnMobtrueDetour_OnSpawnMob_Post))
            
    SetFailState("Failed to detour OnSpawnMob post.");
            
        
    // ====================================================================================================
        // Detour    -    ZombieManager::SpawnITMob
        // ====================================================================================================
        
        
    Handle hDetour_SpawnITMob DHookCreateDetour(Address_NullCallConv_THISCALLReturnType_VoidThisPointer_Ignore);
        if( !
    hDetour_SpawnITMob )
            
    SetFailState("Failed to setup detour for hDetour_SpawnITMob");
        
        
    // Load the address of the function from gamedata file.
        
    if (!DHookSetFromConf(hDetour_SpawnITMobhGamedataSDKConf_Signature"Zombiemanager_SpawnITMob"))
            
    SetFailState("Failed to find \"ZombieManager::SpawnITMob\" signature.");

        
    // Add all parameters.
        
    DHookAddParam(hDetour_SpawnITMobHookParamType_Int);


        
    // Add a pre hook on the function.
        
    if (!DHookEnableDetour(hDetour_SpawnITMobfalseDetour_OnSpawnITMob))
            
    SetFailState("Failed to detour OnSpawnITMob.");
            
        
    // And a post hook.
        
    if (!DHookEnableDetour(hDetour_SpawnITMobtrueDetour_OnSpawnITMob_Post))
            
    SetFailState("Failed to detour OnSpawnITMob post.");
    }


    // ====================================================================================================
    // Function    -    ZombieManager::SpawnMob
    // ====================================================================================================

    public MRESReturn Detour_OnSpawnMob(Handle hParam)
    {
        
    int param1 DHookGetParam(hParam1);
        
    //int client = SDKCall(hGetPlayerSlot, pThis) + 1; 
        
    PrintToChatAll("Detour_OnSpawnMob_pre called on %d"param1);
        
        if(
    cvar_mob_count.IntValue)
        {
            
    DHookSetParam(hParam1cvar_mob_count.IntValue);
            return 
    MRES_ChangedOverride;
        }
        return 
    MRES_Ignored;
    }

    public 
    MRESReturn Detour_OnSpawnMob_Post(Handle hParam)
    {
        
    int param1 DHookGetParam(hParam1);
        
    PrintToChatAll("Detour_OnSpawnMob_Post called on %d"param1);
        return 
    MRES_Ignored;
    }

    // ====================================================================================================
    // Function    -    ZombieManager::SpawnITMob
    // ====================================================================================================
        
    public MRESReturn Detour_OnSpawnITMob(Handle hParam)
    {
        
    int param1 DHookGetParam(hParam1);
        
    PrintToChatAll("Detour_OnSpawnITMob_pre called on %d"param1);
        
        if(
    cvar_mobit_count.IntValue)
        {
            
    DHookSetParam(hParam1cvar_mobit_count.IntValue);
            return 
    MRES_ChangedOverride;
        }
        return 
    MRES_Ignored;
    }

    public 
    MRESReturn Detour_OnSpawnITMob_Post(Handle hParam)
    {
        
    int param1 DHookGetParam(hParam1);
        
    PrintToChatAll("Detour_OnSpawnITMob_Post called on %d"param1);
        return 
    MRES_Ignored;

    Attached Files
    File Type: sp Get Plugin or Get Source (Spawn_IT.sp - 363 views - 4.5 KB)
    __________________

    Last edited by Spirit_12; 08-12-2018 at 23:42.
    Spirit_12 is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 08-13-2018 , 08:03   Re: [L4D2]RandomWitch/LMC_RandomWitch +12 Models(Updated 01/03/2017)
    Reply With Quote #8

    I'm not sure why you posted that here xD
    Was this ment to be on a different thread?
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    Spirit_12
    Veteran Member
    Join Date: Dec 2012
    Location: Toronto, CA
    Old 08-13-2018 , 13:51   Re: [L4D2]RandomWitch/LMC_RandomWitch +12 Models(Updated 01/03/2017)
    Reply With Quote #9

    Quote:
    Originally Posted by Lux View Post
    I did infact get the Real Witch_Bride to spawn but when ever you startle her she forces a panic event
    You stated it starts a panic event every time you startle her. Was pointing out a way to avoid that scenario.

    I had just finished hooking those 2 functions. Just wanted to see if they can be used.
    __________________
    Spirit_12 is offline
    hoanganh81097
    Senior Member
    Join Date: Apr 2016
    Old 08-13-2018 , 15:10   Re: [L4D2]RandomWitch/LMC_RandomWitch +12 Models(Updated 01/03/2017)
    Reply With Quote #10

    Can make this plugin for Common Infected ?
    hoanganh81097 is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 02:05.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode