The main issue I see in this regard would be the "ignoring walls" bit. But, if I had to take a quick, untested stab at it, I would probably write something like:
Code:
bool isFairy = false;
bool inFairy = false;
const int fairyItem = 1234; //for the sprite modification
global script slot2 {
void run() {
while(true) {
if(isFairy()) doFairy();
Waitframe();
}
}
void doFairy() {
if(!inFairy) {
Link->Item[fairyItem] = true;
Link->Action = LA_NONE;
inFairy = true;
}
if(Link->InputUp) {
Link->Dir = DIR_UP;
if(Link->Y > 3) Link->Y -= 2;
}
if(Link->InputDown) {
Link->Dir = DIR_DOWN;
if(Link->Y < 173) Link->Y += 2;
}
if(Link->InputLeft) {
Link->Dir = DIR_LEFT;
if(Link->X > 3) Link->X -= 2;
}
if(Link->InputRight) {
Link->Dir = DIR_RIGHT;
if(Link->X < 253) Link->X += 2;
}
if(Link->InputA) {
Link->Item[fairyItem] = false;
inFairy = false;
isFairy = false;
}
}
}
item script fairySpell {
void run() {
isFairy = true;
}
}
Warning: Totally untested or syntax checked.
You need to make two items: one is the spell (which gets the item script above), and the other is a hidden item which serves only to modify Link's sprite. Put the sprite item's ID into the constant in the script at the top.