You've got about 99% of the work already done (if I'm understanding correctly)
Code:
on *:text:*blah*:#:{
  var %name = $strip($$6), %section = $strip($$3)
  if %section == BLAH {
    if list isin %name {
      var %apple = blah, %pears = blah, %passionfruit = blah, %cherries = %blah, %plums  = blah
      /window -zk0 @blah
      /aline -p @blah some text and vars here
      ; Line
      ;some  code here
      }
    } 
  }
}


That's the best I can do with what you provided. Hopefully it'll be enough. Suggested reading /help if/elseif/else