Scripts for Tribes 1.40

poop weaps for 1.40

not tested much

bind dual weaps to any key in options>binds

Code:
// poop weps for 1.40

$PoopWep::Wep1A = "Disc Launcher";
$PoopWep::Wep1B = "Plasma Gun";

$PoopWep::Wep2A = "Grenade Launcher";
$PoopWep::Wep2B = "Laser Rifle";

$PoopWep::Wep3A = "Mortar";
$PoopWep::Wep3B = "ChainGun";

$PoopWep::Wep4A = "Elf Gun";
$PoopWep::Wep4B = "Blaster";

$PoopWep::Wep5A = "Targeting Laser";

$PoopWep::DualWeps = 5;

function PoopWep::Use( %key ) {

	if( GetItemCount( $PoopWep::Wep[ %key @ "A" ] ) == 1 && GetMountedItem( 0 ) != GetItemType( $PoopWep::Wep[%key@"A"]) && $PoopWep::Tapped[%key] != "TRUE") {
		use( $PoopWep::Wep[ %key @ "A" ] );
		$PoopWep::Tapped[ %key ] = "TRUE";
		schedule::add( "$PoopWep::Tapped[ " @ %key @ " ] = \"\";", 0.5);
		
	}
	
	else if( GetItemCount( $PoopWep::Wep[ %key @ "B" ] ) == 1 && GetMountedItem( 0 ) != GetItemType( $PoopWep::Wep[ %key @ "B" ]) ) {
		use( $PoopWep::Wep[ %key @ "B" ] );
		$PoopWep::Tapped[ %key ] = "";
	}
	
}

function PoopWeaps140::InitBinds()	after GameBinds::Init {

	$GameBinds::CurrentMapHandle = GameBinds::GetActionMap2( "playMap.sae" );
	$GameBinds::CurrentMap = "playMap.sae";
	
	for(%i = 1; %i <= $PoopWep::DualWeps; %i++)
		GameBinds::addBindCommand( "POOP " @ $PoopWep::Wep[ %i @ "A" ] @ " " @ $PoopWep::Wep[ %i @ "B" ], "PoopWep::Use( " @ %i @ ");" );
}
 
Last edited:
i am sorry, where do i paste that? ty
Code:
$ChatHud::Lines = 5;
function setMyChatHudSize(%gui)
{
    if(%gui != "playGui")
        return;
    postAction(nameToId("SimGui::PlayDelegate"), IDACTION_CHAT_DISP_SIZE, $ChatHud::Lines);  
}
Event::Attach(eventGuiOpen, setMyChatHudSize);

Place it in

/config/Modules/ChatHudSize.acs.cs

so you will find it again, you need to create that file.
 
Last edited:
Anyone have an idea as to why this uses the kit at spawn on occasion? Do you see an ez fix? Is there a way to perhaps ad a delay to it so that it doesn't waste the kit?

Code:
function Auto::Health( ) {

	if ( $Health < 70 )
		use("Repair Kit");
	schedule::add("Auto::Health();", 1);
}

Event::Attach(eventConnected, Auto::Health);
 
i noticed that too

i just assumed it uses it occasionally because there seems to be a split second when you respawn where you have 0 energy/life

but it doesn't happen enough to bother me yet
 
this should fix that

Code:
function Auto::Health( ) {

	if ( $Health < 70 && $Health > 0 )
		use("Repair Kit");
	schedule::add("Auto::Health();", 1);
}

Event::Attach(eventConnected, Auto::Health);

Here is what I use.

Code:
function DropBlaster::AutoHealth() before nextWeapon
{
	if ( $Health < 70 )
		use("Repair Kit");
	
	drop(Blaster);
}
 
Last edited:
Is there a pilot mode script out there? Zlex's links are broken.

Is there a better way of doing it than just a toggle that ups the mouse sensitivity?
 
Code:
function Sense::On() {
	if($Sense::High != "TRUE") { Sense::Toggle(); }
}

function Sense::Off() {
	if($Sense::High == "TRUE") { Sense::Toggle(); }
}

function Sense::SetVals() {
	$Sense::Reset = "";
	$SensePref::Default = Client::getMouseSensitivity("playMap.sae");
}

function Sense::Toggle() {
	if($Sense::Init != "TRUE") {
		$Sense::Init = "TRUE";
		NewActionMap("SenseMap.sae");
		editActionMap("SenseMap.sae");
		bindCommand(keyboard0, MAKE, "space", TO, "Sense::Off();");
		if(isfile($Sense::Reset != "")) { 
			Sense::SetVals();
		}
	}
	if($Sense::High != "TRUE") {
		Sense::SetVals();
		EditActionMap("playMap.sae");
		if(Client::getMouseXaxisFlip("playMap.sae")) { bindAction(mouse0, xaxis0, TO, IDACTION_YAW, Scale, 0.2); }
		else { bindAction(mouse0, xaxis0, TO, IDACTION_YAW, Flip, Scale, 0.02); }

		if(Client::getMouseYaxisFlip("playMap.sae")) { bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Scale, 0.02); }
		else { bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Flip, Scale, 0.02); }
		
		$Sense::High = "TRUE";
		PushActionMap("SenseMap.sae");
		remoteBP(2048, "<JC><F2>Pilot Mode", 2);
	}
	else {
		EditActionMap("playMap.sae");
		if(Client::getMouseXaxisFlip("playMap.sae")) { bindAction(mouse0, xaxis0, TO, IDACTION_YAW, Scale, $SensePref::Default); }
		else { bindAction(mouse0, xaxis0, TO, IDACTION_YAW, Flip, Scale, $SensePref::Default); }

		if(Client::getMouseYaxisFlip("playMap.sae")) { bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Scale, $SensePref::Default); }
		else { bindAction(mouse0, yaxis0, TO, IDACTION_PITCH, Flip, Scale, $SensePref::Default); }
		
		$Sense::High = "";
		PopActionMap("SenseMap.sae");
		postAction(2048, IDACTION_MOVEUP, 1);
		Schedule::Add("postAction(2048, IDACTION_MOVEUP, 0.000000);",0.05);
		remoteBP(2048, "<JC><F2>Normal Mode", 2);
	}
}

function Sense::GameBinds::Init()
  after GameBinds::Init
{
	$GameBinds::CurrentMapHandle = GameBinds::GetActionMap2( "playMap.sae");
	$GameBinds::CurrentMap = "playMap.sae";
	GameBinds::addBindCommand( "Pilot Mode", "Sense::Toggle();");
}
 
Back
Top