One idea:
put the particle effect call, into a while loop (maybe the one of the character) and call the effect if the sword is in use.
Next: use a variable for the kind of particle effect the sword should emit. I will name it: sword_ParticleNr
Now for each different particle effect you'll have one number, in your example:
sword_ParticleNr = 0 if its none
sword_ParticleNr = 1 if its fire
sword_ParticleNr = 2 if its ice
Now when you want to call the effect put in an if-else branch to call the right function for the right state of the sword (fire, ice)
For your keys: write two functions and attach each of it to one key:
function sword_SetFireEffect()
{
sword_ParticleNr = 1;
}
function sword_SetIceEffect()
{
sword_ParticleNr = 2;
}