Results 1 to 4 of 4

Thread: [SCRIPT] Usable Flak88 for the map The Hunt (modification)

  1. #1

    Default [SCRIPT] Usable Flak88 for the map The Hunt (modification)

    This is modification from another mod created from another person.

    I only have credits for the moditification.


    //*****************************************************************\\
    // Player Usable Flak-88 A.T. Gun from the SFX Mod Menu \\
    // Usable Flak88 and Nebelwerfer Script by Cobra {sfx} & PacRac {sfx} \\
    // www.Mods-R-us.net \\
    //*************************************************************************\\


    main:

    // --------------------------------------- Flak Missing sounds ----------------------------------------------------------------------------

    local.master = spawn scriptmaster

    local.master aliascache flak_snd_move sound/vehicle/veh_tank_turret1.wav soundparms 0.9 0.2 0.9 0.2 800 4000 auto loaded maps "m dm obj"
    local.master aliascache flak_snd_fire1 sound/weapons/fire/TankCannonFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak_snd_fire2 sound/weapons/fire/Flak88Fire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak_snd_fire3 sound/weapons/fire/Flak88Fire3.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak_snd_fire4 sound/weapons/fire/Flak88Fire4.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak88_fire1 sound/weapons/fire/TankCannonFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak88_fire2 sound/weapons/fire/Flak88Fire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak88_fire3 sound/weapons/fire/Flak88Fire3.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak88_fire4 sound/weapons/fire/Flak88Fire4.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "m dm obj"
    local.master aliascache flak_reload sound/weapons/fire/TankFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 auto loaded maps "dm obj"

    // ---------------------------------------------------------------------------------------------------------------------------------------

    //local.base = spawn models/statweapons/flak88base.tik "classname" "script_model"
    //local.base.targetname = "Flak88Base"
    //$Flak88Base.angles = local.angle
    //$Flak88Base solid
    //$Flak88Base.origin = local.origin

    //local.ent = spawn models/statweapons/flak88turret.tik
    //local.ent.targetname = "Flak88"
    //$Flak88.angles = local.angle
    //$Flak88 setsize ( -80 -80 0 ) ( 80 80 158 )
    //$Flak88.damagemdl= models/statweapons/flak88_d.tik
    //$Flak88.origin = $Flak88Base.origin + ( 0 0 64 )


    $flak88_weapon1 thread ResetFlak
    $flak88_weapon1.damagemodel = "models/statweapons/flak88_d.tik"

    local.trig = spawn trigger_multiple "health" "200" "spawnflags" "128"
    local.trig.origin = $flak88_weapon1.origin
    local.trig setsize ( -60 -60 0 ) ( 60 60 170 )
    local.trig.target1 = $flak88_weapon1
    local.trig.target2 = $flak88_base1
    local.trig setthread ImDead

    end


    // Flak88 Bit
    ImDead:
    self nottriggerable
    self thread spawn_fx "emitters/mortar_dirt_nebelwerfer.tik" 1.2
    $flak88_weapon1_explosive remove
    self playsound explode_flak88
    radiusdamage self.origin 500 300
    self thread spawn_fx models/fx/fx_flak88_explosion.tik 1.1
    local.dam = spawn script_model model self.target1.damagemodel
    local.dam.origin = self.origin
    local.dam.angles = self.target1.angles
    self.target1 delete
    wait 3
    self.target2 thread CleanUP
    local.dam thread CleanUP
    self delete

    end



    spawn_fx local.fx local.scale:
    local.temp = spawn script_model model local.fx scale local.scale
    local.temp.origin = self.origin + ( 0 0 -50 )
    local.temp anim start
    radiusdamage local.temp.origin 800 384
    end


    ResetFlak:
    waitframe
    self.corona = 0
    local.trig3 = spawn trigger_useonce
    local.trig3.origin = self.origin
    local.trig3 setsize ( -170 -170 0 ) ( 170 170 110 )
    local.trig3 waittill trigger
    thread playergetin_flak
    end

    playergetin_flak:
    self dmprojectile models/projectiles/tigercannonshell.tik
    local.flakplayer = parm.other
    local.team = local.flakplayer.dmteam
    self.gunner = local.flakplayer

    //local.flakplayer safeholster 1
    local.flakplayer notsolid
    local.flakplayer hide
    wait 1
    local.flakplayer physics_off
    self.corona = 1

    while(local.flakplayer!= NIL && local.flakplayer!= NULL)
    {
    local.flakplayer.origin = self.origin + ( -10 0 20 ) // I like this Viewing Position!! Dunno if it is the best! :P
    local.turretmove = local.flakplayer thread find_spot

    self setaimtarget local.turretmove
    waitframe


    if(local.flakplayer.fireheld && self.flakfiredelay != 0)
    {
    self waitthread fire_flak

    self thread reload_flak
    }


    if(local.flakplayer.useheld)
    {
    while(local.flakplayer.useheld)
    waitframe
    local.flakplayer.origin = self.origin + ( 0 0 200 )
    local.flakplayer.viewangles = (self.angles[0] self.angles[1] 0)
    local.flakplayer physics_on
    local.flakplayer show
    local.flakplayer uselast
    local.flakplayer = NIL
    self.corona = 0
    self thread ResetFlak
    }

    if(local.flakplayer.dmteam == spectator)
    {
    waitframe
    local.flakplayer.origin = self.origin + ( 0 0 200 )
    local.flakplayer.viewangles = (self.angles[0] self.angles[1] 0)
    local.flakplayer physics_on
    local.flakplayer = NIL
    self.corona = 0
    self thread ResetFlak
    }
    if(local.flakplayer.dmteam != local.team)
    {
    waitframe
    local.flakplayer stufftext "reconnect"
    local.flakplayer physics_on
    local.flakplayer = NIL
    }
    if(local.player != NIL)
    {
    waitframe
    self.driver = NIL
    self.driver physics_on
    self.corona = 0
    self thread ResetFlak
    }
    waitframe
    }


    if(local.player != NIL || local.player != NULL)
    {
    end
    }


    end

    reload_flak:
    self.flakfiredelay = 0
    wait 5
    self.flakfiredelay = 1

    end

    fire_flak:
    self playsound flak_snd_fire3
    self anim fire
    wait .5
    self playsound flak_reload

    end

    find_spot: // Turret movement attached to player ** Thank you bdbodger ;)

    local.fwd_vec = (angles_toforward self.viewangles)
    local.start = self gettagposition "Bip01 Head"
    local.range = 5000
    local.hit_location = trace (local.start - local.fwd_vec * 56) (local.start + local.fwd_vec * local.range ) 0
    local.flakent = spawn script_origin origin (local.hit_location - ( 0 0 32 )) //32

    end local.flakent

    Last edited by DoubleKill; April 20th, 2019 at 03:42 AM.

  2. #2

    Default

    I think this is what Mistico was looking for... haven't tested it... compiled from some notes I took in 2012 when I removed it from my ubermod lol...

    I don't know who made it or where it came from.
    Attached Files Attached Files
    Browse MOHAA Servers Post GameSpy Era

    VISIT MOHREBORN.COM FOR LATEST INFORMATION



    Medal of Honor: Game Server Browser Fixer - Patches your MOHAA, MOHSH, and MOHBT game binaries to allow you to retrieve a list of game servers within the multi-player menu in-game even after GameSpy ceases operation!

    Medal of Honor: Query Launcher - Find, browse, organize, join, get your ping, and get more information regarding all Medal of Honor (AA, SH, & BT) servers from your PC at any time!
    Medal of Honor: Web Server Master List - Find and browse all Medal of Honor servers online using your browser!
    Add your Medal of Honor Server to the Master List
    YouTube Video for Medal of Honor: Query Launcher and MOHAASERVERS.TK!



    MOHAA Mods and Utilities
    OwN-3m-All's Mods
    Make Me Stock - A program that allows you to easily move-in and move-out non-stock mods and other files at the click of a button. Automates adding / removing mods without having to copy / move files manually.



    Quality Game Servers

    Rent dedicated Dallas Texas, Kansas City, Chicago, Pennsylvania, and Sofia Bulgaria MOHAA and other game servers from We Be HostiN starting at $10 a month.


  3. #3

    Default

    The script may give a problem to put the bomb on the canon.

    If someone have a problem like that, tell me so i will fix it.

  4. #4

    Default

    This one i use on my mod... if u fire the flak u can be killed, in the normal mod u are not killable, this version is edited by ryback a little while ago and u can kill the flakshooting bastard.
    a nice add would be as soon u grab the flak u are invissable, maybe glue the character to the flak so they can see they hold it.

    Code:
    //----------------------------------------------------------------------
    //         FlakFire.scr v2.0
    //                           By =|95th|=GenDonut
    // Credits:
    // bdbodger bdbodger@bodger-mods.com <For his original script>
    // SorridStroker <For Help Creating More Features>
    //
    //            |F |L /A\ |K      |F |I| |R |E   . S (C |R
    //
    // Usage:
    // Exec the flakfire.scr with an origin, an angle, and an amount of amno
    //  
    // exec global/flakfire.scr ( ORIGIN ) ( ANGLE ) AMNO TAKE_DMG FLAKHEALTH
    //
    // eg.
    // Sample script for mohdm4 add the following line to dm/mohdm4.scr
    //                                 ORIGIN               ANGLE      AMNO TAKE DMG   flak health
    // exec global/flakfire.scr ( 18.8 2906.8 296.1 ) ( 0.0 270.2 0.0 ) 100 1          100
    //
    // Description:
    // Go to the flak and press use to get on and use to get off.
    // Move around and fire.
    //---------------------------------------------------------------------
    
    main local.origin local.angle local.amno local.destory local.health:
    
    	local.random = randomint(9999)
    	local.ent = spawn models/statweapons/flak88turret.tik
    	local.ent.origin = local.origin
    	local.ent.origin += ( 0 0 50 )
    	local.ent.angles = local.angle
    	local.ent.shellamno = local.amno
    	local.ent targetname ("flak_" + local.random)
    	local.ent.save_amno = local.amno
    	local.ent.destroyed_model = "models/statweapons/flak88_d.tik"
    	local.ent.destroy_enabled = local.destroy
    	local.ent.canhealth = local.health
    
    	local.ent.base = spawn models/statweapons/flak88base.tik
    	local.ent.base.origin = local.origin
    	local.ent.base.angles = local.angle
    
    	local.ent thread flak_initial
    
    	local.ent.dmg_listener = spawn trigger_multipleall origin local.origin spawnflags 128 
    	local.ent.dmg_listener setsize ( -200 -200 -50 ) ( 200 200 100 )
    	local.ent.dmg_listener setthread flak_pain
    	local.ent.dmg_listener.flakcan = local.ent
    end
    
    flak_initial:
    local.master = spawn scriptmaster
    
    //Flak 88 gun
    //local.master aliascache flak_snd_move sound/vehicle/veh_tank_turret1.wav soundparms 0.9 0.2 0.9 0.2 800 4000 auto loaded maps "dm obj"
    local.master aliascache flak_snd_fire1 sound/weapons/fire/TankCannonFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm obj"
    local.master aliascache flak_snd_fire2 sound/weapons/fire/Flak88Fire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm obj"
    local.master aliascache flak_snd_fire3 sound/weapons/fire/Flak88Fire3.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm obj"
    local.master aliascache flak_snd_fire4 sound/weapons/fire/Flak88Fire4.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm obj"
    local.master aliascache flak88_fire1 sound/weapons/fire/TankCannonFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm obj"
    local.master aliascache flak88_fire2 sound/weapons/fire/Flak88Fire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm obj"
    local.master aliascache flak88_fire3 sound/weapons/fire/Flak88Fire3.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm obj"
    local.master aliascache flak88_fire4 sound/weapons/fire/Flak88Fire4.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 weapon loaded maps "dm obj"
    local.master aliascache flak_reload sound/weapons/fire/TankFire1.wav soundparms 1.5 0.0 1.0 0.0 2000 4000 auto loaded maps "dm obj"
    
    self dmprojectile models/projectiles/tigercannonshell.tik
    //self dmprojectile models/fx/dummy.tik
    local.trigger = spawn trigger_multiple origin self.origin
    local.trigger setsize ( -200 -200 -50 ) ( 200 200 100 )
    local.trigger.target = self
    self.touchlisten = local.trigger
    
    while(1)
    {
    	local.trigger waittill trigger
    
    	local.trigger waitthread get_ready_to_fire
    }
    
    end
    
    //-------------------------------------------------------------------
    
    get_ready_to_fire:
    
    local.player = parm.other
    
    	while(local.player istouching self.target && local.player.useheld == 1 && local.player.onflak != 1)
    	{
    		if(local.player.wasuse != 1)
    			local.player.wasuse = 1
    	waitframe
    	}
    	if(local.player.onflak != 1 && local.player.wasuse == 1 && local.player istouching self.target && self.target.hasgunner != 1)
    	{
    		self.target waitthread player_getin local.player
    		local.player.wasuse = 0
    	}
    end
    
    
    
    player_getin local.player:
    //local.player forcetorsostate FLAK_CONTROL_MAIN
    self.hasgunner = 1
    //local.player holster
    local.player notsolid
    local.player hide
    local.player physics_off
    local.player.onflak = 1
    self.gunner = local.player
    local.player.flakgun = self
    
    
    local.player stufftext ("globalwidgetcommand dday1 title Cannon-Amno-" + self.shellamno)
    local.player stufftext "globalwidgetcommand dday1 shader townhallwindow"
    local.player stufftext "globalwidgetcommand dday1 fgcolor 1.00 1.00 1.00 1.00"
    local.player stufftext "globalwidgetcommand dday1 bgcolor 0.50 0.50 0.50 0.00"
    local.player stufftext "globalwidgetcommand dday1 fadein 0"
    local.player stufftext "globalwidgetcommand dday1 menu dday1 640 480 NONE 0"
    local.player stufftext "globalwidgetcommand dday1 virtualres 1" 
    local.player stufftext "globalwidgetcommand dday1 fullscreen 1"
    
    local.player stufftext "globalwidgetcommand june6 shader townhallwindow"
    local.player stufftext "globalwidgetcommand june6 rect 64 288 512 64"
    local.player stufftext "globalwidgetcommand june6 fgcolor 1.00 1.00 1.00 1.00"
    local.player stufftext "globalwidgetcommand june6 bgcolor 0.00 0.00 0.00 0.00"
    local.player stufftext "globalwidgetcommand june6 font facfont-20"
    local.player stufftext ("globalwidgetcommand june6 title Cannon-Amno:-" + self.shellamno)	
    
    
    local.player stufftext "showmenu dday1"
    
    while((local.player.onflak) && (local.player.dmteam != "spectator") && (local.player!= NULL) && (local.player!= NIL))
    {
    
    	local.player stufftext ("globalwidgetcommand june6 title Cannon-Amno-" + self.shellamno)
    	if(local.player.useheld || !IsAlive(local.player))
    	{
    		local.player.onflak = 0
    	}
    
    	//println "moving player"
    	local.player.origin = self.origin - self.forwardvector * 56 //distance back
    	local.player.origin += ( 0 0 37 ) //dist up
    	local.canangle = local.player thread find_spot
    
    	self setaimtarget local.canangle
    
    	if(local.player.fireheld == 1 && self.canfire != 0 && self.shellamno != 0)
    	{
    
    		local.shot_org = local.canangle
    		self waitthread fire_cannon local.shot_org
    		//wait 4.8
    		self thread check_fire_ready
    		local.canangle remove
    		//local.player iprint ("SHELLS REMAINING: " + self.shellamno) 1
    
    	}
    
    
    	waitframe
    	if(local.canangle != NULL)
    		local.canangle remove
    
    }
    
    if(local.player != NULL)
    {
    	local.player solid
    	//local.player holster
    	local.player show
    	local.player uselast
    	local.player physics_on
    	local.player stufftext "hidemenu dday1"
    }
    self.hasgunner = 0
    
    
    end
    
    check_fire_ready:
    	self.canfire = 0
    	wait 4.8
    	self.canfire = 1
    	if(self.shellamno == 0)
    	{
    		self.gunner stopwatch 15
    		self playsound flak_reload
    		wait 14.8
    		self.shellamno = self.save_amno
    		//self.gunner iprint "Reloading Done" 1
    	}
    end
    //-------------------------------------------------------------------
    
    find_spot:
    
       local.fwd_vec = (angles_toforward self.viewangles)
       local.start = self gettagposition "Bip01 Head"
       local.range = 5000
       local.hit_location = trace (local.start - local.fwd_vec * 56) (local.start + local.fwd_vec * local.range ) 0
    
       local.ent = spawn script_origin origin (local.hit_location - ( 0 0 32 ))
    
    end local.ent
    
    
    //-------------------------------------------------------------------
    
    fire_cannon local.arty:
    	self setaimtarget local.arty
    	self waittill ontarget
    	self anim fire_scripted
    	waitthread get_playerkills local.arty self
    	thread bang local.arty
    	wait .8
    	self playsound flak_reload
    	local.arty immediateremove
    	self.shellamno--
    end
    
    
    //------------------------------------------------
    end
    
    
    bang local.arty:
    
    local.Exp1 = spawn "fx_flak88_explosion.tik"
    local.Exp2 = spawn "animate/fx_mortar_dirt.tik"
    local.Exp3 = spawn "emitters/fireandsmoke.tik"
    local.Exp4 = spawn "emitters/inferno.tik"
    local.Exp5 = spawn "emitters/residual_fire.tik"
    
    //exec global/earthquake.scr .23 4 0 0
    
    local.Exp1.origin = local.arty
    local.Exp1 anim idle
    
    local.Exp2.origin = local.arty
    local.Exp2 anim start
    
    local.Exp3.origin = local.arty
    local.Exp3 anim start
    
    local.Exp4.origin = local.arty
    local.Exp4 anim start
    
    local.Exp5.origin = local.arty
    local.Exp5 anim start
    
    wait 1
    local.Exp1 remove
    local.Exp2 remove
    wait 3
    local.Exp3 remove
    local.Exp4 remove
    local.Exp5 remove
    
    end
    
    flak_pain:
    
    	local.killer = parm.other
    
    	local.victim = self.flakcan.gunner
    
    	if((local.victim != NULL) && (local.victim.onflak == 1) && (local.victim != local.killer))
    	{
    		local.victim damage local.killer 10 local.killer local.victim.origin local.victim.forwardvector ( 0 0 0 ) 0 0 17 0
    	}
    
    	if(self.flakcan.destroy_enabled)
    	{
    		self.flakcan.canhealth -= 15
    		if(self.flakcan.canhealth <= 0)
    		{
    			local.d_flak = spawn self.flakcan.destroyed_model //models/statweapons/flak88turret.tik
    			local.d_flak.origin = self.flakcan.origin
    			local.d_flak.angles = self.flakcan.angles
    			iprintlnbold "A Flak88 Cannon Has Destroyed!"
    			waitframe
    			self.flakcan.base remove
    			self.flakcan.touchlisten remove
    			self.flakcan.gunner.onflak = 0
    			self remove
    		}
    	}	
    end
    
    get_playerkills local.arg local.flak:
    
    for(local.i=1; local.i <= $player.size; local.i++)
    	if((vector_within $player[local.i].origin local.arg 300) && ($player[local.i] != local.flak.gunner) && 	($player[local.i].dmteam != local.flak.gunner.dmteam )) { $player[local.i] damage local.flak.gunner 150 local.flak.gunner $player[local.i].origin $player[local.i].forwardvector ( 0 0 0 ) 0 0 9 0 }
    end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •