Maybe you can look at this one and see how it build.
Script Name: RKUltraPetFighter.txt
; Author: Roadkill
; Version: 1.2
; Client Tested with: 4.0.6a patch34
; EUO version tested with: build 009D
; Shard OSI / FS: OSI
; Revision Date: 29Dec04
; Public Release: 29Nov04
; Global Variables Used: *RKPF . #charid
; Purpose: Absolutely Indespensible for hunting with Pets! Up to 5 pets, auto-vetting,auto-attack