Well first, Your syntax is wrong (You used = in the If operation instead of ==) -- Try this:
PHP Code:
if (playertouchsme && player.swordpower == 2)
{
hide;
}
This is hybridized though, I suggest you do:
PHP Code:
function onPlayerTouchsMe()
{
if (player.swordpower == 2)
{
hide();
}
}