Home   Help Search Login Register  

Author Topic: Random ammo script  (Read 1127 times)

0 Members and 1 Guest are viewing this topic.

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Random ammo script
« on: 14 Jan 2004, 22:21:24 »
to use add to init

this exec "westrandom"
this exec "eastrandom"

Code: [Select]
eastrandom.sqs

#init
_this1 = _this
_count = 0
RemoveAllWeapons _this1
_this1 addWeapon "NVGoggles"
_this1 addweapon "Binocular"
#Start
~0.0001
?(Local Server):WeaponsNumber=Random 15
?(Local Server):WeaponsNumber=(WeaponsNumber+.05)-((WeaponsNumber+.05) mod 1)
PublicVariable "WeaponsNumber"

?(WeaponsNumber==0):Goto "0"
?(WeaponsNumber==1):Goto "1"
?(WeaponsNumber==2):Goto "2"
?(WeaponsNumber==3):Goto "3"
?(WeaponsNumber==4):Goto "4"
?(WeaponsNumber==5):Goto "5"
?(WeaponsNumber==6):Goto "6"
?(WeaponsNumber==7):Goto "7"
?(WeaponsNumber==0):Goto "8"
?(WeaponsNumber==1):Goto "9"
?(WeaponsNumber==2):Goto "10"
?(WeaponsNumber==3):Goto "11"
?(WeaponsNumber==4):Goto "12"
?(WeaponsNumber==5):Goto "13"
?(WeaponsNumber==6):Goto "14"
?(WeaponsNumber==7):Goto "15"
#0
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddWeapon "AK74"
_this1 SelectWeapon "AK74"
Goto "exit"
#1
_this1 AddMagazine "6g30Magazine"
_this1 AddMagazine "6g30Magazine"
_this1 AddWeapon "6G30"
_this1 SelectWeapon "6G30"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#2
_this1 AddMagazine "9K32Launcher"
_this1 AddWeapon "9K32Launcher"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddWeapon "AK74"
_this1 SelectWeapon "AK74"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#3
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddWeapon "AK74"
_this1 SelectWeapon "AK74"
_this1 AddMagazine "AT4Launcher"
_this1 AddWeapon "AT4Launcher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#4
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddWeapon "Bizon"
_this1 selectWeapon "Bizon"
_this1 AddMagazine "Pipebomb"
_this1 AddMagazine "Pipebomb"
_this1 AddMagazine "Pipebomb"
_this1 AddWeapon "Pipebomb"
Goto "exit"
#5
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddMagazine "BizonMag"
_this1 AddWeapon "Bizon"
_this1 selectWeapon "Bizon"
Goto "exit"
#6
_this1 AddMagazine "PK"
_this1 AddMagazine "PK"
_this1 AddMagazine "PK"
_this1 AddWeapon "PK"
_this1 SelectWeapon "PK"
_this1 AddMagazine "RPGLauncher"
_this1 AddWeapon "RPGLauncher"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#7
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddWeapon "AK74"
_this1 SelectWeapon "AK74"
_this1 AddMagazine "RPGLauncher"
_this1 AddWeapon "RPGLauncher"
_this1 AddMagazine "Mine"
_this1 AddMagazine "Mine"
_this1 AddMagazine "Mine"
Goto "exit"
#8
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddWeapon "AK74"
_this1 SelectWeapon "AK74"
_this1 AddMagazine "RPGLauncher"
_this1 AddMagazine "RPGLauncher"
_this1 AddWeapon "RPGLauncher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#9
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddMagazine "AK74"
_this1 AddWeapon "AK74"
_this1 SelectWeapon "AK74"
_this1 AddMagazine "RPGLauncher"
_this1 AddMagazine "RPGLauncher"
_this1 AddWeapon "RPGLauncher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#10
#AddMagazine
_this1 AddMagazine "SVDDragunov"
_count = _count  + 1
? (_count < 8):goto "AddMagazine"
_this1 AddWeapon "SVDDragunov"
_this1 SelectWeapon "SVDDragunov"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#11
_this1 AddMagazine "M4"
_this1 AddMagazine "M4"
_this1 AddMagazine "M4"
_this1 AddMagazine "M4"
_this1 AddMagazine "M4"
_this1 AddWeapon "XMS"
_this1 selectWeapon "XMS"
_this1 AddMagazine "RPGLauncher"
_this1 AddMagazine "RPGLauncher"
_this1 AddWeapon "RPGLauncher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#12
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddWeapon "Steyr"
_this1 SelectWeapon "Steyr"
_this1 AddMagazine "RPGLauncher"
_this1 AddMagazine "RPGLauncher"
_this1 AddWeapon "RPGLauncher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#13
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddWeapon "Steyr"
_this1 selectWeapon "Steyr"
_this1 AddMagazine "RPGLauncher"
_this1 AddMagazine "RPGLauncher"
_this1 AddWeapon "RPGLauncher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#14
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddWeapon "Steyr"
_this1 SelectWeapon "Steyr"
_this1 AddMagazine "AT4Launcher"
_this1 AddWeapon "AT4Launcher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#15
_this1 AddMagazine "9K32Launcher"
_this1 AddWeapon "9K32Launcher"
_this1 AddMagazine "SteyrMag"
_this1 AddMagazine "SteyrMag"
_this1 AddWeapon "Steyr"
_this1 SelectWeapon "Steyr"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#exit
exit

Code: [Select]
westrandom.sqs

#init
_this1 = _this
_count = 0
RemoveAllWeapons _this1
_this1 addWeapon "NVGoggles"
_this1 addweapon "Binocular"
#Start
~0.0001
?(Local Server):WeaponsNumber=Random 11
?(Local Server):WeaponsNumber=(WeaponsNumber+.05)-((WeaponsNumber+.05) mod 1)
PublicVariable "WeaponsNumber"

?(WeaponsNumber==0):Goto "0"
?(WeaponsNumber==1):Goto "1"
?(WeaponsNumber==2):Goto "2"
?(WeaponsNumber==3):Goto "3"
?(WeaponsNumber==4):Goto "4"
?(WeaponsNumber==5):Goto "5"
?(WeaponsNumber==6):Goto "6"
?(WeaponsNumber==7):Goto "7"
?(WeaponsNumber==0):Goto "8"
?(WeaponsNumber==1):Goto "9"
?(WeaponsNumber==2):Goto "10"
?(WeaponsNumber==3):Goto "11"
#0
_this1 AddMagazine "M60"
_this1 AddMagazine "M60"
_this1 AddMagazine "M60"
_this1 AddWeapon "M60"
_this1 selectWeapon "M60"
_this1 AddMagazine "LAWLauncher"
_this1 AddWeapon "LAWLauncher"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#1
_this1 AddMagazine "LAWLauncher"
_this1 AddMagazine "LAWLauncher"
_this1 AddWeapon "LAWLauncher"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddWeapon "beretta"
_this1 selectWeapon "beretta"
Goto "exit"
#2
_this1 AddMagazine "CarlGustavLauncher"
_this1 AddWeapon "CarlGustavLauncher"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddWeapon "beretta"
_this1 selectWeapon "beretta"
Goto "exit"
#3
_this1 AddMagazine "LAWLauncher"
_this1 AddMagazine "LAWLauncher"
_this1 AddWeapon "LAWLauncher"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddWeapon "beretta"
_this1 selectWeapon "beretta"
Goto "exit"
#4
_this1 AddMagazine "AALauncher"
_this1 AddWeapon "AALauncher"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddWeapon "beretta"
_this1 selectWeapon "beretta"
Goto "exit"
#5
_this1 AddMagazine "M4"
_this1 AddMagazine "M4"
_this1 AddMagazine "M4"
_this1 AddMagazine "M4"
_this1 AddMagazine "M4"
_this1 AddWeapon "XMS"
_this1 selectWeapon "XMS"
_this1 AddMagazine "LAWLauncher"
_this1 AddMagazine "LAWLauncher"
_this1 AddWeapon "LAWLauncher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#6
_this1 AddMagazine "M16"
_this1 AddMagazine "M16"
_this1 AddMagazine "M16"
_this1 AddMagazine "M16"
_this1 AddMagazine "M16"
_this1 AddWeapon "M16"
_this1 selectWeapon "M16"
_this1 AddMagazine "LAWLauncher"
_this1 AddMagazine "LAWLauncher"
_this1 AddWeapon "LAWLauncher"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#7
#AddMagazine
_this1 AddMagazine "M21"
_count = _count  + 1
? (_count < 8):goto "AddMagazine"
_this1 AddWeapon "M21"
_this1 selectWeapon "M21"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#8
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddWeapon "HK"
_this1 selectWeapon "HK"
Goto "exit"
#9
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddMagazine "HK"
_this1 AddWeapon "HK"
_this1 selectWeapon "HK"
_this1 AddMagazine "Pipebomb"
_this1 AddMagazine "Pipebomb"
_this1 AddMagazine "Pipebomb"
_this1 AddWeapon "Pipebomb"
Goto "exit"
#10
_this1 AddMagazine "MM1magazine"
_this1 AddWeapon "MM1"
_this1 SelectWeapon "MM1"
_this1 AddMagazine "HandGrenade"
_this1 AddMagazine "HandGrenade"
Goto "exit"
#11
_this1 AddMagazine "LAWLauncher"
_this1 AddWeapon "LAWLauncher"
_this1 AddMagazine "Mine"
_this1 AddMagazine "Mine"
_this1 AddMagazine "Mine"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddMagazine "berettaMag"
_this1 AddWeapon "beretta"
_this1 selectWeapon "beretta"
Goto "exit"
#exit
exit

Offline WizzyWig

  • Members
  • *
  • Mod Maker
    • Oblivion Promotions
Re:Random ammo script
« Reply #1 on: 15 Jan 2004, 03:20:07 »
Ok trying to get my ammo scripts working as a global (side selection) i have looked at other scripts and i have so far made this donno if its correct please cast your eyes over and help if you can. donno if i need a game logic server.

Please help

Code: [Select]
;Im running useing "[] exec "InitRandom\randomguns.sqs".
_side = _this Select 0

? (_side == east):goto "RandomEast"

#RandomWest

hint "west"
;_this1 exec "InitRandom\RandomWest.sqs"
exit

#RandomEast
hint "east"
;_this1 exec "InitRandom\RandomEast.sqs"