The script call to check a weapon ID is
$gameActors.actor(actor_id).equips()[slot_id] == null;
*change null to id
I'm not 100% sure how to reference this in a damage formula. However, without using plugins, I think you would just need a condition in the damage formula to check if the user has a dagger equipped.
So if the weapon name is 'Dagger' then you could try
a.equips()[0] == dagger ? b.addState(x);
formula here :
formula here
I'm not sure about the syntax though. I did a google search and I couldn't find anything specific to damage formulas, only script calls.
Here is a link to the
master script call list. Under the battle section you can see script calls that reference checks for weapons and weapon types.