git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2414 e016b1c5-ed68-44aa-a2f7-31cac88cffde
132 lines
3.7 KiB
INI
132 lines
3.7 KiB
INI
// bot menus and tools
|
|
|
|
alias tmp_botskill good
|
|
alias tmp_numbots 1
|
|
alias tmp_mode
|
|
alias tmp_botmap
|
|
|
|
// add bots
|
|
alias startbotmatch [
|
|
|
|
if (= $tmp_mode 7) [ // TDM
|
|
alias numrvsf (- (div $tmp_numbots 2) (curteam))
|
|
alias numcla (- (div $tmp_numbots 2) (= (curteam) 0))
|
|
addnbot $numrvsf RVSF $tmp_botskill
|
|
addnbot $numcla CLA $tmp_botskill
|
|
] [ // DM
|
|
addnbot $tmp_numbots
|
|
]
|
|
]
|
|
|
|
// register events and change map
|
|
alias startbotmap [
|
|
if $connected [ disconnect ] // async
|
|
sleep 1000 [
|
|
echo starting botmatch..
|
|
|
|
// register event that is fired during mapload
|
|
alias mapstartonce [
|
|
kickallbots
|
|
startbotmatch // add bots
|
|
]
|
|
|
|
mode $tmp_mode
|
|
map $tmp_botmap
|
|
]
|
|
]
|
|
|
|
|
|
alias emptymap [ if $connected [ disconnect; sleep 1000 [ emptymap2 ] ] [ emptymap2 ] ]
|
|
alias emptymap2 [
|
|
mode 0
|
|
showmenu maps ]
|
|
|
|
newmenu singleplayer
|
|
|
|
// teamplay not mature yet
|
|
menuitem "Bot Team Deathmatch" "alias tmp_mode 7; showmenu botskill"
|
|
menuitem "Bot Deathmatch" "alias tmp_mode 8; showmenu botskill"
|
|
menuitem "Bot One Shot, One Kill" "alias tmp_mode 12; showmenu botskill"
|
|
menuitem "Empty Map" "emptymap"
|
|
|
|
newmenu botskill
|
|
|
|
alias showmenu_enemies [ if (= $tmp_mode 7) [ showmenu "team enemies" ] [ showmenu enemies ] ]
|
|
menuitem "best" "alias tmp_botskill best; showmenu_enemies"
|
|
menuitem "good (default)" "alias tmp_botskill good; showmenu_enemies"
|
|
menuitem "medium" "alias tmp_botskill medium; showmenu_enemies"
|
|
menuitem "worse" "alias tmp_botskill worse; showmenu_enemies"
|
|
menuitem "bad" "alias tmp_botskill bad; showmenu_enemies"
|
|
|
|
|
|
alias genenemyitems [
|
|
loop i (listlen $arg1) [
|
|
alias numplayers (at $arg1 $i)
|
|
if (= $arg2 0) [ // DM
|
|
alias numplayers (- $numplayers 1) // don't count yourself as enemy
|
|
if (= $numplayers 1) [
|
|
alias menutext (concat $numplayers enemy)
|
|
] [
|
|
alias menutext (concat $numplayers enemies)
|
|
]
|
|
] [ // TDM
|
|
alias teamsize (div $numplayers 2)
|
|
alias menutext (concatword $teamsize on $teamsize)
|
|
]
|
|
menuitem $menutext (concat "alias tmp_numbots" $numplayers "; showmenu botmaps")
|
|
]
|
|
]
|
|
|
|
newmenu enemies
|
|
genenemyitems "2 3 5 9 17 33" 0
|
|
|
|
newmenu "team enemies"
|
|
genenemyitems "2 4 6 8 16 32" 1
|
|
|
|
newmenu "Creating bot waypoints"
|
|
|
|
menuitem "Waypoints..." [ showmenu "Waypoints" ]
|
|
menuitem "Paths..." [ showmenu "Paths" ]
|
|
menuitem "Other operations..." [ showmenu "Other bot operations" ]
|
|
menuitem """"
|
|
menuitem "Flood map with waypoints" "wpflood"
|
|
menuitem "Save bot waypoints" "wpsave"
|
|
|
|
|
|
newmenu Waypoints
|
|
|
|
menuitem "Add a waypoint" "addwp 0"
|
|
menuitem "Add auto-connecting waypoint" "addwp 1"
|
|
menuitem """"
|
|
menuitem "Delete a waypoint" "delwp"
|
|
menuitem "Delete all waypoints" [ showmenu "Delete all waypoints?" ]
|
|
|
|
|
|
newmenu Paths
|
|
|
|
menuitem "Create Start of 2-way path" "addpath2way1"
|
|
menuitem "Create End of 2-way path" "addpath2way2"
|
|
menuitem "Delete Start of 2-way path" "delpath2way1"
|
|
menuitem "Delete End of 2-way path" "delpath2way2"
|
|
menuitem """"
|
|
menuitem "Create Start of 1-way path" "addpath1way1"
|
|
menuitem "Create End of 1-way path" "addpath1way2"
|
|
menuitem "Delete Start of 1-way path" "delpath1way1"
|
|
menuitem "Delete End of 1-way path" "delpath1way2"
|
|
|
|
|
|
newmenu "Other bot operations"
|
|
|
|
menuitem "Set waypoint as jumpable" "setjumpwp"
|
|
menuitem "Unset waypoint as jumpable" "unsetjumpwp"
|
|
menuitem "Set waypoint direction (yaw)" "setwpyaw"
|
|
menuitem """"
|
|
menuitemslider "Waypoint visibility: " 0 1 "($wpvisible)" 1 ["Hide waypoints" "Show waypoints"] "wpvisible $arg1"
|
|
menuitemslider "Select/place waypoints by: " 0 1 "($xhairwpsel)" 1 ["Your current location" "Clicking a point on the grid"] "xhairwpsel $arg1"
|
|
|
|
|
|
newmenu "Delete all waypoints?"
|
|
|
|
menuitem "Yes, delete all waypoints" "wpclear"
|
|
menuitem "No. Leave my waypoints alone!" "showmenu botedit"
|