//LadderSwitch.zs for NJF by ZoriaRPG - 26-JULY-2016. //v0.2 const int LADDER_REG = 3; const int LADDER_REG_DMAP = 0; const int LADDER_REG_SCREEN = 0x60; item script LadderPickup{ void run(){ Game->SetDMapScreenD(LADDER_REG_DMAP, LADDER_REG_SCREEN, LADDER_REG, 1); } } int OwnsLadder(){ return Game->GetDMapScreenD(LADDER_REG_DMAP, LADDER_REG_SCREEN, LADDER_REG); } global script ActiveLadder{ void run(){ while(true){ if ( OwnsLadder() ) LadderSwitch(); Waitdraw(); Waitframe(); } } } void LadderSwitch() { int ft[]="AllowLadder"; int ff = GetFFCScript(ft); int q; ffc f; bool allow; for ( q = 1; q <= 32, q++ ) { f = Screen->LoadFFC(q); if ( f->Script = ff ) { allow = true } } if ( allow && !Link->Item[I_LADDER] ) { Link->Item[I_LADDER] = true; } else { if ( Link->Item[I_LADDER] ) Link->Item[I_LADDER] = false; } } ffc script AllowLadder{ void run(){ while(true) Waitframe(); } }