09 Sep 11, 06:20PM
Ok, I've been working on this script for a almost a week now. I've had input from my clan mates and some people I trust to be nice. I'd like to see what the community thinks about this script. It's under on going development, but I don't foresee any more major changes. I would like to include the logic of this script in a cfg file but am ignorant as to there use. Feel free to push, prick, prod, dissect and otherwise criticize this script. Thanks.
If for some reason you want to see where this all started visit my clan's website: Crosshair Switcher by Verse
If for some reason you want to see where this all started visit my clan's website: Crosshair Switcher by Verse
[SELECT ALL] Code:
// Crosshair Switcher by Verse version 0.31
// With inspiration from Ronald_Reagan
// This script allows you to set the type and size of each
// weapons' crosshair.
// You can to cusumize the section labled "B I N D S" and the
// section labeled "S E T T I N G S"to fit your needs
//------------------- B I N D S ------------------------
//This script is designed to use these binds. Customize
//these binds to fit your needs. To the best of my
//knowledge these binds will not interfere with mapping.
//MOUSE1 is exicuted on left-click
bind "MOUSE1" [ mouse1Click ]
//MOUSE2 is exicuted on right-click
bind "MOUSE2" [ mouse2Click ]
//MOUSE3 is exicuted on middle click
bind "MOUSE3" [ mouse3Click ]
//MOUSE4 is exicuted by scrolling up on the mouse
//scroll wheel
bind "MOUSE4" [ mouse4ScrollUp]
//MOUSE5 is exicuted by scrolling down on the mouse
//scroll wheel
bind "MOUSE5" [ mouse5ScrollDown]
//The following binds are usually 1, 2, and 4
//respectivly. I prefer A, Z and Q as they are more
//effective for me.
bind "1" [primaryCustCrosshair]
bind "2" [secondaryCustCrosshair]
bind "3" [grenadesCustCrosshair]
bind "4" [meleeCustCrosshair]
//-------------- S E T T I N G S ----------------
//INSTRUCTIONS FOR SETTING CROSSHAIR SIZE AND TYPE
// SIZE
// To change a weapon's size you change the number under
// "CROSSHAIR SIZE" in that weapons row. The range is
// from 0 to 50.
// Note: the sniper is only included to keep the script
// congruent, it fills no purpose and thus the size is 0.
// TYPE
// To change the crosshair type, you put the name of the
// crosshair you would like under under 'CROSSHAIR TYPE' in
// that weapons row. The file you would like to use must
// be in the crosshairs folder. A list of the standard
// crosshairs and their discriptions is provided.
// For example
// if you want to change your knife crosshair to
// a circle with a dot in the middle. You look for
// 'o_dot.png' on the "CROSSHAIR LIST.
// Then you scroll down to "WEAPON SETTINGS". Once there
// you set "CROSSHAIR SIZE" of your knife to 50 and .
//----------------------- C R O S S H A I R L I S T ---------------------------
// CROSSHAIR TYPE DESCRIPTION
//------------------------------------------------------------------------------
// cube.png Vertial and Horizontal X
// default.png Same as cube.png but with an empty middle
// dot.png White dot
// dot_wide.png White dot with 'T's at the outer edges
// o.png Circle
// o_dot.png Circle with a dot
// o_x.png Combination of o.png and default.png
// red_dot.png Red Dot
// star.png A small circular dot with short vertial and horizontal lines
// wide.png Dot_wide, without the dot
// x-dot.png Default.png with a dot in the middle
// custom Anycustom crosshair in the 'crosshairs' folder
//-------------------- W E A P O N S E T T I N G S --------------------------------
// WEAPON CROSSHAIR SIZE CROSSHAIR TYPE
// NAME \/ |--------------|
//--------------------------------------------------------------------------------------
Setting_Knife = [ alias size 50; alias crosshairType o_x.png ]
Setting_Pistol = [ alias size 30; alias crosshairType dot_wide.png ]
Setting_Carabine = [ alias size 12; alias crosshairType dot_wide.png ]
Setting_Shotgun = [ alias size 50; alias crosshairType o_dot.png ]
Setting_SubmachineGun = [ alias size 20; alias crosshairType dot_wide.png ]
Setting_AssaultRifle = [ alias size 12; alias crosshairType dot_wide.png ]
Setting_Grenade = [ alias size 30; alias crosshairType dot_wide.png ]
Setting_Akimbo = [ alias size 30; alias crosshairType dot_wide.png ]
Setting_Sniper = [ alias size 00; alias crosshairType dot_wide.png ]
//END OF SETTINGS
//------------------------WARNING-----------------------
// Changing anything below this message could cause this
// script to stop working.
// On the other hand if you want to play with this scipt
// this where the fun stuff starts
// HAVE FUN!!!
//----------------------END WARNING---------------------
alias setCrosshair [
//size
alias size = 15
alias crosshairType = 0
//knife 0
if (= 0 (curweapon)) [Setting_Knife] [
//pistol 1
if (= 1 (curweapon)) [Setting_Pistol] [
//carbine 2
if (= 2 (curweapon)) [Setting_Carabine] [
//shotgun 3
if (= 3 (curweapon)) [Setting_Shotgun] [
//subM 4
if (= 4 (curweapon)) [Setting_SubmachineGun] [
//assaultR 6
if (= 6 (curweapon)) [Setting_AssaultRifle] [
//grenade 8
if (= 8 (curweapon)) [Setting_Grenade] [
//akimbo 9
if (= 9 (curweapon)) [Setting_Akimbo] [
//sniper 5
if (= 5 (curweapon)) [Setting_Sniper]
] ] ] ] ] ] ] ]
setCrosshairAction $size $crosshairType
]
alias mouse1Click [
attack
resetAfterEvent
]
alias mouse2Click [
if $editing [
showmenu editing
] [
altaction
resetAfterEvent
]
]
alias mouse3Click [
weapon
sleepSetCrosshair
]
alias mouse4ScrollUp [
universaldelta 1
sleepSetCrosshair
]
alias mouse5ScrollDown [
universaldelta -1
sleepSetCrosshair
]
//END BINDS
//DIRECT SELECT
//These allow direct selection of primary weapon, pistol,
//knife, and grenades weapons in game
alias primaryCustCrosshair [
setWeapon (currentprimary)
sleepSetCrosshair
]
alias meleeCustCrosshair [
setWeapon 0
sleepSetCrosshair
]
alias secondaryCustCrosshair [
setWeapon 1
sleepSetCrosshair
]
alias grenadesCustCrosshair [
setWeapon 8
resetAfterEvent
]
alias resetAfterEvent [
alias count 0
while [ (< $count 2051) ] [
alias i 0
sleep $count [
setCrosshair
]
alias count (+ $count 50)
]
]
//This codeblock is used by DIRECT SELECT
alias setWeapon [
num = $arg1
// Knife 0
if (= $num 0) [
melee
] [
// Pist 1
if (= $num 1) [
secondary
] [
// Cbine 2
if (= $num 2) [
primary
] [
// Shot 3
if (= $num 3) [
primary
] [
// subM 4
if (= $num 4) [
primary
] [
// snipe 5
if (= $num 5) [
primary
] [
// AR 6
if (= $num 6) [
primary
] [
// nade 8
if (= $num 8) [
grenades
] [
// akimbo 9
if (= $num 9) [
secondary
] [ ] ] ] ] ] ] ] ] ]
]
//END DIRECT SELECT
//SETCROSSHAIR
//This code block allows you to customize the size and shape
//of every crosshair for every weapon. See instructions
//below under "Set CrosshairType"
alias sleepSetCrosshair [
sleep 300 [setCrosshair]
]
alias setCrosshairAction [
crosshairsize $arg1
loadcrosshair $arg2
]
//END Crosshair Switcher by Verse