Checked in my CustomTF class builder GIB script and two example support

files.
This commit is contained in:
Brian Koropoff 2002-08-30 00:25:31 +00:00
parent 1c52bc404d
commit 976edc87fd
3 changed files with 335 additions and 0 deletions

181
doc/config/gib/cb.gib Normal file
View file

@ -0,0 +1,181 @@
// cb.gib
//
// CustomTF class builder for GIB in QuakeForge 0.5
//
// Copyright (C) 2002 Brian Koropoff
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to:
//
// Free Software Foundation, Inc.
// 59 Temple Place - Suite 330
// Boston, MA 02111-1307, USA
//
// $Id$
// Instructions:
//
// First, you'll need to load a menu for whatever server you are on,
// otherwise it won't know what items are available and where to find
// them on the custom menu. To use the provided prozac.menu, you would
// type:
// custom.load.menu prozac
//
// To load a class, get to the first page of the custom menu and use
// custom.load.class to load up a class file. To use the provided
// warlock.class, you would type:
// custom.load.class warlock
//
// To record a class, again get to the first page of the custom menu.
// Now type custom.record at the menu. This will rebind all your
// number keys to keep track of what selections you have made.
// If you decide to restart building your class, you will have to
// type custom.record again. After you have built your class,
// press 0 as usual. Instead of spawning, you will get a message
// that recording has finished. To save your class with the name
// "engy" you would then type:
// custom.record.save engy
// You can now use custom.load.class to reload your class at any
// time.
global custom
custom.load.menu_f = {
custom.menu.${custom.menu.size}.name = $1
custom.menu.${custom.menu.size}.size = 0
function "__menu" $2
__menu
custom.menu.size = (${custom.menu.size} + 1)
}
custom.load.item_f = {
local i
local n
i = ${custom.menu.size}
n = ${custom.menu.$i.size}
custom.menu.$i.$n = $1
custom.item.$1 = 1
custom.item.$1.menu = $i
custom.item.$1.number = $n
custom.menu.$i.size = ($n + 1)
}
custom.load.buy_f = {
local i
local n
ifnot ${custom.item.$1} return
i = ${custom.item.$1.menu}
n = ${custom.item.$1.number}
custom.menu.seek $i
impulse ($n+1)
wait; wait; wait
}
function custom.load.menu {
local oldm
local oldi
oldm = `function.get menu`
oldi = `function.get item`
function "menu" ${custom.load.menu_f}
function "item" ${custom.load.item_f}
custom.menu.size = 0
exec "custom/", $1, ".menu"
function "menu" $oldm
function "item" $oldi
}
function custom.load.class {
local oldb
oldb = `function.get buy`
custom.menu.cur = 0
function "buy" ${custom.load.buy_f}
exec "custom/", $1, ".class"
function "buy" $oldb
}
function custom.menu.seek {
local fw
fw = (${custom.menu.cur} < $1)
while (${custom.menu.cur} != $1) {
if $fw {
custom.menu.cur = (${custom.menu.cur} + 1)
impulse 9
wait; wait;
} else {
custom.menu.cur = (${custom.menu.cur} - 1)
impulse 8
wait; wait;
}
}
}
function custom.record.item {
local m
m = ${custom.menu.cur}
ifnot ($1 < ${custom.menu.$m.size}) return
local line
line = "buy \"", ${custom.menu.$m.$1}, "\""
custom.recording = ${custom.recording}, "\n", $line
impulse ($1+1)
}
function custom.record.seek {
local new
new = (${custom.menu.cur} + $1)
if ($new < 0 || $new >= ${custom.menu.size}) return
custom.menu.cur = $new
if ($1 < 0) {
impulse 8
} else {
impulse 9
}
}
function custom.record.stop {
bind "0" "impulse 10"
for i in `range 1 9` {
bind $i "impulse ", $i
}
echo "CustomBuild-> Recording finished"
custom.recording = "// Script recorded by CustomTF class builder",${custom.recording}
}
function custom.record {
custom.menu.cur = 0
custom.recording = ""
bind "0" "custom.record.stop"
bind "8" "custom.record.seek -1"
bind "9" "custom.record.seek 1"
for i in `range 1 7` {
bind $i "custom.record.item ",($i-1)
}
echo "CustomBuild-> Recording class. Please build a class as usual."
custom
}
function custom.record.save {
local file
file = "custom/", $1, ".class"
echo "Saving class script to ", $file, "..."
file.write $file ${custom.recording}
}
export custom.load.menu
export custom.load.class
export custom.record.item
export custom.record.seek
export custom.record.stop
export custom.record
export custom.record.save

View file

@ -0,0 +1,143 @@
menu "primary" { // Primary weapons
item "sniper rifle"
item "assult cannon"
item "rocket launcher"
item "pyro toys"
item "grenade set"
item "lightning gun"
item "light assult"
}
menu "secondary" { // Secondary weapons
item "super nailgun"
item "knife"
item "double barrel"
item "rail gun"
item "nail gun"
item "tranquilizer"
item "single barrel"
}
menu "misc" { // Misc/Extra weapons
item "mauser"
item "air-fist"
item "impulse rifle"
item "laser cannon"
}
menu "leg" { // Leg enhancements
item "cheetah"
item "cougar"
item "white rhino"
item "scrub jay"
item "kgb officer"
item "black mamba"
item "imperialpenguin"
}
menu "health" { // Health and armor
item "75 green"
item "100 yellow"
item "150 red"
item "200 red"
item "300 red"
item "+50 health"
item "+5 health"
}
menu "armor" { // Special armor/ammo
item "ceramic armor"
item "impact armor"
item "asbestos armor"
item "kevlar armor"
item "blast armor"
item "ammo backpack"
item "ammo bandolier"
}
menu "special1" { // Special items
item "scanner"
item "auto-scanner"
item "detpack"
item "medikit"
item "spy kit"
item "scuba gear"
item "grapple"
}
menu "special2" { // More special items
item "scanner jammer"
item "cyberaug unit"
item "motion sensor"
item "field generator"
item "full armor"
item "c4 tossable det"
item "dispenser"
}
menu "grenades1" { // Grenades - combat
item "normal grenades"
item "flame grenades"
item "gas grenades"
item "emp grenades"
item "frag grenades"
item "nail grenades"
item "mirv grenades"
}
menu "grenades2" { // Grenades - utility
item "flares"
item "caltrops"
item "concussion grenades"
item "flash grenades"
item "antigrav grenades"
item "bio-infection grenades"
item "krac grenades"
}
menu "engy" { // Engineering items
item "spanner"
item "sentrygun"
item "turret upgrade"
item "tesla"
item "tesla upgrade"
item "camera"
item "teleporter"
}
menu "skill1" { // Skilled profession
item "thief"
item "runner"
item "warlock"
item "chaplan"
item "berserker"
item "guerilla"
item "judoka"
}
menu "skill2" { // More professions
item "army"
item "cybernet"
item "martyr"
item "crusader"
}
menu "abilities" { // Proficiency
item "stealth"
item "highjump"
item "aspect of hwguy"
item "explosive body"
item "gymnast"
item "demon lore"
item "close combat"
}
menu "optional" { // Optional equipment
item "auto-id"
item "respawn guard"
item "hover boots"
item "boot upgrade"
item "laser guided rockets"
item "otr bullets"
item "cluster rockets"
}

View file

@ -0,0 +1,11 @@
buy "knife"
buy "white rhino"
buy "flash grenades"
buy "warlock"
buy "demon lore"
buy "close combat"
buy "150 red"
buy "+50 health"
buy "+50 health"
buy "+50 health"
buy "single barrel"