I'm planning to visit Morocco, Casablanca and want to be sure if I'll be able to use my magnetic credit card as I do not have a chip and PIN.
If EMV (the technical name for the "chip") cards are required (and in Africa, both MasterCard and VISA have implemented these), your non-chipped card will likely not work in kiosks or other such automated machines (for example, automatic card machines, vending machines, etc.)
At ATMs your card will be accepted; and most Point Of Sale should also accept your card.
However - your bank may block the transaction. So, it is best to let your bank know that you will be traveling to Morocco (and the expected dates) so that they do not block transactions.
Depending on your bank's policy, they may need to call you to confirm transactions, so make sure you have updated your contact information with the bank before you travel.