Thanks for the answer!
i really couldn't answer this without seeing your tentative code, or at least pseudocode. there's always the stack to store temporary variables on, btw. though it can get unwieldly if you have branches, because then you have to PLA in two separate places.
Well the stack could be a good option. Sorry for my ignorance, but how much bytes can the stack hold? I tried to find the answer on net but I haven't found anything...
Let's say I PHA 4 bytes (twice 2 bytes) into the stack: The important thing if I understand right would be to PLA those 4 bytes by the end of my custom function in case what is already in the stack (if there is anything) would be require by another function later on ?
as for potentially free variables, Function C0/6CF3, which is called by a few event functions, uses the 1-byte $1B.
You're right. $1B seems to used to store a character number, sometimes a data from a character (such as his level) or it's even used a a counter for looping I think.
Another solution would be like you did to try to identify (potentially safe) variables that are used to store multiple things...I should start taking notes...
As for my code I haven't really worked on my function since last week and I was really absorbed in SPC composition this week. I'll post it when I'm sure it's good so that way I won't look like an idiot. I'm still learning...

Edit: Well I'm not done but here's what my code looks like. This one checks if one member of the active party has a level higher than the parameter. I would like to change the code so it would check if all members of the party have a level higher than parameter...Then I would need to store the number of people in the party somewhere (in the stack maybe?) and how many members of the party has a level higher than the parameter somewhere else ($1B?) and compare those two values when I would have looped 16 times. There might be some mistakes in my code but you should get the general idea:
TDC (zero A)
LDX $00 (zero X)
TXY (zero Y)
REP #$20 (16 bit accum./memory)
(A) LDA $0867,Y (current character's party)
AND #$0007 (check which party)
CMP $1A6D (compare A to the value of the active party stored in $1A6D)
BNE (branch to (B) if not the current party)
SEP #$20 (8 bit accum./memory)
STX $4202 (store character number as multiplier A)
LDA #$25 (character data length)
STA $4203 (store character data length as multiplier B)
REP #$20 (16 bit accum./memory)
NOP (wait for the multiplication to be done)
NOP (wait for the multiplication to be done)
LDA $4216 (store the result of the multiplication in A)
TAY (transfer A to Y)
LDA $1608,Y (load current level of the character)
SEP #$20 (8 bit accum./memory)
(E) CMP $EB (compare to parameter)
BEQ (Branch to (D) if level was initially equal or higher than parameter)
CMP #$01 (check if it looped down to level 1)
BEQ (branch to (B) if level was never equal or higher than parameter)
DEC (decrement level by 1)
BRA (Branch to (E))
(B) INX (Increment X by 1)
TXA (Transfer X to A)
BIT #$10 (Have we checked all 16 characters?)
BNE (Branch to (C) if we have checked all the characters)
STX $4202 (store next character number as multiplier A)
LDA #$29 (character data lenght)
STA $4203 (store character data length as multiplier B)
NOP (wait for the multiplication to be done)
NOP (wait for the multiplication to be done)
REP #$20 (16 bit accum./memory)
LDA $4216 (store the result of the multiplication in A)
TAY (Transfer A to Y)
BRA (Branch to (A))
(C) REP #$21
LDA $E5 (Load low and middle byte of current offset)
ADC #$0005 (Command + parameters length)
STA $E5 (Save in $E5)
TDC (Transfer D to C)
SEP #$20 (8 bit accum./memory)
ADC $E7 (Add to A $E7)
STA $E7 (Store A in $E7)
JMP $C09A6D (Make a 5 bytes jump from the command number in the event)
(D) REP #$20 (16 bit accum./memory)
LDX $EC (Load parameter 2 and 3)
STX $E5 (store the low and middle byte of the offset in $E5)
SEP #$20 (8 bit accum./memory)
LDA $EE (Load parameter 4)
CLC (clear carry)
ADC #$CA (Add #$CA to the high byte of the offset)
STA $E7 (Stre high byte of the offset in $E7)
JMP $C09A6D (Make the event branching/jumping effective)