Here, I did this as an example, so you can follow suite from it.
(defun c:PF (/ pt eLast ent)
;; Alan J. Thompson, 07.21.10
(setvar 'filletrad
(cond ((getdist (strcat "\nSpecify fillet radius <" (rtos (getvar 'filletrad)) ">: ")))
((getvar 'filletrad))
)
)
(if (setq pt (getpoint "\nSpecify start point: "))
(progn
(setq eLast (entlast))
(command "_.pline" "_non" pt)
(while (= 1 (logand (getvar 'cmdactive) 1))
(princ "\nSpecify next point: ")
(command PAUSE)
)
(or (equal eLast (setq ent (entlast)))
(command "_.fillet" "_P" ent)
)
)
)
(princ)
)