Friends, I think I almost got it after studying all the code, I discovered where it originates infinity loop ...
I found it in the next NPC, i am increasing and playing, "NEXT; ". NOTE
But now I get an error called: script_rid2sd: fatal error ! player not attached!
My question is...